Index: openafs/src/LICENSE
diff -c openafs/src/LICENSE:1.1.20.1 openafs/src/LICENSE:1.1.20.2
*** openafs/src/LICENSE:1.1.20.1	Fri Apr 15 15:03:25 2005
--- openafs/src/LICENSE	Mon Feb 27 15:18:34 2006
***************
*** 690,692 ****
--- 690,694 ----
   * 2550 Garcia Avenue
   * Mountain View, California  94043
   */
+ 
+ src/afs/LINUX/osi_flush.s included code under IBM Public License with permission of the author, Paul MacKerras.
Index: openafs/src/JAVA/classes/.classpath
diff -c /dev/null openafs/src/JAVA/classes/.classpath:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:20 2006
--- openafs/src/JAVA/classes/.classpath	Fri Oct 14 22:14:09 2005
***************
*** 0 ****
--- 1,6 ----
+ <?xml version="1.0" encoding="UTF-8"?>
+ <classpath>
+ 	<classpathentry kind="src" path=""/>
+ 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ 	<classpathentry kind="output" path=""/>
+ </classpath>
Index: openafs/src/JAVA/classes/.project
diff -c /dev/null openafs/src/JAVA/classes/.project:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:20 2006
--- openafs/src/JAVA/classes/.project	Fri Oct 14 22:14:09 2005
***************
*** 0 ****
--- 1,17 ----
+ <?xml version="1.0" encoding="UTF-8"?>
+ <projectDescription>
+ 	<name>JAVA-openafs</name>
+ 	<comment></comment>
+ 	<projects>
+ 	</projects>
+ 	<buildSpec>
+ 		<buildCommand>
+ 			<name>org.eclipse.jdt.core.javabuilder</name>
+ 			<arguments>
+ 			</arguments>
+ 		</buildCommand>
+ 	</buildSpec>
+ 	<natures>
+ 		<nature>org.eclipse.jdt.core.javanature</nature>
+ 	</natures>
+ </projectDescription>
Index: openafs/src/JAVA/classes/ErrorMessages.properties
diff -c openafs/src/JAVA/classes/ErrorMessages.properties:1.2 openafs/src/JAVA/classes/ErrorMessages.properties:1.2.2.1
*** openafs/src/JAVA/classes/ErrorMessages.properties:1.2	Thu Jun 19 12:53:13 2003
--- openafs/src/JAVA/classes/ErrorMessages.properties	Fri Oct 14 22:14:09 2005
***************
*** 12,37 ****
  E1004 = Operation was forced to abort
  
  #-----------------------------------------------------------
- # Internal JAFS Error Codes
- #-----------------------------------------------------------
- E1050 = Could not allocate memory.
- E1051 = Could not find specified Java class.
- E1052 = Could not find specified Java method.
- E1053 = Could not find specified Java field.
- E1054 = Invalid argument value, argument is NULL.
- E1055 = Username provided is NULL.
- E1056 = Password provided is NULL.
- E1057 = Group name provided is NULL.
- E1058 = Group owner provided is NULL.
- E1059 = Volume name provided is NULL.
- E1060 = Partition name provided is NULL.
- E1061 = Process name provided is NULL.
- E1062 = Server name provided is NULL.
- E1063 = Cell name provided is NULL.
- E1064 = Invalid path name provided, path is NULL.
- E1065 = Invalid ACL provided, string is NULL.
- 
- #-----------------------------------------------------------
  # Standard UNIX Error Codes
  #-----------------------------------------------------------
  E1   = Operation not permitted
--- 12,17 ----
Index: openafs/src/JAVA/classes/testAFS.java
diff -c /dev/null openafs/src/JAVA/classes/testAFS.java:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:20 2006
--- openafs/src/JAVA/classes/testAFS.java	Fri Oct 14 22:14:09 2005
***************
*** 0 ****
--- 1,684 ----
+ import java.io.File;
+ import java.util.GregorianCalendar;
+ 
+ import org.openafs.jafs.*;
+ 
+ 
+ 
+ /**
+  * @version 	1.0
+  * @author
+  */
+ public class testAFS
+ {
+ 	public class TesterThread implements Runnable
+ 	{
+ 		private String user = null;
+ 		private String pass = null;
+ 		private String cell = null;
+ 		private boolean letItRun = true;
+ 
+ 		public TesterThread(String user, String pass, String cell)
+ 		{
+ 			this.user = user;
+ 			this.pass = pass;
+ 			this.cell = cell;
+ 		}
+ 		public void finish()
+ 		{
+ 			letItRun = false;
+ 		}
+ 		public void run()
+ 		{
+ 			while(letItRun)
+ 			{
+ 				try
+ 				{
+ 					Token t = new Token(user, pass, cell);
+ 					Cell c = new Cell(t, false);
+ 					c.getInfo();
+ 	
+ 					for(int j=0; j<100; j++)
+ 					{
+ 						ACL acl = new ACL("/afs/." + cell, true);
+ 					}
+ 
+ 					c.close();
+ 				} catch(Exception e) {
+ 					e.printStackTrace();
+ 				}
+ 				Thread.yield();
+ 			}
+ 		}
+ 	}
+ 	
+ 	
+ 	static java.io.PrintStream out = System.out;
+ 	static String firstCellPathRW = null;
+ 
+ 	static boolean allowDump = true;
+ 	
+ 	static int ident = 0;
+ 
+ 	static void DumpBegin()
+ 	{
+ 		if (allowDump)
+ 		{
+ 			for(int i=0; i<ident; i++)
+ 				out.print("   ");
+ 		}
+ 	}
+ 	static void Dump(String str)
+ 	{
+ 		if (allowDump)
+ 			out.print(str);
+ 	}
+ 	static void DumpEnd()
+ 	{
+ 		if (allowDump)
+ 			out.println();
+ 	}
+ 	static void DumpLn(String str)
+ 	{
+ 		DumpBegin();
+ 		Dump(str);
+ 		DumpEnd();
+ 	}
+ 
+ 	public static String getGregDateStr(GregorianCalendar gc)
+ 	{
+ 		if (gc==null)
+ 			return "null";
+ 		else
+ 			return gc.getTime().toString();
+ 	}
+ 
+ 	public static void DumpToken(Token t)
+ 	{
+ 		try
+ 		{
+ 			DumpLn("Token: user=" + t.getUsername() +
+ 					" cell=" + t.getCellName() + " expiration=" + t.getExpiration());
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 	}
+ 
+ 	public static void DumpFile(org.openafs.jafs.File f)
+ 	{
+ 		try
+ 		{
+ 			DumpBegin();
+ 			f.refresh();
+ 			Dump("File name: " + f.getPath() + ": ");
+ 			if (f.isDirectory()) {
+ 				Dump("This is a directory.");
+ 			} else if (f.isLink()) {
+ 				Dump("This is a symbolic-link.");
+ 				Dump(" Its target is: " + f.getTarget());
+ 				f.validate();
+ 				if (f.isFile()) {
+ 					Dump(" This object is now a file!");
+ 				} else if (f.isDirectory()) {
+ 					Dump(" This object is now a directory!");
+ 				} else if (f.isMountPoint()) {
+ 					Dump(" This object is now a volume mount point!");
+ 				}
+ 			} else if (f.isMountPoint()) {
+ 				Dump(" This is a volume mount point.");
+ 			} else if (f.isFile()) {
+ 				Dump(" This is a file. Size: " + f.length());
+ 			}
+ 			DumpEnd();
+ 
+ 			ACL acl = new ACL(f.getPath());
+ 			ident++;
+ 			DumpLn(acl.toString());
+ 			ident--;
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 	}
+ 
+ 	public static void DumpCell(Cell cell)
+ 	{
+ 		try
+ 		{
+ 			DumpLn("Cell: " + cell.getName());
+ 			ident++;
+ 			DumpLn("MaxGroupID: " + cell.getMaxGroupID());
+ 			DumpLn("MaxUserID: " + cell.getMaxUserID());
+ 			ident--;
+ 	
+ 			//test some queries, don't write to output
+ 			cell.getInfo();
+ 			cell.getInfoGroups();
+ 			cell.getInfoServers();
+ 			cell.getInfoUsers();
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 	}
+ 
+ 	public static void DumpServer(Server s)
+ 	{
+ 		DumpLn("Server: " + s.getName());
+ 		ident++;
+ 		try
+ 		{
+ 			try //pServer'SLES9 bug:
+ 			{
+ 				DumpLn("BinaryRestartTime: " + s.getBinaryRestartTime());
+ 			} catch(AFSException e) {
+ 				e.printStackTrace();
+ 			}
+ 			DumpLn("TotalFreeSpace:" + s.getTotalFreeSpace());
+ 			DumpLn("TotalSpace:" + s.getTotalSpace());
+ 			DumpLn("TotalUsedSpace:" + s.getTotalUsedSpace());
+ 			DumpLn("GeneralRestartTime:" + s.getGeneralRestartTime());
+ 			DumpBegin();
+ 			Dump("ip addresses: ");
+ 			String[] ipAddrs = s.getIPAddresses();
+ 			for(int i=0; i<ipAddrs.length; i++)
+ 			{
+ 				Dump(ipAddrs[i] + " ");
+ 			}
+ 			DumpEnd();
+ 			DumpBegin();
+ 			Dump("isFileServer: " + s.isFileServer());
+ 			Dump(" isBadFileserver: " + s.isBadFileServer());
+ 			Dump(" isDatabase: " + s.isDatabase());
+ 			Dump(" isBadDatabase: " + s.isBadDatabase());
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}			
+ 		ident--;
+ 
+ 		try
+ 		{
+ 			//test some queries, don't write to output
+ 			s.getInfo();
+ 			try
+ 			{
+ 				s.getInfoKeys();
+ 			} catch(AFSException e) {
+ 				e.printStackTrace();
+ 			}
+ 			try	//is there any partitions? why parts can be null...
+ 			{	//wrong programming concept: null instead of an empty array !!!
+ 				s.getInfoPartitions();
+ 			} catch(Exception e) {
+ 				e.printStackTrace();
+ 			}
+ 			s.getInfoProcesses();
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 	}
+ 
+ 	public static void DumpVolume(Volume v)
+ 	{
+ 		try
+ 		{
+ 			DumpBegin();
+ 			Dump("Volume name: " + v.getName());
+ 			Dump(" ID: " + v.getID());
+ 			DumpEnd();
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 
+ 		ident++;
+ 		try
+ 		{
+ 			DumpBegin();
+ 			Dump("BackupID: " + v.getBackupID());
+ 			Dump(" ReadOnlyID: " + v.getReadOnlyID());
+ 			Dump(" ReadWriteID: " + v.getReadWriteID());
+ 			DumpEnd();
+ 			DumpBegin();
+ 			Dump("LastUpdateDate: " + getGregDateStr(v.getLastUpdateDate()));
+ 			Dump(" CreationDate: " + getGregDateStr(v.getCreationDate()));
+ 			Dump(" AccessesSinceMidnight: " + v.getAccessesSinceMidnight());
+ 			DumpEnd();
+ 			DumpBegin();
+ 			Dump("FileCount: " + v.getFileCount());
+ 			Dump(" CurrentSize: " + v.getCurrentSize());
+ 			Dump(" TotalFreeSpace: " + v.getTotalFreeSpace());
+ 			DumpEnd();
+ 			DumpBegin();
+ 			Dump("Type: " + v.getType());
+ 			Dump(" Disposition: " + v.getDisposition());
+ 			DumpEnd();
+ 			
+ 			//test some queries, don't write to output
+ 			v.getInfo();
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 		ident--;
+ 	}
+ 
+ 	public static void DumpPartition(Partition p)
+ 	{
+ 		try
+ 		{
+ 			DumpBegin();
+ 			Dump("Partition name: " + p.getName());
+ 			Dump(" ID: " + p.getID());
+ 			Dump(" DeviceName: " + p.getDeviceName());
+ 			DumpEnd();
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 		ident++;
+ 		try
+ 		{
+ 			DumpBegin();
+ 			Dump("TotalFreeSpace: " + p.getTotalFreeSpace());
+ 			Dump(" TotalQuota: " + p.getTotalQuota());
+ 			Dump(" TotalTotalSpace: " + p.getTotalSpace());
+ 			DumpEnd();
+ 
+ 			//test some queries, don't write to output
+ 			p.getInfo();
+ 			p.getInfoVolumes();
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 		ident--;
+ 	}
+ 
+ 	public static void DumpGroup(Group g)
+ 	{
+ 		try
+ 		{
+ 			DumpBegin();
+ 			Dump("Group name: " + g.getName());
+ 			Dump(" Type: " + g.getType());
+ 			Dump(" UID: " + g.getUID());
+ 			DumpEnd();
+ 			
+ 			//test some queries, don't write to output
+ 			g.getInfo();
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 	}
+ 
+ 	public static void DumpUser(User u)
+ 	{
+ 		DumpLn("User name: " + u.getName());
+ 		ident++;
+ 		try
+ 		{
+ 
+ 			DumpLn("EncryptionKey" + u.getEncryptionKey());
+ 			DumpBegin();
+ 			Dump("DaysToPasswordExpire: " + u.getDaysToPasswordExpire());
+ 			Dump(" FailLoginCount: " + u.getFailLoginCount());
+ 			Dump(" KeyCheckSum: " + u.getKeyCheckSum());
+ 			DumpEnd();
+ 			DumpBegin();
+ 			Dump("UserExpirationDate: " + getGregDateStr(u.getUserExpirationDate()));
+ 			Dump(" MaxTicketLifetime: " + u.getMaxTicketLifetime());
+ 			Dump(" LockedUntilDate: " + getGregDateStr(u.getLockedUntilDate()));
+ 			DumpEnd();
+ 
+ 			
+ 			//test some queries, don't write to output
+ 			u.getInfo();
+ 			u.getInfoGroups();
+ 			u.getInfoGroupsOwned();
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 		ident--;
+ 	}
+ 
+ 	static void DumpProcess(org.openafs.jafs.Process p)
+ 	{
+ 		DumpLn("Process name: " + p.getName());
+ 		ident++;
+ 		try
+ 		{
+ 
+ 			DumpBegin();
+ 			Dump("StartTimeDate: " + getGregDateStr(p.getStartTimeDate()));
+ 			Dump(" ExitTimeDate: " + getGregDateStr(p.getExitTimeDate()));
+ 			DumpEnd();
+ 			
+ 			//test some queries, don't write to output
+ 			p.getInfo();
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 		ident--;
+ 	}
+ 
+ 	public static Token testToken(String user, String pass, String cell)
+ 	{
+ 		Token token = null;
+ 		try
+ 		{
+ 			token = new Token(user, pass, cell);
+ 			DumpToken(token);
+ 			testCell(token);
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 		return token;
+ 	}
+ 
+ 	public static void testFilesRecursive(File dir)
+ 	{
+ 		try
+ 		{
+ 			java.io.File fj = new java.io.File(dir.getPath());
+ 			String[] strSubdirs = fj.list();
+ 			for(int i=0; i<strSubdirs.length; i++)
+ 			{
+ 				org.openafs.jafs.File f = new org.openafs.jafs.File(
+ 						dir.getPath() + "/" + strSubdirs[i]);
+ 				DumpFile(f);
+ 				f.validate();
+ 				if (f.isDirectory() || f.isMountPoint() || f.isLink())
+ 				{
+ 					testFilesRecursive(dir);
+ 				}
+ 			}
+ 		} catch(AFSFileException e) {
+ 			e.printStackTrace();
+ 		}
+ 	}
+ 
+ 	public static void testFiles()
+ 	throws AFSException, AFSFileException
+ 	{
+ 		org.openafs.jafs.File f = new org.openafs.jafs.File(firstCellPathRW);
+ 		DumpFile(f);
+ 		testFilesRecursive(f);
+ 	}
+ 	
+ 	public static void testCell(Token token)
+ 	{
+ 		Cell cell = null;
+ 		try
+ 		{
+ 			cell = new Cell(token, false);
+ 
+ 			DumpCell(cell);
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 		if (cell==null)
+ 			return;
+ 
+ 		ident++;
+ 		try
+ 		{
+ 			Group[]	groups = cell.getGroups();
+ 			for(int i=0; i<groups.length; i++)
+ 			{
+ 				testGroup(groups[i]);
+ 			}
+ 	
+ 			Server[] servers = cell.getServers();
+ 			for(int j=0; j<servers.length; j++)
+ 			{
+ 				testServer(servers[j]);
+ 			}
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 		ident--;
+ 
+ 		try
+ 		{
+ 			if (cell!=null)
+ 				cell.close();
+                 } catch(AFSException e) {
+                         e.printStackTrace();
+                 }
+ 	}
+ 	
+ 	public static void testServer(Server server)
+ 	throws AFSException
+ 	{
+ 		DumpServer(server);
+ 		ident++;
+ 		try
+ 		{
+ 			Partition[] parts = server.getPartitions();
+ 			if (parts!=null)
+ 			{
+ 				for(int i=0; i<parts.length; i++)
+ 				{
+ 					testPartition(parts[i]);
+ 				}
+ 			}
+ 	
+ 			org.openafs.jafs.Process[] procs = server.getProcesses();
+ 			if (procs!=null)
+ 			{
+ 				for(int i=0; i<procs.length; i++)
+ 				{
+ 					DumpProcess(procs[i]);
+ 				}
+ 			}
+ 
+ 			DumpLn("salvage...");
+ 			server.salvage();
+ 			DumpLn("getLog...");
+ 			try
+ 			{
+ 				server.getLog("/var/log/openafs/BosLog");
+ 			} catch(AFSException e) {
+ 				e.printStackTrace();
+ 			}
+ 			//DumpLn("stopAllProcesses...");
+ 			//server.stopAllProcesses();
+ 			//DumpLn("startAllProcesses...");
+ 			//server.startAllProcesses();
+ 			DumpLn("syncServer...");
+ 			server.syncServer();
+ 			DumpLn("syncVLDB...");
+ 			server.syncVLDB();
+ 			DumpLn("ok.");
+ 		} catch(AFSException e) {
+ 			e.printStackTrace();
+ 		}
+ 		ident--;
+ 	}
+ 
+ 	public static void testProcess(org.openafs.jafs.Process p)
+ 	throws AFSException
+ 	{
+ 		DumpProcess(p);
+ 	}
+ 
+ 	public static void testPartition(Partition part)
+ 	throws AFSException
+ 	{
+ 		DumpPartition(part);
+ 		ident++;
+ 
+ 		Volume[] vols = part.getVolumes();
+ 		for(int i=0; i<vols.length; i++)
+ 		{
+ 			testVolume(vols[i]);
+ 		}
+ 
+ 		ident--;
+ 	}
+ 	
+ 	public static void testVolume(Volume vol)
+ 	throws AFSException
+ 	{
+ 		DumpVolume(vol);
+ 	}
+ 	
+ 	public static void testGroup(Group group)
+ 	throws AFSException
+ 	{
+ 		DumpGroup(group);
+ 		ident++;
+ 
+ 		User[] users = group.getMembers();
+ 		for(int i=0; i<users.length; i++)
+ 		{
+ 			testUser(users[i]);
+ 		}
+ 
+ 		ident--;
+ 	}
+ 	
+ 	public static void testUser(User user)
+ 	throws AFSException
+ 	{
+ 		DumpUser(user);
+ 	}
+ 
+ 	public static void testNewVolume(String cellName, String userName, String passString)
+ 	{
+ 		if (firstCellPathRW==null)
+ 		{
+ 			System.err.println("testNewVolume cannot be executed (null args).");
+ 			return;
+ 		}
+ 
+ 		String volName = "myTestJafsVolume92834";
+ 		String mpName = firstCellPathRW + "/" + volName;
+ 		try
+ 		{
+ 			Token token = new Token(cellName, userName, passString);
+ 			Cell cell = new Cell(token, false);
+ 			Server[] servers = cell.getServers();
+ 			if (servers.length==0)
+ 			{
+ 				System.err.println("Error: failed to run\"testNewVolume\"!");
+ 				return;
+ 			}
+ 			Partition firstPart = null;
+ 			int i;
+ 			for(i=0; i<servers.length; i++)
+ 			{
+ 				Partition[] parts = servers[i].getPartitions();
+ 				if (parts==null)
+ 					continue;
+ 
+ 				if (parts.length!=0)
+ 				{
+ 					firstPart = parts[0];
+ 					break;
+ 				}
+ 			}
+ 			if (firstPart==null)
+ 			{
+ 				System.err.println("Error: failed to find any partition on any server - \"testNewVolume\" couldn't be tested!");
+ 				return;
+ 			}
+ 
+ 			Volume v = new Volume(volName, firstPart);
+ 			DumpLn("Creating a new volume " + volName + " ...");
+ 			v.create(0);
+ 
+ 			v.lock();
+ 			v.unlock();
+ 
+ 			volName = "myTestJafsVolume2389";
+ 			DumpLn("Renaming volume to " + volName + " ...");
+ 			v.rename(volName);
+ 
+ 			DumpLn("Creating an rw mount point " + mpName + " ...");
+ 			v.createMountPoint(mpName, true);
+ 
+ 			DumpLn("Deleting mount point...");
+ 			java.lang.Runtime.getRuntime().exec("fs rmmount " + mpName);
+ 			
+ 			DumpLn("Creating RO...");
+ 			Volume volRO = v.createReadOnly(firstPart);
+ 
+ 			DumpLn("Creating backup...");
+ 			v.createBackup();
+ 
+ 			DumpLn("Releaseing volume...");
+ 			v.release();
+ 
+ 			//v.moveTo();	//needs a more careful test env
+ 
+ 			DumpLn("Salvaging volume...");
+ 			v.salvage();
+ 
+ 			DumpLn("Deleting volume...");
+ 			v.delete();
+ 
+ 			DumpLn("Deleting RO site...");
+ 			volRO.delete();
+ 
+ 			DumpLn("OK.");
+ 		} catch(Exception e) {
+ 			e.printStackTrace();
+ 		}
+ 	}
+ 	
+ 	public static void main(String[] args)
+ 	{
+ 
+ 		try
+ 		{
+ 			if (args.length<4)
+ 			{
+ 				System.err.println("testAFS <user> <pass> <cell_name> <# of cycles>");
+ 				return;
+ 			}
+ 
+ 			Class.forName("org.openafs.jafs.Token");	//initialization...
+ 			System.out.println("Java interface version: " + VersionInfo.getVersionOfJavaInterface());
+ 			System.out.println("Library version: " + VersionInfo.getVersionOfLibrary());
+ 			System.out.println("Build info: " + VersionInfo.getBuildInfo());
+ 
+ 			//first test whether token is valid
+ 			//and load libraries with it
+ 			Token t0 = new Token(args[0], args[1], args[2]);
+ 			t0.close();
+ 
+ 			System.out.print("Starting another tester thread...");
+ 			testAFS	ta = new testAFS();
+ 			TesterThread tt = ta.new TesterThread(args[0], args[1], args[2]);
+ 			Thread tTest = new Thread(tt);
+ 			tTest.start();
+ 			System.out.println("started.");
+ 
+ 			firstCellPathRW = "/afs/." + args[2];
+ 			int numOfCycles = Integer.parseInt(args[3]);
+ 			for(int i=0; i<numOfCycles || numOfCycles==0; i++)
+ 			{
+ 				testToken(args[0], args[1], args[2]);
+ 
+ 				testFiles();
+ 
+ 				testNewVolume(args[0], args[1], args[2]);
+ 
+ 				System.out.print("ACL excercising...");
+ 				allowDump = false;
+ 				for(int j=0; j<100; j++)
+ 				{
+ 					testFiles();
+ 					System.out.print(".");
+ 				}
+ 				System.out.println();
+ 				allowDump = true;
+ 
+ 				AFSException afs = new AFSException(1);
+ 
+ 				System.out.println("cycle #" + (i+1) + "/" + numOfCycles + " done.");
+ 			}
+ 
+ 			tt.finish();
+ 			System.out.println("All done.");
+ 		} catch (Exception e) {
+ 			e.printStackTrace();
+ 		}
+ 	}
+ }
Index: openafs/src/JAVA/classes/org/openafs/jafs/ACL.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/ACL.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/ACL.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/ACL.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/ACL.java	Fri Oct 14 22:14:09 2005
***************
*** 33,629 ****
   * This class is an extension of the standard Java File class with file-based 
   * manipulation methods overridden by integrated AFS native methods.
   *
-  * @version 2.2, 03/24/2003 - Added new Delta ACL functionality and changes 
-  *                            from Stonehenge.
   * @version 2.0, 04/18/2001 - Completely revised class for efficiency.
   */
  
  public class ACL implements Serializable, Comparable
  {
!   private ACL.Entry[] positiveEntries;
!   private ACL.Entry[] negativeEntries;
! 
!   private ACL.Entry[] positiveExpungeEntries;
!   private ACL.Entry[] negativeExpungeEntries;
! 
!   /** 
!    * Path for this ACL, if null then this ACL instance is most likely a 
!    * Delta ACL.
!    */
!   private String path = null;
   
!   private ACL()
!   {
!   }
!   public ACL( String path ) throws AFSException
!   {
!     this( path, true );
!   }
!   public ACL( String path, boolean init ) throws AFSException
    {
!     int numberPositiveEntries = 0;
!     int numberNegativeEntries = 0;
!     ACL.Entry aclEntry;
!     String buffer;
! 
!     this.path = path;
! 
!     if ( init ) {
!       StringTokenizer st = new StringTokenizer( getACLString(path), "\n\t" );
!   
!       buffer = st.nextToken();
!       numberPositiveEntries = new Integer(buffer).intValue();
!       positiveEntries = new ACL.Entry[numberPositiveEntries];
!   
!       buffer = st.nextToken();
!       numberNegativeEntries = new Integer(buffer).intValue();
!       negativeEntries = new ACL.Entry[numberNegativeEntries];
    
!       for(int i = 0; i < numberPositiveEntries; i++)
!       {
!         aclEntry = new ACL.Entry();
!         aclEntry.setUser(st.nextToken());
!         aclEntry.setPermissions(new Integer(st.nextToken()).intValue());
!         positiveEntries[i] = aclEntry;
!       }
!   
!       for(int i = 0; i < numberNegativeEntries; i++)
!       {
!         aclEntry = new ACL.Entry();
!         aclEntry.setUser(st.nextToken());
!         aclEntry.setPermissions(new Integer(st.nextToken()).intValue());
!         negativeEntries[i] = aclEntry;
!       }
!     } else {
!       positiveEntries = new ACL.Entry[0];
!       negativeEntries = new ACL.Entry[0];
!     }
!   }
!   /**
!    * Returns the total number of ACL entries, this is the sum of positive
!    * and negative entries.
!    *
!    * @return Total number of ACL entries
!    */
    public int getEntryCount()
    {
!     return getPositiveEntryCount() + getNegativeEntryCount();
    }
-   /**
-    * Returns the path this ACL instance is bound to.
-    *
-    * @return Path for this ACL
-    */
    public String getPath()
    {
      return path;
    }
!   /**
!    * Writes the ACL to AFS, making all changes immediately effective.
!    * This method requires an active connection to AFS.
!    */
!   public void flush() throws AFSException
!   {
!     setACLString(path, getFormattedString());
!   }
! 
! 
!   /*--------------------------------------------------------------------------*/
!   /* Positive ACL Methods                                                     */
!   /*--------------------------------------------------------------------------*/
! 
!   /**
!    * Returns the number of positive ACL entries for this ACL instance.
!    *
!    * @return Positive ACL entry count
!    */
!   public int getPositiveEntryCount()
    {
!     return ( positiveEntries == null ) ? 0 : positiveEntries.length;
    }
-   /**
-    * Returns all positive ACL entries for this ACL instance.
-    *
-    * @return All positive ACL entries
-    */
    public ACL.Entry[] getPositiveEntries()
    {
!     return ( positiveEntries == null ) ? new ACL.Entry[0] : positiveEntries;
!   }
!   /**
!    * Returns the positive ACL entry associated with the specified 
!    * user/group name.
!    *
!    * @param  name Name of user/group for desired ACL entry.
!    * @return Positive ACL entry
!    * @see ACL.Entry#getUser()
!    */
!   public Entry getPositiveEntry(String name)
!   {
!     int n = getPositiveEntryCount();
!     for (int i = 0; i < n; i++) {
!       if (positiveEntries[i].getUser().equalsIgnoreCase(name)) {
!         return positiveEntries[i];
!       }
!     }
!     return null;
!   }
!   /**
!    * Returns all positive ACL entries to be expunged; used in Delta ACLs.
!    *
!    * @return All positive ACL entries
!    */
!   public ACL.Entry[] getPositiveExpungeEntries()
!   {
!     return ( positiveExpungeEntries == null ) ? new ACL.Entry[0] : positiveExpungeEntries;
!   }
!   /**
!    * Returns <code>true</code> if this ACL contains the specified ACL entry.
!    *
!    * @param  entry Positive ACL entry
!    * @return <code>true</code> if the specified ACL entry is present; 
!    *         <code>false</code> otherwise.
!    */
!   public boolean containsPositiveEntry(Entry entry)
!   {
!     int n = getPositiveEntryCount();
!     for (int i = 0; i < n; i++) {
!       if (positiveEntries[i].equals(entry)) {
!         return true;
!       }
!     }
!     return false;
    }
!   /**
!    * Adds a single positive ACL entry to this ACL instance.
!    *
!    * @param entry ACL.Entry object to add
!    */
!   public void addPositiveEntry( ACL.Entry entry ) throws AFSException
    {
!     int n = getPositiveEntryCount();
      ACL.Entry[] e = new ACL.Entry[n + 1];
-     if ( n > 0 ) System.arraycopy(positiveEntries, 0, e, 0, n);
-     e[n] = entry;
-     positiveEntries = e;
-     update();
-   }
-   /**
-    * Adds the provided list of positive ACL entries to this ACL instance.
-    *
-    * @param entries Array of ACL.Entry objects to add
-    */
-   public void addPositiveEntries( ACL.Entry[] entries ) throws AFSException
-   {
-     int n = getPositiveEntryCount();
-     ACL.Entry[] e = new ACL.Entry[n + entries.length];
      System.arraycopy(positiveEntries, 0, e, 0, n);
!     System.arraycopy(entries,0,e,n,entries.length);
      positiveEntries = e;
!     update();
    }
!   /**
!    * Sets the complete array of positive ACL entries to the provided
!    * ACL entry list (<code>entries</code>) for this ACL instance.
!    *
!    * @param entries Array of ACL.Entry objects that represent this
!    *                ACL's positive entry list.
!    */
!   public void setPositiveEntries( ACL.Entry[] entries ) throws AFSException
    {
      this.positiveEntries = entries;
!     update();
!   }
!   /**
!    * Add a positive ACL entry to the list of positive ACL entries to be 
!    * expunged; used in Delta ACLs.
!    *
!    * @param entry Positive ACL entries to be expunged.
!    */
!   public void addPositiveExpungeEntry( ACL.Entry entry ) throws AFSException
!   {
!     int n = ( positiveExpungeEntries == null ) ? 0 : positiveExpungeEntries.length;
!     ACL.Entry[] e = new ACL.Entry[n + 1];
!     if ( n > 0 ) System.arraycopy(positiveExpungeEntries, 0, e, 0, n);
!     e[n] = entry;
!     positiveExpungeEntries = e;
!     update();
!   }
! 
!   /**
!    * Removes a single positive ACL entry from this ACL instance.
!    *
!    * @param entry ACL.Entry object to removed
!    */
!   public void removePositiveEntry(Entry entry) throws AFSException
!   {
!     int n = getPositiveEntryCount();
!     ArrayList list = new ArrayList();
! 
!     for (int i = 0; i < n; i++) {
!       if (!positiveEntries[i].equals(entry)) {
!         list.add(positiveEntries[i]);
!       }
!     }
! 
!     positiveEntries = (ACL.Entry[]) list.toArray(new ACL.Entry[list.size()]);
!     update();
!   }
!   /**
!    * Removes all positive ACL entries from this ACL instance.
!    */
!   public void removeAllPositiveEntries() throws AFSException
!   {
!     positiveEntries = new Entry[0];
!     update();
!   }
! 
! 
!   /*--------------------------------------------------------------------------*/
!   /* Negative ACL Methods                                                     */
!   /*--------------------------------------------------------------------------*/
! 
!   /**
!    * Returns the number of negative ACL entries for this ACL instance.
!    *
!    * @return Negative ACL entry count
!    */
!   public int getNegativeEntryCount()
!   {
!     return ( negativeEntries == null ) ? 0 : negativeEntries.length;
    }
-   /**
-    * Returns all negative ACL entries for this ACL instance.
-    *
-    * @return All negative ACL entries
-    */
    public ACL.Entry[] getNegativeEntries()
    {
!     return ( negativeEntries == null ) ? new ACL.Entry[0] : negativeEntries;
!   }
!   /**
!    * Returns the negative ACL entry associated with the specified 
!    * user/group name.
!    *
!    * @param  name Name of user/group for desired ACL entry.
!    * @return Negative ACL entry
!    * @see ACL.Entry#getUser()
!    */
!   public Entry getNegativeEntry(String name)
!   {
!     int n = getNegativeEntryCount();
!     for (int i = 0; i < n; i++) {
!       if (negativeEntries[i].getUser().equalsIgnoreCase(name)) {
!         return negativeEntries[i];
!       }
!     }
!     return null;
!   }
!   /**
!    * Returns all negative ACL entries to be expunged; used in Delta ACLs.
!    *
!    * @return All negative ACL entries to be expunged.
!    */
!   public ACL.Entry[] getNegativeExpungeEntries()
!   {
!     return ( negativeExpungeEntries == null ) ? new ACL.Entry[0] : negativeExpungeEntries;
!   }
!   /**
!    * Returns <code>true</code> if this ACL contains the specified ACL entry.
!    *
!    * @param  entry Negative ACL entry
!    * @return <code>true</code> if the specified ACL entry is present; 
!    *         <code>false</code> otherwise.
!    */
!   public boolean containsNegative(Entry entry)
!   {
!     int n = getNegativeEntryCount();
!     for (int i = 0; i < n; i++) {
!       if (negativeEntries[i].equals(entry)) {
!         return true;
!       }
!     }
!     return false;
    }
!   /**
!    * Adds a single negative ACL entry to this ACL instance.
!    *
!    * @param entry ACL.Entry object to add
!    */
!   public void addNegativeEntry( ACL.Entry entry ) throws AFSException
    {
!     int n = getNegativeEntryCount();
      ACL.Entry[] e = new ACL.Entry[n + 1];
!     if ( n > 0 ) System.arraycopy(negativeEntries, 0, e, 0, n);
      e[n] = entry;
      negativeEntries = e;
!     update();
    }
!   /**
!    * Adds the provided list of negative ACL entries to this ACL instance.
!    *
!    * @param entries Array of ACL.Entry objects to add
!    */
!   public void addNegativeEntries( ACL.Entry[] entries ) throws AFSException
    {
!     int n = getNegativeEntryCount();
!     ACL.Entry[] e = new ACL.Entry[n + entries.length];
!     System.arraycopy(negativeEntries, 0, e, 0, n);
!     System.arraycopy(entries,0,e,n,entries.length);
!     negativeEntries = e;
!     update();
    }
!   /**
!    * Add a negative ACL entry to the list of negative ACL entries to be 
!    * expunged; used in Delta ACLs.
!    *
!    * @param entry Negative ACL entries to be expunged.
!    */
!   public void addNegativeExpungeEntry( ACL.Entry entry ) throws AFSException
    {
!     int n = ( negativeExpungeEntries == null ) ? 0 : negativeExpungeEntries.length;
!     ACL.Entry[] e = new ACL.Entry[n + 1];
!     if ( n > 0 ) System.arraycopy(negativeExpungeEntries, 0, e, 0, n);
!     e[n] = entry;
!     negativeExpungeEntries = e;
!     update();
    }
!   /**
!    * Sets the complete array of negative ACL entries to the provided
!    * ACL entry list (<code>entries</code>) for this ACL instance.
!    *
!    * @param entries Array of ACL.Entry objects that represent this
!    *                ACL's negative entry list.
!    */
!   public void setNegativeEntries( ACL.Entry[] entries ) throws AFSException
    {
      this.negativeEntries = entries;
!     update();
    }
  
!   /**
!    * Removes a single negative ACL entry from this ACL instance.
!    *
!    * @param entry ACL.Entry object to removed
!    */
!   public void removeNegativeEntry(Entry entry) throws AFSException
    {
!     int n = getNegativeEntryCount();
!     ArrayList list = new ArrayList();
!         
!     for (int i = 0; i < n; i++) {
!       if (!negativeEntries[i].equals(entry)) {
!         list.add(negativeEntries[i]);
!       }
!     }
! 
!     negativeEntries = (ACL.Entry[]) list.toArray(new ACL.Entry[list.size()]);
!     update();
    }
    
    /**
!    * Removes all negative ACL entries from this ACL instance.
     */
!   public void removeAllNegativeEntries() throws AFSException
!   {
!     negativeEntries = new Entry[0];
!     update();
    }
    
- 
-   /*--------------------------------------------------------------------------*/
-   /* Delta ACL Methods                                                        */
-   /*--------------------------------------------------------------------------*/
- 
    /**
!    * Returns a "Delta ACL", which is an ACL that represents only the difference
!    * (delta) of two ACLs, relative to the current ACL instance by the provided
!    * ACL specified by <code>acl</code>.
!    *
!    * <P> This ACL instance represents the base or reference object while the 
!    * provided ACL (<code>acl</code>) represents the object in question. 
!    * Therefore, if the provided ACL has an entry that differs from the base ACL,
!    * then the resulting Delta ACL will contain that entry found in the provided 
!    * ACL; base ACL entries are never entered into the Delta ACL, but rather are
!    * used solely for comparison.
!    *
!    * @param acl the ACL to compare this ACL instance to
!    * @return Delta ACL by comparing this ACL instance with <code>acl</code>
     */
!   public ACL getDeltaACL( ACL acl ) throws AFSException
!   {
!     ACL delta = new ACL();
!     int n = getPositiveEntryCount();
!     
!     ACL.Entry[] pEntries = acl.getPositiveEntries();
!     for ( int i = 0; i < pEntries.length; i++ )
!     {
!       boolean match = false;
!       for ( int j = 0; j < n; j++ )
!       {
!         if ( pEntries[i].equals( positiveEntries[j] ) ) {
!           match = true;
!           break;
!         }
!       }
!       if ( !match ) delta.addPositiveEntry( pEntries[i] );
!     }
! 
!     // Check for positive entries that need to be expunged.
!     n = getPositiveEntryCount();
!     if ( n > pEntries.length ) {
!       for ( int i = 0; i < n; i++ )
!       {
!         String eu = positiveEntries[i].getUser();
!         boolean match = false;
!         for ( int j = 0; j < pEntries.length; j++ )
!         {
!           if ( eu != null && eu.equals( pEntries[j].getUser() ) ) {
!             match = true;
!             break;
!           }
!         }
!         if ( !match ) delta.addPositiveExpungeEntry( positiveEntries[i] );
!       }
!     }
! 
!     n = getNegativeEntryCount();
!     ACL.Entry[] nEntries = acl.getNegativeEntries();
!     for ( int i = 0; i < nEntries.length; i++ )
!     {
!       boolean match = false;
!       for ( int j = 0; j < n; j++ )
!       {
!         if ( nEntries[i].equals( negativeEntries[j] ) ) {
!           match = true;
!           break;
!         }
!       }
!       if ( !match ) delta.addNegativeEntry( nEntries[i] );
!     }
! 
!     // Check for negative entries that need to be expunged.
!     n = getNegativeEntryCount();
!     if ( n > nEntries.length ) {
!       for ( int i = 0; i < n; i++ )
!       {
!         String eu = negativeEntries[i].getUser();
!         boolean match = false;
!         for ( int j = 0; j < nEntries.length; j++ )
!         {
!           if ( eu != null && eu.equals( nEntries[j].getUser() ) ) {
!             match = true;
!             break;
!           }
!         }
!         if ( !match ) delta.addNegativeExpungeEntry( negativeEntries[i] );
!       }
!     }
! 
!     return delta;
    }
! 
    /**
!    * Updates the current ACL instance by replacing, adding, or deleting 
!    * ACL entries designated by the specified Delta ACL (<code>delta</code>).
!    *
!    * <P> If the provided Delta ACL has an entry that differs from this ACL 
!    * instance, then the ACL entry of the Delta ACL will be set.
!    *
!    * @param delta the Delta ACL to be applied to this ACL instance
     */
!   public void update( ACL delta ) throws AFSException
!   {
!     ArrayList pos = new ArrayList( this.getPositiveEntryCount() );
!     ArrayList neg = new ArrayList( this.getNegativeEntryCount() );
! 
!     ACL.Entry[] pExpungeEntries = delta.getPositiveExpungeEntries();
!     ACL.Entry[] nExpungeEntries = delta.getNegativeExpungeEntries();
! 
!     ACL.Entry[] pEntries = delta.getPositiveEntries();
!     ACL.Entry[] nEntries = delta.getNegativeEntries();
! 
!     // Delete positive expunge entries first
!     int n = getPositiveEntryCount();
!     for ( int i = 0; i < n; i++ )
!     {
!       boolean match = false;
!       for ( int j = 0; j < pExpungeEntries.length; j++ )
!       {
!         if ( pExpungeEntries[j].equals( positiveEntries[i] ) ) {
!           match = true;
!           break;
!         }
!       }
!       if ( !match ) pos.add( positiveEntries[i] );
!     }
! 
!     // Now check for entries that need replacing
!     for ( int i = 0; i < pEntries.length; i++ )
!     {
!       boolean match = false;
!       String user = pEntries[i].getUser();
!       for ( int j = 0; j < pos.size(); j++ )
!       {
!         if ( user.equals( ((ACL.Entry)pos.get(j)).getUser() ) ) {
!           pos.set( j, pEntries[i] );
!           match = true;
!           break;
!         }
!       }
!       if ( !match ) pos.add( pEntries[i] );
!     }
!     setPositiveEntries( (ACL.Entry[])pos.toArray(new ACL.Entry[pos.size()]) );
! 
!     // Delete negative expunge entries next
!     n = getNegativeEntryCount();
!     for ( int i = 0; i < n; i++ )
!     {
!       boolean match = false;
!       for ( int j = 0; j < nExpungeEntries.length; j++ )
!       {
!         if ( nExpungeEntries[j].equals( negativeEntries[i] ) ) {
!           match = true;
!           break;
!         }
!       }
!       if ( !match ) neg.add( negativeEntries[i] );
!     }
! 
!     // Now check for entries that need replacing (negative)
!     for ( int i = 0; i < nEntries.length; i++ )
!     {
!       boolean match = false;
!       String user = nEntries[i].getUser();
!       for ( int j = 0; j < neg.size(); j++ )
!       {
!         if ( user.equals( ((ACL.Entry)neg.get(j)).getUser() ) ) {
!           neg.set( j, nEntries[i] );
!           match = true;
!           break;
!         }
!       }
!       if ( !match ) neg.add( nEntries[i] );
!     }
!     setNegativeEntries( (ACL.Entry[])neg.toArray(new ACL.Entry[neg.size()]) );
    }
  
  
!   /*--------------------------------------------------------------------------*/
!   /* Private Methods                                                          */
!   /*--------------------------------------------------------------------------*/
! 
    /**
!    * Returns a resized array containing only valid (non-empty) ACL entries.
!    *
!    * @param  entries Original array of entries, possibly containing empty 
!    *                 entries.
!    * @return         All non-empty ACL entries
     */
!   private ACL.Entry[] getNonEmptyEntries( ACL.Entry[] entries )
    {
!     if ( entries == null ) return new ACL.Entry[0];
!     ArrayList list = new ArrayList( entries.length );
      for (int i = 0; i < entries.length; i++)
      {
        boolean isNonEmpty = entries[i].canRead()   ||
--- 33,269 ----
   * This class is an extension of the standard Java File class with file-based 
   * manipulation methods overridden by integrated AFS native methods.
   *
   * @version 2.0, 04/18/2001 - Completely revised class for efficiency.
   */
  
  public class ACL implements Serializable, Comparable
  {
!    protected ACL.Entry[] positiveEntries;
!    protected ACL.Entry[] negativeEntries;
!    protected String path;
   
!   public ACL(String path) throws AFSException
    {
!   	this(path,true);
!  }
    
! public ACL(String path, boolean init) throws AFSException {
! 	int numberPositiveEntries = 0;
! 	int numberNegativeEntries = 0;
! 	ACL.Entry aclEntry;
! 	String buffer;
! 	this.path = path;
! 
! 	if (init) {
! 
! 		StringTokenizer st = new StringTokenizer(getACLString(path), "\n\t");
! 
! 		buffer = st.nextToken();
! 		numberPositiveEntries = new Integer(buffer).intValue();
! 		positiveEntries = new ACL.Entry[numberPositiveEntries];
! 
! 		buffer = st.nextToken();
! 		numberNegativeEntries = new Integer(buffer).intValue();
! 		negativeEntries = new ACL.Entry[numberNegativeEntries];
! 
! 		for (int i = 0; i < numberPositiveEntries; i++) {
! 			aclEntry = new ACL.Entry();
! 			aclEntry.setUser(st.nextToken());
! 			aclEntry.setPermissions(new Integer(st.nextToken()).intValue());
! 			positiveEntries[i] = aclEntry;
! 		}
! 
! 		for (int i = 0; i < numberNegativeEntries; i++) {
! 			aclEntry = new ACL.Entry();
! 			aclEntry.setUser(st.nextToken());
! 			aclEntry.setPermissions(new Integer(st.nextToken()).intValue());
! 			negativeEntries[i] = aclEntry;
! 		}
! 	}else{
! 		positiveEntries = new ACL.Entry[numberPositiveEntries];
! 		negativeEntries = new ACL.Entry[numberNegativeEntries];
! 	}
! }
    public int getEntryCount()
    {
!     return positiveEntries.length + positiveEntries.length;
    }
    public String getPath()
    {
      return path;
    }
!   public void setPath(String path)
    {
! 	this.path= path;
    }
    public ACL.Entry[] getPositiveEntries()
    {
!     return positiveEntries;
    }
!   public void addPositiveEntry(ACL.Entry entry) throws AFSException
    {
!     int n = positiveEntries.length;
      ACL.Entry[] e = new ACL.Entry[n + 1];
      System.arraycopy(positiveEntries, 0, e, 0, n);
!     e[n] = entry;
      positiveEntries = e;
!     setACLString(path, getFormattedString());
    }
!   public void setPositiveEntries(ACL.Entry[] entries) throws AFSException
    {
      this.positiveEntries = entries;
!     setACLString(path, getFormattedString());
    }
    public ACL.Entry[] getNegativeEntries()
    {
!     return negativeEntries;
    }
!   public void addNegativeEntry(ACL.Entry entry) throws AFSException
    {
!     int n = negativeEntries.length;
      ACL.Entry[] e = new ACL.Entry[n + 1];
!     System.arraycopy(negativeEntries, 0, e, 0, n);
      e[n] = entry;
      negativeEntries = e;
!     setACLString(path, getFormattedString());
    }
!   
!   public void addAllNegativeEntrys(ACL.Entry[] entry) throws AFSException
    {
! 	int n = negativeEntries.length;
! 	ACL.Entry[] e = new ACL.Entry[n + entry.length];
! 	System.arraycopy(negativeEntries, 0, e, 0, n);
! 	System.arraycopy(entry,0,e,n,entry.length);
! 	
! 	negativeEntries = e;
! 	setACLString(path, getFormattedString());
!  
    }
!   
!   public void addAllPositiveEntrys(ACL.Entry[] entry) throws AFSException
    {
! 	int n = positiveEntries.length;
! 	ACL.Entry[] e = new ACL.Entry[n + entry.length];
! 	System.arraycopy(positiveEntries, 0, e, 0, n);
! 	System.arraycopy(entry,0,e,n,entry.length);
! 	
! 	positiveEntries = e;
! 	setACLString(path, getFormattedString());
!   
    }
!   public void setNegativeEntries(ACL.Entry[] entries) throws AFSException
    {
      this.negativeEntries = entries;
!     setACLString(path, getFormattedString());
    }
  
!  /**
!  * Needs a AFS Connection
!  */
!   public void flush() throws AFSException
    {
!     setACLString(path, getFormattedString());
    }
    
    /**
!    * removes a ACL Entry from acl
     */
!   public void removeNegativeEntry(Entry entry) throws AFSException {
! 			
! 	  ArrayList arr = new ArrayList();
! 		
! 	  for (int i = 0; i < negativeEntries.length; i++) {
! 					
! 		  if(!negativeEntries[i].equals(entry)){
! 			  arr.add(negativeEntries[i]);
! 		  }
! 	  }
! 	  negativeEntries = (ACL.Entry[]) arr.toArray(new ACL.Entry[arr.size()]);
! 	
! 	setACLString(path, getFormattedString());
    }
    
    /**
!    * removes all ACL Entrys from acl
     */
!   public void removeAllNegativeEntrys() throws AFSException {
! 	negativeEntries = new Entry[0];
! 	setACLString(path, getFormattedString());
    }
!   
    /**
!    * removes all ACL Entrys from acl
     */
!   public void removeAllPositiveEntrys() throws AFSException {
! 	positiveEntries = new Entry[0];
! 	setACLString(path, getFormattedString());
    }
+   
+   
+   public boolean containsNegative(Entry entry) {
+   	
+ 	for (int i = 0; i < negativeEntries.length; i++) {
+ 					
+ 			 if(negativeEntries[i].equals(entry)){
+ 				 return true;
+ 			 }
+ 		 }
+ 	return false;
+   }
+   
+   
+ 	public Entry getNegative(String entryname) {
  
+ 	  for (int i = 0; i < negativeEntries.length; i++) {
  
! 			   if(negativeEntries[i].getUser().equalsIgnoreCase(entryname)){
! 				   return negativeEntries[i];
! 			   }
! 		   }
! 	  return null;
! 	}
! 	
! 	public Entry getPositive(String entryname) {
! 
! 	  for (int i = 0; i < positiveEntries.length; i++) {
! 
! 			   if(positiveEntries[i].getUser().equalsIgnoreCase(entryname)){
! 				   return positiveEntries[i];
! 			   }
! 		   }
! 	  return null;
! 	}
!   public boolean containsPositive(Entry entry) {
!   	
! 	for (int i = 0; i < positiveEntries.length; i++) {
! 					
! 			 if(positiveEntries[i].equals(entry)){
! 				 return true;
! 			 }
! 		 }
! 	return false;
!   }
!   
    /**
!    * removes a ACL Entry from acl
     */
!   public void removePositiveEntry(Entry entry) throws AFSException {
! 			
! 	  ArrayList arr = new ArrayList();
! 		
! 	  for (int i = 0; i < positiveEntries.length; i++) {
! 					
! 		  if(!positiveEntries[i].equals(entry)){
! 			  arr.add(positiveEntries[i]);
! 		  }
! 	  }
! 	  positiveEntries = (ACL.Entry[]) arr.toArray(new ACL.Entry[arr.size()]);
! 	setACLString(path, getFormattedString());
!   }
! 
!   private ACL.Entry[] getNonEmptyEntries(ACL.Entry[] entries)
    {
!     ArrayList response = new ArrayList(entries.length);
      for (int i = 0; i < entries.length; i++)
      {
        boolean isNonEmpty = entries[i].canRead()   ||
***************
*** 633,660 ****
                             entries[i].canDelete() ||
                             entries[i].canLock()   ||
                             entries[i].canAdmin();
!       if (isNonEmpty) list.add(entries[i]);
      }
!     if (list.size() == entries.length) return entries;
!     return (ACL.Entry[])list.toArray(new ACL.Entry[list.size()]);
    }
  
!   private void entriesToString( ACL.Entry[] entries, StringBuffer buffer )
    {
      for (int i = 0; i < entries.length; i++)
      {
!       this.entryToString((ACL.Entry)entries[i], buffer);
      }
    }
  
!   private void entryToString( ACL.Entry entry, StringBuffer buffer )
    {
!     buffer.append(entry.getUser() + '\t' + entry.getPermissionsMask() + '\n');
!   }
! 
!   private void update() throws AFSException
!   {
!     if ( path != null ) setACLString(path, getFormattedString());
    }
  
    /**
--- 273,295 ----
                             entries[i].canDelete() ||
                             entries[i].canLock()   ||
                             entries[i].canAdmin();
!       if (isNonEmpty) response.add(entries[i]);
      }
!     if (response.size() == entries.length) return entries;
!     return (ACL.Entry[])response.toArray(new ACL.Entry[response.size()]);
    }
  
!   private void entriesToString(ACL.Entry[] entries, StringBuffer response)
    {
      for (int i = 0; i < entries.length; i++)
      {
!       this.entryToString((ACL.Entry)entries[i], response);
      }
    }
  
!   private void entryToString(ACL.Entry entry, StringBuffer response)
    {
!     response.append(entry.getUser() + '\t' + entry.getPermissionsMask() + '\n');
    }
  
    /**
***************
*** 677,686 ****
      return out.toString();
    }
  
! 
!   /*--------------------------------------------------------------------------*/
!   /* Custom Override Methods                                                  */
!   /*--------------------------------------------------------------------------*/
  
    /**
     * Compares two ACL objects respective to their paths and does not
--- 312,318 ----
      return out.toString();
    }
  
!   /////////////// custom override methods ////////////////////
  
    /**
     * Compares two ACL objects respective to their paths and does not
***************
*** 735,748 ****
      ACL.Entry[] nonEmptyPos = this.getNonEmptyEntries(this.getPositiveEntries());
      ACL.Entry[] nonEmptyNeg = this.getNonEmptyEntries(this.getNegativeEntries());
  
!     StringBuffer out = new StringBuffer();
!     if ( path == null ) {
!       out.append("Delta ACL\n");
!     } else {
!       out.append("ACL for ");
!       out.append(path);
!       out.append("\n");
!     }
      out.append("Positive Entries:\n");
      for (int i = 0; i < nonEmptyPos.length; i++) {
        out.append("  ");
--- 367,375 ----
      ACL.Entry[] nonEmptyPos = this.getNonEmptyEntries(this.getPositiveEntries());
      ACL.Entry[] nonEmptyNeg = this.getNonEmptyEntries(this.getNegativeEntries());
  
!     StringBuffer out = new StringBuffer("ACL for ");
!     out.append(path);
!     out.append("\n");
      out.append("Positive Entries:\n");
      for (int i = 0; i < nonEmptyPos.length; i++) {
        out.append("  ");
***************
*** 756,788 ****
        }
      }
  
-     // Check to see if this is a Delta ACL
-     if ( path == null ) {
-       nonEmptyPos = this.getNonEmptyEntries(this.getPositiveExpungeEntries());
-       nonEmptyNeg = this.getNonEmptyEntries(this.getNegativeExpungeEntries());
- 
-       if (nonEmptyPos.length > 0) {
-         out.append("Positive Entries to Delete:\n");
-         for (int i = 0; i < nonEmptyPos.length; i++) {
-           out.append("  ");
-           out.append(nonEmptyPos[i].toString());
-         }
-       }
-       if (nonEmptyNeg.length > 0) {
-         out.append("Negative Entries to Delete:\n");
-         for (int i = 0; i < nonEmptyNeg.length; i++) {
-           out.append("  ");
-           out.append(nonEmptyNeg[i].toString());
-         }
-       }
-     }
- 
      return out.toString();
    }
  
!   /*--------------------------------------------------------------------------*/
!   /* Native Methods                                                           */
!   /*--------------------------------------------------------------------------*/
  
    /**
     * Returns a formatted String representing the ACL for the specified path.
--- 383,392 ----
        }
      }
  
      return out.toString();
    }
  
!   /////////////// native methods ////////////////////
  
    /**
     * Returns a formatted String representing the ACL for the specified path.
***************
*** 807,813 ****
    private native void setACLString(String path, String aclString) throws AFSException;
  
    /*====================================================================*/
!   /* INNER CLASSES                                                      */
    /*====================================================================*/
  
    /**
--- 411,417 ----
    private native void setACLString(String path, String aclString) throws AFSException;
  
    /*====================================================================*/
!   /* INNER CLASSES  */
    /*====================================================================*/
  
    /**
***************
*** 985,997 ****
        username = user;
      }
      /** 
!      * <IMG SRC="file.gif" ALT="File Permission" WIDTH="16" HEIGHT="16" BORDER="0"> Tests whether the ACL permits <code>read</code> access.
       *
       * <p> This permission enables a user to read the contents of files in the directory 
       * and to obtain complete status information for the files (read/retrieve the file 
       * attributes).
       *
!      * <p><FONT COLOR="666699"><IMG SRC="file.gif" ALT="File Permission" WIDTH="16" HEIGHT="16" BORDER="0"> <U><B>File Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to files in 
       * a directory, rather than the directory itself or its subdirectories. 
       *
--- 589,601 ----
        username = user;
      }
      /** 
!      * <IMG SRC="file.gif" ALT="File Permission" WIDTH="15" HEIGHT="15" BORDER="0"> Tests whether the ACL permits <code>read</code> access.
       *
       * <p> This permission enables a user to read the contents of files in the directory 
       * and to obtain complete status information for the files (read/retrieve the file 
       * attributes).
       *
!      * <p><FONT COLOR="666699"><IMG SRC="file.gif" ALT="File Permission" WIDTH="15" HEIGHT="15" BORDER="0"> <U><B>File Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to files in 
       * a directory, rather than the directory itself or its subdirectories. 
       *
***************
*** 1016,1022 ****
        r = flag;
      }
      /** 
!      * <IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="16" HEIGHT="16" BORDER="0"> Tests whether the ACL permits lookup access.
       *
       * <p> This permission functions as something of a gate keeper for access to the directory 
       * and its files, because a user must have it in order to exercise any other permissions. 
--- 620,626 ----
        r = flag;
      }
      /** 
!      * <IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="15" HEIGHT="15" BORDER="0"> Tests whether the ACL permits lookup access.
       *
       * <p> This permission functions as something of a gate keeper for access to the directory 
       * and its files, because a user must have it in order to exercise any other permissions. 
***************
*** 1036,1042 ****
       * the directory. Those operations require the <code>lookup</code> permission on the ACL
       * of the subdirectory itself.
       *
!      * <p><FONT COLOR="666699"><IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="16" HEIGHT="16" BORDER="0"> <U><B>Directory Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to the 
       * directory itself. For example, the <code>insert</code> permission (see: {@link #canInsert})
       * does not control addition of data to a file, but rather creation of a new file or 
--- 640,646 ----
       * the directory. Those operations require the <code>lookup</code> permission on the ACL
       * of the subdirectory itself.
       *
!      * <p><FONT COLOR="666699"><IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="15" HEIGHT="15" BORDER="0"> <U><B>Directory Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to the 
       * directory itself. For example, the <code>insert</code> permission (see: {@link #canInsert})
       * does not control addition of data to a file, but rather creation of a new file or 
***************
*** 1063,1075 ****
        l = flag;
      }
      /** 
!      * <IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="16" HEIGHT="16" BORDER="0"> Tests whether the ACL permits <code>insert</code> access.
       *
       * <p> This permission enables a user to add new files to the directory, either by creating 
       * or copying, and to create new subdirectories. It does not extend into any subdirectories,
       * which are protected by their own ACLs.
       *
!      * <p><FONT COLOR="666699"><IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="16" HEIGHT="16" BORDER="0"> <U><B>Directory Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to the 
       * directory itself. For example, the <code>insert</code> permission (see: {@link #canInsert})
       * does not control addition of data to a file, but rather creation of a new file or 
--- 667,679 ----
        l = flag;
      }
      /** 
!      * <IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="15" HEIGHT="15" BORDER="0"> Tests whether the ACL permits <code>insert</code> access.
       *
       * <p> This permission enables a user to add new files to the directory, either by creating 
       * or copying, and to create new subdirectories. It does not extend into any subdirectories,
       * which are protected by their own ACLs.
       *
!      * <p><FONT COLOR="666699"><IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="15" HEIGHT="15" BORDER="0"> <U><B>Directory Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to the 
       * directory itself. For example, the <code>insert</code> permission (see: {@link #canInsert})
       * does not control addition of data to a file, but rather creation of a new file or 
***************
*** 1096,1108 ****
        i = flag;
      }
      /** 
!      * <IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="16" HEIGHT="16" BORDER="0"> Tests whether the ACL permits <code>delete</code> access.
       *
       * <p> This permission enables a user to remove files and subdirectories from the directory 
       * or move them into other directories (assuming that the user has the <code>insert</code>
       * (see: {@link #canInsert}) permission on the ACL of the other directories).
       *
!      * <p><FONT COLOR="666699"><IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="16" HEIGHT="16" BORDER="0"> <U><B>Directory Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to the 
       * directory itself. For example, the <code>insert</code> permission (see: {@link #canInsert})
       * does not control addition of data to a file, but rather creation of a new file or 
--- 700,712 ----
        i = flag;
      }
      /** 
!      * <IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="15" HEIGHT="15" BORDER="0"> Tests whether the ACL permits <code>delete</code> access.
       *
       * <p> This permission enables a user to remove files and subdirectories from the directory 
       * or move them into other directories (assuming that the user has the <code>insert</code>
       * (see: {@link #canInsert}) permission on the ACL of the other directories).
       *
!      * <p><FONT COLOR="666699"><IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="15" HEIGHT="15" BORDER="0"> <U><B>Directory Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to the 
       * directory itself. For example, the <code>insert</code> permission (see: {@link #canInsert})
       * does not control addition of data to a file, but rather creation of a new file or 
***************
*** 1129,1140 ****
        d = flag;
      }
      /** 
!      * <IMG SRC="file.gif" ALT="File Permission" WIDTH="16" HEIGHT="16" BORDER="0"> Tests whether the ACL permits <code>write</code> access.
       *
       * <p> This permission enables a user to modify the contents of files in the directory 
       * and to change their operating system specific mode bits. 
       *
!      * <p><FONT COLOR="666699"><IMG SRC="file.gif" ALT="File Permission" WIDTH="16" HEIGHT="16" BORDER="0"> <U><B>File Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to files in 
       * a directory, rather than the directory itself or its subdirectories. 
       *
--- 733,744 ----
        d = flag;
      }
      /** 
!      * <IMG SRC="file.gif" ALT="File Permission" WIDTH="15" HEIGHT="15" BORDER="0"> Tests whether the ACL permits <code>write</code> access.
       *
       * <p> This permission enables a user to modify the contents of files in the directory 
       * and to change their operating system specific mode bits. 
       *
!      * <p><FONT COLOR="666699"><IMG SRC="file.gif" ALT="File Permission" WIDTH="15" HEIGHT="15" BORDER="0"> <U><B>File Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to files in 
       * a directory, rather than the directory itself or its subdirectories. 
       *
***************
*** 1159,1170 ****
        w = flag;
      }
      /** 
!      * <IMG SRC="file.gif" ALT="File Permission" WIDTH="16" HEIGHT="16" BORDER="0"> Tests whether the ACL permits the <code>lock</code> authority.
       *
       * <p> This permission enables the user to run programs that issue system calls to 
       * lock files in the directory. 
       *
!      * <p><FONT COLOR="666699"><IMG SRC="file.gif" ALT="File Permission" WIDTH="16" HEIGHT="16" BORDER="0"> <U><B>File Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to files in 
       * a directory, rather than the directory itself or its subdirectories. 
       *
--- 763,774 ----
        w = flag;
      }
      /** 
!      * <IMG SRC="file.gif" ALT="File Permission" WIDTH="15" HEIGHT="15" BORDER="0"> Tests whether the ACL permits the <code>lock</code> authority.
       *
       * <p> This permission enables the user to run programs that issue system calls to 
       * lock files in the directory. 
       *
!      * <p><FONT COLOR="666699"><IMG SRC="file.gif" ALT="File Permission" WIDTH="15" HEIGHT="15" BORDER="0"> <U><B>File Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to files in 
       * a directory, rather than the directory itself or its subdirectories. 
       *
***************
*** 1189,1195 ****
        k = flag;
      }
      /** 
!      * <IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="16" HEIGHT="16" BORDER="0"> Tests whether the ACL permits <code>administer</code> access.
       *
       * <p> This permission enables a user to change the directory's ACL. Members of the 
       * <code>system:administrators</code> group implicitly have this permission on every 
--- 793,799 ----
        k = flag;
      }
      /** 
!      * <IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="15" HEIGHT="15" BORDER="0"> Tests whether the ACL permits <code>administer</code> access.
       *
       * <p> This permission enables a user to change the directory's ACL. Members of the 
       * <code>system:administrators</code> group implicitly have this permission on every 
***************
*** 1197,1203 ****
       * owner of a directory implicitly has this permission on its ACL and those of all 
       * directories below it that he or she owns. 
       *
!      * <p><FONT COLOR="666699"><IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="16" HEIGHT="16" BORDER="0"> <U><B>Directory Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to the 
       * directory itself. For example, the <code>insert</code> permission (see: {@link #canInsert})
       * does not control addition of data to a file, but rather creation of a new file or 
--- 801,807 ----
       * owner of a directory implicitly has this permission on its ACL and those of all 
       * directories below it that he or she owns. 
       *
!      * <p><FONT COLOR="666699"><IMG SRC="folder.gif" ALT="Directory Permission" WIDTH="15" HEIGHT="15" BORDER="0"> <U><B>Directory Permission</B></U></FONT><BR>
       * This permission is meaningful with respect to the 
       * directory itself. For example, the <code>insert</code> permission (see: {@link #canInsert})
       * does not control addition of data to a file, but rather creation of a new file or 
***************
*** 1261,1263 ****
--- 865,876 ----
  
    }
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/classes/org/openafs/jafs/AFSException.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/AFSException.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/AFSException.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/AFSException.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/AFSException.java	Fri Oct 14 22:14:09 2005
***************
*** 187,189 ****
--- 187,204 ----
    }
    /*-----------------------------------------------------------------------*/
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/classes/org/openafs/jafs/AFSSecurityException.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/AFSSecurityException.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/AFSSecurityException.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/AFSSecurityException.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/AFSSecurityException.java	Fri Oct 14 22:14:09 2005
***************
*** 185,187 ****
--- 185,202 ----
    }
    /*-----------------------------------------------------------------------*/
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/classes/org/openafs/jafs/Cell.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/Cell.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/Cell.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/Cell.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/Cell.java	Fri Oct 14 22:14:09 2005
***************
*** 115,121 ****
    protected ArrayList serverNames;
  
    protected String name;
!   protected int cellHandle;
    protected Token token;
  
    protected int maxGroupID;
--- 115,121 ----
    protected ArrayList serverNames;
  
    protected String name;
!   protected long cellHandle;
    protected Token token;
  
    protected int maxGroupID;
***************
*** 142,148 ****
      this.name  = token.getCellName();
  
      cellHandle = getCellHandle( name, token.getHandle() );
! 
      users = null;
      userNames = null;
      groups = null;
--- 142,148 ----
      this.name  = token.getCellName();
  
      cellHandle = getCellHandle( name, token.getHandle() );
! //System.out.println("cellHandle: " + cellHandle);
      users = null;
      userNames = null;
      groups = null;
***************
*** 270,276 ****
  
    /**
     * Sets all the information fields of this <code>Cell</code> object, 
!    * such as max group and user ids, to their most current values.
     *
     * @exception AFSException  If an error occurs in the native code     
     */
--- 270,276 ----
  
    /**
     * Sets all the information fields of this <code>Cell</code> object, 
!    * such as max group and user ids, to trheir most current values.
     *
     * @exception AFSException  If an error occurs in the native code     
     */
***************
*** 293,299 ****
      users = new ArrayList();
  
      // get kas entries
!     int iterationId = getKasUsersBegin( cellHandle );
  
      currUser = new User( this );
      boolean authorized = false;
--- 293,299 ----
      users = new ArrayList();
  
      // get kas entries
!     long iterationId = getKasUsersBegin( cellHandle );
  
      currUser = new User( this );
      boolean authorized = false;
***************
*** 310,322 ****
          System.err.println("ERROR Cell::refreshUsers():kas (User: " 
  			   + currUser.getName() + ") -> " + e.getMessage());
          authorized = false;
!         if (org.openafs.jafs.ErrorTable.isPermissionDenied(e.getErrorCode())) {
! 	  // Check to see if the user has failed more than 25 times,
! 	  // if so it is most likely because they are not appropriately
! 	  // authorized to list or examine users.  May want to check for
! 	  // KAS admin attribute.
! 	  if ( r++ > 25 ) r = 0;
! 	}
        }
      } 
      getKasUsersDone( iterationId );
--- 310,317 ----
          System.err.println("ERROR Cell::refreshUsers():kas (User: " 
  			   + currUser.getName() + ") -> " + e.getMessage());
          authorized = false;
!         //if (org.openafs.jafs.ErrorCodes.isPermissionDenied(e.getErrorCode())) 
! 	//r = 0;
        }
      } 
      getKasUsersDone( iterationId );
***************
*** 339,351 ****
          System.err.println("ERROR Cell::refreshUsers():pts (User: " 
  			   + currUser.getName() + ") -> " + e.getMessage());
          authorized = false;
!         if (org.openafs.jafs.ErrorTable.isPermissionDenied(e.getErrorCode())) {
! 	  // Check to see if the user has failed more than 25 times,
! 	  // if so it is most likely because they are not appropriately
! 	  // authorized to list or examine users.  May want to check for
! 	  // KAS admin attribute.
! 	  if ( r++ > 25 ) r = 0;
! 	}
        }
      } 
      getPtsUsersDone( iterationId );
--- 334,341 ----
          System.err.println("ERROR Cell::refreshUsers():pts (User: " 
  			   + currUser.getName() + ") -> " + e.getMessage());
          authorized = false;
!         //if (org.openafs.jafs.ErrorCodes.isPermissionDenied(e.getErrorCode())) 
! 	// r = 0;
        }
      } 
      getPtsUsersDone( iterationId );
***************
*** 364,370 ****
      userNames = new ArrayList();
  
      // get kas entries
!     int iterationId = getKasUsersBegin( cellHandle );
      while( ( currName = getKasUsersNextString( iterationId )) != null ) {
        userNames.add( currName );
      } 
--- 354,360 ----
      userNames = new ArrayList();
  
      // get kas entries
!     long iterationId = getKasUsersBegin( cellHandle );
      while( ( currName = getKasUsersNextString( iterationId )) != null ) {
        userNames.add( currName );
      } 
***************
*** 391,397 ****
    {
      Group currGroup;
  
!     int iterationId = getGroupsBegin( cellHandle );
      
      groups = new ArrayList();
      
--- 381,387 ----
    {
      Group currGroup;
  
!     long iterationId = getGroupsBegin( cellHandle );
      
      groups = new ArrayList();
      
***************
*** 407,419 ****
          r = getGroupsNext( cellHandle, iterationId, currGroup );
          authorized = true;
        } catch (AFSException e) {
!         System.err.println("ERROR Cell::refreshGroups() (Group: " 
! 			   + currGroup.getName() + ") -> " + e.getMessage());
!         authorized = false;
!         if (org.openafs.jafs.ErrorTable.isPermissionDenied(e.getErrorCode())) {
! 	  if ( r++ > 25 ) r = 0;
! 	}
  
        }
      } 
      Cell.getGroupsDone( iterationId );
--- 397,409 ----
          r = getGroupsNext( cellHandle, iterationId, currGroup );
          authorized = true;
        } catch (AFSException e) {
! 	e.printStackTrace();
  
+ //        System.err.println("ERROR Cell::refreshGroups() (Group: " 
+ //			   + currGroup.getName() + ") -> " + e.getMessage());
+         authorized = false;
+         //if (org.openafs.jafs.ErrorCodes.isPermissionDenied(e.getErrorCode())) 
+ 	// r = 0;
        }
      } 
      Cell.getGroupsDone( iterationId );
***************
*** 428,434 ****
    {
      String currName;
  
!     int iterationId = getGroupsBegin( cellHandle );
      
      groupNames = new ArrayList();
      while( ( currName = getGroupsNextString( iterationId ) ) != null ) {
--- 418,424 ----
    {
      String currName;
  
!     long iterationId = getGroupsBegin( cellHandle );
      
      groupNames = new ArrayList();
      while( ( currName = getGroupsNextString( iterationId ) ) != null ) {
***************
*** 446,452 ****
    {
      Server currServer;
  
!     int iterationId = getServersBegin( cellHandle );
     
      servers = new ArrayList();
      
--- 436,442 ----
    {
      Server currServer;
  
!     long iterationId = getServersBegin( cellHandle );
     
      servers = new ArrayList();
      
***************
*** 456,476 ****
      while( r != 0 ) {
        try {
          if (authorized) {
!           System.out.println("[Java] Cell::refreshServers() -> adding server: " 
! 			     + currServer.getName());
            servers.add( currServer );
            currServer = new Server( this );
          }
          r = getServersNext( cellHandle, iterationId, currServer );
! System.out.println("[Java] Cell::refreshServers() -> r: " + r);
          authorized = true;
        } catch (AFSException e) {
          System.err.println("ERROR Cell::refreshServers() (Server: " 
  			   + currServer.getName() + ") -> " + e.getMessage());
          authorized = false;
!         if (org.openafs.jafs.ErrorTable.isPermissionDenied(e.getErrorCode())) {
! 	  if ( r++ > 25 ) r = 0;
! 	}
        }
      } 
      getServersDone( iterationId );
--- 446,465 ----
      while( r != 0 ) {
        try {
          if (authorized) {
!           //System.out.println("[Java] Cell::refreshServers() -> adding server: " 
! 		//	     + currServer.getName());
            servers.add( currServer );
            currServer = new Server( this );
          }
          r = getServersNext( cellHandle, iterationId, currServer );
! //System.out.println("[Java] Cell::refreshServers() -> r: " + r);
          authorized = true;
        } catch (AFSException e) {
          System.err.println("ERROR Cell::refreshServers() (Server: " 
  			   + currServer.getName() + ") -> " + e.getMessage());
          authorized = false;
!         //if (e.getErrorCode() == org.openafs.jafs.ErrorCodes.PERMISSION_DENIED) 
!         // r = 0;
        }
      } 
      getServersDone( iterationId );
***************
*** 486,492 ****
    {
      String currName;
  
!     int iterationId = getServersBegin( cellHandle );
  
      serverNames = new ArrayList();
      while( ( currName = getServersNextString( iterationId ) ) != null ) {
--- 475,481 ----
    {
      String currName;
  
!     long iterationId = getServersBegin( cellHandle );
  
      serverNames = new ArrayList();
      while( ( currName = getServersNextString( iterationId ) ) != null ) {
***************
*** 658,664 ****
      User[] users  = new User[length];
      User currUser = new User( this );
      int ptsOnlyCount = getPtsOnlyUserCount(cellHandle);
!     int iterationID = 0;
      int indexPTS = 0;
      int indexKAS = 0;
  
--- 647,653 ----
      User[] users  = new User[length];
      User currUser = new User( this );
      int ptsOnlyCount = getPtsOnlyUserCount(cellHandle);
!     long iterationID = 0;
      int indexPTS = 0;
      int indexKAS = 0;
  
***************
*** 800,806 ****
      String[] users  = new String[length];
      String currUser;
      int ptsOnlyCount = getPtsOnlyUserCount(cellHandle);
!     int iterationID = 0;
      int indexPTS = 0;
      int indexKAS = 0;
  
--- 789,795 ----
      String[] users  = new String[length];
      String currUser;
      int ptsOnlyCount = getPtsOnlyUserCount(cellHandle);
!     long iterationID = 0;
      int indexPTS = 0;
      int indexKAS = 0;
  
***************
*** 968,974 ****
      Group currGroup = new Group( this );
      int i = 0;
  
!     int iterationID = getGroupsBeginAt( cellHandle, startIndex );
  
      while( getGroupsNext( cellHandle, iterationID, currGroup ) != 0 
  	   && i < length ) {
--- 957,963 ----
      Group currGroup = new Group( this );
      int i = 0;
  
!     long iterationID = getGroupsBeginAt( cellHandle, startIndex );
  
      while( getGroupsNext( cellHandle, iterationID, currGroup ) != 0 
  	   && i < length ) {
***************
*** 1065,1071 ****
      String currGroup;
      int i = 0;
  
!     int iterationID = getGroupsBeginAt( cellHandle, startIndex );
  
      while( (currGroup = getGroupsNextString( iterationID )) != null &&
              i < length )
--- 1054,1060 ----
      String currGroup;
      int i = 0;
  
!     long iterationID = getGroupsBeginAt( cellHandle, startIndex );
  
      while( (currGroup = getGroupsNextString( iterationID )) != null &&
              i < length )
***************
*** 1216,1222 ****
     * @return the cell handle
     * @exception AFSException  If an error occurs in the native code
     */
!   public int getCellHandle() throws AFSException
    {
      return cellHandle;
    }
--- 1205,1211 ----
     * @return the cell handle
     * @exception AFSException  If an error occurs in the native code
     */
!   public long getCellHandle() throws AFSException
    {
      return cellHandle;
    }
***************
*** 1266,1272 ****
     *
     * @return    a <code>String</code> representation of this <code>Cell</code>
     */
!   protected String getInfo()
    {
      String r = "Cell: " + name + "\n\n";
      try {
--- 1255,1261 ----
     *
     * @return    a <code>String</code> representation of this <code>Cell</code>
     */
!   public String getInfo()
    {
      String r = "Cell: " + name + "\n\n";
      try {
***************
*** 1320,1326 ****
     * @return    a <code>String</code> representation of the users
     * @see       User#getInfo
     */
!   protected String getInfoUsers() throws AFSException
    {
      String r;
  
--- 1309,1315 ----
     * @return    a <code>String</code> representation of the users
     * @see       User#getInfo
     */
!   public String getInfoUsers() throws AFSException
    {
      String r;
  
***************
*** 1342,1348 ****
     * @return    a <code>String</code> representation of the groups
     * @see       Group#getInfo
     */
!   protected String getInfoGroups() throws AFSException
    {
      String r;
  
--- 1331,1337 ----
     * @return    a <code>String</code> representation of the groups
     * @see       Group#getInfo
     */
!   public String getInfoGroups() throws AFSException
    {
      String r;
  
***************
*** 1363,1369 ****
     * @return    a <code>String</code> representation of the servers
     * @see       Server#getInfo
     */
!   protected String getInfoServers() 
        throws AFSException
    {
      String r;
--- 1352,1358 ----
     * @return    a <code>String</code> representation of the servers
     * @see       Server#getInfo
     */
!   public String getInfoServers() 
        throws AFSException
    {
      String r;
***************
*** 1412,1418 ****
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getKasUserCount( int cellHandle )
      throws AFSException;
  
    /**
--- 1401,1407 ----
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getKasUserCount( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1426,1432 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getKasUsersBegin( int cellHandle )
      throws AFSException;
  
    /**
--- 1415,1421 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getKasUsersBegin( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1442,1448 ****
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getKasUsersBeginAt( int cellHandle,
                                                    int startIndex )
      throws AFSException;
  
--- 1431,1437 ----
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native long getKasUsersBeginAt( long cellHandle,
                                                    int startIndex )
      throws AFSException;
  
***************
*** 1456,1462 ****
     * @return the name of the next user of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getKasUsersNextString( int iterationId )
      throws AFSException;
  
    /**
--- 1445,1451 ----
     * @return the name of the next user of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getKasUsersNextString( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1472,1479 ****
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getKasUsersNext( int cellHandle,  
! 					       int iterationId, 
  					       User theUser )
      throws AFSException;
  
--- 1461,1468 ----
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getKasUsersNext( long cellHandle,  
! 					       long iterationId, 
  					       User theUser )
      throws AFSException;
  
***************
*** 1484,1490 ****
     * @see Cell#getKasUsersBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getKasUsersDone( int iterationId )
      throws AFSException;
  
    /**
--- 1473,1479 ----
     * @see Cell#getKasUsersBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getKasUsersDone( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1496,1502 ****
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getPtsUserCount( int cellHandle )
      throws AFSException;
  
    /**
--- 1485,1491 ----
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getPtsUserCount( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1508,1514 ****
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getPtsOnlyUserCount( int cellHandle )
      throws AFSException;
  
    /**
--- 1497,1503 ----
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getPtsOnlyUserCount( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1522,1528 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getPtsUsersBegin( int cellHandle )
      throws AFSException;
  
    /**
--- 1511,1517 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getPtsUsersBegin( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1534,1540 ****
     * @return the name of the next user of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getPtsUsersNextString( int iterationId )
      throws AFSException;
  
    /**
--- 1523,1529 ----
     * @return the name of the next user of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getPtsUsersNextString( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1547,1554 ****
     * @return the name of the next pts user (not kas user) of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getPtsOnlyUsersNextString( int iterationId, 
! 							    int cellHandle )
      throws AFSException;
  
    /**
--- 1536,1543 ----
     * @return the name of the next pts user (not kas user) of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getPtsOnlyUsersNextString( long iterationId, 
! 							    long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1564,1570 ****
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getPtsUsersNext( int cellHandle, int iterationId,
  					       User theUser )
      throws AFSException;
  
--- 1553,1559 ----
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getPtsUsersNext( long cellHandle, long iterationId,
  					       User theUser )
      throws AFSException;
  
***************
*** 1581,1588 ****
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getPtsOnlyUsersNext( int cellHandle, 
! 						   int iterationId, 
  						   User theUser )
      throws AFSException;
  
--- 1570,1577 ----
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getPtsOnlyUsersNext( long cellHandle, 
! 						   long iterationId, 
  						   User theUser )
      throws AFSException;
  
***************
*** 1593,1599 ****
     * @see Cell#getPtsUsersBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getPtsUsersDone( int iterationId )
      throws AFSException;
  
    /**
--- 1582,1588 ----
     * @see Cell#getPtsUsersBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getPtsUsersDone( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1605,1611 ****
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getGroupCount( int cellHandle )
      throws AFSException;
  
    /**
--- 1594,1600 ----
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getGroupCount( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1619,1625 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getGroupsBegin( int cellHandle )
      throws AFSException;
  
    /**
--- 1608,1614 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getGroupsBegin( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1634,1640 ****
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getGroupsBeginAt( int cellHandle, 
                                                  int startIndex )
      throws AFSException;
  
--- 1623,1629 ----
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native long getGroupsBeginAt( long cellHandle, 
                                                  int startIndex )
      throws AFSException;
  
***************
*** 1647,1653 ****
     * @return the name of the next user of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getGroupsNextString( int iterationId )
      throws AFSException;
  
    /**
--- 1636,1642 ----
     * @return the name of the next user of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getGroupsNextString( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1663,1669 ****
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getGroupsNext( int cellHandle, int iterationId, 
  					     Group theGroup )
      throws AFSException;
  
--- 1652,1658 ----
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getGroupsNext( long cellHandle, long iterationId, 
  					     Group theGroup )
      throws AFSException;
  
***************
*** 1674,1680 ****
     * @see Cell#getGroupsBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getGroupsDone( int iterationId )
      throws AFSException;
  
    /**
--- 1663,1669 ----
     * @see Cell#getGroupsBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getGroupsDone( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1686,1692 ****
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getServerCount( int cellHandle )
      throws AFSException;
  
    /**
--- 1675,1681 ----
     * @exception AFSException  If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getServerCount( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1699,1705 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getServersBegin( int cellHandle )
      throws AFSException;
  
    /**
--- 1688,1694 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getServersBegin( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1711,1717 ****
     * @return the name of the next server of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getServersNextString( int iterationId )
      throws AFSException;
  
    /**
--- 1700,1706 ----
     * @return the name of the next server of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getServersNextString( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1727,1733 ****
     * @return 0 if there are no more servers, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getServersNext( int cellHandle, int iterationId, 
  					      Server theServer )
      throws AFSException;
  
--- 1716,1722 ----
     * @return 0 if there are no more servers, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getServersNext( long cellHandle, long iterationId, 
  					      Server theServer )
      throws AFSException;
  
***************
*** 1738,1744 ****
     * @see Cell#getServersBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getServersDone( int iterationId )
      throws AFSException;
  
    /**
--- 1727,1733 ----
     * @see Cell#getServersBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getServersDone( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1749,1755 ****
     * @return the name of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getCellName( int cellHandle )
      throws AFSException;
  
    /**
--- 1738,1744 ----
     * @return the name of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getCellName( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1764,1770 ****
     * @param forceCheck  whether or not to check if this volume name exists
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void createMountPoint( int cellHandle, 
  						 String directory, 
  						 String volumeName, 
  						 boolean readWrite, 
--- 1753,1759 ----
     * @param forceCheck  whether or not to check if this volume name exists
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void createMountPoint( long cellHandle, 
  						 String directory, 
  						 String volumeName, 
  						 boolean readWrite, 
***************
*** 1803,1809 ****
     * @return an integer reresenting the max group id in a cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getMaxGroupID( int cellHandle )
      throws AFSException;
  
    /**
--- 1792,1798 ----
     * @return an integer reresenting the max group id in a cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getMaxGroupID( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1815,1821 ****
     * @param maxID an integer reresenting the new max group id in a cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void setMaxGroupID( int cellHandle, int maxID )
      throws AFSException;
  
    /**
--- 1804,1810 ----
     * @param maxID an integer reresenting the new max group id in a cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void setMaxGroupID( long cellHandle, int maxID )
      throws AFSException;
  
    /**
***************
*** 1828,1834 ****
     * @return an integer reresenting the max user id in a cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getMaxUserID( int cellHandle )
      throws AFSException;
  
    /**
--- 1817,1823 ----
     * @return an integer reresenting the max user id in a cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getMaxUserID( long cellHandle )
      throws AFSException;
  
    /**
***************
*** 1840,1846 ****
     * @param maxID an integer reresenting the new max user id in a cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void setMaxUserID( int cellHandle, int maxID )
      throws AFSException;
  
    /**
--- 1829,1835 ----
     * @param maxID an integer reresenting the new max user id in a cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void setMaxUserID( long cellHandle, int maxID )
      throws AFSException;
  
    /**
***************
*** 1865,1871 ****
     * @exception AFSException  If an error occurs in the native code
     * @see Token#getHandle
     */
!   protected static native int getCellHandle( String cellName, int tokenHandle )
  	throws AFSException;
   
    /**
--- 1854,1860 ----
     * @exception AFSException  If an error occurs in the native code
     * @see Token#getHandle
     */
!   protected static native long getCellHandle( String cellName, long tokenHandle )
  	throws AFSException;
   
    /**
***************
*** 1874,1879 ****
     * @param cellHandle   the cell handle to close
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void closeCell( int cellHandle ) 
  	throws AFSException;
  }
--- 1863,1876 ----
     * @param cellHandle   the cell handle to close
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void closeCell( long cellHandle ) 
  	throws AFSException;
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/classes/org/openafs/jafs/Group.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/Group.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/Group.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/Group.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/Group.java	Fri Oct 14 22:14:10 2005
***************
*** 111,117 ****
    public static final int GROUP_ANYUSER_ACCESS = 2;
  
    protected Cell cell;
!   protected int cellHandle;
    protected String name;
    
    protected int membershipCount;
--- 111,117 ----
    public static final int GROUP_ANYUSER_ACCESS = 2;
  
    protected Cell cell;
!   protected long cellHandle;
    protected String name;
    
    protected int membershipCount;
***************
*** 487,493 ****
    {
      User currUser;
  
!     int iterationID = Group.getGroupMembersBegin( cell.getCellHandle(), name );
  
      members = new ArrayList();
  
--- 487,493 ----
    {
      User currUser;
  
!     long iterationID = Group.getGroupMembersBegin( cell.getCellHandle(), name );
  
      members = new ArrayList();
  
***************
*** 511,517 ****
    protected void refreshMemberNames() throws AFSException
    {
      String currName;
!     int iterationID = Group.getGroupMembersBegin( cell.getCellHandle(), name );
  
      memberNames = new ArrayList();
  
--- 511,517 ----
    protected void refreshMemberNames() throws AFSException
    {
      String currName;
!     long iterationID = Group.getGroupMembersBegin( cell.getCellHandle(), name );
  
      memberNames = new ArrayList();
  
***************
*** 533,539 ****
    {
      Group currGroup;
  
!     int iterationID = User.getGroupsOwnedBegin( cell.getCellHandle(), name );
  
      groupsOwned = new ArrayList();
  
--- 533,539 ----
    {
      Group currGroup;
  
!     long iterationID = User.getGroupsOwnedBegin( cell.getCellHandle(), name );
  
      groupsOwned = new ArrayList();
  
***************
*** 557,563 ****
    {
      String currName;
  
!     int iterationID = User.getGroupsOwnedBegin( cell.getCellHandle(), name );
  
      groupsOwnedNames = new ArrayList();
      while( ( currName = User.getGroupsOwnedNextString( iterationID ) ) 
--- 557,563 ----
    {
      String currName;
  
!     long iterationID = User.getGroupsOwnedBegin( cell.getCellHandle(), name );
  
      groupsOwnedNames = new ArrayList();
      while( ( currName = User.getGroupsOwnedNextString( iterationID ) ) 
***************
*** 1010,1016 ****
     *
     * @return a <code>String</code> representation of the <code>Group</code>
     */
!   protected String getInfo()
    {
      String r;
      try {
--- 1010,1016 ----
     *
     * @return a <code>String</code> representation of the <code>Group</code>
     */
!   public String getInfo()
    {
      String r;
      try {
***************
*** 1108,1114 ****
     *                automatically assigned)
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void create( int cellHandle, String groupName, 
  				       String ownerName, int gid )
  	throws AFSException;
  
--- 1108,1114 ----
     *                automatically assigned)
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void create( long cellHandle, String groupName, 
  				       String ownerName, int gid )
  	throws AFSException;
  
***************
*** 1122,1128 ****
     * @param groupName      the name of the group to delete
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void delete( int cellHandle, String groupName )
  	throws AFSException;
  
    /**
--- 1122,1128 ----
     * @param groupName      the name of the group to delete
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void delete( long cellHandle, String groupName )
  	throws AFSException;
  
    /**
***************
*** 1137,1143 ****
     * @see Group
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getGroupInfo( int cellHandle, String name, 
  					     Group group ) 
  	throws AFSException;
  
--- 1137,1143 ----
     * @see Group
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getGroupInfo( long cellHandle, String name, 
  					     Group group ) 
  	throws AFSException;
  
***************
*** 1150,1156 ****
     * @param theGroup   the group object containing the desired information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void setGroupInfo( int cellHandle, String name, 
  					     Group theGroup ) 
  	throws AFSException;
  
--- 1150,1156 ----
     * @param theGroup   the group object containing the desired information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void setGroupInfo( long cellHandle, String name, 
  					     Group theGroup ) 
  	throws AFSException;
  
***************
*** 1165,1171 ****
     * @return an iteration ID
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native int getGroupMembersBegin( int cellHandle, 
  						    String name )
  	throws AFSException;
  
--- 1165,1171 ----
     * @return an iteration ID
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native long getGroupMembersBegin( long cellHandle, 
  						    String name )
  	throws AFSException;
  
***************
*** 1174,1184 ****
     * <code>null</code> if there are no more members.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see #getGroupMembersBegin
     * @return the name of the next member
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native String getGroupMembersNextString( int iterationId ) 
  	throws AFSException;
  
    /**
--- 1174,1184 ----
     * <code>null</code> if there are no more members.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see getGroupMembersBegin
     * @return the name of the next member
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native String getGroupMembersNextString( long iterationId ) 
  	throws AFSException;
  
    /**
***************
*** 1188,1201 ****
     * @param cellHandle    the handle of the cell to which the users belong
     * @see Cell#getCellHandle
     * @param iterationId   the iteration ID of this iteration
!    * @see #getGroupMembersBegin
     * @param theUser   a User object to be populated with the values of the 
     *                  next user
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getGroupMembersNext( int cellHandle, 
! 						   int iterationId, 
  						   User theUser )
      throws AFSException;
  
--- 1188,1201 ----
     * @param cellHandle    the handle of the cell to which the users belong
     * @see Cell#getCellHandle
     * @param iterationId   the iteration ID of this iteration
!    * @see getGroupMembersBegin
     * @param theUser   a User object to be populated with the values of the 
     *                  next user
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getGroupMembersNext( long cellHandle, 
! 						   long iterationId, 
  						   User theUser )
      throws AFSException;
  
***************
*** 1203,1212 ****
     * Signals that the iteration is complete and will not be accessed anymore.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see #getGroupMembersBegin
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getGroupMembersDone( int iterationId )
  	throws AFSException;
  
    /**
--- 1203,1212 ----
     * Signals that the iteration is complete and will not be accessed anymore.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see getGroupMembersBegin
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getGroupMembersDone( long iterationId )
  	throws AFSException;
  
    /**
***************
*** 1218,1224 ****
     * @param userName      the name of the user to add
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void addMember( int cellHandle, String groupName, 
  					  String userName )
  	throws AFSException;
  
--- 1218,1224 ----
     * @param userName      the name of the user to add
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void addMember( long cellHandle, String groupName, 
  					  String userName )
  	throws AFSException;
  
***************
*** 1232,1238 ****
     * @param userName      the name of the user to remove
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void removeMember( int cellHandle, String groupName, 
  					     String userName )
  	throws AFSException;
  
--- 1232,1238 ----
     * @param userName      the name of the user to remove
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void removeMember( long cellHandle, String groupName, 
  					     String userName )
  	throws AFSException;
  
***************
*** 1246,1252 ****
     * @param ownerName      the name of the new owner
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void changeOwner( int cellHandle, String groupName, 
  					    String ownerName )
  	throws AFSException;
  
--- 1246,1252 ----
     * @param ownerName      the name of the new owner
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void changeOwner( long cellHandle, String groupName, 
  					    String ownerName )
  	throws AFSException;
  
***************
*** 1259,1265 ****
     * @param newGroupName      the new name for the group
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void rename( int cellHandle, String oldGroupName, 
  				       String newGroupName )
  	throws AFSException;
  
--- 1259,1265 ----
     * @param newGroupName      the new name for the group
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void rename( long cellHandle, String oldGroupName, 
  				       String newGroupName )
  	throws AFSException;
  
Index: openafs/src/JAVA/classes/org/openafs/jafs/Key.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/Key.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/Key.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/Key.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/Key.java	Fri Oct 14 22:14:10 2005
***************
*** 329,335 ****
     *
     * @return a <code>String</code> representation of the <code>Key</code>
     */
!   protected String getInfo()
    {
      String r;
      try {
--- 329,335 ----
     *
     * @return a <code>String</code> representation of the <code>Key</code>
     */
!   public String getInfo()
    {
      String r;
      try {
***************
*** 417,423 ****
     * @see Server
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getKeyInfo( int serverHandle, int version, 
  					   Key key ) 
  	throws AFSException;
  
--- 417,423 ----
     * @see Server
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getKeyInfo( long serverHandle, int version, 
  					   Key key ) 
  	throws AFSException;
  
***************
*** 434,440 ****
     *                      be encrypted
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void create( int cellHandle, int serverHandle, int versionNumber, String keyString )
      throws AFSException;
  
    /**
--- 434,440 ----
     *                      be encrypted
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void create( long cellHandle, long serverHandle, int versionNumber, String keyString )
      throws AFSException;
  
    /**
***************
*** 445,451 ****
     * @param versionNumber   the version number of the key to remove (0 to 255)
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void delete( int serverHandle, int versionNumber )
      throws AFSException;
  
    /**
--- 445,451 ----
     * @param versionNumber   the version number of the key to remove (0 to 255)
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void delete( long serverHandle, int versionNumber )
      throws AFSException;
  
    /**
***************
*** 457,459 ****
--- 457,467 ----
    protected static native void reclaimKeyMemory();
  
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/classes/org/openafs/jafs/Partition.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/Partition.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/Partition.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/Partition.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/Partition.java	Fri Oct 14 22:14:10 2005
***************
*** 266,272 ****
    {
      Volume currVolume;
  
!     int iterationID = getVolumesBegin( cell.getCellHandle(), 
  				       server.getVosHandle(), getID() );
  
      volumes = new ArrayList();
--- 266,272 ----
    {
      Volume currVolume;
  
!     long iterationID = getVolumesBegin( cell.getCellHandle(), 
  				       server.getVosHandle(), getID() );
  
      volumes = new ArrayList();
***************
*** 288,294 ****
    {
      String currName;
  
!     int iterationID = getVolumesBegin( cell.getCellHandle(), 
  				       server.getVosHandle(), getID() );
  	
      volumeNames = new ArrayList();
--- 288,294 ----
    {
      String currName;
  
!     long iterationID = getVolumesBegin( cell.getCellHandle(), 
  				       server.getVosHandle(), getID() );
  	
      volumeNames = new ArrayList();
***************
*** 486,492 ****
      Volume currVolume = new Volume( this );
      int i = 0;
  
!     int iterationID = getVolumesBeginAt( cell.getCellHandle(), 
  				       server.getVosHandle(), getID(), startIndex );
  
      while( getVolumesNext( iterationID, currVolume ) != 0 && i < length ) {
--- 486,492 ----
      Volume currVolume = new Volume( this );
      int i = 0;
  
!     long iterationID = getVolumesBeginAt( cell.getCellHandle(), 
  				       server.getVosHandle(), getID(), startIndex );
  
      while( getVolumesNext( iterationID, currVolume ) != 0 && i < length ) {
***************
*** 583,589 ****
      String currName;
      int i = 0;
  
!     int iterationID = getVolumesBeginAt( cell.getCellHandle(), 
  				       server.getVosHandle(), getID(), startIndex );
  
      while( ( currName = getVolumesNextString( iterationID ) ) != null && i < length ) {
--- 583,589 ----
      String currName;
      int i = 0;
  
!     long iterationID = getVolumesBeginAt( cell.getCellHandle(), 
  				       server.getVosHandle(), getID(), startIndex );
  
      while( ( currName = getVolumesNextString( iterationID ) ) != null && i < length ) {
***************
*** 778,784 ****
     *
     * @return a <code>String</code> representation of the <code>Partition</code>
     */
!   protected String getInfo()
    {
      String r;
      
--- 778,784 ----
     *
     * @return a <code>String</code> representation of the <code>Partition</code>
     */
!   public String getInfo()
    {
      String r;
      
***************
*** 812,818 ****
     * @return    a <code>String</code> representation of the volumes
     * @see       Volume#getInfo
     */
!   protected String getInfoVolumes() throws AFSException
    {
  	String r;
  
--- 812,818 ----
     * @return    a <code>String</code> representation of the volumes
     * @see       Volume#getInfo
     */
!   public String getInfoVolumes() throws AFSException
    {
  	String r;
  
***************
*** 896,903 ****
     *                       fill in the information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getPartitionInfo( int cellHandle, 
! 						 int serverHandle, 
  						 int partition, 
  						 Partition thePartition ) 
      throws AFSException;
--- 896,903 ----
     *                       fill in the information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getPartitionInfo( long cellHandle, 
! 						 long serverHandle, 
  						 int partition, 
  						 Partition thePartition ) 
      throws AFSException;
***************
*** 915,922 ****
     * @see Cell#getCellHandle
     * @see Server#getVosServerHandle
     */
!   protected static native int getVolumeCount( int cellHandle, 
! 					       int serverHandle, 
  					       int partition )
      throws AFSException;
  
--- 915,922 ----
     * @see Cell#getCellHandle
     * @see Server#getVosServerHandle
     */
!   protected static native int getVolumeCount( long cellHandle, 
! 					       long serverHandle, 
  					       int partition )
      throws AFSException;
  
***************
*** 935,942 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getVolumesBegin( int cellHandle, 
! 					       int serverHandle, 
  					       int partition )
      throws AFSException;
  
--- 935,942 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getVolumesBegin( long cellHandle, 
! 					       long serverHandle, 
  					       int partition )
      throws AFSException;
  
***************
*** 955,962 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getVolumesBeginAt( int cellHandle, 
! 						 int serverHandle, 
  						 int partition, int index )
      throws AFSException;
  
--- 955,962 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getVolumesBeginAt( long cellHandle, 
! 						 long serverHandle, 
  						 int partition, int index )
      throws AFSException;
  
***************
*** 969,975 ****
     * @return the name of the next volume of the server
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getVolumesNextString( int iterationId )
      throws AFSException;
  
    /**
--- 969,975 ----
     * @return the name of the next volume of the server
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getVolumesNextString( long iterationId )
      throws AFSException;
  
    /**
***************
*** 983,989 ****
     * @return 0 if there are no more volumes, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getVolumesNext( int iterationId, 
  					      Volume theVolume )
      throws AFSException;
  
--- 983,989 ----
     * @return 0 if there are no more volumes, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getVolumesNext( long iterationId, 
  					      Volume theVolume )
      throws AFSException;
  
***************
*** 998,1004 ****
     * @return 0 if there are no more volumes, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getVolumesAdvanceTo( int iterationId, 
  						   Volume theVolume, 
  						   int advanceCount )
      throws AFSException;
--- 998,1004 ----
     * @return 0 if there are no more volumes, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getVolumesAdvanceTo( long iterationId, 
  						   Volume theVolume, 
  						   int advanceCount )
      throws AFSException;
***************
*** 1010,1016 ****
     * @see #getVolumesBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getVolumesDone( int iterationId )
      throws AFSException;
  
    /**
--- 1010,1016 ----
     * @see #getVolumesBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getVolumesDone( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1041,1043 ****
--- 1041,1052 ----
     */
    protected static native void reclaimPartitionMemory();
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/classes/org/openafs/jafs/Process.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/Process.java:1.1 openafs/src/JAVA/classes/org/openafs/jafs/Process.java:1.1.8.1
*** openafs/src/JAVA/classes/org/openafs/jafs/Process.java:1.1	Fri Jul 26 01:34:06 2002
--- openafs/src/JAVA/classes/org/openafs/jafs/Process.java	Fri Oct 14 22:14:10 2005
***************
*** 128,134 ****
  
    protected String name;
    protected Server server;
!   protected int serverHandle;
  
    protected int type;
    protected int state;
--- 128,134 ----
  
    protected String name;
    protected Server server;
!   protected long serverHandle;
  
    protected int type;
    protected int state;
***************
*** 687,693 ****
     *
     * @return a <code>String</code> representation of the <code>Process</code>
     */
!   protected String getInfo()
    {
      String r;
      try {
--- 687,693 ----
     *
     * @return a <code>String</code> representation of the <code>Process</code>
     */
!   public String getInfo()
    {
      String r;
      try {
***************
*** 853,859 ****
     *                       in the information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getProcessInfo( int cellHandle, 
  					       String processName, 
  					       Process theProcess ) 
  	throws AFSException;
--- 853,859 ----
     *                       in the information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getProcessInfo( long cellHandle, 
  					       String processName, 
  					       Process theProcess ) 
  	throws AFSException;
***************
*** 884,890 ****
     *                   <code>null</code>
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void create( int serverHandle, String processName, 
  				       int processType, String executionPath, 
  				       String cronTime, String notifier )
      throws AFSException;
--- 884,890 ----
     *                   <code>null</code>
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void create( long serverHandle, String processName, 
  				       int processType, String executionPath, 
  				       String cronTime, String notifier )
      throws AFSException;
***************
*** 898,904 ****
     * @param processName   the name of the process to remove
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void delete( int serverHandle, String processName )
      throws AFSException;
  
    /**
--- 898,904 ----
     * @param processName   the name of the process to remove
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void delete( long serverHandle, String processName )
      throws AFSException;
  
    /**
***************
*** 910,916 ****
     * @param processName   the name of the process to start
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void start( int serverHandle, String processName )
      throws AFSException;
  
    /**
--- 910,916 ----
     * @param processName   the name of the process to start
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void start( long serverHandle, String processName )
      throws AFSException;
  
    /**
***************
*** 922,928 ****
     * @param processName   the name of the process to restart
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void restart( int serverHandle, String processName )
      throws AFSException;
  
    /**
--- 922,928 ----
     * @param processName   the name of the process to restart
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void restart( long serverHandle, String processName )
      throws AFSException;
  
    /**
***************
*** 934,940 ****
     * @param processName   the name of the process to stop
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void stop( int serverHandle, String processName )
      throws AFSException;
  
    /**
--- 934,940 ----
     * @param processName   the name of the process to stop
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void stop( long serverHandle, String processName )
      throws AFSException;
  
    /**
Index: openafs/src/JAVA/classes/org/openafs/jafs/Server.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/Server.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/Server.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/Server.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/Server.java	Fri Oct 14 22:14:10 2005
***************
*** 108,115 ****
    protected String name;
    protected Cell cell;
  
!   protected int vosHandle;
!   protected int bosHandle;
  
    protected boolean database;
    protected boolean fileServer;
--- 108,115 ----
    protected String name;
    protected Cell cell;
  
!   protected long vosHandle;
!   protected long bosHandle;
  
    protected boolean database;
    protected boolean fileServer;
***************
*** 353,359 ****
  
      Partition currPartition;
  
!     int iterationID = getPartitionsBegin( cell.getCellHandle(), 
  					  getVosHandle() );
      
      partitions = new ArrayList();
--- 353,359 ----
  
      Partition currPartition;
  
!     long iterationID = getPartitionsBegin( cell.getCellHandle(), 
  					  getVosHandle() );
      
      partitions = new ArrayList();
***************
*** 384,390 ****
  
      String currName;
  
!     int iterationID = getPartitionsBegin( cell.getCellHandle(), 
  					  getVosHandle() );
      
      partitionNames = new ArrayList();
--- 384,390 ----
  
      String currName;
  
!     long iterationID = getPartitionsBegin( cell.getCellHandle(), 
  					  getVosHandle() );
      
      partitionNames = new ArrayList();
***************
*** 404,410 ****
    {
      String currName;
  
!     int iterationID = getBosAdminsBegin( getBosHandle() );
      
      adminNames = new ArrayList();
      
--- 404,410 ----
    {
      String currName;
  
!     long iterationID = getBosAdminsBegin( getBosHandle() );
      
      adminNames = new ArrayList();
      
***************
*** 424,430 ****
    {
      User currUser;
  
!     int iterationID = getBosAdminsBegin( getBosHandle() );
  	
      admins = new ArrayList();
  	
--- 424,430 ----
    {
      User currUser;
  
!     long iterationID = getBosAdminsBegin( getBosHandle() );
  	
      admins = new ArrayList();
  	
***************
*** 446,452 ****
    {
      Key currKey;
  
!     int iterationID = getKeysBegin( getBosHandle() );
      
      keys = new ArrayList();
      
--- 446,452 ----
    {
      Key currKey;
  
!     long iterationID = getKeysBegin( getBosHandle() );
      
      keys = new ArrayList();
      
***************
*** 467,473 ****
    {
      String currName;
  
!     int iterationID = getProcessesBegin( getBosHandle() );
      
      processNames = new ArrayList();
      
--- 467,473 ----
    {
      String currName;
  
!     long iterationID = getProcessesBegin( getBosHandle() );
      
      processNames = new ArrayList();
      
***************
*** 487,493 ****
    {
      Process currProcess;
  
!     int iterationID = getProcessesBegin( getBosHandle() );
      
      processes = new ArrayList();
      
--- 487,493 ----
    {
      Process currProcess;
  
!     long iterationID = getProcessesBegin( getBosHandle() );
      
      processes = new ArrayList();
      
***************
*** 814,821 ****
    public Partition[] getPartitions() throws AFSException
    {
      if ( partitions == null ) refreshPartitions();
!     return (Partition []) 
! 	partitions.toArray( new Partition[partitions.size()] );
    }
  
    /**
--- 814,824 ----
    public Partition[] getPartitions() throws AFSException
    {
      if ( partitions == null ) refreshPartitions();
!     if ( partitions != null) {
!     	return (Partition []) partitions.toArray( new Partition[partitions.size()] );
!     } else {
!     	return null;
!     }
    }
  
    /**
***************
*** 977,983 ****
    public Process[] getProcesses() throws AFSException
    {
      if ( processes == null ) refreshProcesses();
!     return (Process[]) processes.toArray( new Process[processes.size()] );
    }
  
    /**
--- 980,989 ----
    public Process[] getProcesses() throws AFSException
    {
      if ( processes == null ) refreshProcesses();
!     if ( processes != null) {
!     	return (Process[]) processes.toArray( new Process[processes.size()] );
!     }
!     return null;
    }
  
    /**
***************
*** 1197,1203 ****
     * @return this server's vos handle
     * @exception AFSException  If an error occurs in the native code
     */
!   protected int getVosHandle() throws AFSException
    {
      if ( vosHandle == 0 ) {
        vosHandle = getVosServerHandle( cell.getCellHandle(), name );
--- 1203,1209 ----
     * @return this server's vos handle
     * @exception AFSException  If an error occurs in the native code
     */
!   protected long getVosHandle() throws AFSException
    {
      if ( vosHandle == 0 ) {
        vosHandle = getVosServerHandle( cell.getCellHandle(), name );
***************
*** 1211,1217 ****
     * @return this server's bos handle
     * @exception AFSException  If an error occurs in the native code
     */
!   protected int getBosHandle() throws AFSException
    {
      if ( bosHandle == 0 ) {
        bosHandle = getBosServerHandle( cell.getCellHandle(), name );
--- 1217,1223 ----
     * @return this server's bos handle
     * @exception AFSException  If an error occurs in the native code
     */
!   protected long getBosHandle() throws AFSException
    {
      if ( bosHandle == 0 ) {
        bosHandle = getBosServerHandle( cell.getCellHandle(), name );
***************
*** 1260,1266 ****
     *
     * @return a <code>String</code> representation of the <code>Server</code>
     */
!   protected String getInfo()
    {
      String r;
      try {
--- 1266,1272 ----
     *
     * @return a <code>String</code> representation of the <code>Server</code>
     */
!   public String getInfo()
    {
      String r;
      try {
***************
*** 1322,1328 ****
     * @return    a <code>String</code> representation of the partitions
     * @see       Partition#getInfo
     */
!   protected String getInfoPartitions() throws AFSException
    {
      String r;
      r = "Server: " + name + "\n\n";
--- 1328,1334 ----
     * @return    a <code>String</code> representation of the partitions
     * @see       Partition#getInfo
     */
!   public String getInfoPartitions() throws AFSException
    {
      String r;
      r = "Server: " + name + "\n\n";
***************
*** 1343,1349 ****
     * @return    a <code>String</code> representation of the keys
     * @see       Key#getInfo
     */
!   protected String getInfoKeys() throws AFSException
    {
      String r;
  
--- 1349,1355 ----
     * @return    a <code>String</code> representation of the keys
     * @see       Key#getInfo
     */
!   public String getInfoKeys() throws AFSException
    {
      String r;
  
***************
*** 1366,1372 ****
     * @return    a <code>String</code> representation of the processes
     * @see       Process#getInfo
     */
!   protected String getInfoProcesses() throws AFSException
    {
      String r;
  
--- 1372,1378 ----
     * @return    a <code>String</code> representation of the processes
     * @see       Process#getInfo
     */
!   public String getInfoProcesses() throws AFSException
    {
      String r;
  
***************
*** 1443,1456 ****
     * methods as a means of identification.
     *
     * @param cellHandle    a cell handle previously returned by 
!    *                      a call to {@link Cell#getCellHandle}
     * @param serverName    the name of the server for which to retrieve 
     *                      a vos handle
     * @return a vos handle to the server
     * @exception AFSException  If an error occurs in the native code
!    * @see Cell#getCellHandle
     */
!   protected static native int getVosServerHandle( int cellHandle, 
  						  String serverName )
  	throws AFSException;
  
--- 1449,1462 ----
     * methods as a means of identification.
     *
     * @param cellHandle    a cell handle previously returned by 
!    *                      a call to {@link #getCellHandle}
     * @param serverName    the name of the server for which to retrieve 
     *                      a vos handle
     * @return a vos handle to the server
     * @exception AFSException  If an error occurs in the native code
!    * @see #getCellHandle
     */
!   protected static native long getVosServerHandle( long cellHandle, 
  						  String serverName )
  	throws AFSException;
  
***************
*** 1460,1466 ****
     * @param vosHandle   the vos server handle to close
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void closeVosServerHandle( int vosHandle ) 
  	throws AFSException; 
  
    /**
--- 1466,1472 ----
     * @param vosHandle   the vos server handle to close
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void closeVosServerHandle( long vosHandle ) 
  	throws AFSException; 
  
    /**
***************
*** 1469,1482 ****
     * as a means of identification.
     *
     * @param cellHandle    a cell handle previously returned by a call 
!    *                      to {@link Cell#getCellHandle}
     * @param serverName    the name of the server for which to retrieve 
     *                      a bos handle
     * @return a bos handle to the server
     * @exception AFSException  If an error occurs in the native code
!    * @see Cell#getCellHandle
     */
!   protected static native int getBosServerHandle( int cellHandle, 
  						  String serverName )
  	throws AFSException;
  
--- 1475,1488 ----
     * as a means of identification.
     *
     * @param cellHandle    a cell handle previously returned by a call 
!    *                      to {@link #getCellHandle}
     * @param serverName    the name of the server for which to retrieve 
     *                      a bos handle
     * @return a bos handle to the server
     * @exception AFSException  If an error occurs in the native code
!    * @see #getCellHandle
     */
!   protected static native long getBosServerHandle( long cellHandle, 
  						  String serverName )
  	throws AFSException;
  
***************
*** 1486,1492 ****
     * @param bosHandle   the bos server handle to close
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void closeBosServerHandle( int bosHandle ) 
  	throws AFSException; 
  
    /**
--- 1492,1498 ----
     * @param bosHandle   the bos server handle to close
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void closeBosServerHandle( long bosHandle ) 
  	throws AFSException; 
  
    /**
***************
*** 1500,1506 ****
     * @see Server
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getServerInfo( int cellHandle, String name, 
  					      Server server ) 
  	throws AFSException;
  
--- 1506,1512 ----
     * @see Server
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getServerInfo( long cellHandle, String name, 
  					      Server server ) 
  	throws AFSException;
  
***************
*** 1516,1523 ****
     * @see Cell#getCellHandle
     * @see #getVosServerHandle
     */
!   protected static native int getPartitionCount( int cellHandle, 
! 						  int serverHandle )
      throws AFSException;
  
    /**
--- 1522,1529 ----
     * @see Cell#getCellHandle
     * @see #getVosServerHandle
     */
!   protected static native int getPartitionCount( long cellHandle, 
! 						  long serverHandle )
      throws AFSException;
  
    /**
***************
*** 1533,1540 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getPartitionsBegin( int cellHandle, 
! 						  int serverHandle )
      throws AFSException;
  
    /**
--- 1539,1546 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getPartitionsBegin( long cellHandle, 
! 						  long serverHandle )
      throws AFSException;
  
    /**
***************
*** 1546,1552 ****
     * @return the name of the next partition of the server
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getPartitionsNextString( int iterationId )
      throws AFSException;
  
    /**
--- 1552,1558 ----
     * @return the name of the next partition of the server
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getPartitionsNextString( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1560,1566 ****
     * @return 0 if there are no more servers, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getPartitionsNext( int iterationId, 
  						 Partition thePartition )
      throws AFSException;
  
--- 1566,1572 ----
     * @return 0 if there are no more servers, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getPartitionsNext( long iterationId, 
  						 Partition thePartition )
      throws AFSException;
  
***************
*** 1571,1577 ****
     * @see #getPartitionsBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getPartitionsDone( int iterationId )
      throws AFSException;
    
    /**
--- 1577,1583 ----
     * @see #getPartitionsBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getPartitionsDone( long iterationId )
      throws AFSException;
    
    /**
***************
*** 1584,1590 ****
     * @exception AFSException  If an error occurs in the native code
     * @see #getVosServerHandle
     */
!   protected static native int getProcessCount( int serverHandle )
      throws AFSException;
  
    /**
--- 1590,1596 ----
     * @exception AFSException  If an error occurs in the native code
     * @see #getVosServerHandle
     */
!   protected static native int getProcessCount( long serverHandle )
      throws AFSException;
  
    /**
***************
*** 1598,1604 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getProcessesBegin( int serverHandle )
      throws AFSException;
  
    /**
--- 1604,1610 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getProcessesBegin( long serverHandle )
      throws AFSException;
  
    /**
***************
*** 1610,1616 ****
     * @return the name of the next process of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getProcessesNextString( int iterationId )
      throws AFSException;
  
    /**
--- 1616,1622 ----
     * @return the name of the next process of the cell
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getProcessesNextString( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1626,1633 ****
     * @return 0 if there are no more processes, != otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getProcessesNext( int serverHandle, 
! 						int iterationId, 
  						Process theProcess )
      throws AFSException;
  
--- 1632,1639 ----
     * @return 0 if there are no more processes, != otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getProcessesNext( long serverHandle, 
! 						long iterationId, 
  						Process theProcess )
      throws AFSException;
  
***************
*** 1638,1644 ****
     * @see #getProcessesBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getProcessesDone( int iterationId )
      throws AFSException;
  
    /**
--- 1644,1650 ----
     * @see #getProcessesBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getProcessesDone( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1651,1657 ****
     * @exception AFSException  If an error occurs in the native code
     * @see #getVosServerHandle
     */
!   protected static native int getKeyCount( int serverHandle )
      throws AFSException;
  
    /**
--- 1657,1663 ----
     * @exception AFSException  If an error occurs in the native code
     * @see #getVosServerHandle
     */
!   protected static native int getKeyCount( long serverHandle )
      throws AFSException;
  
    /**
***************
*** 1664,1670 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getKeysBegin( int serverHandle )
      throws AFSException;
  
    /**
--- 1670,1676 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getKeysBegin( long serverHandle )
      throws AFSException;
  
    /**
***************
*** 1678,1684 ****
     * @return 0 if there are no more keys, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getKeysNext( int iterationId, Key theKey )
      throws AFSException;
  
    /**
--- 1684,1690 ----
     * @return 0 if there are no more keys, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getKeysNext( long iterationId, Key theKey )
      throws AFSException;
  
    /**
***************
*** 1688,1694 ****
     * @see #getKeysBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getKeysDone( int iterationId )
      throws AFSException;
  
    /**
--- 1694,1700 ----
     * @see #getKeysBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getKeysDone( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1701,1707 ****
     * @exception AFSException  If an error occurs in the native code
     * @see #getVosServerHandle
     */
!   protected static native int getBosAdminCount( int serverHandle )
      throws AFSException;
  
    /**
--- 1707,1713 ----
     * @exception AFSException  If an error occurs in the native code
     * @see #getVosServerHandle
     */
!   protected static native int getBosAdminCount( long serverHandle )
      throws AFSException;
  
    /**
***************
*** 1715,1721 ****
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getBosAdminsBegin( int serverHandle )
      throws AFSException;
  
    /**
--- 1721,1727 ----
     * @return an iteration ID
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native long getBosAdminsBegin( long serverHandle )
      throws AFSException;
  
    /**
***************
*** 1727,1733 ****
     * @return the name of the next admin of the server
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getBosAdminsNextString( int iterationId )
      throws AFSException;
  
    /**
--- 1733,1739 ----
     * @return the name of the next admin of the server
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getBosAdminsNextString( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1735,1749 ****
     * are no more admins, != 0 otherwise.
     *
     * @param cellHandle    the handle of the cell to which these admins belong
!    * @see Cell#getCellHandle
     * @param iterationId   the iteration ID of this iteration
     * @see #getBosAdminsBegin
     * @param theUser   the user object in which to fill the values of this admin
     * @return 0 if no more admins, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getBosAdminsNext( int cellHandle, 
! 						int iterationId, User theUser )
      throws AFSException;
  
    /**
--- 1741,1755 ----
     * are no more admins, != 0 otherwise.
     *
     * @param cellHandle    the handle of the cell to which these admins belong
!    * @see #getCellHandle
     * @param iterationId   the iteration ID of this iteration
     * @see #getBosAdminsBegin
     * @param theUser   the user object in which to fill the values of this admin
     * @return 0 if no more admins, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getBosAdminsNext( long cellHandle, 
! 						long iterationId, User theUser )
      throws AFSException;
  
    /**
***************
*** 1753,1759 ****
     * @see #getBosAdminsBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getBosAdminsDone( int iterationId )
      throws AFSException;
  
    /**
--- 1759,1765 ----
     * @see #getBosAdminsBegin
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void getBosAdminsDone( long iterationId )
      throws AFSException;
  
    /**
***************
*** 1765,1771 ****
     * @param adminName   the name of the admin to add to the list
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void addBosAdmin( int serverHandle, 
  					    String adminName )
      throws AFSException;
  
--- 1771,1777 ----
     * @param adminName   the name of the admin to add to the list
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void addBosAdmin( long serverHandle, 
  					    String adminName )
      throws AFSException;
  
***************
*** 1779,1785 ****
     * @param adminName   the name of the admin to remove from the list
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void removeBosAdmin( int serverHandle, 
  					       String adminName )
      throws AFSException;
  
--- 1785,1791 ----
     * @param adminName   the name of the admin to remove from the list
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void removeBosAdmin( long serverHandle, 
  					       String adminName )
      throws AFSException;
  
***************
*** 1787,1793 ****
     * Salvages (restores consistency to) a volume, partition, or server
     *
     * @param cellHandle    the handle of the cell to which the volume belongs
!    * @see Cell#getCellHandle
     * @param serverHandle  the bos handle of the server on which the 
     *                      volume resides
     * @see #getBosServerHandle
--- 1793,1799 ----
     * Salvages (restores consistency to) a volume, partition, or server
     *
     * @param cellHandle    the handle of the cell to which the volume belongs
!    * @see #getCellHandle
     * @param serverHandle  the bos handle of the server on which the 
     *                      volume resides
     * @see #getBosServerHandle
***************
*** 1815,1821 ****
     *                          one block at a time and skip badly damaged 
     *                          blocks.  Use if partition has disk errors
     */
!   protected static native void salvage( int cellHandle, int serverHandle, 
  					String partitionName, String volName,
  					int numSalvagers, String tempDir, 
  					String logFile, 
--- 1821,1827 ----
     *                          one block at a time and skip badly damaged 
     *                          blocks.  Use if partition has disk errors
     */
!   protected static native void salvage( long cellHandle, long serverHandle, 
  					String partitionName, String volName,
  					int numSalvagers, String tempDir, 
  					String logFile, 
***************
*** 1831,1844 ****
     *  Synchronizes a particular server with the volume location database.
     *
     * @param cellHandle    the handle of the cell to which the server belongs
!    * @see Cell#getCellHandle
     * @param serverHandle  the vos handle of the server     
     * @see #getVosServerHandle
     * @param partition   the id of the partition to sync, can be -1 to ignore
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void syncServerWithVLDB( int cellHandle, 
! 						   int serverHandle, 
  						   int partition )
      throws AFSException;
  
--- 1837,1850 ----
     *  Synchronizes a particular server with the volume location database.
     *
     * @param cellHandle    the handle of the cell to which the server belongs
!    * @see #getCellHandle
     * @param serverHandle  the vos handle of the server     
     * @see #getVosServerHandle
     * @param partition   the id of the partition to sync, can be -1 to ignore
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void syncServerWithVLDB( long cellHandle, 
! 						   long serverHandle, 
  						   int partition )
      throws AFSException;
  
***************
*** 1846,1860 ****
     *  Synchronizes the volume location database with a particular server.
     *
     * @param cellHandle    the handle of the cell to which the server belongs
!    * @see Cell#getCellHandle
     * @param serverHandle  the vos handle of the server     
     * @see #getVosServerHandle
     * @param partition   the id of the partition to sync, can be -1 to ignore
     * @param forceDeletion   whether or not to force the deletion of bad volumes
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void syncVLDBWithServer( int cellHandle, 
! 						   int serverHandle, 
  						   int partition, 
  						   boolean forceDeletion )
      throws AFSException;
--- 1852,1866 ----
     *  Synchronizes the volume location database with a particular server.
     *
     * @param cellHandle    the handle of the cell to which the server belongs
!    * @see #getCellHandle
     * @param serverHandle  the vos handle of the server     
     * @see #getVosServerHandle
     * @param partition   the id of the partition to sync, can be -1 to ignore
     * @param forceDeletion   whether or not to force the deletion of bad volumes
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void syncVLDBWithServer( long cellHandle, 
! 						   long serverHandle, 
  						   int partition, 
  						   boolean forceDeletion )
      throws AFSException;
***************
*** 1869,1875 ****
     * @param logLocation   the full path and name of the desired bos log
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getLog( int serverHandle, String logLocation )
      throws AFSException;
  
    /**
--- 1875,1881 ----
     * @param logLocation   the full path and name of the desired bos log
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native String getLog( long serverHandle, String logLocation )
      throws AFSException;
  
    /**
***************
*** 1886,1892 ****
     *                    the restart time fields
     * @exception AFSException  If an error occurs in the native code
     */
!   private static native void getRestartTime( int serverHandle, 
  					       int restartType, 
  					       ExecutableTime executableTime )
      throws AFSException;
--- 1892,1898 ----
     *                    the restart time fields
     * @exception AFSException  If an error occurs in the native code
     */
!   private static native void getRestartTime( long serverHandle, 
  					       int restartType, 
  					       ExecutableTime executableTime )
      throws AFSException;
***************
*** 1903,1909 ****
     * @param theServer   the server object containing the desired information
     * @exception AFSException  If an error occurs in the native code
     */
!   private static native void setRestartTime( int serverHandle, 
  					       int restartType, 
  					       ExecutableTime executableTime )
      throws AFSException;
--- 1909,1915 ----
     * @param theServer   the server object containing the desired information
     * @exception AFSException  If an error occurs in the native code
     */
!   private static native void setRestartTime( long serverHandle, 
  					       int restartType, 
  					       ExecutableTime executableTime )
      throws AFSException;
***************
*** 1916,1922 ****
     * @see #getBosServerHandle
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void startAllProcesses( int serverHandle )
      throws AFSException;
  
    /**
--- 1922,1928 ----
     * @see #getBosServerHandle
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void startAllProcesses( long serverHandle )
      throws AFSException;
  
    /**
***************
*** 1928,1934 ****
     * @param restartBosServer   whether or not to restart the bos server as well
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void restartAllProcesses( int serverHandle, 
  						    boolean restartBosServer )
      throws AFSException;
  
--- 1934,1940 ----
     * @param restartBosServer   whether or not to restart the bos server as well
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void restartAllProcesses( long serverHandle, 
  						    boolean restartBosServer )
      throws AFSException;
  
***************
*** 1940,1946 ****
     * @see #getBosServerHandle
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void stopAllProcesses( int serverHandle )
      throws AFSException;
  
    /**
--- 1946,1952 ----
     * @see #getBosServerHandle
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void stopAllProcesses( long serverHandle )
      throws AFSException;
  
    /**
Index: openafs/src/JAVA/classes/org/openafs/jafs/Token.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/Token.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/Token.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/Token.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/Token.java	Fri Oct 14 22:14:10 2005
***************
*** 91,97 ****
  {
    public static int ANYUSER_PAG_ID;
  
!   protected int tokenHandle;
    protected int pagID = -1;
    protected int errno;
  
--- 91,97 ----
  {
    public static int ANYUSER_PAG_ID;
  
!   protected long tokenHandle;
    protected int pagID = -1;
    protected int errno;
  
***************
*** 161,167 ****
      this.password = password;
      this.cellName = cellName;
  
! System.out.println(username + ", " + cellName);
      /* By default lets authenticate the user using libafsauthent.a */
      login();
    }
--- 161,167 ----
      this.password = password;
      this.cellName = cellName;
  
! //System.out.println(username + ", " + cellName);
      /* By default lets authenticate the user using libafsauthent.a */
      login();
    }
***************
*** 196,202 ****
     * @exception AFSException  If an error occurs in the native code
     * @return a token representing the authentication
     */
!   protected int getHandle()
    {
      return tokenHandle;
    }
--- 196,202 ----
     * @exception AFSException  If an error occurs in the native code
     * @return a token representing the authentication
     */
!   protected long getHandle()
    {
      return tokenHandle;
    }
***************
*** 250,255 ****
--- 250,256 ----
    public void login() throws AFSException
    {
      this.tokenHandle = this.getToken(cellName, username, password);
+ //System.out.println("Token handle -> " + tokenHandle);
    }
  
    /**
***************
*** 355,361 ****
     * @exception AFSException  If an error occurs in the native code
     * @return a token representing the authentication
     */
!   protected native int getToken( String cellName, String username, 
                                   String password ) 
  	throws AFSException;
  
--- 356,362 ----
     * @exception AFSException  If an error occurs in the native code
     * @return a token representing the authentication
     */
!   protected native long getToken( String cellName, String username, 
                                   String password ) 
  	throws AFSException;
  
***************
*** 365,371 ****
     * @param tokenHandle   the token to close
     * @exception AFSException  If an error occurs in the native code
     */
!   protected native void close( int tokenHandle ) throws AFSException;
  
    /**
     *  Gets the expiration time for a given token.
--- 366,372 ----
     * @param tokenHandle   the token to close
     * @exception AFSException  If an error occurs in the native code
     */
!   protected native void close( long tokenHandle ) throws AFSException;
  
    /**
     *  Gets the expiration time for a given token.
***************
*** 376,382 ****
     * @return a long representing the UTC time for the token expiration
     * @exception AFSException  If an error occurs in the native code
     */
!   protected native long getExpiration( int tokenHandle )
        throws AFSException;
  
    /**
--- 377,383 ----
     * @return a long representing the UTC time for the token expiration
     * @exception AFSException  If an error occurs in the native code
     */
!   protected native long getExpiration( long tokenHandle )
        throws AFSException;
  
    /**
Index: openafs/src/JAVA/classes/org/openafs/jafs/User.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/User.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/User.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/User.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/User.java	Fri Oct 14 22:14:10 2005
***************
*** 160,166 ****
    public static final int NO_REUSE_PASSWORD = 1;
  
    protected Cell cell;
!   protected int cellHandle;
    protected String name;
  
    /**
--- 160,166 ----
    public static final int NO_REUSE_PASSWORD = 1;
  
    protected Cell cell;
!   protected long cellHandle;
    protected String name;
  
    /**
***************
*** 542,548 ****
    protected void refreshGroupNames() throws AFSException
    {
      String currName;
!     int iterationID = getUserGroupsBegin( cell.getCellHandle(), name );
      groupNames = new ArrayList();
      while( ( currName = getUserGroupsNextString( iterationID ) ) != null ) {
        groupNames.add( currName );
--- 542,548 ----
    protected void refreshGroupNames() throws AFSException
    {
      String currName;
!     long iterationID = getUserGroupsBegin( cell.getCellHandle(), name );
      groupNames = new ArrayList();
      while( ( currName = getUserGroupsNextString( iterationID ) ) != null ) {
        groupNames.add( currName );
***************
*** 560,566 ****
    protected void refreshGroups() throws AFSException
    {
      Group currGroup;
!     int iterationID = getUserGroupsBegin( cell.getCellHandle(), name );
  
      groups = new ArrayList();
  
--- 560,566 ----
    protected void refreshGroups() throws AFSException
    {
      Group currGroup;
!     long iterationID = getUserGroupsBegin( cell.getCellHandle(), name );
  
      groups = new ArrayList();
  
***************
*** 582,588 ****
    protected void refreshGroupsOwnedNames() throws AFSException
    {
      String currName;
!     int iterationID = this.getGroupsOwnedBegin( cell.getCellHandle(), name );
      groupsOwnedNames = new ArrayList();
      while( ( currName = this.getGroupsOwnedNextString( iterationID ) ) 
  	   != null ) {
--- 582,588 ----
    protected void refreshGroupsOwnedNames() throws AFSException
    {
      String currName;
!     long iterationID = this.getGroupsOwnedBegin( cell.getCellHandle(), name );
      groupsOwnedNames = new ArrayList();
      while( ( currName = this.getGroupsOwnedNextString( iterationID ) ) 
  	   != null ) {
***************
*** 601,607 ****
    protected void refreshGroupsOwned() throws AFSException
    {
      Group currGroup;
!     int iterationID = getGroupsOwnedBegin( cell.getCellHandle(), name );
      groupsOwned = new ArrayList();
      currGroup = new Group( cell );
      while( getGroupsOwnedNext( cellHandle, iterationID, currGroup ) != 0 ) {
--- 601,607 ----
    protected void refreshGroupsOwned() throws AFSException
    {
      Group currGroup;
!     long iterationID = getGroupsOwnedBegin( cell.getCellHandle(), name );
      groupsOwned = new ArrayList();
      currGroup = new Group( cell );
      while( getGroupsOwnedNext( cellHandle, iterationID, currGroup ) != 0 ) {
***************
*** 1288,1294 ****
      if( (value != this.USER_OWNER_ACCESS) && 
  	(value != this.USER_ANYUSER_ACCESS) ) {
  	throw new IllegalArgumentException( "Cannot set listStatus to " 
!                                           + value );
      } else {
  	listStatus = value;
      }
--- 1288,1294 ----
      if( (value != this.USER_OWNER_ACCESS) && 
  	(value != this.USER_ANYUSER_ACCESS) ) {
  	throw new IllegalArgumentException( "Cannot set listStatus to " 
! 					    + value );
      } else {
  	listStatus = value;
      }
***************
*** 1313,1319 ****
      if( (value != this.USER_OWNER_ACCESS) && 
  	(value != this.USER_ANYUSER_ACCESS) ) {
  	throw new IllegalArgumentException( "Cannot set listGroupsOwned to " 
!                                           + value );
      } else {
  	listGroupsOwned = value;
      }
--- 1313,1319 ----
      if( (value != this.USER_OWNER_ACCESS) && 
  	(value != this.USER_ANYUSER_ACCESS) ) {
  	throw new IllegalArgumentException( "Cannot set listGroupsOwned to " 
! 					    + value );
      } else {
  	listGroupsOwned = value;
      }
***************
*** 1339,1345 ****
      if( (value != this.USER_OWNER_ACCESS) && 
  	(value != this.USER_ANYUSER_ACCESS) ) {
  	throw new IllegalArgumentException( "Cannot set listMembership to " 
!                                           + value );
      } else {
  	listMembership = value;
      }
--- 1339,1345 ----
      if( (value != this.USER_OWNER_ACCESS) && 
  	(value != this.USER_ANYUSER_ACCESS) ) {
  	throw new IllegalArgumentException( "Cannot set listMembership to " 
! 					    + value );
      } else {
  	listMembership = value;
      }
***************
*** 1503,1509 ****
     *
     * @return a <code>String</code> representation of the <code>User</code>
     */
!   protected String getInfo()
    {
      String r;
      try {
--- 1503,1509 ----
     *
     * @return a <code>String</code> representation of the <code>User</code>
     */
!   public String getInfo()
    {
      String r;
      try {
***************
*** 1624,1630 ****
     * @return    a <code>String</code> representation of the groups belonged to
     * @see       Group#toString
     */
!   protected String getInfoGroups() throws AFSException
    {
  	String r;
  	r = "User: " + name + "\n\n";
--- 1624,1630 ----
     * @return    a <code>String</code> representation of the groups belonged to
     * @see       Group#toString
     */
!   public String getInfoGroups() throws AFSException
    {
  	String r;
  	r = "User: " + name + "\n\n";
***************
*** 1644,1650 ****
     * @return    a <code>String</code> representation of the groups owned
     * @see       Group#toString
     */
!   protected String getInfoGroupsOwned() throws AFSException
    {
  	String r;
  	r = "User: " + name + "\n\n";
--- 1644,1650 ----
     * @return    a <code>String</code> representation of the groups owned
     * @see       Group#toString
     */
!   public String getInfoGroupsOwned() throws AFSException
    {
  	String r;
  	r = "User: " + name + "\n\n";
***************
*** 1723,1730 ****
     *                automatically assigned)
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void create( int cellHandle, String userName, 
!                                        String password, int uid )
  	throws AFSException;
  
    /**
--- 1723,1730 ----
     *                automatically assigned)
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void create( long cellHandle, String userName, 
! 				       String password, int uid )
  	throws AFSException;
  
    /**
***************
*** 1737,1743 ****
     * @param groupName      the name of the user to delete
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void delete( int cellHandle, String userName )
  	throws AFSException;
  
    /**
--- 1737,1743 ----
     * @param groupName      the name of the user to delete
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void delete( long cellHandle, String userName )
  	throws AFSException;
  
    /**
***************
*** 1748,1754 ****
     * @param groupName      the name of the user to unlock
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void unlock( int cellHandle, String userName )
  	throws AFSException;
  
    /**
--- 1748,1754 ----
     * @param groupName      the name of the user to unlock
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native void unlock( long cellHandle, String userName )
  	throws AFSException;
  
    /**
***************
*** 1763,1770 ****
     * @see User
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getUserInfo( int cellHandle, String name, 
!                                             User user ) 
  	throws AFSException;
  
    /**
--- 1763,1770 ----
     * @see User
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getUserInfo( long cellHandle, String name, 
! 					    User user ) 
  	throws AFSException;
  
    /**
***************
*** 1778,1785 ****
     *                 information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void setUserInfo( int cellHandle, String name, 
!                                             User theUser ) 
  	throws AFSException;
  
    /**
--- 1778,1785 ----
     *                 information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void setUserInfo( long cellHandle, String name, 
! 					    User theUser ) 
  	throws AFSException;
  
    /**
***************
*** 1792,1799 ****
     * @param newName     the new name for the user
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void rename( int cellHandle, String oldName, 
!                                        String newName )
  	throws AFSException;
  
    /**
--- 1792,1799 ----
     * @param newName     the new name for the user
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void rename( long cellHandle, String oldName, 
! 				       String newName )
  	throws AFSException;
  
    /**
***************
*** 1805,1812 ****
     * @param newPassword     the new password for the user
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void setPassword( int cellHandle, String userName, 
!                                             String newPassword )
  	throws AFSException;
  
    /**
--- 1805,1812 ----
     * @param newPassword     the new password for the user
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void setPassword( long cellHandle, String userName, 
! 					    String newPassword )
  	throws AFSException;
  
    /**
***************
*** 1820,1826 ****
     * @return an iteration ID
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native int getUserGroupsBegin( int cellHandle, String name )
  	throws AFSException;
  
    /**
--- 1820,1826 ----
     * @return an iteration ID
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native long getUserGroupsBegin( long cellHandle, String name )
  	throws AFSException;
  
    /**
***************
*** 1828,1838 ****
     * <code>null</code> if there are no more groups.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see #getUserGroupsBegin
     * @return the name of the next group
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native String getUserGroupsNextString( int iterationId )
  	throws AFSException;
  
    /**
--- 1828,1838 ----
     * <code>null</code> if there are no more groups.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see getUserGroupsBegin
     * @return the name of the next group
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native String getUserGroupsNextString( long iterationId )
  	throws AFSException;
  
    /**
***************
*** 1842,1866 ****
     * @param cellHandle    the handle of the cell to which the users belong
     * @see Cell#getCellHandle
     * @param iterationId   the iteration ID of this iteration
!    * @see #getUserGroupsBegin
     * @param theGroup   a Group object to be populated with the values of the 
     *                   next group
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getUserGroupsNext( int cellHandle, 
!                                                  int iterationId, 
!                                                  Group theGroup )
      throws AFSException;
  
    /**
     * Signals that the iteration is complete and will not be accessed anymore.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see #getUserGroupsBegin
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getUserGroupsDone( int iterationId )
  	throws AFSException;
  
    /**
--- 1842,1866 ----
     * @param cellHandle    the handle of the cell to which the users belong
     * @see Cell#getCellHandle
     * @param iterationId   the iteration ID of this iteration
!    * @see getUserGroupsBegin
     * @param theGroup   a Group object to be populated with the values of the 
     *                   next group
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getUserGroupsNext( long cellHandle, 
! 						 long iterationId, 
! 						 Group theGroup )
      throws AFSException;
  
    /**
     * Signals that the iteration is complete and will not be accessed anymore.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see getUserGroupsBegin
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getUserGroupsDone( long iterationId )
  	throws AFSException;
  
    /**
***************
*** 1872,1878 ****
     * @exception AFSException   If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getGroupsOwnedCount( int cellHandle, String name )
  	throws AFSException;
  
    /**
--- 1872,1878 ----
     * @exception AFSException   If an error occurs in the native code
     * @see Cell#getCellHandle
     */
!   protected static native int getGroupsOwnedCount( long cellHandle, String name )
  	throws AFSException;
  
    /**
***************
*** 1886,1893 ****
     * @return an iteration ID
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native int getGroupsOwnedBegin( int cellHandle, 
!                                                    String name )
  	throws AFSException;
  
    /**
--- 1886,1893 ----
     * @return an iteration ID
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native long getGroupsOwnedBegin( long cellHandle, 
! 						   String name )
  	throws AFSException;
  
    /**
***************
*** 1895,1905 ****
     * if there are no more groups.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see #getGroupsOwnedBegin
     * @return the name of the next group
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native String getGroupsOwnedNextString( int iterationId )
  	throws AFSException;
  
    /**
--- 1895,1905 ----
     * if there are no more groups.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see getGroupsOwnedBegin
     * @return the name of the next group
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native String getGroupsOwnedNextString( long iterationId )
  	throws AFSException;
  
    /**
***************
*** 1909,1933 ****
     * @param cellHandle    the handle of the cell to which the users belong
     * @see Cell#getCellHandle
     * @param iterationId   the iteration ID of this iteration
!    * @see #getGroupsOwnedBegin
     * @param theGroup   a Group object to be populated with the values of the 
     *                   next group
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getGroupsOwnedNext( int cellHandle, 
!                 						  int iterationId, 
! 			            			  Group theGroup )
      throws AFSException;
  
    /**
     * Signals that the iteration is complete and will not be accessed anymore.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see #getGroupsOwnedBegin
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getGroupsOwnedDone( int iterationId )
  	throws AFSException;
  
    /**
--- 1909,1933 ----
     * @param cellHandle    the handle of the cell to which the users belong
     * @see Cell#getCellHandle
     * @param iterationId   the iteration ID of this iteration
!    * @see getGroupsOwnedBegin
     * @param theGroup   a Group object to be populated with the values of the 
     *                   next group
     * @return 0 if there are no more users, != 0 otherwise
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int getGroupsOwnedNext( long cellHandle, 
! 						  long iterationId, 
! 						  Group theGroup )
      throws AFSException;
  
    /**
     * Signals that the iteration is complete and will not be accessed anymore.
     *
     * @param iterationId   the iteration ID of this iteration
!    * @see getGroupsOwnedBegin
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getGroupsOwnedDone( long iterationId )
  	throws AFSException;
  
    /**
***************
*** 1937,1939 ****
--- 1937,1948 ----
     */
    protected static native void reclaimUserMemory();
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/classes/org/openafs/jafs/VersionInfo.java
diff -c /dev/null openafs/src/JAVA/classes/org/openafs/jafs/VersionInfo.java:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:20 2006
--- openafs/src/JAVA/classes/org/openafs/jafs/VersionInfo.java	Fri Oct 14 22:14:10 2005
***************
*** 0 ****
--- 1,72 ----
+ /*
+  * @(#)VersionInfo.java	1.0 05/09/2005
+  *
+  * Copyright (c) 2001 International Business Machines Corp.
+  * 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
+  * 
+  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+  * A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
+  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
+ package org.openafs.jafs;
+ 
+ /**
+  * Provides version information about the native C library and the JAVA side.
+  *
+  * At least a <<Class.forName("org.openafs.jafs.Token");>> is necessary before using these methods.
+  * Perhaps a redesign would be required because the library initialization occures only in Token.java.
+  */
+ public class VersionInfo
+ {
+   /**
+    * Returns java interface version string
+    * the native library version should be higher
+    */
+   public static String getVersionOfJavaInterface() {return "20050905";}
+ 
+   /**
+    * Returns the native library version
+    *
+    * @exception AFSException if internal (libjafs, libjafsadmin) versions differ
+    */
+   public static String getVersionOfLibrary() throws AFSException
+   {
+   	String ver = getVersionOfLibjafs();
+ 	if (!ver.equals(getVersionOfLibjafsadm()))
+ 		throw new AFSException("library versions differ", 0);
+ 	return ver;
+   }
+ 
+   /**
+    * Returns build information of the native library.
+    * This information is autogenerated by the openafs make system.
+    * Example: "@(#) OpenAFS 1.3.87 built  2005-09-06 "
+    *
+    * @exception AFSException if internal (libjafs, libjafsadmin) versions differ
+    */
+   public static String getBuildInfo() throws AFSException
+   {
+   	String info = getBuildInfoOfLibjafs();
+ 	if (!info.equals(getBuildInfoOfLibjafsadm()))
+ 		throw new AFSException("library build info differ", 0);
+ 	return info;
+   }
+ 
+   private static native String getVersionOfLibjafs();
+   private static native String getVersionOfLibjafsadm();
+   private static native String getBuildInfoOfLibjafs();
+   private static native String getBuildInfoOfLibjafsadm();
+ }
Index: openafs/src/JAVA/classes/org/openafs/jafs/Volume.java
diff -c openafs/src/JAVA/classes/org/openafs/jafs/Volume.java:1.2 openafs/src/JAVA/classes/org/openafs/jafs/Volume.java:1.2.2.1
*** openafs/src/JAVA/classes/org/openafs/jafs/Volume.java:1.2	Thu Jun 19 12:53:14 2003
--- openafs/src/JAVA/classes/org/openafs/jafs/Volume.java	Fri Oct 14 22:14:10 2005
***************
*** 315,321 ****
    protected void refreshInfo() throws AFSException
    {
      getVolumeInfo( cell.getCellHandle(), server.getVosHandle(), 
!                    partition.getID(), getID(), this );
      cachedInfo = true;
      creationDateCal = null;
      lastUpdateDateCal = null;
--- 315,321 ----
    protected void refreshInfo() throws AFSException
    {
      getVolumeInfo( cell.getCellHandle(), server.getVosHandle(), 
! 		   partition.getID(), getID(), this );
      cachedInfo = true;
      creationDateCal = null;
      lastUpdateDateCal = null;
***************
*** 333,339 ****
    public void create( int quota ) throws AFSException
    {
      id = create( cell.getCellHandle(), server.getVosHandle(), 
!                  partition.getID(), name, quota );
      maxQuota = quota;
    }
  
--- 333,339 ----
    public void create( int quota ) throws AFSException
    {
      id = create( cell.getCellHandle(), server.getVosHandle(), 
! 		 partition.getID(), name, quota );
      maxQuota = quota;
    }
  
***************
*** 366,372 ****
    {
      Server siteServer = sitePartition.getServer();
      createReadOnlyVolume( cell.getCellHandle(), siteServer.getVosHandle(), 
!                           sitePartition.getID(), getID() );
      release( false );
      return new Volume( name + ".readonly", sitePartition );
    }
--- 366,372 ----
    {
      Server siteServer = sitePartition.getServer();
      createReadOnlyVolume( cell.getCellHandle(), siteServer.getVosHandle(), 
! 			  sitePartition.getID(), getID() );
      release( false );
      return new Volume( name + ".readonly", sitePartition );
    }
***************
*** 379,385 ****
    public void delete() throws AFSException
    {
      delete( cell.getCellHandle(), server.getVosHandle(), partition.getID(), 
!             getID() );
      name = null;
      creationDateCal = null;
      lastUpdateDateCal = null;
--- 379,385 ----
    public void delete() throws AFSException
    {
      delete( cell.getCellHandle(), server.getVosHandle(), partition.getID(), 
! 	    getID() );
      name = null;
      creationDateCal = null;
      lastUpdateDateCal = null;
***************
*** 434,440 ****
        startTime = (int) ((dumpSince.getTime().getTime())/((long) 1000));
      }
      dump( cell.getCellHandle(), server.getVosHandle(), partition.getID(), 
!           getID(), startTime, fileName );
    }
  
    /**
--- 434,440 ----
        startTime = (int) ((dumpSince.getTime().getTime())/((long) 1000));
      }
      dump( cell.getCellHandle(), server.getVosHandle(), partition.getID(), 
! 	  getID(), startTime, fileName );
    }
  
    /**
***************
*** 485,491 ****
        throws AFSException
    {
      restore( cell.getCellHandle(), server.getVosHandle(), partition.getID(), 
!              id, name, fileName, incremental );
    }
  
    /**
--- 485,491 ----
        throws AFSException
    {
      restore( cell.getCellHandle(), server.getVosHandle(), partition.getID(), 
! 	     id, name, fileName, incremental );
    }
  
    /**
***************
*** 541,547 ****
    {
      Server newServer = newPartition.getServer();
      move( cell.getCellHandle(), server.getVosHandle(), partition.getID(), 
!           newServer.getVosHandle(), newPartition.getID(), getID() );
  
      server = newServer;
      partition = newPartition;
--- 541,547 ----
    {
      Server newServer = newPartition.getServer();
      move( cell.getCellHandle(), server.getVosHandle(), partition.getID(), 
! 	  newServer.getVosHandle(), newPartition.getID(), getID() );
  
      server = newServer;
      partition = newPartition;
***************
*** 568,575 ****
    public void salvage() throws AFSException
    {
      Server.salvage( cell.getCellHandle(), server.getBosHandle(), 
!                     partition.getName(), name, 4, null, null, false, false, 
!                     false, false, false, false );
    }
  
    /**
--- 568,575 ----
    public void salvage() throws AFSException
    {
      Server.salvage( cell.getCellHandle(), server.getBosHandle(), 
! 		    partition.getName(), name, 4, null, null, false, false, 
! 		    false, false, false, false );
    }
  
    /**
***************
*** 598,604 ****
      throws AFSException
    {
      Cell.createMountPoint( cell.getCellHandle(), directory, getName(), 
!                            readWrite, false ); 
    }
  
    //////////////// accessors:  ////////////////////////
--- 598,604 ----
      throws AFSException
    {
      Cell.createMountPoint( cell.getCellHandle(), directory, getName(), 
! 			   readWrite, false ); 
    }
  
    //////////////// accessors:  ////////////////////////
***************
*** 847,853 ****
      if ( !cachedInfo ) refreshInfo();
      if (maxQuota == 0) {
        throw new AFSException("Volume with id " + id + 
!                              " has an unlimited quota configured.", 0);
      }
      return maxQuota;
    }
--- 847,853 ----
      if ( !cachedInfo ) refreshInfo();
      if (maxQuota == 0) {
        throw new AFSException("Volume with id " + id + 
!                                   " has an unlimited quota configured.", 0);
      }
      return maxQuota;
    }
***************
*** 954,960 ****
    public void setQuota( int quota ) throws AFSException
    {
      this.changeQuota( cell.getCellHandle(), server.getVosHandle(), 
!                       partition.getID(), getID(), quota );
      maxQuota = quota;
    }
  
--- 954,960 ----
    public void setQuota( int quota ) throws AFSException
    {
      this.changeQuota( cell.getCellHandle(), server.getVosHandle(), 
! 		      partition.getID(), getID(), quota );
      maxQuota = quota;
    }
  
***************
*** 966,972 ****
     *
     * @return a <code>String</code> representation of the <code>Volume</code>
     */
!   protected String getInfo()
    {
        String r;
        try {
--- 966,972 ----
     *
     * @return a <code>String</code> representation of the <code>Volume</code>
     */
!   public String getInfo()
    {
        String r;
        try {
***************
*** 1096,1104 ****
     *                    the information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getVolumeInfo( int cellHandle, int serverHandle,
!                                               int partition, int volId, 
!                                               Volume theVolume ) 
  	throws AFSException;
  
    /**
--- 1096,1104 ----
     *                    the information
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void getVolumeInfo( long cellHandle, long serverHandle,
! 					      int partition, int volId, 
! 					      Volume theVolume ) 
  	throws AFSException;
  
    /**
***************
*** 1116,1124 ****
     * @return the numeric ID assigned to the volume
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native int create( int cellHandle, int serverHandle, 
!                                       int partition, String volumeName, 
!                                       int quota ) 
  	throws AFSException;
  
    /**
--- 1116,1124 ----
     * @return the numeric ID assigned to the volume
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native int create( long cellHandle, long serverHandle, 
! 				      int partition, String volumeName, 
! 				      int quota ) 
  	throws AFSException;
  
    /**
***************
*** 1134,1141 ****
     * @param volId   the numeric id of the volume to delete
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void delete( int cellHandle, int serverHandle, 
!                                        int partition, int volId ) 
  	throws AFSException;
  
    /**
--- 1134,1141 ----
     * @param volId   the numeric id of the volume to delete
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void delete( long cellHandle, long serverHandle, 
! 				       int partition, int volId ) 
  	throws AFSException;
  
    /**
***************
*** 1146,1152 ****
     *               volume
     * @see Cell#getCellHandle
     */
!   protected static native void createBackupVolume( int cellHandle, int volId )
  	throws AFSException;
  
    /**
--- 1146,1152 ----
     *               volume
     * @see Cell#getCellHandle
     */
!   protected static native void createBackupVolume( long cellHandle, int volId )
  	throws AFSException;
  
    /**
***************
*** 1161,1169 ****
     * @param volId  the numeric id of the volume for which to create a read-only volume
     * @see Cell#getCellHandle
     */
!   protected static native void createReadOnlyVolume( int cellHandle, 
!                                                      int serverHandle, 
!                                                      int partition, int volId )
  	throws AFSException;
  
    /**
--- 1161,1169 ----
     * @param volId  the numeric id of the volume for which to create a read-only volume
     * @see Cell#getCellHandle
     */
!   protected static native void createReadOnlyVolume( long cellHandle, 
! 						     long serverHandle, 
! 						     int partition, int volId )
  	throws AFSException;
  
    /**
***************
*** 1179,1187 ****
     *               delete the read-only volume
     * @see Cell#getCellHandle
     */
!   protected static native void deleteReadOnlyVolume( int cellHandle, 
!                                                      int serverHandle, 
!                                                      int partition, int volId )
  	throws AFSException;
  
    /**
--- 1179,1187 ----
     *               delete the read-only volume
     * @see Cell#getCellHandle
     */
!   protected static native void deleteReadOnlyVolume( long cellHandle, 
! 						     long serverHandle, 
! 						     int partition, int volId )
  	throws AFSException;
  
    /**
***************
*** 1198,1206 ****
     * @param newQuota    the new quota (in KB) to assign the volume
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void changeQuota( int cellHandle, int serverHandle, 
!                                             int partition, int volId, 
!                                             int newQuota ) 
  	throws AFSException;
  
    /**
--- 1198,1206 ----
     * @param newQuota    the new quota (in KB) to assign the volume
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void changeQuota( long cellHandle, long serverHandle, 
! 					    int partition, int volId, 
! 					    int newQuota ) 
  	throws AFSException;
  
    /**
***************
*** 1220,1228 ****
     * @param volId  the numeric id of the volume to move
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void move( int cellHandle, int fromServerHandle, 
!                                      int fromPartition, int toServerHandle, 
!                                      int toPartition, int volId ) 
  	throws AFSException;
  
    /**
--- 1220,1228 ----
     * @param volId  the numeric id of the volume to move
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void move( long cellHandle, long fromServerHandle, 
! 				     int fromPartition, long toServerHandle, 
! 				     int toPartition, int volId ) 
  	throws AFSException;
  
    /**
***************
*** 1233,1240 ****
     * @param forceComplete  whether or not to force a complete release
     * @see Cell#getCellHandle
     */
!   protected static native void release( int cellHandle, int volId, 
!                                         boolean forceComplete )
  	throws AFSException;
  
    /**
--- 1233,1240 ----
     * @param forceComplete  whether or not to force a complete release
     * @see Cell#getCellHandle
     */
!   protected static native void release( long cellHandle, int volId, 
! 					boolean forceComplete )
  	throws AFSException;
  
    /**
***************
*** 1253,1261 ****
     * @param dumpFile   the full path of the file to which to dump
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void dump( int cellHandle, int serverHandle, 
!                                      int partition, int volId, int startTime, 
!                                      String dumpFile ) 
  	throws AFSException;
  
    /**
--- 1253,1261 ----
     * @param dumpFile   the full path of the file to which to dump
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void dump( long cellHandle, long serverHandle, 
! 				     int partition, int volId, int startTime, 
! 				     String dumpFile ) 
  	throws AFSException;
  
    /**
***************
*** 1277,1286 ****
     *                     otherwise restores a full dump
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void restore( int cellHandle, int serverHandle, 
!                                         int partition, int volId, 
!                                         String volumeName, String dumpFile, 
!                                         boolean incremental ) 
  	throws AFSException;
  
    /**
--- 1277,1286 ----
     *                     otherwise restores a full dump
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void restore( long cellHandle, long serverHandle, 
! 					int partition, int volId, 
! 					String volumeName, String dumpFile, 
! 					boolean incremental ) 
  	throws AFSException;
  
    /**
***************
*** 1292,1299 ****
     * @param newVolumeName  the new name for the volume
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void rename( int cellHandle, int volId, 
!                                        String newVolumeName ) 
  	throws AFSException;
  
    /**
--- 1292,1299 ----
     * @param newVolumeName  the new name for the volume
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void rename( long cellHandle, int volId, 
! 				       String newVolumeName ) 
  	throws AFSException;
  
    /**
***************
*** 1311,1319 ****
     *                     status of the volume -- busy or offline)
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void mount( int serverHandle, int partition, 
!                                       int volId, int sleepTime, 
!                                       boolean offline ) 
  	throws AFSException;
  
    /**
--- 1311,1319 ----
     *                     status of the volume -- busy or offline)
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void mount( long serverHandle, int partition, 
! 				      int volId, int sleepTime, 
! 				      boolean offline ) 
  	throws AFSException;
  
    /**
***************
*** 1327,1334 ****
     * @param volId  the numeric id of the volume to bring offline
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void unmount( int serverHandle, int partition, 
!                                         int volId ) 
  	throws AFSException;
  
    /**
--- 1327,1334 ----
     * @param volId  the numeric id of the volume to bring offline
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void unmount( long serverHandle, int partition, 
! 					int volId ) 
  	throws AFSException;
  
    /**
***************
*** 1339,1345 ****
     * @param volId  the numeric id of the volume to lock
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void lock( int cellHandle, int volId ) 
  	throws AFSException;
  
    /**
--- 1339,1345 ----
     * @param volId  the numeric id of the volume to lock
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void lock( long cellHandle, int volId ) 
  	throws AFSException;
  
    /**
***************
*** 1350,1356 ****
     * @param volId  the numeric id of the volume to unlock
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void unlock( int cellHandle, int volId ) 
  	throws AFSException;
  
    /**
--- 1350,1356 ----
     * @param volId  the numeric id of the volume to unlock
     * @exception AFSException   If an error occurs in the native code
     */
!   protected static native void unlock( long cellHandle, int volId ) 
  	throws AFSException;
  
    /**
***************
*** 1368,1375 ****
     * @return   the id of the volume in question
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int translateNameToID( int cellHandle, String name, 
!                                                  int volumeType )
      throws AFSException;
  
    /**
--- 1368,1375 ----
     * @return   the id of the volume in question
     * @exception AFSException  If an error occurs in the native code
     */
!   protected static native int translateNameToID( long cellHandle, String name, 
! 						 int volumeType )
      throws AFSException;
  
    /**
***************
*** 1379,1381 ****
--- 1379,1394 ----
     */
    protected static native void reclaimVolumeMemory();
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/ACL.c
diff -c openafs/src/JAVA/libjafs/ACL.c:1.3 openafs/src/JAVA/libjafs/ACL.c:1.3.2.1
*** openafs/src/JAVA/libjafs/ACL.c:1.3	Tue Jul 15 19:11:25 2003
--- openafs/src/JAVA/libjafs/ACL.c	Fri Oct 14 22:14:11 2005
***************
*** 28,47 ****
  #include <stdio.h>
  #include <sys/ioctl.h>
  #include <afs/vice.h>
  #include <afs/venus.h>
  #include <afs/afs_args.h>
  
  /*
    #include <afs/afs_osi.h>
  */
  
  /* just for debugging */
! #define MAXHOSTS  13
! #define OMAXHOSTS 8
! #define MAXNAME   100
! #define MAXSIZE	2048
! #define MAXINSIZE 1300		/* pioctl complains if data is larger than this */
! #define VMSGSIZE  128		/* size of msg buf in volume hdr */
  
  static char space[MAXSIZE];
  
--- 28,50 ----
  #include <stdio.h>
  #include <sys/ioctl.h>
  #include <afs/vice.h>
+ #include <netinet/in.h>
  #include <afs/venus.h>
  #include <afs/afs_args.h>
  
+ #include "GetNativeString.h"
+ 
  /*
    #include <afs/afs_osi.h>
  */
  
  /* just for debugging */
! #define	MAXHOSTS 13
! #define	OMAXHOSTS 8
! #define MAXNAME 100
! #define	MAXSIZE	2048
! #define MAXINSIZE 1300    /* pioctl complains if data is larger than this */
! #define VMSGSIZE 128      /* size of msg buf in volume hdr */
  
  static char space[MAXSIZE];
  
***************
*** 59,90 ****
   * path     the directory path
   * returns NULL if an exception is encountered.
   */
! char *
! getACL(char *path)
  {
      struct ViceIoctl params;
      char *buffer;
  
      params.in = NULL;
      params.out = NULL;
!     params.in_size = 0;
!     params.out_size = 0;
! 
!     buffer = (char *)malloc(ACL_LEN);
! 
      if (!buffer) {
! 	fprintf(stderr, "ERROR: ACL::getACL -> could not allocate buffer\n");
! 	return NULL;
      }
  
      params.out = buffer;
!     params.out_size = ACL_LEN;
  
!     if (call_syscall(AFSCALL_PIOCTL, path, VIOCGETAL, &params, 1, 0)) {
! 	fprintf(stderr, "ERROR: ACL::getACL -> VIOCGETAL failed: %d\n",
! 		errno);
! 	free(buffer);
! 	return NULL;
      }
  
      return params.out;
--- 62,94 ----
   * path     the directory path
   * returns NULL if an exception is encountered.
   */
! char* getACL(char *path)
  {
      struct ViceIoctl params;
      char *buffer;
+     int rval1=0;
  
+     buffer = (char*) malloc(ACL_LEN);
      params.in = NULL;
      params.out = NULL;
!     params.in_size = params.out_size = 0;
!     
      if (!buffer) {
!       fprintf(stderr, "ERROR: ACL::getACL -> could not allocate buffer\n");
!       return NULL;
      }
  
      params.out = buffer;
!     params.out_size = ACL_LEN; 
  
! #if defined(AFS_PPC64_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
!     if(pioctl(path, VIOCGETAL, &params, 1)) {
! #else /* AFS_PPC_LINUX20_ENV */
!     if(syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, VIOCGETAL, &params, 1)) {
! #endif /* AFS_PPC_LINUX20_ENV */
!       fprintf(stderr, "ERROR: ACL::getACL -> VIOCGETAL failed: %d, path: %s\n", errno, path);
!       free(buffer);
!       return NULL;
      }
  
      return params.out;
***************
*** 98,105 ****
   * aclString  string representation of ACL to be set
   * returns TRUE if the operation succeeds; otherwise FALSE;
   */
! jboolean
! setACL(char *path, char *aclString)
  {
      struct ViceIoctl params;
      char *redirect, *parentURI, *cptr;
--- 102,108 ----
   * aclString  string representation of ACL to be set
   * returns TRUE if the operation succeeds; otherwise FALSE;
   */
! jboolean setACL(char *path, char *aclString)
  {
      struct ViceIoctl params;
      char *redirect, *parentURI, *cptr;
***************
*** 109,118 ****
      params.out = NULL;
      params.out_size = 0;
  
!     if (call_syscall(AFSCALL_PIOCTL, path, VIOCGETAL, &params, 1)) {
! 	fprintf(stderr, "ERROR: ACL::setACL -> VIOCSETAL failed: %d\n",
! 		errno);
! 	return JNI_FALSE;
      }
  
      return JNI_TRUE;
--- 112,124 ----
      params.out = NULL;
      params.out_size = 0;
  
! #if defined(AFS_PPC64_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
!     if(pioctl(path, VIOCSETAL, &params, 1)) {
! #else /* AFS_PPC_LINUX20_ENV */
!     if(syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, VIOCSETAL, &params, 1)) {
! #endif /* AFS_PPC_LINUX20_ENV */
!       fprintf(stderr, "ERROR: ACL::setACL -> VIOCSETAL failed: %d, path: %s\n", errno, path);
!       return JNI_FALSE;
      }
  
      return JNI_TRUE;
***************
*** 128,158 ****
   * path     the directory path
   * returns NULL if an exception is encountered.
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_ACL_getACLString(JNIEnv * env, jobject obj,
! 				       jstring pathUTF)
  {
      char *path, *acl;
      jstring answer = NULL;
  
!     path = getNativeString(env, pathUTF);
!     if (path == NULL) {
! 	fprintf(stderr, "ERROR: ACL::getACLString ->");
! 	fprintf(stderr, "path = NULL\n");
! 	throwAFSException(env, JAFSNULLPATH);
! 	return NULL;
      }
  
      acl = getACL(path);
-     free(path);
  
!     if (acl) {
! 	answer = (*env)->NewStringUTF(env, acl);
! 	free(acl);
      } else {
! 	throwAFSException(env, errno);
      }
  
      return answer;
  }
  
--- 134,171 ----
   * path     the directory path
   * returns NULL if an exception is encountered.
   */
! JNIEXPORT jstring JNICALL Java_org_openafs_jafs_ACL_getACLString
!   (JNIEnv *env, jobject obj, jstring pathUTF)
  {
      char *path, *acl;
      jstring answer = NULL;
  
!     /*jchar* wpath;
!     path = (char*) (*env)->GetStringUTFChars(env, pathUTF, 0);
!     wpath=(jchar*) (*env)->GetStringChars(env,pathUTF,0);*/
! 
!     path = GetNativeString(env,pathUTF);
! 
!     if(path == NULL) {
!       fprintf(stderr, "ERROR: ACL::getACLString ->");
!       fprintf(stderr, "path = NULL\n");
!       throwMessageException( env, "Path is NULL" ); 
!       return NULL;
      }
  
      acl = getACL(path);
  
!     if(acl) {
!       answer =  (*env) -> NewStringUTF(env, acl);
!       free(acl);
      } else {
!       throwAFSException( env, errno );
      }
  
+     /*(*env)->ReleaseStringUTFChars(env, pathUTF, path);
+       (*env)->ReleaseStringChars(env, pathUTF, (jchar*)wpath);*/
+ 
+     free(path); //psomogyi memory leak - added
      return answer;
  }
  
***************
*** 168,219 ****
   * aclString  string representation of ACL to be set
   * throws an afsAdminExceptionName if an internal exception is encountered.
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_ACL_setACLString(JNIEnv * env, jobject obj,
! 				       jstring pathUTF, jstring aclStringUTF)
  {
      char *path, *aclString;
  
!     if (pathUTF == NULL) {
! 	fprintf(stderr, "ERROR: ACL::setACLString -> pathUTF == NULL\n");
! 	throwAFSException(env, JAFSNULLPATH);
! 	return;
!     }
! 
!     if (aclStringUTF == NULL) {
! 	fprintf(stderr, "ERROR: ACL::setACLString -> aclStringUTF == NULL\n");
! 	throwAFSException(env, JAFSNULLACL);
! 	return;
!     }
! 
!     /* path = (char*) (*env)->GetStringUTFChars(env, pathUTF, 0); */
!     path = getNativeString(env, pathUTF);
!     if (path == NULL) {
! 	fprintf(stderr, "ERROR: ACL::setACLString -> failed to get path\n");
! 	throwMessageException(env, "Failed to get path.");
! 	return;
!     }
! 
!     /* aclString = (char*) (*env)->GetStringUTFChars(env, aclStringUTF, 0); */
!     aclString = getNativeString(env, aclStringUTF);
!     if (aclString == NULL) {
! 	free(path);
! 	fprintf(stderr,
! 		"ERROR: ACL::setACLString -> failed to get aclString\n");
! 	throwMessageException(env, "Failed to get ACL string.");
! 	return;
      }
  
      if (!setACL(path, aclString)) {
! 	throwAFSException(env, errno);
      }
  
!     /* Clean up */
      free(path);
      free(aclString);
- 
-     /*
-      * (*env)->ReleaseStringUTFChars(env, pathUTF, path);
-      * (*env)->ReleaseStringUTFChars(env, aclStringUTF, aclString);
-      */
  }
--- 181,232 ----
   * aclString  string representation of ACL to be set
   * throws an afsAdminExceptionName if an internal exception is encountered.
   */
! JNIEXPORT void JNICALL Java_org_openafs_jafs_ACL_setACLString
!   (JNIEnv *env, jobject obj, jstring pathUTF, jstring aclStringUTF)
  {
      char *path, *aclString;
  
!     if(!pathUTF) {
!       fprintf(stderr, "ERROR: ACL::setACLString -> pathUTF == NULL\n");
!       throwMessageException( env, "pathUTF == NULL" );
!       return;
!     }
! 
!     /*path = (char*) (*env)->GetStringUTFChars(env, pathUTF, 0);*/
!     path = GetNativeString(env,pathUTF);
! 
!     if(path == NULL) {
!       fprintf(stderr, "ERROR: ACL::setACLString -> failed to get path\n");
!       throwMessageException( env, "Failed to get path" );
!       return;
!     }
! 
!     if(!aclStringUTF) {
!       fprintf(stderr, "ERROR: ACL::setACLString -> aclStringUTF == NULL\n");
!       throwMessageException( env, "aclStringUTF == NULL" ); 
!       return;
!     }
! 
!     /*aclString = (char*) (*env)->GetStringUTFChars(env, aclStringUTF, 0);*/
!     aclString = GetNativeString(env,aclStringUTF);
! 
!     if(aclString == NULL) {
!       fprintf(stderr, "ERROR: ACL::setACLString -> failed to get aclString\n");
!       (*env)->ReleaseStringUTFChars(env, pathUTF, path);
!       throwMessageException( env, "aclString == NULL" ); 
!       return;
      }
  
      if (!setACL(path, aclString)) {
!       throwAFSException( env, errno );
      }
  
!     /*(*env)->ReleaseStringUTFChars(env, pathUTF, path);
!       (*env)->ReleaseStringUTFChars(env, aclStringUTF, aclString);*/
! 
      free(path);
      free(aclString);
  }
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/AdminToken.c
diff -c openafs/src/JAVA/libjafs/AdminToken.c:1.3 openafs/src/JAVA/libjafs/AdminToken.c:1.3.2.1
*** openafs/src/JAVA/libjafs/AdminToken.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/AdminToken.c	Fri Oct 14 22:14:11 2005
***************
*** 38,51 ****
   * env      the Java environment
   * obj      the current Java object
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Token_initializeAdminClient(JNIEnv * env, jclass cls)
  {
!     afs_status_t ast;
!     if (!afsclient_Init(&ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  }
  
  
--- 38,51 ----
   * env      the Java environment
   * obj      the current Java object
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Token_initializeAdminClient(JNIEnv *env, jclass cls)
  {
!   afs_status_t ast;
!   if( !afsclient_Init( &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  }
  
  
***************
*** 60,132 ****
   * jpassword    the password of the user
   * returns a token representing the authentication
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Token_getToken(JNIEnv * env, jobject obj,
! 				     jstring jcellName, jstring juserName,
! 				     jstring jpassword)
! {
!     afs_status_t ast;
!     char *cellName;
!     char *userName;
!     char *password;
!     void *tokenHandle;
!     int rc;
! 
!     // convert java strings
!     if (jcellName != NULL) {
! 	cellName = getNativeString(env, jcellName);
! 	if (!cellName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return 0;
! 	}
!     } else {
! 	cellName = NULL;
!     }
! 
!     if (juserName != NULL) {
! 	userName = getNativeString(env, juserName);
! 	if (!userName) {
! 	    if (cellName != NULL)
! 		free(cellName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return 0;
! 	}
!     } else {
! 	if (cellName != NULL)
! 	    free(cellName);
! 	throwAFSException(env, JAFSNULLUSER);
! 	return 0;
!     }
! 
!     if (jpassword != NULL) {
! 	password = getNativeString(env, jpassword);
! 	if (!password) {
! 	    if (cellName != NULL)
! 		free(cellName);
! 	    free(userName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return 0;
! 	}
!     } else {
! 	if (cellName != NULL)
! 	    free(cellName);
! 	free(userName);
! 	throwAFSException(env, JAFSNULLPASS);
! 	return 0;
!     }
  
!     if (!
! 	(afsclient_TokenGetNew
! 	 (cellName, userName, password, &tokenHandle, &ast))) {
! 	throwAFSException(env, ast);
!     }
! 
!     if (cellName != NULL)
! 	free(cellName);
!     free(userName);
!     free(password);
! 
!     return (jint) tokenHandle;
  }
  
  /**
--- 60,134 ----
   * jpassword    the password of the user
   * returns a token representing the authentication
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Token_getToken
!   (JNIEnv *env, jobject obj, jstring jcellName, jstring juserName,
!    jstring jpassword)
! {
!   afs_status_t ast;
!   const char *cellName;
!   const char *userName;
!   const char *password;
!   void *tokenHandle;
!   int rc;
! 
!   // convert java strings
!   if( jcellName != NULL ) { 
!       cellName = (*env)->GetStringUTFChars(env, jcellName, 0);
!       if( !cellName ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return 0;    
!       }
!   } else {
!       cellName = NULL;
!   }
!   if( juserName != NULL ) {
!       userName = (*env)->GetStringUTFChars(env, juserName, 0);
!       if( !userName ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return 0;    
!       }
!   } else {
!       userName = NULL;
!   }
!   if( jpassword != NULL ) {
!       password = (*env)->GetStringUTFChars(env, jpassword, 0);
!       if( !password ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return 0;    
!       }
!   } else {
!       password = NULL;
!   }
! 
!   if ( !(afsclient_TokenGetNew( cellName, userName, password, &tokenHandle, 
! 				&ast) ) ) {
!     // release converted strings
!       if( cellName != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jcellName, cellName);
!       }
!       if( userName != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, juserName, userName);
!       }
!       if( password != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jpassword, password);
!       }
!       throwAFSException( env, ast );
!       return 0;
!   }
! 
!   // release converted strings
!   if( cellName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jcellName, cellName);
!   }
!   if( userName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, juserName, userName);
!   }
!   if( password != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jpassword, password);
!   }
  
!   return (jlong) tokenHandle;
  }
  
  /**
***************
*** 136,149 ****
   * obj      the current Java object
   * tokenHandle   the token to close
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Token_close(JNIEnv * env, jobject obj, jint tokenHandle)
  {
      afs_status_t ast;
  
!     if (!afsclient_TokenClose((void *)tokenHandle, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
      }
  }
  
--- 138,152 ----
   * obj      the current Java object
   * tokenHandle   the token to close
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Token_close
!   (JNIEnv *env, jobject obj, jlong tokenHandle)
  {
      afs_status_t ast;
  
!     if( !afsclient_TokenClose( (void *) tokenHandle, &ast ) ) {
!       throwAFSException( env, ast );
!       return;
      }
  }
  
***************
*** 158,189 ****
   * tokenHandle    a token handle previously returned by a call to getToken
   * returns a handle to the open cell
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getCellHandle(JNIEnv * env, jobject obj,
! 					 jstring jcellName, jint tokenHandle)
! {
!     afs_status_t ast;
!     char *cellName;
!     void *cellHandle;
! 
!     if (jcellName != NULL) {
! 	cellName = getNativeString(env, jcellName);
! 	if (!cellName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return -1;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLCELL);
! 	return -1;
!     }
  
!     if (!afsclient_CellOpen(cellName, (void *)tokenHandle, &cellHandle, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     free(cellName);
! 
!     return (jint) cellHandle;
  }
  
  /**
--- 161,198 ----
   * tokenHandle    a token handle previously returned by a call to getToken
   * returns a handle to the open cell
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Cell_getCellHandle
!   (JNIEnv *env, jobject obj, jstring jcellName, jlong tokenHandle)
! {
!   afs_status_t ast;
!   const char *cellName;
!   void *cellHandle;
! 
!   if( jcellName != NULL ) {
!     cellName = (*env)->GetStringUTFChars(env, jcellName, 0);
!     if( !cellName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     cellName = NULL;
!   }
! 
!   if( !afsclient_CellOpen( cellName, (void *) tokenHandle, 
! 			   &cellHandle, &ast ) ) {
!     if( cellName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jcellName, cellName);
!     }  
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( cellName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jcellName, cellName);
!   }  
  
!   return (jlong) cellHandle;
  }
  
  /**
***************
*** 193,208 ****
   * obj      the current Java object
   * cellHandle   the cell handle to close
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Cell_closeCell(JNIEnv * env, jobject obj,
! 				     jint cellHandle)
  {
-     afs_status_t ast;
  
!     if (!afsclient_CellClose((void *)cellHandle, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
      }
  }
  
  /**
--- 202,219 ----
   * obj      the current Java object
   * cellHandle   the cell handle to close
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_closeCell (JNIEnv *env, jobject obj, 
!                                          jlong cellHandle)
  {
  
!    afs_status_t ast;
! 
!     if( !afsclient_CellClose( (void *) cellHandle, &ast ) ) {
!       throwAFSException( env, ast );
!       return;
      }
+ 
  }
  
  /**
***************
*** 218,251 ****
   *                      a vos handle
   * returns a vos handle to the server
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getVosServerHandle(JNIEnv * env, jobject obj,
! 						jint cellHandle,
! 						jstring jserverName)
! {
!     afs_status_t ast;
!     void *serverHandle;
!     char *serverName;
  
!     if (jserverName != NULL) {
! 	serverName = getNativeString(env, jserverName);
! 	if (!serverName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return -1;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLSERVER);
! 	return -1;
!     }
! 
!     if (!vos_ServerOpen
! 	((void *)cellHandle, serverName, (void **)&serverHandle, &ast)) {
! 	throwAFSException(env, ast);
!     }
!     // release converted string
!     free(serverName);
! 
!     return (jint) serverHandle;
  }
  
  /**
--- 229,268 ----
   *                      a vos handle
   * returns a vos handle to the server
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Server_getVosServerHandle
!   (JNIEnv *env, jobject obj, jlong cellHandle, jstring jserverName)
! {
!   afs_status_t ast;
!   void *serverHandle;
!   // convert java string
!   const char *serverName;
! 
!   if( jserverName != NULL ) {
!       serverName = (*env)->GetStringUTFChars(env, jserverName, 0);
!       if( !serverName ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
!   } else {
!       serverName = NULL;
!   }
! 
!   if( !vos_ServerOpen( (void *) cellHandle, serverName, 
! 		       (void **) &serverHandle, &ast ) ) {
!       if( serverName != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jserverName, serverName);
!       }
!       throwAFSException( env, ast );
!       return 0;
!   }
! 
!   // release converted string
!   if( serverName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jserverName, serverName);
!   }
  
!   return (jlong) serverHandle;
  }
  
  /**
***************
*** 255,269 ****
   * obj      the current Java object
   * vosServerHandle   the vos server handle to close
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_closeVosServerHandle(JNIEnv * env, jobject obj,
! 						  jint vosServerHandle)
  {
      afs_status_t ast;
  
!     if (!vos_ServerClose((void *)vosServerHandle, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
      }
  }
  
--- 272,286 ----
   * obj      the current Java object
   * vosServerHandle   the vos server handle to close
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_closeVosServerHandle
!   (JNIEnv *env, jobject obj, jlong vosServerHandle)
  {
      afs_status_t ast;
  
!     if( !vos_ServerClose( (void *) vosServerHandle, &ast ) ) {
!       throwAFSException( env, ast );
!       return;
      }
  }
  
***************
*** 280,313 ****
   *                      a bos handle
   * returns a bos handle to the server
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getBosServerHandle(JNIEnv * env, jobject obj,
! 						jint cellHandle,
! 						jstring jserverName)
! {
!     afs_status_t ast;
!     void *serverHandle;
!     char *serverName;
! 
!     if (jserverName != NULL) {
! 	serverName = getNativeString(env, jserverName);
! 	if (!serverName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLSERVER);
! 	return;
!     }
  
!     if (!bos_ServerOpen
! 	((void *)cellHandle, serverName, (void **)&serverHandle, &ast)) {
! 	throwAFSException(env, ast);
!     }
!     // release converted string
!     free(serverName);
! 
!     return (jint) serverHandle;
  }
  
  /**
--- 297,336 ----
   *                      a bos handle
   * returns a bos handle to the server
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Server_getBosServerHandle
!   (JNIEnv *env, jobject obj, jlong cellHandle, jstring jserverName)
! {
!   afs_status_t ast;
!   void *serverHandle;
!   // convert java string
!   const char *serverName;
! 
!   if( jserverName != NULL ) {
!       serverName = (*env)->GetStringUTFChars(env, jserverName, 0);
!       if( !serverName ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
!   } else {
!       serverName = NULL;
!   }
! 
!   if( !bos_ServerOpen( (void *) cellHandle, serverName, 
! 		       (void **) &serverHandle, &ast ) ) {
!       if( serverName != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jserverName, serverName);
!       }
!       throwAFSException( env, ast );
!       return 0;
!   }
! 
!   // release converted string
!   if( serverName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jserverName, serverName);
!   }
  
!   return (jlong) serverHandle;
  }
  
  /**
***************
*** 317,331 ****
   * obj      the current Java object
   * bosServerHandle   the bos server handle to close
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_closeBosServerHandle(JNIEnv * env, jobject obj,
! 						  jint bosServerHandle)
  {
      afs_status_t ast;
  
!     if (!bos_ServerClose((void *)bosServerHandle, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
      }
  }
  
--- 340,354 ----
   * obj      the current Java object
   * bosServerHandle   the bos server handle to close
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_closeBosServerHandle
!   (JNIEnv *env, jobject obj, jlong bosServerHandle)
  {
      afs_status_t ast;
  
!     if( !bos_ServerClose( (void *) bosServerHandle, &ast ) ) {
!       throwAFSException( env, ast );
!       return;
      }
  }
  
***************
*** 339,383 ****
   *                       to getToken
   * returns a long representing the UTC time for the token expiration
   */
! JNIEXPORT jlong JNICALL
! Java_org_openafs_jafs_Token_getExpiration(JNIEnv * env, jobject obj,
! 					  jint tokenHandle)
  {
      afs_status_t ast;
      unsigned long expTime;
!     char *prince = malloc(sizeof(char) * KAS_MAX_NAME_LEN);
!     char *inst = malloc(sizeof(char) * KAS_MAX_NAME_LEN);
!     char *cell = malloc(sizeof(char) * AFS_MAX_SERVER_NAME_LEN);
      int hkt;
  
!     if (!prince || !inst || !cell) {
! 	if (prince) {
! 	    free(prince);
! 	}
! 	if (inst) {
! 	    free(inst);
! 	}
! 	if (cell) {
! 	    free(cell);
! 	}
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (!afsclient_TokenQuery
! 	((void *)tokenHandle, &expTime, prince, inst, cell, &hkt, &ast)) {
! 	throwAFSException(env, ast);
      }
  
!     free(prince);
!     free(inst);
!     free(cell);
  
      return (jlong) expTime;
  }
  
  // reclaim global memory used by this portion
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Token_reclaimAuthMemory(JNIEnv * env, jclass cls)
  {
  }
--- 362,416 ----
   *                       to getToken
   * returns a long representing the UTC time for the token expiration
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Token_getExpiration
!   (JNIEnv *env, jobject obj, jlong tokenHandle)
  {
      afs_status_t ast;
      unsigned long expTime;
!     char *prince = malloc( sizeof(char)*KAS_MAX_NAME_LEN ); 
!     char *inst = malloc( sizeof(char)*KAS_MAX_NAME_LEN );    
!     char *cell = malloc( sizeof(char)*AFS_MAX_SERVER_NAME_LEN );    
      int hkt;
  
!     if( !prince || !inst || !cell ) {
!       if( prince ) {
!         free( prince );
!       }
!       if( inst ) {
!         free( inst );
!       }
!       if( cell ) {
!         free( cell );
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
! 
!     if( !afsclient_TokenQuery( (void *) tokenHandle, &expTime, prince, inst, 
! 			       cell, &hkt, &ast ) ) {
! 	free( prince );
! 	free( inst );
! 	free( cell );
! 	throwAFSException( env, ast );
! 	return 0;
      }
  
!     free( prince );
!     free( inst );
!     free( cell );
  
      return (jlong) expTime;
  }
  
  // reclaim global memory used by this portion
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Token_reclaimAuthMemory (JNIEnv *env, jclass cls)
  {
  }
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/Cell.c
diff -c openafs/src/JAVA/libjafs/Cell.c:1.3 openafs/src/JAVA/libjafs/Cell.c:1.3.2.1
*** openafs/src/JAVA/libjafs/Cell.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/Cell.c	Fri Oct 14 22:14:11 2005
***************
*** 33,41 ****
  #include <afs_AdminClientErrors.h>
  #include <afs_AdminCommonErrors.h>
  
! /*-----------------------------------------------------------------------
!  * Definitions in Internal.c
!  */
  extern jclass userCls;
  //extern jfieldID user_cellHandleField;
  extern jfieldID user_nameField;
--- 33,40 ----
  #include <afs_AdminClientErrors.h>
  #include <afs_AdminCommonErrors.h>
  
! //// definitions in Internal.c  //////////////////
! 
  extern jclass userCls;
  //extern jfieldID user_cellHandleField;
  extern jfieldID user_nameField;
***************
*** 50,75 ****
  //extern jfieldID server_cellHandleField;
  extern jfieldID server_cachedInfoField;
  
! /*-----------------------------------------------------------------------
!  * Definition in User.c
!  */
! extern void getUserInfoChar(JNIEnv * env, int cellHandle, const char *name,
! 			    jobject user);
  
! /*-----------------------------------------------------------------------
!  * Definition in Group.c
!  */
! extern void getGroupInfoChar(JNIEnv * env, int cellHandle, const char *name,
! 			     jobject group);
  
! /*-----------------------------------------------------------------------
!  * Definition in Server.c
!  */
! extern void fillServerInfo(JNIEnv * env, jint cellHandle, jobject server,
! 			   afs_serverEntry_t servEntry);
  
  
! /*-----------------------------------------------------------------------*/
  
  /**
   * Returns the total number of KAS users belonging to the cell denoted
--- 49,76 ----
  //extern jfieldID server_cellHandleField;
  extern jfieldID server_cachedInfoField;
  
! //////////////////////////////////////////////////////////
  
! ///// definition in jafs_User.c /////////////////
  
! extern void getUserInfoChar (JNIEnv *env, void *cellHandle, const char *name, 
! 			     jobject user);
! 
! ///////////////////////////////////////////////////
! 
! ///// definition in jafs_Group.c /////////////////
! 
! extern void getGroupInfoChar (JNIEnv *env, void *cellHandle, const char *name, 
! 			      jobject group);
! 
! ///////////////////////////////////////////////////
! 
! ///// definition in jafs_Server.c /////////////////
  
+ extern void fillServerInfo (JNIEnv *env, void *cellHandle, jobject server, 
+ 			    afs_serverEntry_t servEntry);
  
! ///////////////////////////////////////////////////
  
  /**
   * Returns the total number of KAS users belonging to the cell denoted
***************
*** 80,108 ****
   *  cellHandle    the handle of the cell to which the users belong
   *  returns total count of KAS users
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getKasUserCount(JNIEnv * env, jclass cls,
! 					   jint cellHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
!     kas_identity_t who;
!     int i = 0;
! 
!     if (!kas_PrincipalGetBegin((void *)cellHandle, NULL, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     while (kas_PrincipalGetNext((void *)iterationId, &who, &ast))
! 	i++;
! 
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     return i;
  }
  
  
--- 81,109 ----
   *  cellHandle    the handle of the cell to which the users belong
   *  returns total count of KAS users
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getKasUserCount (JNIEnv *env, jclass cls, 
! 					       jlong cellHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
!   kas_identity_t who;
!   int i = 0;
! 
!   if( !kas_PrincipalGetBegin( (void *) cellHandle, NULL, 
! 			      &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   while ( kas_PrincipalGetNext( iterationId, &who, &ast ) ) i++;
! 
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   return i;
  }
  
  
***************
*** 117,135 ****
   *  cellHandle    the handle of the cell to which the users belong
   *  returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getKasUsersBegin(JNIEnv * env, jclass cls,
! 					    jint cellHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
  
!     if (!kas_PrincipalGetBegin((void *)cellHandle, NULL, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
-     return (jint) iterationId;
  }
  
  /**
--- 118,138 ----
   *  cellHandle    the handle of the cell to which the users belong
   *  returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Cell_getKasUsersBegin (JNIEnv *env, jclass cls, 
! 						jlong cellHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( !kas_PrincipalGetBegin( (void *) cellHandle, NULL, &iterationId, 
! 			      &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 145,177 ****
   *  startIndex    the starting base-zero index
   *  returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getKasUsersBeginAt(JNIEnv * env, jclass cls,
! 					      jint cellHandle,
! 					      jint startIndex)
! {
!     afs_status_t ast;
!     void *iterationId;
!     kas_identity_t who;
!     int i;
! 
!     if (!kas_PrincipalGetBegin((void *)cellHandle, NULL, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
      }
  
!     for (i = 1; i < startIndex; i++) {
! 	if (!kas_PrincipalGetNext((void *)iterationId, &who, &ast)) {
! 	    if (ast == ADMITERATORDONE) {
! 		return 0;
! 	    } else {
! 		throwAFSException(env, ast);
! 		return 0;
! 	    }
! 	}
!     }
  
-     return (jint) iterationId;
  }
  
  /**
--- 148,182 ----
   *  startIndex    the starting base-zero index
   *  returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Cell_getKasUsersBeginAt (JNIEnv *env, jclass cls, 
! 						  jlong cellHandle, 
! 						  jint startIndex) {
! 
!   afs_status_t ast;
!   void *iterationId;
!   kas_identity_t who;
!   int i;
! 
!   if( !kas_PrincipalGetBegin( (void *) cellHandle, NULL, 
! 			      &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   for ( i = 1; i < startIndex; i++) {
!     if( !kas_PrincipalGetNext( (void *) iterationId, &who, &ast ) ) {
!       if( ast == ADMITERATORDONE ) {
!         return 0;
!       } else {
!         throwAFSException( env, ast );
!         return 0;
!       }
      }
+   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 184,226 ****
   *  iterationId   the iteration ID of this iteration
   *  returns the name of the next user of the cell
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Cell_getKasUsersNextString(JNIEnv * env, jclass cls,
! 						 jint iterationId)
! {
!     afs_status_t ast;
!     kas_identity_t who;
!     jstring juser;
  
!     if (!kas_PrincipalGetNext((void *)iterationId, &who, &ast)) {
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	    // other
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return;
! 	}
!     }
! 
!     if (strcmp(who.instance, "")) {
! 	char *fullName = (char *)malloc(sizeof(char) * (strlen(who.principal)
! 							+ strlen(who.instance)
! 							+ 2));
! 	if (!fullName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
! 	*fullName = '\0';
! 	strcat(fullName, who.principal);
! 	strcat(fullName, ".");
! 	strcat(fullName, who.instance);
! 	juser = (*env)->NewStringUTF(env, fullName);
! 	free(fullName);
      } else {
! 	juser = (*env)->NewStringUTF(env, who.principal);
!     }
  
!     return juser;
  
  }
  
--- 189,231 ----
   *  iterationId   the iteration ID of this iteration
   *  returns the name of the next user of the cell
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Cell_getKasUsersNextString (JNIEnv *env, jclass cls, 
! 						     jlong iterationId) {
! 
!   afs_status_t ast;
!   kas_identity_t who;
!   jstring juser;
  
!   if( !kas_PrincipalGetNext( (void *) iterationId, &who, &ast ) ) {
!     if( ast == ADMITERATORDONE ) {
! 	return NULL;
!     // other
      } else {
!       throwAFSException( env, ast );
!       return;
!     }    
!   }
! 
!   if( strcmp( who.instance, "" ) ) {
!     char *fullName = (char *) malloc( sizeof(char)*( strlen( who.principal ) 
! 						     + strlen( who.instance ) 
! 						     + 2 ) );
!     if( !fullName ) {
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!     *fullName = '\0';
!     strcat( fullName, who.principal );
!     strcat( fullName, "." );
!     strcat( fullName, who.instance );
!     juser = (*env)->NewStringUTF(env, fullName );
!     free( fullName );
!   } else {
!     juser = (*env)->NewStringUTF(env, who.principal);
!   }
  
!   return juser;
  
  }
  
***************
*** 236,296 ****
   *                  the next kas user
   *  returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getKasUsersNext(JNIEnv * env, jclass cls,
! 					   jint cellHandle, jint iterationId,
! 					   jobject juserObject)
! {
! 
!     afs_status_t ast;
!     kas_identity_t who;
!     jstring juser;
!     char *fullName = NULL;
! 
! 
!     if (!kas_PrincipalGetNext((void *)iterationId, &who, &ast)) {
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	    // other
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
!     }
!     // take care of the instance stuff(by concatenating with a period in between)
!     if (strcmp(who.instance, "")) {
! 	fullName =
! 	    (char *)malloc(sizeof(char) *
! 			   (strlen(who.principal) + strlen(who.instance) +
! 			    2));
! 	if (!fullName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
! 	*fullName = '\0';
! 	strcat(fullName, who.principal);
! 	strcat(fullName, ".");
! 	strcat(fullName, who.instance);
! 	juser = (*env)->NewStringUTF(env, fullName);
!     } else {
! 	juser = (*env)->NewStringUTF(env, who.principal);
!     }
! 
!     if (userCls == 0) {
! 	internal_getUserClass(env, juserObject);
!     }
  
-     (*env)->SetObjectField(env, juserObject, user_nameField, juser);
  
!     if (fullName != NULL) {
! 	getUserInfoChar(env, (int)cellHandle, fullName, juserObject);
! 	free(fullName);
      } else {
! 	getUserInfoChar(env, (int)cellHandle, who.principal, juserObject);
!     }
!     (*env)->SetBooleanField(env, juserObject, user_cachedInfoField, TRUE);
  
!     return 1;
  
  }
  
--- 241,300 ----
   *                  the next kas user
   *  returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getKasUsersNext (JNIEnv *env, jclass cls, 
! 					       jlong cellHandle, 
! 					       jlong iterationId, 
! 					       jobject juserObject) {
! 
!   afs_status_t ast;
!   kas_identity_t who;
!   jstring juser;
!   char *fullName = NULL;
  
  
!   if( !kas_PrincipalGetNext( (void *) iterationId, &who, &ast ) ) {
!     if( ast == ADMITERATORDONE ) {
! 	return 0;
!     // other
      } else {
!       throwAFSException( env, ast );
!       return 0;
!     }    
!   }
! 
!   // take care of the instance stuff(by concatenating with a period in between)
!   if( strcmp( who.instance, "" ) ) {
!     fullName = (char *) malloc( sizeof(char)*( strlen( who.principal ) + 
! 					       strlen( who.instance ) + 2 ) );
!     if( !fullName ) {
!       throwAFSException( env, JAFSADMNOMEM );
!       return 0;    
!     }
!     *fullName = '\0';
!     strcat( fullName, who.principal );
!     strcat( fullName, "." );
!     strcat( fullName, who.instance );
!     juser = (*env)->NewStringUTF(env, fullName );
!   } else {
!     juser = (*env)->NewStringUTF(env, who.principal);
!   }
! 
!   if( userCls == 0 ) {
!     internal_getUserClass( env, juserObject );
!   }
! 
!   (*env)->SetObjectField(env, juserObject, user_nameField, juser);
! 
!   if( fullName != NULL ) { 
!       getUserInfoChar( env, (void *) cellHandle, fullName, juserObject );
!       free( fullName );
!   } else {
!       getUserInfoChar( env, (void *) cellHandle, who.principal, juserObject );
!   }
!   (*env)->SetBooleanField( env, juserObject, user_cachedInfoField, TRUE );
  
!   return 1;
  
  }
  
***************
*** 301,316 ****
   *  cls      the current Java class
   *  iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Cell_getKasUsersDone(JNIEnv * env, jclass cls,
! 					   jint iterationId)
! {
!     afs_status_t ast;
! 
!     if (!kas_PrincipalGetDone((void *)iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
  }
  
--- 305,320 ----
   *  cls      the current Java class
   *  iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_getKasUsersDone (JNIEnv *env, jclass cls, 
! 					       jlong iterationId) {
! 
!   afs_status_t ast;
! 
!   if( !kas_PrincipalGetDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
***************
*** 322,344 ****
   *  cellHandle    the handle of the cell to which the user belongs
   *  returns the name of the cell
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Cell_getCellName(JNIEnv * env, jclass cls,
! 				       jint cellHandle)
! {
!     afs_status_t ast;
!     char *cellName;
!     jstring jcellName;
! 
!     if (!afsclient_CellNameGet
! 	((void *)cellHandle, (const char **)&cellName, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
! 
!     jcellName = (*env)->NewStringUTF(env, cellName);
  
!     return jcellName;
  
  }
  
--- 326,348 ----
   *  cellHandle    the handle of the cell to which the user belongs
   *  returns the name of the cell
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Cell_getCellName (JNIEnv *env, jclass cls, 
! 					   jlong cellHandle) {
! 
!   afs_status_t ast;
!   char *cellName;
!   jstring jcellName;
! 
!   if( !afsclient_CellNameGet( (void *) cellHandle, 
! 			      (const char **) &cellName, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
!   
!   jcellName = (*env)->NewStringUTF(env, cellName);
  
!   return jcellName;
  
  }
  
***************
*** 351,388 ****
   *  cellHandle    the handle of the cell to which the users belong
   *  returns total number of PTS users
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getPtsUserCount(JNIEnv * env, jclass cls,
! 					   jint cellHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
!     char *userName;
!     int i = 0;
  
!     if (!pts_UserListBegin((void *)cellHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     userName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
  
!     if (!userName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return -1;
!     }
  
!     while (pts_UserListNext((void *)iterationId, userName, &ast))
! 	i++;
  
!     free(userName);
  
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     return i;
  }
  
  /**
--- 355,391 ----
   *  cellHandle    the handle of the cell to which the users belong
   *  returns total number of PTS users
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getPtsUserCount (JNIEnv *env, jclass cls, 
! 					       jlong cellHandle) {
  
!   afs_status_t ast;
!   void *iterationId;
!   char *userName;
!   int i = 0;
  
!   if( !pts_UserListBegin( (void *) cellHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   userName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
  
!   if( !userName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return -1;    
!   }
  
!   while ( pts_UserListNext( (void *) iterationId, userName, &ast ) ) i++;
  
!   free( userName );
  
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   return i;
  }
  
  /**
***************
*** 394,454 ****
   *  cellHandle    the handle of the cell to which the users belong
   *  returns total number of users that are in PTS and not KAS
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getPtsOnlyUserCount(JNIEnv * env, jclass cls,
! 					       jint cellHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
!     kas_identity_p who = (kas_identity_p) malloc(sizeof(kas_identity_t));
!     kas_principalEntry_t kasEntry;
!     char *userName;
!     int i = 0;
! 
!     if (who == NULL) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return -1;
!     }
! 
!     if (!pts_UserListBegin((void *)cellHandle, &iterationId, &ast)) {
! 	free(who);
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     userName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
!     if (!userName) {
! 	free(who);
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return -1;
!     }
  
!     while (pts_UserListNext((void *)iterationId, userName, &ast)) {
! 	if (strcmp(userName, "anonymous") != 0) {
! 	    // make sure the name is within the allowed bounds
! 	    if (strlen(userName) > KAS_MAX_NAME_LEN) {
! 		free(who);
! 		free(userName);
! 		throwAFSException(env, ADMPTSUSERNAMETOOLONG);
! 		return -1;
! 	    }
! 	    // if there is a kas entry, recurse
! 	    internal_makeKasIdentity(userName, who);
! 	    if (!kas_PrincipalGet
! 		((void *)cellHandle, NULL, who, &kasEntry, &ast))
! 		i++;
! 	}
!     }
! 
!     free(userName);
!     free(who);
! 
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     return i;
  }
  
  /**
--- 397,458 ----
   *  cellHandle    the handle of the cell to which the users belong
   *  returns total number of users that are in PTS and not KAS
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getPtsOnlyUserCount (JNIEnv *env, jclass cls, 
! 						   jlong cellHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
!   kas_identity_p who = (kas_identity_p) malloc( sizeof(kas_identity_t) );
!   kas_principalEntry_t kasEntry;
!   char *userName;
!   int i = 0;
! 
!   if( !who ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return -1;
!   }
! 
!   if( !pts_UserListBegin( (void *) cellHandle, &iterationId, &ast ) ) {
!     free( who );
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   userName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
!     
!   if( !userName ) {
!     free( who );
!     throwAFSException( env, JAFSADMNOMEM );
!     return -1;
!   }
! 
!   while ( pts_UserListNext( (void *) iterationId, userName, &ast ) ) {
!     if( strcmp( userName, "anonymous" ) != 0 ) {
!       // make sure the name is within the allowed bounds
!       if( strlen( userName ) > KAS_MAX_NAME_LEN ) {
! 	    free( who );
! 	    free( userName );
! 	    throwAFSException( env, ADMPTSUSERNAMETOOLONG );
! 	    return -1;
! 	  }
!   
!       // if there is a kas entry, recurse
!       internal_makeKasIdentity( userName, who );
!       if( !kas_PrincipalGet( (void *) cellHandle, NULL, who, 
! 			     &kasEntry, &ast ) ) i++;
! 	}
!   }
! 
!   free( userName );
!   free( who );
! 
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   return i;
  }
  
  /**
***************
*** 462,480 ****
   *  cellHandle    the handle of the cell to which the users belong
   *  returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getPtsUsersBegin(JNIEnv * env, jclass cls,
! 					    jint cellHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
  
!     if (!pts_UserListBegin((void *)cellHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     return (jint) iterationId;
  
  }
  
--- 466,484 ----
   *  cellHandle    the handle of the cell to which the users belong
   *  returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Cell_getPtsUsersBegin (JNIEnv *env, jclass cls, 
! 						jlong cellHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( !pts_UserListBegin( (void *) cellHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jlong) iterationId;
  
  }
  
***************
*** 487,526 ****
   *  iterationId   the iteration ID of this iteration
   *  returns the name of the next user of the cell
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Cell_getPtsUsersNextString(JNIEnv * env, jclass cls,
! 						 jint iterationId)
! {
!     afs_status_t ast;
!     char *userName;
!     jstring juser;
! 
!     userName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!userName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return NULL;
!     }
! 
!     if (!pts_UserListNext((void *)iterationId, userName, &ast)) {
! 	free(userName);
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return NULL;
! 	}
!     }
! 
!     if (strcmp(userName, "anonymous") == 0) {
! 	free(userName);
! 	return Java_org_openafs_jafs_Cell_getPtsUsersNextString(env, cls,
! 								iterationId);
      }
  
!     juser = (*env)->NewStringUTF(env, userName);
!     free(userName);
!     return juser;
  
  }
  
--- 491,530 ----
   *  iterationId   the iteration ID of this iteration
   *  returns the name of the next user of the cell
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Cell_getPtsUsersNextString (JNIEnv *env, jclass cls, 
! 						     jlong iterationId) {
! 
!   afs_status_t ast;
!   char *userName;
!   jstring juser;
! 
!   userName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
! 
!   if( !userName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !pts_UserListNext( (void *) iterationId, userName, &ast ) ) {
!     free( userName );
!     if( ast == ADMITERATORDONE ) {
!       return NULL;
!     } else {
!       throwAFSException( env, ast );
!       return;
      }
+   }
  
!   if( strcmp( userName, "anonymous" ) == 0 ) {
!     free( userName );
!     return Java_org_openafs_jafs_Cell_getPtsUsersNextString( env, cls, 
! 								iterationId );
!   }
! 
!   juser = (*env)->NewStringUTF(env, userName);
!   free( userName );
!   return juser;
  
  }
  
***************
*** 534,596 ****
   *  cellHandle   the cell handle to which these users will belong
   *  returns the name of the next pts user (not kas user) of the cell
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Cell_getPtsOnlyUsersNextString(JNIEnv * env, jclass cls,
! 						     jint iterationId,
! 						     jint cellHandle)
! {
!     kas_identity_p who = (kas_identity_p) malloc(sizeof(kas_identity_t));
      kas_principalEntry_t kasEntry;
      afs_status_t ast;
      char *userName;
      jstring juser;
  
!     if (!who) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return NULL;
      }
  
!     userName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!userName) {
! 	free(who);
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return NULL;
      }
  
!     while (1) {
  
! 	if (!pts_UserListNext((void *)iterationId, userName, &ast)) {
! 	    free(userName);
! 	    free(who);
! 	    if (ast == ADMITERATORDONE) {
  		return NULL;
  	    } else {
! 		throwAFSException(env, ast);
  		return NULL;
  	    }
  	}
  
! 	if (strcmp(userName, "anonymous") == 0) {
  	    continue;
  	}
  	// make sure the name is within the allowed bounds
! 	if (strlen(userName) > KAS_MAX_NAME_LEN) {
! 	    free(who);
! 	    free(userName);
! 	    throwAFSException(env, ADMPTSUSERNAMETOOLONG);
  	    return NULL;
  	}
  	// if there is a kas entry, recurse
! 	internal_makeKasIdentity(userName, who);
! 	if (kas_PrincipalGet((void *)cellHandle, NULL, who, &kasEntry, &ast)) {
  	    continue;
  	}
! 
  	juser = (*env)->NewStringUTF(env, userName);
! 	free(userName);
! 	free(who);
  	return juser;
      }
  
  }
--- 538,605 ----
   *  cellHandle   the cell handle to which these users will belong
   *  returns the name of the next pts user (not kas user) of the cell
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Cell_getPtsOnlyUsersNextString (JNIEnv *env, 
! 							 jclass cls, 
! 							 jlong iterationId, 
! 							 jlong cellHandle) {
! 
!     kas_identity_p who = (kas_identity_p) malloc( sizeof(kas_identity_t) );
      kas_principalEntry_t kasEntry;
      afs_status_t ast;
      char *userName;
      jstring juser;
  
!     if( !who ) {
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
      }
  
!     userName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
!     
!     if( !userName ) {
!       free( who );
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
      }
  
!     while( 1 ) {
  
! 	if( !pts_UserListNext( (void *) iterationId, userName, &ast ) ) {
! 	    free( userName );
! 	    free( who );
! 	    if( ast == ADMITERATORDONE ) {
  		return NULL;
  	    } else {
! 		throwAFSException( env, ast );
  		return NULL;
  	    }
  	}
  
! 	if( strcmp( userName, "anonymous" ) == 0 ) {
  	    continue;
  	}
+ 	
  	// make sure the name is within the allowed bounds
! 	if( strlen( userName ) > KAS_MAX_NAME_LEN ) {
! 	    free( who );
! 	    free( userName );
! 	    throwAFSException( env, ADMPTSUSERNAMETOOLONG );
  	    return NULL;
  	}
+ 	
  	// if there is a kas entry, recurse
! 	internal_makeKasIdentity( userName, who );
! 	if( kas_PrincipalGet( (void *) cellHandle, NULL, who, 
! 			      &kasEntry, &ast ) ) {
  	    continue;
  	}
! 	
  	juser = (*env)->NewStringUTF(env, userName);
! 	free( userName );
! 	free( who );
  	return juser;
+ 
      }
  
  }
***************
*** 607,660 ****
   *                  the next pts user
   *  returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getPtsUsersNext(JNIEnv * env, jclass cls,
! 					   jint cellHandle, jint iterationId,
! 					   jobject juserObject)
! {
! 
!     afs_status_t ast;
!     char *userName;
!     jstring juser;
! 
!     userName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!userName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return 0;
!     }
! 
!     if (!pts_UserListNext((void *)iterationId, userName, &ast)) {
! 	free(userName);
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
!     }
! 
!     if (strcmp(userName, "anonymous") == 0) {
! 	free(userName);
! 	return Java_org_openafs_jafs_Cell_getPtsUsersNext(env, cls,
! 							  cellHandle,
! 							  iterationId,
! 							  juserObject);
      }
  
!     juser = (*env)->NewStringUTF(env, userName);
  
!     if (userCls == 0) {
! 	internal_getUserClass(env, juserObject);
!     }
  
!     (*env)->SetObjectField(env, juserObject, user_nameField, juser);
  
!     getUserInfoChar(env, (int)cellHandle, userName, juserObject);
!     (*env)->SetBooleanField(env, juserObject, user_cachedInfoField, TRUE);
  
-     free(userName);
-     return 1;
  }
  
  /**
--- 616,670 ----
   *                  the next pts user
   *  returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getPtsUsersNext (JNIEnv *env, jclass cls, 
! 					       jlong cellHandle, 
! 					       jlong iterationId, 
! 					       jobject juserObject ) {
!     
!   afs_status_t ast;
!   char *userName;
!   jstring juser;
! 
!   userName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
! 
!   if( !userName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return 0;    
!   }
! 
!   if( !pts_UserListNext( (void *) iterationId, userName, &ast ) ) {
!     free( userName );
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
      }
+   }
  
!   if( strcmp( userName, "anonymous" ) == 0 ) {
!     free( userName );
!     return Java_org_openafs_jafs_Cell_getPtsUsersNext( env, cls, 
! 							  cellHandle, 
! 							  iterationId, 
! 							  juserObject );
!   }
!   
!   juser = (*env)->NewStringUTF(env, userName);
! 
!   if( userCls == 0 ) {
!     internal_getUserClass( env, juserObject );
!   }
  
!   (*env)->SetObjectField(env, juserObject, user_nameField, juser);
  
!   getUserInfoChar( env, (void *) cellHandle, userName, juserObject );
!   (*env)->SetBooleanField( env, juserObject, user_cachedInfoField, TRUE );
  
!   free( userName );
!   return 1;
  
  }
  
  /**
***************
*** 669,743 ****
   *                  the next pts (with no kas) user
   *  returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getPtsOnlyUsersNext(JNIEnv * env, jclass cls,
! 					       jint cellHandle,
! 					       jint iterationId,
! 					       jobject juserObject)
! {
!     kas_identity_p who = (kas_identity_p) malloc(sizeof(kas_identity_t));
!     kas_principalEntry_t kasEntry;
!     afs_status_t ast;
!     char *userName;
!     jstring juser;
! 
!     if (!who) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return 0;
!     }
! 
!     userName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!userName) {
! 	free(who);
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return 0;
!     }
! 
!     while (1) {
! 
! 	if (!pts_UserListNext((void *)iterationId, userName, &ast)) {
! 	    free(userName);
! 	    free(who);
! 	    if (ast == ADMITERATORDONE) {
! 		return 0;
! 	    } else {
! 		throwAFSException(env, ast);
! 		return 0;
! 	    }
! 	}
! 
! 	if (strcmp(userName, "anonymous") == 0) {
! 	    continue;
! 	}
! 	// make sure the name is within the allowed bounds
! 	if (strlen(userName) > KAS_MAX_NAME_LEN) {
! 	    free(userName);
! 	    free(who);
! 	    throwAFSException(env, ADMPTSUSERNAMETOOLONG);
! 	    return 0;
! 	}
! 
! 	if (userCls == 0) {
! 	    internal_getUserClass(env, juserObject);
! 	}
! 	// if there is a kas entry, recurse
! 	internal_makeKasIdentity(userName, who);
! 	if (kas_PrincipalGet((void *)cellHandle, NULL, who, &kasEntry, &ast)) {
! 	    continue;
! 	}
! 
! 	juser = (*env)->NewStringUTF(env, userName);
! 
! 	(*env)->SetObjectField(env, juserObject, user_nameField, juser);
! 	getUserInfoChar(env, (int)cellHandle, userName, juserObject);
! 	(*env)->SetBooleanField(env, juserObject, user_cachedInfoField, TRUE);
! 
! 	free(who);
! 	free(userName);
! 	return 1;
! 
!     }
  
  }
  
--- 679,757 ----
   *                  the next pts (with no kas) user
   *  returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getPtsOnlyUsersNext (JNIEnv *env, jclass cls, 
! 						   jlong cellHandle, 
! 						   jlong iterationId, 
! 						   jobject juserObject ) {
! 
!   kas_identity_p who = (kas_identity_p) malloc( sizeof(kas_identity_t) );
!   kas_principalEntry_t kasEntry;
!   afs_status_t ast;
!   char *userName;
!   jstring juser;
! 
!   if( !who ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return 0;    
!   }
!   
!   userName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
! 
!   if( !userName ) {
!     free( who );
!     throwAFSException( env, JAFSADMNOMEM );
!     return 0;    
!   }
! 
!   while( 1 ) {
! 
!       if( !pts_UserListNext( (void *) iterationId, userName, &ast ) ) {
! 	  free( userName );
! 	  free( who );
! 	  if( ast == ADMITERATORDONE ) {
! 	      return 0;
! 	  } else {
! 	      throwAFSException( env, ast );
! 	      return 0;
! 	  }
!       }
!       
!       if( strcmp( userName, "anonymous" ) == 0 ) {
! 	  continue;
!       }
!       
!       // make sure the name is within the allowed bounds
!       if( strlen( userName ) > KAS_MAX_NAME_LEN ) {
! 	  free( userName );
! 	  free( who );
! 	  throwAFSException( env, ADMPTSUSERNAMETOOLONG );
! 	  return 0;
!       }
!       
!       if( userCls == 0 ) {
! 	  internal_getUserClass( env, juserObject );
!       }
!       
!       
!       // if there is a kas entry, recurse
!       internal_makeKasIdentity( userName, who );
!       if( kas_PrincipalGet( (void *) cellHandle, NULL, who, 
! 			    &kasEntry, &ast ) ) {
! 	  continue;
!       } 
!       
!       juser = (*env)->NewStringUTF(env, userName);
!       
!       (*env)->SetObjectField(env, juserObject, user_nameField, juser);
!       getUserInfoChar( env, (void *) cellHandle, userName, juserObject );
!       (*env)->SetBooleanField( env, juserObject, user_cachedInfoField, TRUE );
!       
!       free( who );
!       free( userName );
!       return 1;
!       
!   }
  
  }
  
***************
*** 748,764 ****
   *  cls      the current Java class
   *  iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Cell_getPtsUsersDone(JNIEnv * env, jclass cls,
! 					   jint iterationId)
! {
!     afs_status_t ast;
! 
!     if (!pts_UserListDone((void *)iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
! 
  }
  
  /**
--- 762,778 ----
   *  cls      the current Java class
   *  iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_getPtsUsersDone (JNIEnv *env, jclass cls, 
! 					       jlong iterationId) {
! 
!   afs_status_t ast;
! 
!   if( !pts_UserListDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
!   
  }
  
  /**
***************
*** 770,808 ****
   *  cellHandle    the handle of the cell to which the groups belong
   *  returns total number of groups
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getGroupCount(JNIEnv * env, jclass cls,
! 					 jint cellHandle)
! {
  
!     afs_status_t ast;
!     void *iterationId;
!     char *groupName;
!     int i = 0;
! 
!     if (!pts_GroupListBegin((void *)cellHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     groupName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
  
!     if (!groupName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return -1;
!     }
  
!     while (pts_GroupListNext((void *)iterationId, groupName, &ast))
! 	i++;
  
!     free(groupName);
  
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     return i;
  }
  
  /**
--- 784,820 ----
   *  cellHandle    the handle of the cell to which the groups belong
   *  returns total number of groups
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getGroupCount (JNIEnv *env, jclass cls, 
! 					     jlong cellHandle) {
  
!   afs_status_t ast;
!   void *iterationId;
!   char *groupName;
!   int i = 0;
  
!   if( !pts_GroupListBegin( (void *) cellHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   groupName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
  
!   if( !groupName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return -1;
!   }
  
!   while ( pts_GroupListNext( (void *) iterationId, groupName, &ast ) ) i++;
  
!   free( groupName );
  
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   return i;
  }
  
  /**
***************
*** 816,834 ****
   *  cellHandle    the handle of the cell to which the groups belong
   *  returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getGroupsBegin(JNIEnv * env, jclass cls,
! 					  jint cellHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
  
!     if (!pts_GroupListBegin((void *)cellHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
-     return (jint) iterationId;
  }
  
  /**
--- 828,847 ----
   *  cellHandle    the handle of the cell to which the groups belong
   *  returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Cell_getGroupsBegin (JNIEnv *env, jclass cls, 
! 					      jlong cellHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( !pts_GroupListBegin( (void *) cellHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 843,878 ****
   *  startIndex    the starting base-zero index
   *  returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getGroupsBeginAt(JNIEnv * env, jclass cls,
! 					    jint cellHandle, jint startIndex)
! {
!     afs_status_t ast;
!     void *iterationId;
!     char *groupName;
!     int i;
! 
!     groupName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!pts_GroupListBegin((void *)cellHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return 0;
      }
  
!     for (i = 1; i < startIndex; i++) {
! 	if (!pts_GroupListNext((void *)iterationId, groupName, &ast)) {
! 	    free(groupName);
! 	    if (ast == ADMITERATORDONE) {
! 		return 0;
! 	    } else {
! 		throwAFSException(env, ast);
! 		return 0;
! 	    }
! 	}
!     }
  
-     free(groupName);
-     return (jint) iterationId;
  }
  
  /**
--- 856,893 ----
   *  startIndex    the starting base-zero index
   *  returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Cell_getGroupsBeginAt (JNIEnv *env, jclass cls, 
! 						jlong cellHandle, 
! 						jint startIndex) {
! 
!   afs_status_t ast;
!   void *iterationId;
!   char *groupName;
!   int i;
! 
!   groupName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
! 
!   if( !pts_GroupListBegin( (void *) cellHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return 0;
!   }
! 
!   for ( i = 1; i < startIndex; i++) {
!     if( !pts_GroupListNext( (void *) iterationId, groupName, &ast ) ) {
!       free( groupName );
!       if( ast == ADMITERATORDONE ) {
!         return 0;
!       } else {
!         throwAFSException( env, ast );
!         return 0;
!       }
      }
+   }
  
!   free( groupName );
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 884,917 ****
   *  iterationId   the iteration ID of this iteration
   *  returns the name of the next user of the cell
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Cell_getGroupsNextString(JNIEnv * env, jclass cls,
! 					       jint iterationId)
! {
!     afs_status_t ast;
!     char *groupName;
!     jstring jgroup;
! 
!     groupName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!groupName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return NULL;
!     }
! 
!     if (!pts_GroupListNext((void *)iterationId, groupName, &ast)) {
! 	free(groupName);
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return NULL;
! 	}
      }
  
!     jgroup = (*env)->NewStringUTF(env, groupName);
!     free(groupName);
!     return jgroup;
  
  }
  
--- 899,932 ----
   *  iterationId   the iteration ID of this iteration
   *  returns the name of the next user of the cell
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Cell_getGroupsNextString (JNIEnv *env, jclass cls, 
! 						   jlong iterationId) {
! 
!   afs_status_t ast;
!   char *groupName;
!   jstring jgroup;
! 
!   groupName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
! 
!   if( !groupName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !pts_GroupListNext( (void *) iterationId, groupName, &ast ) ) {
!     free( groupName );
!     if( ast == ADMITERATORDONE ) {
!       return NULL;
!     } else {
!       throwAFSException( env, ast );
!       return;
      }
+   }
  
!   jgroup = (*env)->NewStringUTF(env, groupName);
!   free( groupName );
!   return jgroup;
  
  }
  
***************
*** 927,971 ****
   *                   the next group
   *  returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getGroupsNext(JNIEnv * env, jclass cls,
! 					 jint cellHandle, jint iterationId,
! 					 jobject jgroupObject)
! {
!     afs_status_t ast;
!     char *groupName;
!     jstring jgroup;
! 
!     groupName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!groupName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (!pts_GroupListNext((void *)iterationId, groupName, &ast)) {
! 	free(groupName);
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
      }
  
!     jgroup = (*env)->NewStringUTF(env, groupName);
  
!     if (groupCls == 0) {
! 	internal_getGroupClass(env, jgroupObject);
!     }
  
!     (*env)->SetObjectField(env, jgroupObject, group_nameField, jgroup);
  
!     getGroupInfoChar(env, (int)cellHandle, groupName, jgroupObject);
!     (*env)->SetBooleanField(env, jgroupObject, group_cachedInfoField, TRUE);
  
-     free(groupName);
-     return 1;
  }
  
  /**
--- 942,987 ----
   *                   the next group
   *  returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getGroupsNext (JNIEnv *env, jclass cls, 
! 					     jlong cellHandle, 
! 					     jlong iterationId, 
! 					     jobject jgroupObject) {
! 
!   afs_status_t ast;
!   char *groupName;
!   jstring jgroup;
! 
!   groupName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN );
! 
!   if( !groupName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!       return;    
!   }
!   
!   if( !pts_GroupListNext( (void *) iterationId, groupName, &ast ) ) {
!     free( groupName );
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
      }
+   }
  
!   jgroup = (*env)->NewStringUTF(env, groupName);
  
!   if( groupCls == 0 ) {
!     internal_getGroupClass( env, jgroupObject );
!   }
  
!   (*env)->SetObjectField(env, jgroupObject, group_nameField, jgroup);
!   getGroupInfoChar( env, (void *)cellHandle, groupName, jgroupObject );
!   (*env)->SetBooleanField( env, jgroupObject, group_cachedInfoField, TRUE );
  
!   free( groupName );
!   return 1;
  
  }
  
  /**
***************
*** 975,991 ****
   *  cls      the current Java class
   *  iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Cell_getGroupsDone(JNIEnv * env, jclass cls,
! 					 jint iterationId)
! {
!     afs_status_t ast;
! 
!     if (!pts_GroupListDone((void *)iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
! 
  }
  
  /**
--- 991,1007 ----
   *  cls      the current Java class
   *  iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_getGroupsDone (JNIEnv *env, jclass cls, 
! 					     jlong iterationId) {
! 
!   afs_status_t ast;
! 
!   if( !pts_GroupListDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
!   
  }
  
  /**
***************
*** 998,1016 ****
   *  cellHandle    the handle of the cell to which the group belongs
   *  returns an integer reresenting the max group id in a cell
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getMaxGroupID(JNIEnv * env, jclass cls,
! 					 jint cellHandle)
! {
!     afs_status_t ast;
!     jint maxID;
  
!     if (!pts_GroupMaxGet((void *)cellHandle, (int *)&maxID, &ast)) {
! 	throwAFSException(env, ast);
! 	return 0;
!     }
  
-     return maxID;
  }
  
  /**
--- 1014,1033 ----
   *  cellHandle    the handle of the cell to which the group belongs
   *  returns an integer reresenting the max group id in a cell
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getMaxGroupID (JNIEnv *env, jclass cls, 
! 					     jlong cellHandle) {
! 
!   afs_status_t ast;
!   int maxID;
! 
!   if( !pts_GroupMaxGet( (void *) cellHandle, &maxID, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jint)maxID;
  
  }
  
  /**
***************
*** 1022,1037 ****
   *  cellHandle    the handle of the cell to which the group belongs
   *  maxID an integer reresenting the new max group id in a cell
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Cell_setMaxGroupID(JNIEnv * env, jclass cls,
! 					 jint cellHandle, jint maxID)
! {
!     afs_status_t ast;
  
-     if (!pts_GroupMaxSet((void *)cellHandle, (int)maxID, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 1039,1055 ----
   *  cellHandle    the handle of the cell to which the group belongs
   *  maxID an integer reresenting the new max group id in a cell
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_setMaxGroupID (JNIEnv *env, jclass cls, 
! 					     jlong cellHandle, jint maxID) {
! 
!   afs_status_t ast;
! 
!   if( !pts_GroupMaxSet( (void *) cellHandle, (int) maxID, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 1044,1062 ****
   *  cellHandle    the handle of the cell to which the user belongs
   *  returns an integer reresenting the max user id in a cell
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getMaxUserID(JNIEnv * env, jclass cls,
! 					jint cellHandle)
! {
!     afs_status_t ast;
!     jint maxID;
  
!     if (!pts_UserMaxGet((void *)cellHandle, (int *)&maxID, &ast)) {
! 	throwAFSException(env, ast);
! 	return 0;
!     }
  
-     return maxID;
  }
  
  /**
--- 1062,1081 ----
   *  cellHandle    the handle of the cell to which the user belongs
   *  returns an integer reresenting the max user id in a cell
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getMaxUserID (JNIEnv *env, jclass cls, 
! 					    jlong cellHandle) {
! 
!   afs_status_t ast;
!   int maxID;
! 
!   if( !pts_UserMaxGet( (void *) cellHandle, &maxID, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jint)maxID;
  
  }
  
  /**
***************
*** 1068,1083 ****
   *  cellHandle    the handle of the cell to which the user belongs
   *  maxID an integer reresenting the new max user id in a cell
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Cell_setMaxUserID(JNIEnv * env, jclass cls,
! 					jint cellHandle, jint maxID)
! {
!     afs_status_t ast;
  
-     if (!pts_UserMaxSet((void *)cellHandle, (int)maxID, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 1087,1103 ----
   *  cellHandle    the handle of the cell to which the user belongs
   *  maxID an integer reresenting the new max user id in a cell
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_setMaxUserID (JNIEnv *env, jclass cls, 
! 					    jlong cellHandle, jint maxID) {
! 
!   afs_status_t ast;
! 
!   if( !pts_UserMaxSet( (void *) cellHandle, (int) maxID, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 1089,1117 ****
   *  cellHandle    the handle of the cell to which the servers belong
   *  returns total number of servers
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getServerCount(JNIEnv * env, jclass cls,
! 					  jint cellHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
!     afs_serverEntry_t servEntry;
!     int i = 0;
! 
!     if (!afsclient_AFSServerGetBegin((void *)cellHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     while (afsclient_AFSServerGetNext((void *)iterationId, &servEntry, &ast))
! 	i++;
! 
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     return i;
  }
  
  /**
--- 1109,1138 ----
   *  cellHandle    the handle of the cell to which the servers belong
   *  returns total number of servers
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getServerCount (JNIEnv *env, jclass cls, 
! 					      jlong cellHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
!   afs_serverEntry_t servEntry;
!   int i = 0;
! 
!   if( !afsclient_AFSServerGetBegin( (void *) cellHandle, 
! 				    &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   while ( afsclient_AFSServerGetNext( (void *) iterationId, 
! 				      &servEntry, &ast ) ) i++;
! 
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   return i;
  }
  
  /**
***************
*** 1124,1142 ****
   *  cellHandle    the handle of the cell to which the servers belong
   *  returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getServersBegin(JNIEnv * env, jclass cls,
! 					   jint cellHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
  
!     if (!afsclient_AFSServerGetBegin((void *)cellHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
-     return (jint) iterationId;
  }
  
  /**
--- 1145,1165 ----
   *  cellHandle    the handle of the cell to which the servers belong
   *  returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Cell_getServersBegin (JNIEnv *env, jclass cls, 
! 					       jlong cellHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( !afsclient_AFSServerGetBegin( (void *) cellHandle, 
! 				    &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 1148,1170 ****
   *  iterationId   the iteration ID of this iteration
   *  returns the name of the next server of the cell
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Cell_getServersNextString(JNIEnv * env, jclass cls,
! 						jint iterationId)
! {
!     afs_status_t ast;
!     jstring jserver;
!     afs_serverEntry_t servEntry;
  
!     if (!afsclient_AFSServerGetNext((void *)iterationId, &servEntry, &ast)) {
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return NULL;
! 	}
!     }
!     return jserver;
  }
  
  /**
--- 1171,1196 ----
   *  iterationId   the iteration ID of this iteration
   *  returns the name of the next server of the cell
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Cell_getServersNextString (JNIEnv *env, jclass cls, 
! 						    jlong iterationId) {
! 
!   afs_status_t ast;
!   jstring jserver;
!   afs_serverEntry_t servEntry;
! 
!   if( !afsclient_AFSServerGetNext( (void *) iterationId, &servEntry, &ast ) ) {
!       if( ast == ADMITERATORDONE ) {
! 	  return NULL;
!       } else {
! 	  throwAFSException( env, ast );
! 	  return NULL;
!       }
!   }
!   
!   jserver = (*env)->NewStringUTF(env, "not_implemented"); /* psomogyi 20050514 */
  
!   return jserver;
  }
  
  /**
***************
*** 1179,1212 ****
   *                    of the next server 
   *  returns 0 if there are no more servers, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Cell_getServersNext(JNIEnv * env, jclass cls,
! 					  jint cellHandle, jint iterationId,
! 					  jobject jserverObject)
! {
!     afs_status_t ast;
!     jstring jserver;
!     afs_serverEntry_t servEntry;
!     jintArray jaddress;
! 
!     if (!afsclient_AFSServerGetNext((void *)iterationId, &servEntry, &ast)) {
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
!     }
!     // get the class fields if need be
!     if (serverCls == 0) {
! 	internal_getServerClass(env, jserverObject);
      }
  
!     fillServerInfo(env, (int)cellHandle, jserverObject, servEntry);
  
!     (*env)->SetBooleanField(env, jserverObject, server_cachedInfoField, TRUE);
  
!     return 1;
  }
  
  /**
--- 1205,1239 ----
   *                    of the next server 
   *  returns 0 if there are no more servers, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Cell_getServersNext
!   (JNIEnv *env, jclass cls, jlong cellHandle, jlong iterationId,
!    jobject jserverObject)
! {
!   afs_status_t ast;
!   jstring jserver;
!   afs_serverEntry_t servEntry;
!   jintArray jaddress;
! 
!   if( !afsclient_AFSServerGetNext( (void *) iterationId, &servEntry, &ast ) ) {
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
      }
+   }
+ 
+   // get the class fields if need be
+   if( serverCls == 0 ) {
+     internal_getServerClass( env, jserverObject );
+   }
  
!   fillServerInfo( env, (void *) cellHandle, jserverObject, servEntry );
  
!   (*env)->SetBooleanField( env, jserverObject, server_cachedInfoField, TRUE );
  
!   return 1;
  }
  
  /**
***************
*** 1216,1231 ****
   *  cls      the current Java class
   *  iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Cell_getServersDone(JNIEnv * env, jclass cls,
! 					  jint iterationId)
! {
!     afs_status_t ast;
  
-     if (!afsclient_AFSServerGetDone((void *)iterationId, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 1243,1259 ----
   *  cls      the current Java class
   *  iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_getServersDone
!   (JNIEnv *env, jclass cls, jlong iterationId)
! {
!   afs_status_t ast;
! 
!   if( !afsclient_AFSServerGetDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 1240,1301 ****
   *  readWrite   whether or not this is to be a readwrite mount point
   *  forceCheck  whether or not to check if this volume name exists
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Cell_createMountPoint(JNIEnv * env, jclass cls,
! 					    jint cellHandle,
! 					    jstring jdirectory,
! 					    jstring jvolumeName,
! 					    jboolean readWrite,
! 					    jboolean forceCheck)
! {
!     afs_status_t ast;
!     char *directory;
!     char *volumeName;
!     vol_type_t type;
!     vol_check_t check;
! 
!     if (jdirectory != NULL) {
! 	directory = getNativeString(env, jdirectory);
! 	if (!directory) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLPATH);
! 	return;
!     }
!     if (jvolumeName != NULL) {
! 	volumeName = getNativeString(env, jvolumeName);
! 	if (volumeName == NULL) {
! 	    free(directory);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(directory);
! 	throwAFSException(env, JAFSNULLVOLUME);
! 	return;
!     }
! 
!     if (readWrite) {
! 	type = READ_WRITE;
!     } else {
! 	type = READ_ONLY;
!     }
! 
!     if (forceCheck) {
! 	check = CHECK_VOLUME;
!     } else {
! 	check = DONT_CHECK_VOLUME;
!     }
  
-     if (!afsclient_MountPointCreate
- 	((void *)cellHandle, directory, volumeName, type, check, &ast)) {
- 	throwAFSException(env, ast);
-     }
- 
-     free(directory);
-     free(volumeName);
  }
  
  /*
--- 1268,1340 ----
   *  readWrite   whether or not this is to be a readwrite mount point
   *  forceCheck  whether or not to check if this volume name exists
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_createMountPoint (JNIEnv *env, jclass cls, 
! 						jlong cellHandle, 
! 						jstring jdirectory, 
! 						jstring jvolumeName, 
! 						jboolean readWrite, 
! 						jboolean forceCheck) {
! 
!   afs_status_t ast;
!   const char *directory;
!   const char *volumeName;
!   vol_type_t type;
!   vol_check_t check;
! 
!   if( jdirectory != NULL ) {
!     directory = (*env)->GetStringUTFChars(env, jdirectory, 0);
!     if( !directory ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     directory = NULL;
!   }
!   if( jvolumeName != NULL ) {
!     volumeName = (*env)->GetStringUTFChars(env, jvolumeName, 0);
!     if( !volumeName ) {
!       if( directory != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jdirectory, directory);
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     volumeName = NULL;
!   }
! 
!   if( readWrite ) {
!     type = READ_WRITE;
!   } else {
!     type = READ_ONLY;
!   }
! 
!   if( forceCheck ) {
!     check = CHECK_VOLUME;
!   } else {
!     check = DONT_CHECK_VOLUME;
!   }
! 
!   if( !afsclient_MountPointCreate( (void *) cellHandle, directory, 
! 				   volumeName, type, check, &ast ) ) {
!     if( volumeName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jvolumeName, volumeName);
!     }
!     if( directory != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jdirectory, directory);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( volumeName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jvolumeName, volumeName);
!   }
!   if( directory != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jdirectory, directory);
!   }
  
  }
  
  /*
***************
*** 1314,1413 ****
   *  lock    whether or not to allow lock access to this user
   *  admin    whether or not to allow admin access to this user
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Cell_setACL(JNIEnv * env, jclass cls,
! 				  jstring jdirectory, jstring juserName,
! 				  jboolean read, jboolean write,
! 				  jboolean lookup, jboolean delete,
! 				  jboolean insert, jboolean lock,
! 				  jboolean admin)
! {
!     afs_status_t ast;
!     char *directory;
!     char *userName;
!     acl_t acl;
  
-     if (!afsclient_Init(&ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  
-     if (jdirectory != NULL) {
- 	directory = getNativeString(env, jdirectory);
- 	if (!directory) {
- 	    throwAFSException(env, JAFSADMNOMEM);
- 	    return;
- 	}
-     } else {
- 	throwAFSException(env, JAFSNULLPATH);
- 	return;
-     }
  
-     if (juserName != NULL) {
- 	userName = getNativeString(env, juserName);
- 	if (!userName) {
- 	    free(directory);
- 	    throwAFSException(env, JAFSADMNOMEM);
- 	    return;
- 	}
-     } else {
- 	free(directory);
- 	throwAFSException(env, JAFSNULLUSER);
- 	return;
-     }
  
-     if (read) {
- 	acl.read = READ;
-     } else {
- 	acl.read = NO_READ;
-     }
  
-     if (write) {
- 	acl.write = WRITE;
-     } else {
- 	acl.write = NO_WRITE;
-     }
  
-     if (lookup) {
- 	acl.lookup = LOOKUP;
-     } else {
- 	acl.lookup = NO_LOOKUP;
-     }
  
-     if (delete) {
- 	acl.del = DELETE;
-     } else {
- 	acl.del = NO_DELETE;
-     }
  
-     if (insert) {
- 	acl.insert = INSERT;
-     } else {
- 	acl.insert = NO_INSERT;
-     }
  
-     if (lock) {
- 	acl.lock = LOCK;
-     } else {
- 	acl.lock = NO_LOCK;
-     }
  
-     if (admin) {
- 	acl.admin = ADMIN;
-     } else {
- 	acl.admin = NO_ADMIN;
-     }
  
-     if (!afsclient_ACLEntryAdd(directory, userName, &acl, &ast)) {
- 	throwAFSException(env, ast);
-     }
  
-     free(userName);
-     free(directory);
- }
  
- // reclaim global memory used by this portion
- JNIEXPORT void JNICALL
- Java_org_openafs_jafs_Cell_reclaimCellMemory(JNIEnv * env, jclass cls)
- {
- }
--- 1353,1485 ----
   *  lock    whether or not to allow lock access to this user
   *  admin    whether or not to allow admin access to this user
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_setACL (JNIEnv *env, jclass cls, 
! 				      jstring jdirectory, jstring juserName, 
! 				      jboolean read, jboolean write, 
! 				      jboolean lookup, jboolean delete, 
! 				      jboolean insert, jboolean lock, 
! 				      jboolean admin) {
! 
!   afs_status_t ast;
!   const char *directory;
!   const char *userName;
!   acl_t acl;
! 
!   // Added by MP
!   if( !afsclient_Init( &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( jdirectory != NULL ) {
!     directory = (*env)->GetStringUTFChars(env, jdirectory, 0);
!     if( !directory ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     directory = NULL;
!   }
!   if( juserName != NULL ) {
!     userName = (*env)->GetStringUTFChars(env, juserName, 0);
!     if( !userName ) {
!       if( directory != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jdirectory, directory);
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     userName = NULL;
!   }
! 
!   if( read ) {
!     acl.read = READ;
!   } else {
!     acl.read = NO_READ;
!   }
! 
!   if( write ) {
!     acl.write = WRITE;
!   } else {
!     acl.write = NO_WRITE;
!   }
! 
!   if( lookup ) {
!     acl.lookup = LOOKUP;
!   } else {
!     acl.lookup = NO_LOOKUP;
!   }
! 
!   if( delete ) {
!     acl.del = DELETE;
!   } else {
!     acl.del = NO_DELETE;
!   }
! 
!   if( insert ) {
!     acl.insert = INSERT;
!   } else {
!     acl.insert = NO_INSERT;
!   }
! 
!   if( lock ) {
!     acl.lock = LOCK;
!   } else {
!     acl.lock = NO_LOCK;
!   }
! 
!   if( admin ) {
!     acl.admin = ADMIN;
!   } else {
!     acl.admin = NO_ADMIN;
!   }
! 
!   if( !afsclient_ACLEntryAdd( directory, userName, &acl, &ast ) ) {
!       if( userName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, juserName, userName);
!       }
!       if( directory != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jdirectory, directory);
!       }
!       throwAFSException( env, ast );
!       return;
!   }
! 
!   if( userName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, juserName, userName);
!   }
!   if( directory != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jdirectory, directory);
!   }
! 
! }
! 
! // reclaim global memory used by this portion
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Cell_reclaimCellMemory (JNIEnv *env, jclass cls) {
! 
! }
! 
! 
! 
! 
! 
! 
! 
! 
! 
  
  
  
  
  
  
  
  
  
  
  
  
  
Index: openafs/src/JAVA/libjafs/ChangeLog
diff -c /dev/null openafs/src/JAVA/libjafs/ChangeLog:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:20 2006
--- openafs/src/JAVA/libjafs/ChangeLog	Fri Oct 14 22:14:11 2005
***************
*** 0 ****
--- 1,41 ----
+ 20050524: (by Peter Somogyi somogyi@de.ibm.com)
+ 	- bugfix: ACL.c: syscall => pioctl (problem on ppc64)
+ 	- bugfix: ACL.c: memory leak
+ 	- some minor changes in ACL.c to be more accordance to src/venus/fs.c
+ 	- bugfix: inet_ntoa crashed; implemented an own function is Server.c instead
+ 	- modified src/libuafs/MakefileProto.LINUX: added -fPIC flag (doesn't tolerate mixing with non-fPIC on ppc)
+ 	
+ 20050525: (somogyi@de.ibm.com)
+ 	- removed non-error message from getACL; extended the error report (path string) instead of it
+ 
+ 20050602: (somogyi@de.ibm.com)
+ 	- moved ACL.c from libjafs.so into libjafsadm.so
+ 	(solves pioctl call failure in [get|set]ACL)
+ 	In the future each one should be in libjafsadm.so - using _only_ AFS API (!!!).
+ 20050603:
+ 	- moved GetNativeString from libjafs.so into libjafsadm.so
+ 20050610:
+ 	- created an automatic testAFS comprehensive java test
+ 	- modified java library: made all getInfo-like methods public
+ 20050614:
+ 	- bugfix: Cell.c: ..._getServersNextString: return "not_implemented" instead of making a crash
+ 20050616:
+ 	- created a multithreaded test; pioctl in getACL fails on i386_linux26, but doesn't fail under ppc64_linux26
+ 20050617:
+ 	- [#]ifdef-separated c sources and makefiles for ppc64_linux26
+ 	- bugfix: eliminating thread-safety crashes on pioctl/i386, but only pioctl works on ppc64 (idef-ed)
+ 	(pioctl didn't crash on ppc64)
+ 20050720:
+ 	- added s390x support, needs some special patches to openafs src
+ 	- added 64-bit support, affects java part
+ 	- refined testAFS.java tester tool
+ 
+ 20050727:
+ 	- tested on ppc64/32, fixed some bugs because of some s390x modifications
+ 
+ 20050830:
+ 	- modified Makefile.in to support OpenAFS version 1.3.85 or higher (added util/rxkstats.o to libjafs.so)
+ 
+ 20050906:
+ 	- added version info (overwritting an earlier implementation)
+ 	- added build info (using AFS_component_version_number.c) which is autogenerated
Index: openafs/src/JAVA/libjafs/Exceptions.h
diff -c openafs/src/JAVA/libjafs/Exceptions.h:1.2 openafs/src/JAVA/libjafs/Exceptions.h:1.2.2.1
*** openafs/src/JAVA/libjafs/Exceptions.h:1.2	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/Exceptions.h	Fri Oct 14 22:14:11 2005
***************
*** 1,9 ****
  #ifndef _Jafsadm_Exceptions
  #define _Jafsadm_Exceptions
  
! static char *afsExceptionName = "org/openafs/jafs/AFSException";
! static char *afsFileExceptionName = "org/openafs/jafs/AFSFileException";
! static char *afsSecurityExceptionName =
!     "org/openafs/jafs/AFSSecurityException";
  
  #endif
--- 1,12 ----
  #ifndef _Jafsadm_Exceptions
  #define _Jafsadm_Exceptions
  
! static char *afsExceptionName         = "org/openafs/jafs/AFSException";
! static char *afsFileExceptionName     = "org/openafs/jafs/AFSFileException";
! static char *afsSecurityExceptionName = "org/openafs/jafs/AFSSecurityException";
  
  #endif
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/File.c
diff -c openafs/src/JAVA/libjafs/File.c:1.3 openafs/src/JAVA/libjafs/File.c:1.3.2.1
*** openafs/src/JAVA/libjafs/File.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/File.c	Fri Oct 14 22:14:11 2005
***************
*** 19,28 ****
   * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   */
  
- #if 0
  #include <afs/param.h>
  #include <errno.h>
- #endif
  
  #include "Internal.h"
  #include "org_openafs_jafs_File.h"
--- 19,26 ----
***************
*** 31,37 ****
  #include <fcntl.h>
  #include <jni.h>
  #include <pthread.h>
! #include <afs/afs_usrops.h>
  #include <afs/prs_fs.h>
  #include <sys/time.h>
  #include <unistd.h>
--- 29,35 ----
  #include <fcntl.h>
  #include <jni.h>
  #include <pthread.h>
! /*#include <afs/afs_usrops.h>*/
  #include <afs/prs_fs.h>
  #include <sys/time.h>
  #include <unistd.h>
***************
*** 49,55 ****
  #include "dmalloc.h"
  #endif
  
! void setFileNotExistsAttributes(JNIEnv * env, jobject * obj);
  
  typedef struct {
      char *fileName;
--- 47,53 ----
  #include "dmalloc.h"
  #endif
  
! void setFileNotExistsAttributes(JNIEnv *env, jobject *obj);
  
  typedef struct {
      char *fileName;
***************
*** 58,73 ****
  
  /*static char compile_date[] = COMPILE_DATE;*/
  
! int
! sub_time(struct timeval *tv1, struct timeval *tv2)
  {
!     if (tv2->tv_usec > tv1->tv_usec) {
! 	tv1->tv_usec += 1000000;
! 	tv1->tv_usec -= 1;
!     }
  
!     tv1->tv_usec -= tv2->tv_usec;
!     tv1->tv_sec -= tv2->tv_sec;
  }
  
  /**
--- 56,70 ----
  
  /*static char compile_date[] = COMPILE_DATE;*/
  
! int sub_time(struct timeval *tv1, struct timeval *tv2)
  {
!    if (tv2->tv_usec > tv1->tv_usec) {
!      tv1->tv_usec += 1000000;
!      tv1->tv_usec -= 1;
!    }
  
!    tv1->tv_usec -= tv2->tv_usec;
!    tv1->tv_sec -= tv2->tv_sec;
  }
  
  /**
***************
*** 77,118 ****
   * env      the Java environment
   * obj      the current Java object
   */
! char *
! getAbsolutePath(JNIEnv * env, jobject * obj, char *dirName)
  {
      jclass thisClass;
      jstring jDirName;
      jmethodID getAbsolutePathID;
!     char *auxDirName;
      jfieldID fid;
  
      thisClass = (*env)->GetObjectClass(env, *obj);
!     if (thisClass == NULL) {
! 	fprintf(stderr, "File::getAbsolutePath(): GetObjectClass failed\n");
! 	return NULL;
      }
- 
      fid = (*env)->GetFieldID(env, thisClass, "path", "Ljava/lang/String;");
!     if (fid == NULL) {
! 	fprintf(stderr,
! 		"File::getAbsolutePath(): GetFieldID (path) failed\n");
! 	return NULL;
      }
- 
      jDirName = (*env)->GetObjectField(env, *obj, fid);
-     if (jDirName == NULL) {
- 	fprintf(stderr, "File::getAbsolutePath(): failed to get file name\n");
- 	return NULL;
-     }
  
!     auxDirName = getNativeString(env, jDirName);
!     if (auxDirName == NULL) {
! 	fprintf(stderr,
! 		"File::getAbsolutePath(): failed to get translated file name\n");
! 	return NULL;
      }
      strcpy(dirName, auxDirName);
!     free(auxDirName);
  }
  
  /**
--- 74,106 ----
   * env      the Java environment
   * obj      the current Java object
   */
! char* getAbsolutePath(JNIEnv *env, jobject *obj, char *dirName)
  {
      jclass thisClass;
      jstring jDirName;
      jmethodID getAbsolutePathID;
!     const char *auxDirName;
      jfieldID fid;
  
      thisClass = (*env)->GetObjectClass(env, *obj);
!     if(thisClass == NULL) {
!       fprintf(stderr, "File::getAbsolutePath(): GetObjectClass failed\n");
!       return NULL;
      }
      fid = (*env)->GetFieldID(env, thisClass, "path", "Ljava/lang/String;");
!     if (fid == 0) {
!       fprintf(stderr, "File::getAbsolutePath(): GetFieldID (path) failed\n");
!       return NULL;
      }
      jDirName = (*env)->GetObjectField(env, *obj, fid);
  
!     if(jDirName == NULL) {
!       fprintf(stderr, "File::getAbsolutePath(): failed to get file name\n");
!       return NULL;
      }
+     auxDirName = (*env) -> GetStringUTFChars(env, jDirName, 0);
      strcpy(dirName, auxDirName);
!     (*env) -> ReleaseStringUTFChars(env, jDirName, auxDirName);
  }
  
  /**
***************
*** 130,139 ****
   *
   * throws AFSException
   */
! JNIEXPORT jboolean JNICALL
! Java_org_openafs_jafs_File_setAttributes(JNIEnv * env, jobject obj)
  {
!     char target[FILENAME_MAX + 1];
      char dirName[FILENAME_MAX];
      jclass thisClass;
      jfieldID fid;
--- 118,127 ----
   *
   * throws AFSException
   */
! JNIEXPORT jboolean JNICALL Java_org_openafs_jafs_File_setAttributes
!   (JNIEnv *env, jobject obj)
  {
!     char target[FILENAME_MAX+1];
      char dirName[FILENAME_MAX];
      jclass thisClass;
      jfieldID fid;
***************
*** 145,331 ****
      struct timeval tv0, tv1;
      struct timezone tz;
  
!     /*memset(target, 0, FILENAME_MAX); */
  
      *dirName = '\0';
      getAbsolutePath(env, &obj, dirName);
  
!     /*fprintf(stderr, "dirName=%s\n", dirName); */
  
!     if (*dirName == '\0') {
! 	fprintf(stderr, "File::setAttributes(): failed to get dirName\n");
! 	return JNI_FALSE;
      }
  
!     thisClass = (*env)->GetObjectClass(env, obj);
!     if (thisClass == NULL) {
! 	fprintf(stderr, "File::setAttributes(): GetObjectClass failed\n");
! 	return JNI_FALSE;
      }
  
      gettimeofday(&tv0, &tz);
      if ((strcmp(dirName, "/afs") == 0) || (strcmp(dirName, "/afs/") == 0)) {
! 	rc = 1;			/* special case for /afs since statmountpoint fails on it */
      } else {
! 	rc = uafs_statmountpoint(dirName);
! 	gettimeofday(&tv1, &tz);
! 	sub_time(&tv1, &tv0);
! 	/*printf("%s: statmountpoint %d.%06d\n", dirName, tv1.tv_sec, tv1.tv_usec); */
!     }
! 
!     if (rc < 0) {
! 	setError(env, &obj, errno);
! 	if (errno == ENOENT) {
! 	    setFileNotExistsAttributes(env, &obj);
! 	    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;
! 	}
      }
  
      if (rc == 1) {
! 	/* this is an AFS mount point; we don't want to stat it */
! 	/* fake up a stat entry instead */
! 	mtpoint = 1;
! 	st.st_mtime = 0;
! 	st.st_size = 2048;
! 	st.st_mode = 0;		/* don't match anything */
      } else {
! 	mtpoint = 0;
! 	fid = (*env)->GetFieldID(env, thisClass, "isLink", "Z");
! 	if (fid == 0) {
! 	    fprintf(stderr,
! 		    "File::setAttributes(): GetFieldID (isLink) failed\n");
! 	    setError(env, &obj, -1);
! 	    return JNI_FALSE;
! 	}
! 	islink = (*env)->GetBooleanField(env, obj, fid);
! 	if (islink != JNI_TRUE) {
! 	    rc = uafs_lstat(dirName, &st);
! 	} else {
! 	    /* Here we are being called on a link object for the second time,
! 	     * so we want info on the object pointed to by the link. */
! 	    fprintf(stderr, "islink = TRUE on file %s\n", dirName);
! 	    rc = uafs_stat(dirName, &st);
! 	}
! 
! 	if (rc < 0) {
! 	    setError(env, &obj, errno);
! 	    fprintf(stderr, "uafs_lstat failed for dir %s: error %d\n",
! 		    dirName, errno);
! 	    if (errno == ENOENT) {
! 		setFileNotExistsAttributes(env, &obj);
! 		return JNI_TRUE;
! 	    }
! 	    fprintf(stderr,
! 		    "File::setAttributes(): uafs_stat failed for %s (%s)\n",
! 		    dirName, error_message(errno));
! 	    return JNI_FALSE;
! 	}
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "exists", "Z");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setAttributes(): GetFieldID (exists) failed\n");
! 	setError(env, &obj, -1);
! 	return JNI_FALSE;
      }
      (*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
  
      fid = (*env)->GetFieldID(env, thisClass, "isDirectory", "Z");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setAttributes(): GetFieldID (isDirectory) failed\n");
! 	setError(env, &obj, -1);
! 	return JNI_FALSE;
      }
      if ((st.st_mode & S_IFMT) == S_IFDIR && !mtpoint) {
! 	(*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
      } else {
! 	(*env)->SetBooleanField(env, obj, fid, JNI_FALSE);
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "isFile", "Z");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setAttributes(): GetFieldID (isFile) failed\n");
! 	setError(env, &obj, -1);
! 	return JNI_FALSE;
      }
      if ((st.st_mode & S_IFMT) == S_IFREG) {
! 	(*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
      } else {
! 	(*env)->SetBooleanField(env, obj, fid, JNI_FALSE);
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "isLink", "Z");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setAttributes(): GetFieldID (isLink) failed\n");
! 	setError(env, &obj, -1);
! 	return JNI_FALSE;
!     }
! 
!     if (islink != JNI_TRUE) {	/* don't re-process link */
! 	if ((st.st_mode & S_IFMT) == S_IFLNK) {
! 	    (*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
! 
! 	    /* Find the target of the link */
! 	    rc = uafs_readlink(dirName, target, FILENAME_MAX);
! 	    if (rc < 0) {
! 		fprintf(stderr,
! 			"File::setAttributes(): uafs_readlink failed\n");
! 		setError(env, &obj, errno);
! 		return JNI_FALSE;
! 	    } else {
! 		target[rc] = 0;	/* weird that we have to do this */
! 		/*fprintf(stderr, "readlink %s succeeded, target=%s, rc=%d\n", dirName,
! 		 * target, rc); */
! 	    }
! 
! 	    rc = setString(env, &obj, "target", target);
! 	    if (rc < 0) {
! 		fprintf(stderr, "setString dirName=%s target=%s failed\n",
! 			dirName, target);
! 	    }
! 	} else {
! 	    (*env)->SetBooleanField(env, obj, fid, JNI_FALSE);
! 	}
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "isMountPoint", "Z");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setAttributes(): GetFieldID (isMountPoint) failed\n");
! 	setError(env, &obj, -1);
! 	return JNI_FALSE;
      }
  
      if (mtpoint) {
! 	(*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
      } else {
! 	(*env)->SetBooleanField(env, obj, fid, JNI_FALSE);
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "lastModified", "J");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setAttributes(): GetFieldID (lastModified) failed\n");
! 	setError(env, &obj, -1);
! 	return JNI_FALSE;
      }
!     (*env)->SetLongField(env, obj, fid, ((jlong) st.st_mtime) * 1000);
  
      fid = (*env)->GetFieldID(env, thisClass, "length", "J");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setAttributes(): GetFieldID (length) failed\n");
! 	setError(env, &obj, -1);
! 	return JNI_FALSE;
      }
      (*env)->SetLongField(env, obj, fid, st.st_size);
  
--- 133,316 ----
      struct timeval tv0, tv1;
      struct timezone tz;
  
!     /*memset(target, 0, FILENAME_MAX);*/
  
      *dirName = '\0';
      getAbsolutePath(env, &obj, dirName);
  
!     /*fprintf(stderr, "dirName=%s\n", dirName);*/
  
!     if(*dirName == '\0') {
!       fprintf(stderr, "File::setAttributes(): failed to get dirName\n");
!       return JNI_FALSE;
      }
  
!     thisClass = (*env) -> GetObjectClass(env, obj);
!     if(thisClass == NULL) {
!       fprintf(stderr, "File::setAttributes(): GetObjectClass failed\n");
!       return JNI_FALSE;
      }
  
      gettimeofday(&tv0, &tz);
      if ((strcmp(dirName, "/afs") == 0) || (strcmp(dirName, "/afs/") == 0)) {
!       rc = 1;   /* special case for /afs since statmountpoint fails on it */
      } else {
!       rc = uafs_statmountpoint(dirName);
!       gettimeofday(&tv1, &tz);
!       sub_time(&tv1, &tv0);
!       /*printf("%s: statmountpoint %d.%06d\n", dirName, tv1.tv_sec, tv1.tv_usec);*/
!     }
! 
!     if(rc < 0) {
!       setError(env, &obj, errno);
!       if(errno == ENOENT) {
!         setFileNotExistsAttributes(env, &obj);
!         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;
!       }
      }
  
      if (rc == 1) {
!       /* this is an AFS mount point; we don't want to stat it */
!       /* fake up a stat entry instead */
!       mtpoint = 1;
!       st.st_mtime = 0;
!       st.st_size = 2048;
!       st.st_mode = 0;  /* don't match anything */
      } else {
!       mtpoint = 0;
!       fid = (*env)->GetFieldID(env, thisClass, "isLink", "Z");
!       if (fid == 0) {
!         fprintf(stderr, "File::setAttributes(): GetFieldID (isLink) failed\n");
!         setError(env, &obj, -1);
!         return JNI_FALSE;
!       }
!       islink = (*env)->GetBooleanField(env, obj, fid);
!       if (islink != JNI_TRUE) {
!         rc = uafs_lstat(dirName, &st);
!       } else {
!         /* Here we are being called on a link object for the second time,
!            so we want info on the object pointed to by the link. */
!         fprintf(stderr, "islink = TRUE on file %s\n", dirName);
!         rc = uafs_stat(dirName, &st);
!       }
! 
!       if(rc < 0) {
!         setError(env, &obj, errno);
!         fprintf(stderr, "uafs_lstat failed for dir %s: error %d\n",
!                          dirName, errno);
!         if(errno == ENOENT) {
!           setFileNotExistsAttributes(env, &obj);
!           return JNI_TRUE;
!         }
!         fprintf(stderr, 
!             "File::setAttributes(): uafs_stat failed for %s (%s)\n", 
!              dirName, error_message(errno));
!         return JNI_FALSE;
!       }
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "exists", "Z");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setAttributes(): GetFieldID (exists) failed\n");
!       setError(env, &obj, -1);
!       return JNI_FALSE;
      }
      (*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
  
      fid = (*env)->GetFieldID(env, thisClass, "isDirectory", "Z");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setAttributes(): GetFieldID (isDirectory) failed\n");
!       setError(env, &obj, -1);
!       return JNI_FALSE;
      }
      if ((st.st_mode & S_IFMT) == S_IFDIR && !mtpoint) {
!       (*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
      } else {
!       (*env)->SetBooleanField(env, obj, fid, JNI_FALSE);
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "isFile", "Z");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setAttributes(): GetFieldID (isFile) failed\n");
!       setError(env, &obj, -1);
!       return JNI_FALSE;
      }
      if ((st.st_mode & S_IFMT) == S_IFREG) {
!       (*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
      } else {
!       (*env)->SetBooleanField(env, obj, fid, JNI_FALSE);
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "isLink", "Z");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setAttributes(): GetFieldID (isLink) failed\n");
!       setError(env, &obj, -1);
!       return JNI_FALSE;
!     }
! 
!     if (islink != JNI_TRUE) {    /* don't re-process link */
!       if ((st.st_mode & S_IFMT) == S_IFLNK) {
!         (*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
! 
!         /* Find the target of the link */
!         rc = uafs_readlink(dirName, target, FILENAME_MAX);
!         if (rc < 0) {
!           fprintf(stderr, "File::setAttributes(): uafs_readlink failed\n");
!           setError(env, &obj, errno);
!           return JNI_FALSE;
!         } else {
!           target[rc] = 0;     /* weird that we have to do this */
!           /*fprintf(stderr, "readlink %s succeeded, target=%s, rc=%d\n", dirName,
!             target, rc);*/
!         }
! 
!         rc = setString(env, &obj, "target", target);
!         if (rc < 0) {
!           fprintf(stderr, "setString dirName=%s target=%s failed\n",
!                            dirName, target);
!         }
!       } else {
!         (*env)->SetBooleanField(env, obj, fid, JNI_FALSE);
!       }
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "isMountPoint", "Z");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setAttributes(): GetFieldID (isMountPoint) failed\n");
!       setError(env, &obj, -1);
!       return JNI_FALSE;
      }
  
      if (mtpoint) {
!       (*env)->SetBooleanField(env, obj, fid, JNI_TRUE);
      } else {
!       (*env)->SetBooleanField(env, obj, fid, JNI_FALSE);
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "lastModified", "J");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setAttributes(): GetFieldID (lastModified) failed\n");
!       setError(env, &obj, -1);
!       return JNI_FALSE;
      }
!     (*env)->SetLongField(env, obj, fid, ((jlong) st.st_mtime)*1000);
  
      fid = (*env)->GetFieldID(env, thisClass, "length", "J");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setAttributes(): GetFieldID (length) failed\n");
!       setError(env, &obj, -1);
!       return JNI_FALSE;
      }
      (*env)->SetLongField(env, obj, fid, st.st_size);
  
***************
*** 342,349 ****
   *
   * return  permission/ACL mask
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_File_getRights(JNIEnv * env, jobject obj)
  {
      char dirName[FILENAME_MAX];
      jclass thisClass;
--- 327,334 ----
   *
   * return  permission/ACL mask
   */
! JNIEXPORT jint JNICALL Java_org_openafs_jafs_File_getRights
!   (JNIEnv *env, jobject obj)
  {
      char dirName[FILENAME_MAX];
      jclass thisClass;
***************
*** 355,364 ****
      *dirName = '\0';
      getAbsolutePath(env, &obj, dirName);
  
!     if (*dirName == '\0') {
! 	fprintf(stderr, "File::getRights(): failed to get dirName\n");
! 	setError(env, &obj, -1);
! 	return JNI_FALSE;
      }
  
      /*-Access Rights-
--- 340,349 ----
      *dirName = '\0';
      getAbsolutePath(env, &obj, dirName);
  
!     if(*dirName == '\0') {
!       fprintf(stderr, "File::getRights(): failed to get dirName\n");
!       setError(env, &obj, -1);
!       return JNI_FALSE;
      }
  
      /*-Access Rights-
***************
*** 374,398 ****
      rights = 0;
      afs_rights = uafs_getRights(dirName);
      if (afs_rights < 0) {
! 	setError(env, &obj, errno);
! 	return -1;
      }
! 
      if (afs_rights & PRSFS_READ)
! 	rights |= UAFS_READ;
      if (afs_rights & PRSFS_WRITE)
! 	rights |= UAFS_WRITE;
      if (afs_rights & PRSFS_INSERT)
! 	rights |= UAFS_INSERT;
      if (afs_rights & PRSFS_LOOKUP)
! 	rights |= UAFS_LOOKUP;
      if (afs_rights & PRSFS_DELETE)
! 	rights |= UAFS_DELETE;
      if (afs_rights & PRSFS_LOCK)
! 	rights |= UAFS_LOCK;
      if (afs_rights & PRSFS_ADMINISTER)
! 	rights |= UAFS_ADMIN;
! 
      return rights;
  }
  
--- 359,383 ----
      rights = 0;
      afs_rights = uafs_getRights(dirName);
      if (afs_rights < 0) {
!       setError(env, &obj, errno);
!       return -1;
      }
!     
      if (afs_rights & PRSFS_READ)
!       rights |= UAFS_READ;
      if (afs_rights & PRSFS_WRITE)
!       rights |= UAFS_WRITE;
      if (afs_rights & PRSFS_INSERT)
!       rights |= UAFS_INSERT;
      if (afs_rights & PRSFS_LOOKUP)
!       rights |= UAFS_LOOKUP;
      if (afs_rights & PRSFS_DELETE)
!       rights |= UAFS_DELETE;
      if (afs_rights & PRSFS_LOCK)
!       rights |= UAFS_LOCK;
      if (afs_rights & PRSFS_ADMINISTER)
!       rights |= UAFS_ADMIN;
!     
      return rights;
  }
  
***************
*** 405,414 ****
   *
   * return   the directory handle
   */
! JNIEXPORT jlong JNICALL
! Java_org_openafs_jafs_File_listNative(JNIEnv * env, jobject obj,
! 				      jobject buffer)
  {
      char dirName[FILENAME_MAX];
      jclass arrayListClass;
      jmethodID addID;
--- 390,400 ----
   *
   * return   the directory handle
   */
! JNIEXPORT jlong JNICALL Java_org_openafs_jafs_File_listNative
!   (JNIEnv *env, jobject obj, jobject buffer)
  {
+   return 0;
+ #if 0
      char dirName[FILENAME_MAX];
      jclass arrayListClass;
      jmethodID addID;
***************
*** 417,468 ****
      struct usr_dirent *enp;
      int i, dirSize;
  
!     *dirName = '\0';
      getAbsolutePath(env, &obj, dirName);
!     if (*dirName == '\0') {
! 	fprintf(stderr, "File::listNative(): failed to get dirName\n");
! 	setError(env, &obj, -1);
! 	return 0;
      }
      arrayListClass = (*env)->GetObjectClass(env, buffer);
!     if (arrayListClass == NULL) {
! 	fprintf(stderr, "File::listNative(): GetObjectClass failed\n");
! 	setError(env, &obj, -1);
! 	return 0;
!     }
!     addID =
! 	(*env)->GetMethodID(env, arrayListClass, "add",
! 			    "(Ljava/lang/Object;)Z");
!     if (addID == 0) {
! 	fprintf(stderr, "File::listNative(): failed to get addID\n");
! 	setError(env, &obj, -1);
! 	return 0;
      }
      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;
!     }
!     while ((enp = uafs_readdir(dirp)) != NULL) {
! 	if (strcmp(enp->d_name, ".") == 0 || strcmp(enp->d_name, "..") == 0) {
! 	    continue;
  	}
! 	entryJString = (*env)->NewStringUTF(env, enp->d_name);
! 	if (entryJString == NULL) {
! 	    fprintf(stderr, "File::listNative(): NewStringUTF failed\n");
! 	    setError(env, &obj, -1);
! 	    return 0;
! 	}
! 	(*env)->CallBooleanMethod(env, buffer, addID, entryJString);
      }
!     /*uafs_closedir(dirp); */
  
      setError(env, &obj, 0);
  
      return (jlong) dirp;
  }
  
  /**
--- 403,455 ----
      struct usr_dirent *enp;
      int i, dirSize;
  
!     *dirName='\0';
      getAbsolutePath(env, &obj, dirName);
!     if(*dirName == '\0') {
!       fprintf(stderr, "File::listNative(): failed to get dirName\n");
!       setError(env, &obj, -1);
!       return 0;
      }
      arrayListClass = (*env)->GetObjectClass(env, buffer);
!     if(arrayListClass == NULL) {
!       fprintf(stderr, "File::listNative(): GetObjectClass failed\n");
!       setError(env, &obj, -1);
!       return 0;
!     }
!     addID = (*env) -> GetMethodID(env, arrayListClass, "add", 
!                                   "(Ljava/lang/Object;)Z");
!     if(addID == 0) {
!       fprintf(stderr, 
!             "File::listNative(): failed to get addID\n");
!       setError(env, &obj, -1);
!       return 0;
      }
      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;
!     }
!     while((enp = uafs_readdir(dirp)) != NULL) {
! 	if(strcmp(enp->d_name, ".") == 0 || strcmp(enp->d_name, "..") == 0) {
!         continue;
  	}
!       entryJString = (*env) -> NewStringUTF(env, enp->d_name);
!       if(entryJString == NULL) {
!         fprintf(stderr, "File::listNative(): NewStringUTF failed\n");
!         setError(env, &obj, -1);
!         return 0;
!       }
!       (*env) -> CallBooleanMethod(env, buffer, addID, entryJString);
      }
!     /*uafs_closedir(dirp);*/
  
      setError(env, &obj, 0);
  
      return (jlong) dirp;
+ #endif
  }
  
  /**
***************
*** 473,491 ****
   *
   * return  true if the directory closes without error
   */
! JNIEXPORT jboolean JNICALL
! Java_org_openafs_jafs_File_closeDir(JNIEnv * env, jobject obj, jlong dp)
  {
-     usr_DIR *dirp = (usr_DIR *) dp;
-     int rc;
  
!     rc = uafs_closedir(dirp);
!     if (rc < 0) {
! 	setError(env, &obj, errno);
! 	return JNI_FALSE;
!     } else {
! 	return JNI_TRUE;
!     }
  }
  
  
--- 460,483 ----
   *
   * return  true if the directory closes without error
   */
! JNIEXPORT jboolean JNICALL Java_org_openafs_jafs_File_closeDir
!   (JNIEnv *env, jobject obj, jlong dp)
  {
  
!   return JNI_TRUE;
! 
! #if 0
!   usr_DIR *dirp = (usr_DIR *) dp;
!   int rc;
!   
!   rc = uafs_closedir(dirp);
!   if (rc < 0) {
!     setError(env, &obj, errno);
!     return JNI_FALSE;
!   }
!   else return JNI_TRUE;
! #endif
! 
  }
  
  
***************
*** 497,520 ****
   *
   * return  true if the file is removed without error
   */
! JNIEXPORT jboolean JNICALL
! Java_org_openafs_jafs_File_rmfile(JNIEnv * env, jobject obj)
  {
      char dirName[FILENAME_MAX];
      int rc;
  
!     *dirName = '\0';
      getAbsolutePath(env, &obj, dirName);
!     if (*dirName == '\0') {
! 	setError(env, &obj, EINVAL);
! 	fprintf(stderr, "File::rmfile(): failed to get dirName\n");
! 	return JNI_FALSE;
      }
      rc = uafs_unlink(dirName);
!     if (rc < 0) {
! 	setError(env, &obj, errno);
! 	fprintf(stderr, "File::rmfile(): uafs_unlink failed\n");
! 	return JNI_FALSE;
      }
      setError(env, &obj, 0);
      return JNI_TRUE;
--- 489,512 ----
   *
   * return  true if the file is removed without error
   */
! JNIEXPORT jboolean JNICALL Java_org_openafs_jafs_File_rmfile
!   (JNIEnv *env, jobject obj)
  {
      char dirName[FILENAME_MAX];
      int rc;
  
!     *dirName='\0';
      getAbsolutePath(env, &obj, dirName);
!     if(*dirName == '\0') {
!       setError(env, &obj, EINVAL);
!       fprintf(stderr, "File::rmfile(): failed to get dirName\n");
!       return JNI_FALSE;
      }
      rc = uafs_unlink(dirName);
!     if(rc < 0) {
!       setError(env, &obj, errno);
!       fprintf(stderr, "File::rmfile(): uafs_unlink failed\n");
!       return JNI_FALSE;
      }
      setError(env, &obj, 0);
      return JNI_TRUE;
***************
*** 528,551 ****
   *
   * return  true if the directory is removed without error
   */
! JNIEXPORT jboolean JNICALL
! Java_org_openafs_jafs_File_rmdir(JNIEnv * env, jobject obj)
  {
      char dirName[FILENAME_MAX];
      int rc;
  
!     *dirName = '\0';
      getAbsolutePath(env, &obj, dirName);
!     if (*dirName == '\0') {
! 	setError(env, &obj, -1);
! 	fprintf(stderr, "File::rmdir(): failed to get dirName\n");
! 	return JNI_FALSE;
      }
      rc = uafs_rmdir(dirName);
!     if (rc < 0) {
! 	setError(env, &obj, errno);
! 	fprintf(stderr, "File::rmdir(): uafs_unlink failed\n");
! 	return JNI_FALSE;
      }
      setError(env, &obj, 0);
      return JNI_TRUE;
--- 520,543 ----
   *
   * return  true if the directory is removed without error
   */
! JNIEXPORT jboolean JNICALL Java_org_openafs_jafs_File_rmdir
!   (JNIEnv *env, jobject obj)
  {
      char dirName[FILENAME_MAX];
      int rc;
  
!     *dirName='\0';
      getAbsolutePath(env, &obj, dirName);
!     if(*dirName == '\0') {
!       setError(env, &obj, -1);
!       fprintf(stderr, "File::rmdir(): failed to get dirName\n");
!       return JNI_FALSE;
      }
      rc = uafs_rmdir(dirName);
!     if(rc < 0) {
!       setError(env, &obj, errno);
!       fprintf(stderr, "File::rmdir(): uafs_unlink failed\n");
!       return JNI_FALSE;
      }
      setError(env, &obj, 0);
      return JNI_TRUE;
***************
*** 560,583 ****
   * return  true if and only if the directory was
   *          created; false otherwise
   */
! JNIEXPORT jboolean JNICALL
! Java_org_openafs_jafs_File_mkdir(JNIEnv * env, jobject obj)
  {
      char dirName[FILENAME_MAX];
      int rc;
  
!     *dirName = '\0';
      getAbsolutePath(env, &obj, dirName);
!     if (*dirName == '\0') {
! 	setError(env, &obj, EINVAL);
! 	fprintf(stderr, "File::mkdir(): failed to get dirName\n");
! 	return JNI_FALSE;
      }
      rc = uafs_mkdir(dirName, 0755);
!     if (rc < 0) {
! 	setError(env, &obj, errno);
! 	fprintf(stderr, "File::mkdir(): uafs_mkdir failed\n");
! 	return JNI_FALSE;
      }
      setError(env, &obj, 0);
      return JNI_TRUE;
--- 552,575 ----
   * return  true if and only if the directory was
   *          created; false otherwise
   */
! JNIEXPORT jboolean JNICALL Java_org_openafs_jafs_File_mkdir
!   (JNIEnv *env, jobject obj)
  {
      char dirName[FILENAME_MAX];
      int rc;
  
!     *dirName='\0';
      getAbsolutePath(env, &obj, dirName);
!     if(*dirName == '\0') {
!       setError(env, &obj, EINVAL);
!       fprintf(stderr, "File::mkdir(): failed to get dirName\n");
!       return JNI_FALSE;
      }
      rc = uafs_mkdir(dirName, 0755);
!     if(rc < 0) {
!       setError(env, &obj, errno);
!       fprintf(stderr, "File::mkdir(): uafs_mkdir failed\n");
!       return JNI_FALSE;
      }
      setError(env, &obj, 0);
      return JNI_TRUE;
***************
*** 596,628 ****
   * throws   NullPointerException  
   *          If parameter dest is null
   */
! JNIEXPORT jboolean JNICALL
! Java_org_openafs_jafs_File_renameTo(JNIEnv * env, jobject obj,
! 				    jobject newFile)
  {
      char thisDirName[FILENAME_MAX], newDirName[FILENAME_MAX];
      int rc;
  
!     *thisDirName = '\0';
      getAbsolutePath(env, &obj, thisDirName);
!     if (*thisDirName == '\0') {
! 	setError(env, &obj, -1);
! 	fprintf(stderr,
! 		"File::renameTo(): failed to get dirName for this \n");
! 	return JNI_FALSE;
      }
!     *newDirName = '\0';
      getAbsolutePath(env, &newFile, newDirName);
!     if (*newDirName == '\0') {
! 	setError(env, &obj, -1);
! 	fprintf(stderr, "File::renameTo(): failed to get dirName for new \n");
! 	return JNI_FALSE;
      }
      rc = uafs_rename(thisDirName, newDirName);
!     if (rc < 0) {
! 	setError(env, &obj, errno);
! 	fprintf(stderr, "File::renameTo(): uafs_rename failed\n");
! 	return JNI_FALSE;
      }
      return JNI_TRUE;
  }
--- 588,618 ----
   * throws   NullPointerException  
   *          If parameter dest is null
   */
! JNIEXPORT jboolean JNICALL Java_org_openafs_jafs_File_renameTo
!   (JNIEnv *env, jobject obj, jobject newFile)
  {
      char thisDirName[FILENAME_MAX], newDirName[FILENAME_MAX];
      int rc;
  
!     *thisDirName='\0';
      getAbsolutePath(env, &obj, thisDirName);
!     if(*thisDirName == '\0') {
!       setError(env, &obj, -1);
!       fprintf(stderr, "File::renameTo(): failed to get dirName for this \n");
!       return JNI_FALSE;
      }
!     *newDirName='\0';
      getAbsolutePath(env, &newFile, newDirName);
!     if(*newDirName == '\0') {
!       setError(env, &obj, -1);
!       fprintf(stderr, "File::renameTo(): failed to get dirName for new \n");
!       return JNI_FALSE;
      }
      rc = uafs_rename(thisDirName, newDirName);
!     if(rc < 0) {
!       setError(env, &obj, errno);
!       fprintf(stderr, "File::renameTo(): uafs_rename failed\n");
!       return JNI_FALSE;
      }
      return JNI_TRUE;
  }
***************
*** 634,692 ****
   * env      the Java environment
   * obj      the current Java object
   */
! void
! setFileNotExistsAttributes(JNIEnv * env, jobject * obj)
  {
      jclass thisClass;
      jfieldID fid;
  
!     thisClass = (*env)->GetObjectClass(env, *obj);
!     if (thisClass == NULL) {
! 	fprintf(stderr,
! 		"File::setFileNotExistsAttributes(): GetObjectClass failed\n");
! 	return;
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "exists", "Z");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setFileNotExistsAttributes(): GetFieldID (exists) failed\n");
! 	return;
      }
      (*env)->SetBooleanField(env, *obj, fid, JNI_FALSE);
  
      fid = (*env)->GetFieldID(env, thisClass, "isDirectory", "Z");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setFileNotExistsAttributes(): GetFieldID (isDirectory) failed\n");
! 	return;
      }
      (*env)->SetBooleanField(env, *obj, fid, JNI_FALSE);
  
      fid = (*env)->GetFieldID(env, thisClass, "isFile", "Z");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setFileNotExistsAttributes(): GetFieldID (isDirectory) failed\n");
! 	return;
      }
      (*env)->SetBooleanField(env, *obj, fid, JNI_FALSE);
  
      fid = (*env)->GetFieldID(env, thisClass, "lastModified", "J");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setFileNotExistsAttributes(): GetFieldID (lastModified) failed\n");
! 	return;
      }
      (*env)->SetLongField(env, *obj, fid, 0);
  
! 
      fid = (*env)->GetFieldID(env, thisClass, "length", "J");
      if (fid == 0) {
! 	fprintf(stderr,
! 		"File::setFileNotExistsAttributes(): GetFieldID (length) failed\n");
! 	return;
      }
      (*env)->SetLongField(env, *obj, fid, 0);
  
      return;
  }
--- 624,684 ----
   * env      the Java environment
   * obj      the current Java object
   */
! void setFileNotExistsAttributes
!     (JNIEnv *env, jobject *obj)
  {
      jclass thisClass;
      jfieldID fid;
  
!     thisClass = (*env) -> GetObjectClass(env, *obj);
!     if(thisClass == NULL) {
!       fprintf(stderr, 
!             "File::setFileNotExistsAttributes(): GetObjectClass failed\n");
!       return;
      }
  
      fid = (*env)->GetFieldID(env, thisClass, "exists", "Z");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setFileNotExistsAttributes(): GetFieldID (exists) failed\n");
!       return;
      }
      (*env)->SetBooleanField(env, *obj, fid, JNI_FALSE);
  
      fid = (*env)->GetFieldID(env, thisClass, "isDirectory", "Z");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setFileNotExistsAttributes(): GetFieldID (isDirectory) failed\n");
!       return;
      }
      (*env)->SetBooleanField(env, *obj, fid, JNI_FALSE);
  
      fid = (*env)->GetFieldID(env, thisClass, "isFile", "Z");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setFileNotExistsAttributes(): GetFieldID (isDirectory) failed\n");
!       return;
      }
      (*env)->SetBooleanField(env, *obj, fid, JNI_FALSE);
  
      fid = (*env)->GetFieldID(env, thisClass, "lastModified", "J");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setFileNotExistsAttributes(): GetFieldID (lastModified) failed\n");
!       return;
      }
      (*env)->SetLongField(env, *obj, fid, 0);
  
!     
      fid = (*env)->GetFieldID(env, thisClass, "length", "J");
      if (fid == 0) {
!       fprintf(stderr, 
!             "File::setFileNotExistsAttributes(): GetFieldID (length) failed\n");
!       return;
      }
      (*env)->SetLongField(env, *obj, fid, 0);
  
      return;
  }
+ 
+ 
Index: openafs/src/JAVA/libjafs/FileInputStream.c
diff -c openafs/src/JAVA/libjafs/FileInputStream.c:1.3 openafs/src/JAVA/libjafs/FileInputStream.c:1.3.2.1
*** openafs/src/JAVA/libjafs/FileInputStream.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/FileInputStream.c	Fri Oct 14 22:14:11 2005
***************
*** 33,39 ****
  /**
   * Be carefull with the memory management:
   *
!  * - For every getNativeString call the corresponding free().
   * - For every Get<type>ArrayElements call the corresponding
   *   Release<type>ArrayElements
   * - For every malloc call the corresponding free.
--- 33,39 ----
  /**
   * Be carefull with the memory management:
   *
!  * - For every GetStringUTFChars call the corresponding ReleaseStringUTFChars.
   * - For every Get<type>ArrayElements call the corresponding
   *   Release<type>ArrayElements
   * - For every malloc call the corresponding free.
***************
*** 51,69 ****
   * @return		file descriptor
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_FileInputStream_openReadOnly(JNIEnv * env, jobject obj,
! 						   jstring fileNameUTF)
  {
!     int err;
!     int fd = -1;		//file descriptor
  
!     fd = openAFSFile(env, fileNameUTF, O_RDONLY, 0, &err);
!     if (fd < 0) {
! 	fprintf(stderr, "FileInputStream::openReadOnly(): err=%d\n", err);
! 	throwAFSFileException(env, err, NULL);
!     }
!     return fd;
  }
  
  /**
--- 51,68 ----
   * @return		file descriptor
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT jint JNICALL Java_org_openafs_jafs_FileInputStream_openReadOnly
!   (JNIEnv *env, jobject obj, jstring fileNameUTF)
  {
!   int err;
!   int fd = -1;		//file descriptor
  
!   fd = openAFSFile(env, fileNameUTF, O_RDONLY, 0, &err);
!   if (fd < 0) {
!     fprintf(stderr, "FileInputStream::openReadOnly(): err=%d\n", err);
!     throwAFSFileException( env, err, NULL );
!   }
!   return fd;
  }
  
  /**
***************
*** 82,121 ****
   *			the file has been reached.
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_FileInputStream_read(JNIEnv * env, jobject obj,
! 					   jbyteArray jbytes, jint offset,
! 					   jint length)
  {
!     int fd, bytesLen, bytesRead;
!     jclass thisClass;
!     jmethodID getFileDescriptorID;
!     jbyte *bytes;
!     jfieldID fid;
! 
!     /* If we have to read 0 bytes just return */
!     if (length == 0)
! 	return 0;
! 
!     thisClass = (*env)->GetObjectClass(env, obj);
!     fid = (*env)->GetFieldID(env, thisClass, "fileDescriptor", "I");
!     fd = (*env)->GetIntField(env, obj, fid);
! 
!     if (fd < 0) {
! 	fprintf(stderr, "FileInputStream::read(): invalid file state\n");
! 	throwAFSFileException(env, 0, "Invalid file state");
! 	return -1;
!     }
! 
!     bytes = (*env)->GetByteArrayElements(env, jbytes, 0);
!     bytesLen = (*env)->GetArrayLength(env, jbytes);
!     bytesRead = uafs_read(fd, bytes, bytesLen);
  
!     if (errno != 0)
! 	throwAFSFileException(env, errno, NULL);
  
!     (*env)->ReleaseByteArrayElements(env, jbytes, bytes, 0);
!     return (bytesRead > 0) ? bytesRead : -1;
  }
  
  /**
--- 81,116 ----
   *			the file has been reached.
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT jint JNICALL Java_org_openafs_jafs_FileInputStream_read
!   (JNIEnv *env, jobject obj, jbyteArray jbytes, jint offset, jint length)
  {
!   int fd, bytesLen, bytesRead;
!   jclass thisClass;
!   jmethodID getFileDescriptorID;
!   jbyte *bytes;
!   jfieldID fid;
! 
!   /* If we have to read 0 bytes just return */
!   if(length == 0) return 0;
! 
!   thisClass = (*env)->GetObjectClass(env, obj);
!   fid = (*env)->GetFieldID(env, thisClass, "fileDescriptor", "I");
!   fd = (*env)->GetIntField(env, obj, fid);
! 
!   if(fd < 0) {
!     fprintf(stderr, "FileInputStream::read(): invalid file state\n");
!     throwAFSFileException(env, 0, "Invalid file state");
!     return -1;
!   }
! 
!   bytes = (*env) -> GetByteArrayElements(env, jbytes, 0);
!   bytesLen = (*env) -> GetArrayLength(env, jbytes);
!   bytesRead = uafs_read(fd, bytes, bytesLen);
  
!   if (errno != 0) throwAFSFileException(env, errno, NULL);
  
!   (*env) -> ReleaseByteArrayElements(env, jbytes, bytes, 0);
!   return (bytesRead > 0) ? bytesRead : -1;
  }
  
  /**
***************
*** 128,155 ****
   *
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_FileInputStream_close(JNIEnv * env, jobject obj)
  {
!     int fd, rc;
!     jclass thisClass;
!     jmethodID getFileDescriptorID;
!     jfieldID fid;
!     char *bytes;
! 
!     thisClass = (*env)->GetObjectClass(env, obj);
!     fid = (*env)->GetFieldID(env, thisClass, "fileDescriptor", "I");
!     fd = (*env)->GetIntField(env, obj, fid);
! 
!     if (fd < 0) {
! 	fprintf(stderr, "FileInputStream::close(): invalid file state\n");
! 	throwAFSFileException(env, 0, "Invalid file state");
! 	return;
!     }
! 
!     rc = uafs_close(fd);
! 
!     if (rc != 0) {
! 	throwAFSFileException(env, errno, NULL);
!     }
  }
--- 123,153 ----
   *
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT void JNICALL Java_org_openafs_jafs_FileInputStream_close
!   (JNIEnv *env, jobject obj)
  {
!   int fd, rc;
!   jclass thisClass;
!   jmethodID getFileDescriptorID;
!   jfieldID fid;
!   char *bytes;
! 
!   thisClass = (*env)->GetObjectClass(env, obj);
!   fid = (*env)->GetFieldID(env, thisClass, "fileDescriptor", "I");
!   fd = (*env)->GetIntField(env, obj, fid);
! 
!   if(fd < 0) {
!     fprintf(stderr, "FileInputStream::close(): invalid file state\n");
!     throwAFSFileException(env, 0, "Invalid file state");
!     return;
!   }
! 
!   rc = uafs_close(fd);
! 
!   if (rc != 0) {
!     throwAFSFileException(env, errno, NULL);
!   }
  }
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/FileOutputStream.c
diff -c openafs/src/JAVA/libjafs/FileOutputStream.c:1.3 openafs/src/JAVA/libjafs/FileOutputStream.c:1.3.2.1
*** openafs/src/JAVA/libjafs/FileOutputStream.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/FileOutputStream.c	Fri Oct 14 22:14:11 2005
***************
*** 36,42 ****
  /**
   * Be carefull with the memory management:
   *
!  * - For every getNativeString call the corresponding free().
   * - For every Get<type>ArrayElements call the corresponding
   *   Release<type>ArrayElements
   * - For every malloc call the corresponding free.
--- 36,42 ----
  /**
   * Be carefull with the memory management:
   *
!  * - For every GetStringUTFChars call the corresponding ReleaseStringUTFChars.
   * - For every Get<type>ArrayElements call the corresponding
   *   Release<type>ArrayElements
   * - For every malloc call the corresponding free.
***************
*** 54,72 ****
   * @returns		file descriptor
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_FileOutputStream_openWrite(JNIEnv * env, jobject obj,
! 						 jstring fileNameUTF)
  {
!     int err;
!     jint fd = -1;		//file descriptor
  
!     fd = openAFSFile(env, fileNameUTF, O_CREAT | O_TRUNC, 0644, &err);
!     if (fd < 0) {
! 	fprintf(stderr, "FileOutputStream::openWrite(): err=%d\n", err);
! 	throwAFSFileException(env, err, NULL);
!     }
!     return fd;
  }
  
  /**
--- 54,71 ----
   * @returns		file descriptor
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT jint JNICALL Java_org_openafs_jafs_FileOutputStream_openWrite
!   (JNIEnv *env, jobject obj, jstring fileNameUTF)
  {
!   int err;
!   jint fd = -1;		//file descriptor
  
!   fd = openAFSFile(env, fileNameUTF, O_CREAT | O_TRUNC, 0644, &err);
!   if (fd < 0) {
!     fprintf(stderr, "FileOutputStream::openWrite(): err=%d\n", err);
!     throwAFSFileException(env, err, NULL);
!   }
!   return fd;
  }
  
  /**
***************
*** 79,97 ****
   * @return		file descriptor
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_FileOutputStream_openAppend(JNIEnv * env, jobject obj,
! 						  jstring fileNameUTF)
  {
!     int err;
!     jint fd = -1;		//file descriptor
  
!     fd = openAFSFile(env, fileNameUTF, O_CREAT | O_APPEND, 0644, &err);
!     if (fd < 0) {
! 	fprintf(stderr, "FileOutputStream::openAppend(): err=%d\n", err);
! 	throwAFSFileException(env, err, NULL);
!     }
!     return fd;
  }
  
  /**
--- 78,95 ----
   * @return		file descriptor
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT jint JNICALL Java_org_openafs_jafs_FileOutputStream_openAppend
!   (JNIEnv *env, jobject obj, jstring fileNameUTF)
  {
!   int err;
!   jint fd = -1;		//file descriptor
  
!   fd = openAFSFile(env, fileNameUTF, O_CREAT | O_APPEND, 0644, &err);
!   if (fd < 0) {
!     fprintf(stderr, "FileOutputStream::openAppend(): err=%d\n", err);
!     throwAFSFileException(env, err, NULL);
!   }
!   return fd;
  }
  
  /**
***************
*** 106,115 ****
   *
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_FileOutputStream_write(JNIEnv * env, jobject obj,
! 					     jbyteArray jbytes, jint offset,
! 					     jint length)
  {
      int fd, written, toWrite;
      jint twritten;
--- 104,111 ----
   *
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT void JNICALL Java_org_openafs_jafs_FileOutputStream_write
!   (JNIEnv *env, jobject obj, jbyteArray jbytes, jint offset, jint length)
  {
      int fd, written, toWrite;
      jint twritten;
***************
*** 121,152 ****
      thisClass = (*env)->GetObjectClass(env, obj);
      fid = (*env)->GetFieldID(env, thisClass, "fileDescriptor", "I");
      fd = (*env)->GetIntField(env, obj, fid);
!     if (fd < 0) {
! 	fprintf(stderr, "FileOutputStream::write(): failed to get file 
!                        descriptor\n");
! 	throwAFSFileException(env, 0, "Failed to get file descriptor!");
!     }
! 
!     bytes = (char *)malloc(length);
!     if (bytes == NULL) {
! 	fprintf(stderr,
! 		"FileOutputStream::write(): malloc failed of %d bytes\n",
! 		length);
! 	throwAFSFileException(env, 0, "Failed to allocate memory!");
      }
! 
!     (*env)->GetByteArrayRegion(env, jbytes, offset, length, bytes);
      toWrite = length;
      twritten = 0;
! 
!     while (toWrite > 0) {
! 	written = uafs_write(fd, bytes, length);
! 	twritten += written;
! 	if (written < 0) {
! 	    free(bytes);
! 	    throwAFSFileException(env, errno, NULL);
! 	}
! 	toWrite -= written;
      }
      free(bytes);
  }
--- 117,144 ----
      thisClass = (*env)->GetObjectClass(env, obj);
      fid = (*env)->GetFieldID(env, thisClass, "fileDescriptor", "I");
      fd = (*env)->GetIntField(env, obj, fid);
!     if(fd < 0) {
!       fprintf(stderr, "FileOutputStream::write(): failed to get file "
!                        "descriptor\n");
!       throwAFSFileException(env, 0, "Failed to get file descriptor!");
!     }
!     bytes = (char*) malloc(length);
!     if(bytes == NULL) {
!       fprintf(stderr, "FileOutputStream::write(): malloc failed of %d bytes\n",
!                        length);
!       throwAFSFileException(env, 0, "Failed to allocate memory!");
      }
!     (*env) -> GetByteArrayRegion(env, jbytes, offset, length, bytes);
      toWrite = length;
      twritten = 0;
!     while(toWrite>0) {
!       written = uafs_write(fd, bytes, length);
!       twritten += written;
!       if(written<0) {
!         free(bytes);
!         throwAFSFileException(env, errno, NULL);
!       }
!       toWrite -= written;
      }
      free(bytes);
  }
***************
*** 161,168 ****
   *
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_FileOutputStream_close(JNIEnv * env, jobject obj)
  {
      int fd, rc;
      jclass thisClass;
--- 153,160 ----
   *
   * @exception	AFSFileException  if an I/O or other file related error occurs.
   */
! JNIEXPORT void JNICALL Java_org_openafs_jafs_FileOutputStream_close
!   (JNIEnv *env, jobject obj)
  {
      int fd, rc;
      jclass thisClass;
***************
*** 173,185 ****
      thisClass = (*env)->GetObjectClass(env, obj);
      fid = (*env)->GetFieldID(env, thisClass, "fileDescriptor", "I");
      fd = (*env)->GetIntField(env, obj, fid);
!     if (fd < 0) {
! 	fprintf(stderr,
! 		"FileOutputStream::close(): failed to get file descriptor\n");
! 	throwAFSFileException(env, 0, "Failed to get file descriptor!");
      }
      rc = uafs_close(fd);
      if (rc != 0) {
! 	throwAFSFileException(env, rc, NULL);
      }
  }
--- 165,178 ----
      thisClass = (*env)->GetObjectClass(env, obj);
      fid = (*env)->GetFieldID(env, thisClass, "fileDescriptor", "I");
      fd = (*env)->GetIntField(env, obj, fid);
!     if(fd < 0) {
!       fprintf(stderr, "FileOutputStream::close(): failed to get file descriptor\n");
!       throwAFSFileException(env, 0, "Failed to get file descriptor!");
      }
      rc = uafs_close(fd);
      if (rc != 0) {
!       throwAFSFileException(env, rc, NULL);
      }
  }
+ 
+ 
Index: openafs/src/JAVA/libjafs/GetNativeString.c
diff -c /dev/null openafs/src/JAVA/libjafs/GetNativeString.c:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:20 2006
--- openafs/src/JAVA/libjafs/GetNativeString.c	Fri Oct 14 22:14:12 2005
***************
*** 0 ****
--- 1,49 ----
+ 
+ #include <jni.h>
+ #include "GetNativeString.h"
+ 
+ char* GetNativeString(JNIEnv *env, jstring jstr){
+   jbyteArray bytes = 0;
+   jthrowable exc;
+   char *result = 0;
+   
+   if ((*env)->EnsureLocalCapacity(env, 2) < 0) {
+     return 0; /* out of memory error */
+   }
+   
+   jclass stringClass=(*env)->FindClass(env,"java/lang/String");
+ 
+   if(!stringClass){
+     return 0;
+   }
+ 
+   jmethodID  MID_String_getBytes = (*env)->GetMethodID(env,stringClass,"getBytes","()[B");
+   if(!MID_String_getBytes){
+     return 0;
+   }
+ 
+   bytes = (*env)->CallObjectMethod(env, jstr,
+ 				   MID_String_getBytes);
+   exc = (*env)->ExceptionOccurred(env);
+   if (!exc) {
+     jint len = (*env)->GetArrayLength(env, bytes);
+     result = (char *)malloc(len + 1);
+     if (result == 0) {
+ 
+       /*JNU_ThrowByName(env, "java/lang/OutOfMemoryError",
+ 	0);*/
+ 
+       (*env)->DeleteLocalRef(env, bytes);
+       return 0;
+     }
+     (*env)->GetByteArrayRegion(env, bytes, 0, len,
+ 			       (jbyte *)result);
+     result[len] = 0; /* NULL-terminate */
+   } else {
+     (*env)->DeleteLocalRef(env, exc);
+   }
+   (*env)->DeleteLocalRef(env, bytes);
+      return result;  
+ }
+ 
+ jstring GetJavaString(JNIEnv *env, char*);
Index: openafs/src/JAVA/libjafs/GetNativeString.h
diff -c /dev/null openafs/src/JAVA/libjafs/GetNativeString.h:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:20 2006
--- openafs/src/JAVA/libjafs/GetNativeString.h	Fri Oct 14 22:14:12 2005
***************
*** 0 ****
--- 1,6 ----
+ 
+ #include <jni.h>
+ #include <stdlib.h>
+ 
+ char* GetNativeString(JNIEnv *env, jstring jstr);
+ jstring GetJavaString(JNIEnv *env, char*);
Index: openafs/src/JAVA/libjafs/Group.c
diff -c openafs/src/JAVA/libjafs/Group.c:1.3 openafs/src/JAVA/libjafs/Group.c:1.3.2.1
*** openafs/src/JAVA/libjafs/Group.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/Group.c	Fri Oct 14 22:14:12 2005
***************
*** 65,124 ****
   * gid     the group id to assign to the group (0 to have one 
   *                automatically assigned)
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_create(JNIEnv * env, jclass cls, jint cellHandle,
! 				   jstring jgroupName, jstring jownerName,
! 				   jint gid)
! {
!     afs_status_t ast;
!     // convert java strings
!     char *groupName;
!     char *ownerName;
! 
!     if (jgroupName != NULL) {
! 	groupName = getNativeString(env, jgroupName);
! 	if (groupName == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return;
!     }
  
!     if (jownerName != NULL) {
! 	ownerName = getNativeString(env, jownerName);
! 	if (ownerName == NULL) {
! 	    free(groupName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(groupName);
! 	throwAFSException(env, JAFSNULLOWNER);
! 	return;
!     }
! 
!     // make sure the name is within the allowed bounds
!     if (strlen(groupName) > PTS_MAX_NAME_LEN) {
! 	// release converted java strings
! 	free(groupName);
! 	free(ownerName);
! 	throwAFSException(env, ADMPTSGROUPNAMETOOLONG);
! 	return;
!     }
! 
!     if (!pts_GroupCreate
! 	((void *)cellHandle, groupName, ownerName, (int *)&gid, &ast)) {
! 	// release converted java strings
! 	free(groupName);
! 	free(ownerName);
! 	throwAFSException(env, ast);
! 	return;
      }
      // release converted java strings
!     free(groupName);
!     free(ownerName);
  }
  
  /**
--- 65,134 ----
   * gid     the group id to assign to the group (0 to have one 
   *                automatically assigned)
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_create
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jgroupName, 
!    jstring jownerName, jint gid )
! {
!   afs_status_t ast;
!   // convert java strings
!   const char *groupName;
!   const char *ownerName;
! 
!   if( jgroupName != NULL ) {
!     groupName = (*env)->GetStringUTFChars(env, jgroupName, 0);
!     if( !groupName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     groupName = NULL;
!   }
! 
!   if( jownerName != NULL ) {
!     ownerName = (*env)->GetStringUTFChars(env, jownerName, 0);
!     if( !ownerName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     ownerName = NULL;
!   }
  
!   // make sure the name is within the allowed bounds
!   if( groupName != NULL && strlen( groupName ) > PTS_MAX_NAME_LEN ) {
!     // release converted java strings
!     if( groupName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!     }
!     if( ownerName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jownerName, ownerName);
      }
+     throwAFSException( env, ADMPTSGROUPNAMETOOLONG );
+     return;
+   }
+   
+   if( !pts_GroupCreate( (void *) cellHandle, groupName, ownerName, 
+ 			(int *) &gid, &ast ) ) {
      // release converted java strings
!     if( groupName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!     }
!     if( ownerName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jownerName, ownerName);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   // release converted java strings
!   if( groupName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!   }
!   if( ownerName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jownerName, ownerName);
!   }
! 
  }
  
  /**
***************
*** 131,160 ****
   * cellHandle    the handle of the cell to which the group belongs
   * jgroupName      the name of the group to delete
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_delete(JNIEnv * env, jclass cls, jint cellHandle,
! 				   jstring jgroupName)
! {
!     afs_status_t ast;
!     // convert java strings
!     char *groupName;
! 
!     if (jgroupName != NULL) {
! 	groupName = getNativeString(env, jgroupName);
! 	if (!groupName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return;
!     }
  
-     if (!pts_GroupDelete((void *)cellHandle, groupName, &ast)) {
- 	throwAFSException(env, ast);
-     }
-     // release converted java strings
-     free(groupName);
  }
  
  /**
--- 141,177 ----
   * cellHandle    the handle of the cell to which the group belongs
   * jgroupName      the name of the group to delete
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_delete
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jgroupName )
! {
!   afs_status_t ast;
!   // convert java strings
!   const char *groupName;
! 
!   if( jgroupName != NULL ) {
!     groupName = (*env)->GetStringUTFChars(env, jgroupName, 0);
!     if( !groupName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     groupName = NULL;
!   }
! 
!   if( !pts_GroupDelete( (void *) cellHandle, groupName, &ast ) ) {
!     if( groupName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
!   
!   // release converted java strings
!   if( groupName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!   }
  
  }
  
  /**
***************
*** 166,256 ****
   * name      the name of the group for which to get the info
   * group      the Group object to populate with the info
   */
! void
! getGroupInfoChar(JNIEnv * env, jint cellHandle, const char *name,
! 		 jobject group)
! {
! 
!     jstring jowner;
!     jstring jcreator;
!     pts_GroupEntry_t entry;
!     afs_status_t ast;
!     // get the field ids if you haven't already
!     if (groupCls == 0) {
! 	internal_getGroupClass(env, group);
!     }
! 
!     if (!pts_GroupGet((void *)cellHandle, name, &entry, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
!     // set the fields
!     (*env)->SetIntField(env, group, group_nameUidField, entry.nameUid);
!     (*env)->SetIntField(env, group, group_ownerUidField, entry.ownerUid);
!     (*env)->SetIntField(env, group, group_creatorUidField, entry.creatorUid);
!     (*env)->SetIntField(env, group, group_membershipCountField,
! 			entry.membershipCount);
! 
!     if (entry.listStatus == PTS_GROUP_OWNER_ACCESS) {
! 	(*env)->SetIntField(env, group, group_listStatusField,
! 			    org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
!     } else if (entry.listStatus == PTS_GROUP_ACCESS) {
! 	(*env)->SetIntField(env, group, group_listStatusField,
! 			    org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
!     } else {
! 	(*env)->SetIntField(env, group, group_listStatusField,
! 			    org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
!     }
  
!     if (entry.listGroupsOwned == PTS_GROUP_OWNER_ACCESS) {
! 	(*env)->SetIntField(env, group, group_listGroupsOwnedField,
! 			    org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
!     } else if (entry.listGroupsOwned == PTS_GROUP_ACCESS) {
! 	(*env)->SetIntField(env, group, group_listGroupsOwnedField,
! 			    org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
!     } else {
! 	(*env)->SetIntField(env, group, group_listGroupsOwnedField,
! 			    org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
!     }
  
!     if (entry.listMembership == PTS_GROUP_OWNER_ACCESS) {
! 	(*env)->SetIntField(env, group, group_listMembershipField,
! 			    org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
!     } else if (entry.listMembership == PTS_GROUP_ACCESS) {
! 	(*env)->SetIntField(env, group, group_listMembershipField,
! 			    org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
!     } else {
! 	(*env)->SetIntField(env, group, group_listMembershipField,
! 			    org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
!     }
  
!     if (entry.listAdd == PTS_GROUP_OWNER_ACCESS) {
! 	(*env)->SetIntField(env, group, group_listAddField,
! 			    org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
!     } else if (entry.listAdd == PTS_GROUP_ACCESS) {
! 	(*env)->SetIntField(env, group, group_listAddField,
! 			    org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
!     } else {
! 	(*env)->SetIntField(env, group, group_listAddField,
! 			    org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
!     }
  
-     if (entry.listDelete == PTS_GROUP_OWNER_ACCESS) {
- 	(*env)->SetIntField(env, group, group_listDeleteField,
- 			    org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
-     } else if (entry.listDelete == PTS_GROUP_ACCESS) {
- 	(*env)->SetIntField(env, group, group_listDeleteField,
- 			    org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
-     } else {
- 	(*env)->SetIntField(env, group, group_listDeleteField,
- 			    org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
-     }
- 
-     jowner = (*env)->NewStringUTF(env, entry.owner);
-     jcreator = (*env)->NewStringUTF(env, entry.creator);
- 
-     (*env)->SetObjectField(env, group, group_ownerField, jowner);
-     (*env)->SetObjectField(env, group, group_creatorField, jcreator);
  }
  
  /**
--- 183,274 ----
   * name      the name of the group for which to get the info
   * group      the Group object to populate with the info
   */
! void getGroupInfoChar
!   ( JNIEnv *env, void *cellHandle, const char *name, jobject group )
! {
  
!   jstring jowner;
!   jstring jcreator;
!   pts_GroupEntry_t entry;
!   afs_status_t ast;
! 
!   // get the field ids if you haven't already
!   if( groupCls == 0 ) {
!     internal_getGroupClass( env, group );
!   }
!   if ( !pts_GroupGet( cellHandle, name, &entry, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   // set the fields
!   (*env)->SetIntField(env, group, group_nameUidField, entry.nameUid);
!   (*env)->SetIntField(env, group, group_ownerUidField, entry.ownerUid);
!   (*env)->SetIntField(env, group, group_creatorUidField, entry.creatorUid);
!   (*env)->SetIntField(env, group, group_membershipCountField, 
! 		      entry.membershipCount);
! 
!   if( entry.listStatus == PTS_GROUP_OWNER_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listStatusField, 
! 			  org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
!   } else if( entry.listStatus == PTS_GROUP_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listStatusField, 
! 			  org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
!   } else {
!       (*env)->SetIntField(env, group, group_listStatusField, 
! 			  org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
!   }
! 
!   if( entry.listGroupsOwned == PTS_GROUP_OWNER_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listGroupsOwnedField, 
! 			  org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
!   } else if( entry.listGroupsOwned == PTS_GROUP_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listGroupsOwnedField, 
! 			  org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
!   } else {
!       (*env)->SetIntField(env, group, group_listGroupsOwnedField, 
! 			  org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
!   }
! 
!   if( entry.listMembership == PTS_GROUP_OWNER_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listMembershipField, 
! 			  org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
!   } else if( entry.listMembership == PTS_GROUP_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listMembershipField, 
! 			  org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
!   } else {
!       (*env)->SetIntField(env, group, group_listMembershipField, 
! 			  org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
!   }
! 
!   if( entry.listAdd == PTS_GROUP_OWNER_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listAddField, 
! 			  org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
!   } else if( entry.listAdd == PTS_GROUP_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listAddField, 
! 			  org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
!   } else {
!       (*env)->SetIntField(env, group, group_listAddField, 
! 			  org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
!   }
! 
!   if( entry.listDelete == PTS_GROUP_OWNER_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listDeleteField, 
! 			  org_openafs_jafs_Group_GROUP_OWNER_ACCESS);
!   } else if( entry.listDelete == PTS_GROUP_ACCESS ) {
!       (*env)->SetIntField(env, group, group_listDeleteField, 
! 			  org_openafs_jafs_Group_GROUP_GROUP_ACCESS);
!   } else {
!       (*env)->SetIntField(env, group, group_listDeleteField, 
! 			  org_openafs_jafs_Group_GROUP_ANYUSER_ACCESS);
!   }
  
!   jowner = (*env)->NewStringUTF(env, entry.owner);
!   jcreator =  (*env)->NewStringUTF(env, entry.creator);
  
!   (*env)->SetObjectField(env, group, group_ownerField, jowner);
!   (*env)->SetObjectField(env, group, group_creatorField, jcreator);
  
  }
  
  /**
***************
*** 264,296 ****
   * group     the Group object in which to fill in the 
   *                  information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_getGroupInfo(JNIEnv * env, jclass cls,
! 					 jint cellHandle, jstring jname,
! 					 jobject group)
! {
!     char *name;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (!name) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return;
!     }
!     getGroupInfoChar(env, cellHandle, name, group);
! 
!     // get class fields if need be
!     if (groupCls == 0) {
! 	internal_getGroupClass(env, group);
!     }
!     // set name in case blank object
!     (*env)->SetObjectField(env, group, group_nameField, jname);
  
-     free(name);
  }
  
  /**
--- 282,317 ----
   * group     the Group object in which to fill in the 
   *                  information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_getGroupInfo
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jname, jobject group)
! {
! 
!   const char *name;
! 
!   if( jname != NULL ) {
!     name = (*env)->GetStringUTFChars(env, jname, 0);
!     if( !name ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     name = NULL;
!   }
!   getGroupInfoChar( env, (void *)cellHandle, name, group );
! 
!   // get class fields if need be
!   if( groupCls == 0 ) {
!     internal_getGroupClass( env, group );
!   }
! 
!   // set name in case blank object
!   (*env)->SetObjectField(env, group, group_nameField, jname);
! 
!   if( name != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
  
  }
  
  /**
***************
*** 302,387 ****
   * name     the name of the user for which to set the information
   * theGroup   the group object containing the desired information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_setGroupInfo(JNIEnv * env, jclass cls,
! 					 jint cellHandle, jstring jname,
! 					 jobject group)
! {
!     char *name;
!     pts_GroupUpdateEntry_t ptsEntry;
!     afs_status_t ast;
! 
!     jint jlistStatus;
!     jint jlistGroupsOwned;
!     jint jlistMembership;
!     jint jlistAdd;
!     jint jlistDelete;
! 
!     // get the field ids if you haven't already
!     if (groupCls == 0) {
! 	internal_getGroupClass(env, group);
!     }
! 
!     jlistStatus = (*env)->GetIntField(env, group, group_listStatusField);
!     jlistGroupsOwned =
! 	(*env)->GetIntField(env, group, group_listGroupsOwnedField);
!     jlistMembership =
! 	(*env)->GetIntField(env, group, group_listMembershipField);
!     jlistAdd = (*env)->GetIntField(env, group, group_listAddField);
!     jlistDelete = (*env)->GetIntField(env, group, group_listDeleteField);
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (name == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return;
!     }
! 
!     if (jlistStatus == org_openafs_jafs_Group_GROUP_OWNER_ACCESS) {
! 	ptsEntry.listStatus = PTS_GROUP_OWNER_ACCESS;
!     } else if (jlistStatus == org_openafs_jafs_Group_GROUP_GROUP_ACCESS) {
! 	ptsEntry.listStatus = PTS_GROUP_ACCESS;
!     } else {
! 	ptsEntry.listStatus = PTS_GROUP_ANYUSER_ACCESS;
!     }
!     if (jlistGroupsOwned == org_openafs_jafs_Group_GROUP_OWNER_ACCESS) {
! 	ptsEntry.listGroupsOwned = PTS_GROUP_OWNER_ACCESS;
!     } else if (jlistGroupsOwned == org_openafs_jafs_Group_GROUP_GROUP_ACCESS) {
! 	ptsEntry.listGroupsOwned = PTS_GROUP_ACCESS;
!     } else {
! 	ptsEntry.listGroupsOwned = PTS_GROUP_ANYUSER_ACCESS;
!     }
!     if (jlistMembership == org_openafs_jafs_Group_GROUP_OWNER_ACCESS) {
! 	ptsEntry.listMembership = PTS_GROUP_OWNER_ACCESS;
!     } else if (jlistMembership == org_openafs_jafs_Group_GROUP_GROUP_ACCESS) {
! 	ptsEntry.listMembership = PTS_GROUP_ACCESS;
!     } else {
! 	ptsEntry.listMembership = PTS_GROUP_ANYUSER_ACCESS;
!     }
!     if (jlistAdd == org_openafs_jafs_Group_GROUP_OWNER_ACCESS) {
! 	ptsEntry.listAdd = PTS_GROUP_OWNER_ACCESS;
!     } else if (jlistAdd == org_openafs_jafs_Group_GROUP_GROUP_ACCESS) {
! 	ptsEntry.listAdd = PTS_GROUP_ACCESS;
!     } else {
! 	ptsEntry.listAdd = PTS_GROUP_ANYUSER_ACCESS;
!     }
!     if (jlistDelete == org_openafs_jafs_Group_GROUP_OWNER_ACCESS) {
! 	ptsEntry.listDelete = PTS_GROUP_OWNER_ACCESS;
!     } else if (jlistDelete == org_openafs_jafs_Group_GROUP_GROUP_ACCESS) {
! 	ptsEntry.listDelete = PTS_GROUP_ACCESS;
!     } else {
! 	ptsEntry.listDelete = PTS_GROUP_ANYUSER_ACCESS;
!     }
  
-     if (!pts_GroupModify((void *)cellHandle, name, &ptsEntry, &ast)) {
- 	throwAFSException(env, ast);
-     }
- 
-     free(name);
  }
  
  /**
--- 323,413 ----
   * name     the name of the user for which to set the information
   * theGroup   the group object containing the desired information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_setGroupInfo
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jname, jobject group)
! {
!   const char *name;
!   pts_GroupUpdateEntry_t ptsEntry;
!   afs_status_t ast;
! 
!   jint jlistStatus;
!   jint jlistGroupsOwned;
!   jint jlistMembership;
!   jint jlistAdd;
!   jint jlistDelete;
! 
!   // get the field ids if you haven't already
!   if( groupCls == 0 ) {
!     internal_getGroupClass( env, group );
!   }
! 
!   jlistStatus = (*env)->GetIntField(env, group, group_listStatusField);
!   jlistGroupsOwned = (*env)->GetIntField(env, group, 
! 					 group_listGroupsOwnedField);
!   jlistMembership = (*env)->GetIntField(env, group, group_listMembershipField);
!   jlistAdd = (*env)->GetIntField(env, group, group_listAddField);
!   jlistDelete = (*env)->GetIntField(env, group, group_listDeleteField);
! 
!   if( jname != NULL ) {
!     name = (*env)->GetStringUTFChars(env, jname, 0);
!     if( !name ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     name = NULL;
!   }
! 
!   if( jlistStatus == org_openafs_jafs_Group_GROUP_OWNER_ACCESS ) {
!     ptsEntry.listStatus = PTS_GROUP_OWNER_ACCESS;
!   } else if( jlistStatus == org_openafs_jafs_Group_GROUP_GROUP_ACCESS ) {
!     ptsEntry.listStatus = PTS_GROUP_ACCESS;
!   } else {
!     ptsEntry.listStatus = PTS_GROUP_ANYUSER_ACCESS;
!   }
!   if( jlistGroupsOwned == org_openafs_jafs_Group_GROUP_OWNER_ACCESS ) {
!     ptsEntry.listGroupsOwned = PTS_GROUP_OWNER_ACCESS;
!   } else if( jlistGroupsOwned == 
! 	     org_openafs_jafs_Group_GROUP_GROUP_ACCESS ) {
!     ptsEntry.listGroupsOwned = PTS_GROUP_ACCESS;
!   } else {
!     ptsEntry.listGroupsOwned = PTS_GROUP_ANYUSER_ACCESS;
!   }
!   if( jlistMembership == org_openafs_jafs_Group_GROUP_OWNER_ACCESS ) {
!     ptsEntry.listMembership = PTS_GROUP_OWNER_ACCESS;
!   } else if( jlistMembership == 
! 	     org_openafs_jafs_Group_GROUP_GROUP_ACCESS ) {
!     ptsEntry.listMembership = PTS_GROUP_ACCESS;
!   } else {
!     ptsEntry.listMembership = PTS_GROUP_ANYUSER_ACCESS;
!   }
!   if( jlistAdd == org_openafs_jafs_Group_GROUP_OWNER_ACCESS ) {
!     ptsEntry.listAdd = PTS_GROUP_OWNER_ACCESS;
!   } else if( jlistAdd == org_openafs_jafs_Group_GROUP_GROUP_ACCESS ) {
!     ptsEntry.listAdd = PTS_GROUP_ACCESS;
!   } else {
!     ptsEntry.listAdd = PTS_GROUP_ANYUSER_ACCESS;
!   }
!   if( jlistDelete == org_openafs_jafs_Group_GROUP_OWNER_ACCESS ) {
!     ptsEntry.listDelete = PTS_GROUP_OWNER_ACCESS;
!   } else if( jlistDelete == org_openafs_jafs_Group_GROUP_GROUP_ACCESS ) {
!     ptsEntry.listDelete = PTS_GROUP_ACCESS;
!   } else {
!     ptsEntry.listDelete = PTS_GROUP_ANYUSER_ACCESS;
!   }
!   if( !pts_GroupModify( (void *) cellHandle, name, &ptsEntry, &ast ) ) {
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!     }
!     throwAFSException( env, ast );
!     return;    
!   }
! 
!   if( name != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
  
  }
  
  /**
***************
*** 395,428 ****
   * jname          the name of the group for which to get the members
   * returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Group_getGroupMembersBegin(JNIEnv * env, jclass cls,
! 						 jint cellHandle,
! 						 jstring jname)
! {
!     char *name;
!     afs_status_t ast;
!     void *iterationId;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (name == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return 0;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return 0;
!     }
! 
!     if (!pts_GroupMemberListBegin
! 	((void *)cellHandle, name, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
!     }
  
!     free(name);
  
-     return (jint) iterationId;
  }
  
  /**
--- 421,459 ----
   * jname          the name of the group for which to get the members
   * returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Group_getGroupMembersBegin
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jname)
! {
!   const char *name;
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( jname != NULL ) {
!     name = (*env)->GetStringUTFChars(env, jname, 0);
!     if( !name ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     name = NULL;
!   }
! 
!   if( !pts_GroupMemberListBegin( (void *) cellHandle, name, &iterationId, 
! 				 &ast ) ) {
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( name != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 434,466 ****
   * iterationId   the iteration ID of this iteration
   * returns the name of the next member
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Group_getGroupMembersNextString(JNIEnv * env,
! 						      jclass cls,
! 						      jint iterationId)
! {
!     afs_status_t ast;
!     char *userName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
!     jstring juser;
! 
!     if (!userName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (!pts_GroupMemberListNext((void *)iterationId, userName, &ast)) {
! 	free(userName);
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return;
! 	}
!     }
! 
!     juser = (*env)->NewStringUTF(env, userName);
!     free(userName);
!     return juser;
  }
  
  /**
--- 465,496 ----
   * iterationId   the iteration ID of this iteration
   * returns the name of the next member
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Group_getGroupMembersNextString
!   (JNIEnv *env, jclass cls, jlong iterationId)
! {
!   afs_status_t ast;
!   char *userName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
!   jstring juser;
! 
!   if( !userName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !pts_GroupMemberListNext( (void *) iterationId, userName, &ast ) ) {
!     free( userName );
!     if( ast == ADMITERATORDONE ) {
!       return NULL;
!     } else {
!       throwAFSException( env, ast );
!       return;
!     }
!   }
!   
!   juser = (*env)->NewStringUTF(env, userName);
!   free( userName );
!   return juser;
  }
  
  /**
***************
*** 475,520 ****
   *                  next user
   * returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Group_getGroupMembersNext(JNIEnv * env, jclass cls,
! 						jint cellHandle,
! 						jint iterationId,
! 						jobject juserObject)
  {
!     afs_status_t ast;
!     char *userName;
!     jstring juser;
  
!     userName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
  
!     if (!userName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
  
!     if (!pts_GroupMemberListNext((void *)iterationId, userName, &ast)) {
! 	free(userName);
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
      }
  
!     juser = (*env)->NewStringUTF(env, userName);
  
!     if (userCls == 0) {
! 	internal_getUserClass(env, juserObject);
!     }
  
!     (*env)->SetObjectField(env, juserObject, user_nameField, juser);
  
!     getUserInfoChar(env, (void *)cellHandle, userName, juserObject);
!     (*env)->SetBooleanField(env, juserObject, user_cachedInfoField, TRUE);
  
!     free(userName);
!     return 1;
  
  }
  
--- 505,549 ----
   *                  next user
   * returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Group_getGroupMembersNext
!   (JNIEnv *env, jclass cls, jlong cellHandle, jlong iterationId,
!    jobject juserObject)
  {
!   afs_status_t ast;
!   char *userName;
!   jstring juser;
  
!   userName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
  
!   if( !userName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
  
!   if( !pts_GroupMemberListNext( (void *) iterationId, userName, &ast ) ) {
!     free( userName );
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
      }
+   }
  
!   juser = (*env)->NewStringUTF(env, userName);
  
!   if( userCls == 0 ) {
!     internal_getUserClass( env, juserObject );
!   }
  
!   (*env)->SetObjectField(env, juserObject, user_nameField, juser);
  
!   getUserInfoChar( env, (void *) cellHandle, userName, juserObject );
!   (*env)->SetBooleanField( env, juserObject, user_cachedInfoField, TRUE );
  
!   free( userName );
!   return 1;
  
  }
  
***************
*** 525,540 ****
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_getGroupMembersDone(JNIEnv * env, jclass cls,
! 						jint iterationId)
! {
!     afs_status_t ast;
! 
!     if (!pts_GroupMemberListDone((void *)iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  }
  
  /**
--- 554,570 ----
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_getGroupMembersDone
!   (JNIEnv *env, jclass cls, jlong iterationId)
! {
!   afs_status_t ast;
! 
!   if( !pts_GroupMemberListDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
! 
  }
  
  /**
***************
*** 546,590 ****
   * jgroupName          the name of the group to which to add a member
   * juserName      the name of the user to add
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_addMember(JNIEnv * env, jclass cls,
! 				      jint cellHandle, jstring jgroupName,
! 				      jstring juserName)
! {
!     afs_status_t ast;
!     char *groupName;
!     char *userName;
! 
!     if (jgroupName != NULL) {
! 	groupName = getNativeString(env, jgroupName);
! 	if (groupName == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return;
!     }
! 
!     if (juserName != NULL) {
! 	userName = getNativeString(env, juserName);
! 	if (userName == NULL) {
! 	    free(groupName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(groupName);
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
! 
!     if (!pts_GroupMemberAdd((void *)cellHandle, userName, groupName, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     free(userName);
!     free(groupName);
  }
  
  /**
--- 576,630 ----
   * jgroupName          the name of the group to which to add a member
   * juserName      the name of the user to add
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_addMember
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jgroupName,
!    jstring juserName )
! {
!   afs_status_t ast;
!   const char *groupName;
!   const char *userName;
! 
!   if( jgroupName != NULL ) {
!     groupName = (*env)->GetStringUTFChars(env, jgroupName, 0);
!     if( !groupName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     groupName = NULL;
!   }
! 
!   if( juserName != NULL ) {
!     userName = (*env)->GetStringUTFChars(env, juserName, 0);
!     if( !userName ) {
!       if( groupName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     userName = NULL;
!   }
! 
!   if( !pts_GroupMemberAdd( (void *) cellHandle, userName, groupName, &ast ) ) {
!     if( groupName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!     }
!     if( userName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( groupName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!   }
!   if( userName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, juserName, userName);
!   }
  }
  
  /**
***************
*** 597,641 ****
   *                           member
   * juserName      the name of the user to remove
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_removeMember(JNIEnv * env, jclass cls,
! 					 jint cellHandle, jstring jgroupName,
! 					 jstring juserName)
! {
!     afs_status_t ast;
!     char *groupName;
!     char *userName;
! 
!     if (jgroupName != NULL) {
! 	groupName = getNativeString(env, jgroupName);
! 	if (groupName == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return;
!     }
! 
!     if (juserName != NULL) {
! 	userName = getNativeString(env, juserName);
! 	if (userName == NULL) {
! 	    free(groupName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(groupName);
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
! 
!     if (!pts_GroupMemberRemove((void *)cellHandle, userName, groupName, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     free(groupName);
!     free(userName);
  }
  
  /**
--- 637,692 ----
   *                           member
   * juserName      the name of the user to remove
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_removeMember
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jgroupName,
!    jstring juserName)
! {
!   afs_status_t ast;
!   const char *groupName;
!   const char *userName;
! 
!   if( jgroupName != NULL ) {
!     groupName = (*env)->GetStringUTFChars(env, jgroupName, 0);
!     if( !groupName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     groupName = NULL;
!   }
! 
!   if( juserName != NULL ) {
!     userName = (*env)->GetStringUTFChars(env, juserName, 0);
!     if( !userName ) {
!       if( groupName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     userName = NULL;
!   }
! 
!   if( !pts_GroupMemberRemove( (void *)cellHandle, userName, 
! 			      groupName, &ast ) ) {
!     if( groupName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!     }
!     if( userName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
!   
!   if( groupName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!   }
!   if( userName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, juserName, userName);
!   }
  }
  
  /**
***************
*** 648,692 ****
   *                           owner
   * jownerName      the name of the new owner
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_changeOwner(JNIEnv * env, jclass cls,
! 					jint cellHandle, jstring jgroupName,
! 					jstring jownerName)
! {
!     afs_status_t ast;
!     char *groupName;
!     char *ownerName;
! 
!     if (jgroupName != NULL) {
! 	groupName = getNativeString(env, jgroupName);
! 	if (groupName == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return;
!     }
! 
!     if (jownerName != NULL) {
! 	ownerName = getNativeString(env, jownerName);
! 	if (ownerName == NULL) {
! 	    free(groupName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(groupName);
! 	throwAFSException(env, JAFSNULLOWNER);
! 	return;
!     }
! 
!     if (!pts_GroupOwnerChange((void *)cellHandle, groupName, ownerName, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     free(groupName);
!     free(ownerName);
  }
  
  /**
--- 699,755 ----
   *                           owner
   * jownerName      the name of the new owner
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_changeOwner
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jgroupName,
!    jstring jownerName )
! {
!   afs_status_t ast;
!   const char *groupName;
!   const char *ownerName;
! 
!   if( jgroupName != NULL ) {
!     groupName = (*env)->GetStringUTFChars(env, jgroupName, 0);
!     if( !groupName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     groupName = NULL;
!   }
! 
!   if( jownerName != NULL ) {
!     ownerName = (*env)->GetStringUTFChars(env, jownerName, 0);
!     if( !ownerName ) {
!       if( groupName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     ownerName = NULL;
!   }
! 
!   if( !pts_GroupOwnerChange( (void *)cellHandle, groupName, 
! 			     ownerName, &ast ) ) {
!     if( groupName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!     }
!     if( ownerName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jownerName, ownerName);
!     }
!     throwAFSException( env, ast );
!     return; 
!   }
! 
!   if( groupName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jgroupName, groupName);
!   }
!   if( ownerName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jownerName, ownerName);
!   }
!   
  }
  
  /**
***************
*** 698,751 ****
   * joldGroupName          the old name of the group
   * jnewGroupName      the new name for the group
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_rename(JNIEnv * env, jclass cls, jint cellHandle,
! 				   jstring jgroupOldName,
! 				   jstring jgroupNewName)
! {
!     afs_status_t ast;
!     char *groupOldName;
!     char *groupNewName;
! 
!     if (jgroupOldName != NULL) {
! 	groupOldName = getNativeString(env, jgroupOldName);
! 	if (groupOldName == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return;
!     }
! 
!     if (jgroupNewName != NULL) {
! 	groupNewName = getNativeString(env, jgroupNewName);
! 	if (groupNewName == NULL) {
! 	    free(groupOldName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(groupOldName);
! 	throwAFSException(env, JAFSNULLGROUP);
! 	return;
!     }
! 
!     if (!pts_GroupRename
! 	((void *)cellHandle, groupOldName, groupNewName, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     free(groupOldName);
!     free(groupNewName);
  }
  
  // reclaim global memory used by this portion
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Group_reclaimGroupMemory(JNIEnv * env, jclass cls)
  {
!     if (groupCls) {
! 	(*env)->DeleteGlobalRef(env, groupCls);
! 	groupCls = 0;
!     }
  }
--- 761,827 ----
   * joldGroupName          the old name of the group
   * jnewGroupName      the new name for the group
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_rename
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jgroupOldName, 
!    jstring jgroupNewName )
! {
!   afs_status_t ast;
!   const char *groupOldName;
!   const char *groupNewName;
! 
!   if( jgroupOldName != NULL ) {
!     groupOldName = (*env)->GetStringUTFChars(env, jgroupOldName, 0);
!     if( !groupOldName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     groupOldName = NULL;
!   }
! 
!   if( jgroupNewName != NULL ) {
!     groupNewName = (*env)->GetStringUTFChars(env, jgroupNewName, 0);
!     if( !groupNewName ) {
!       if( groupOldName != NULL ) {
!         (*env)->ReleaseStringUTFChars(env, jgroupOldName, groupOldName);
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     groupNewName = NULL;
!   }
! 
!   if( !pts_GroupRename( (void *)cellHandle, groupOldName, 
! 			groupNewName, &ast ) ) {
!     if( groupOldName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jgroupOldName, groupOldName);
!     }
!     if( groupNewName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jgroupNewName, groupNewName);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( groupOldName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jgroupOldName, groupOldName);
!   }
!   if( groupNewName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jgroupNewName, groupNewName);
!   }
  }
  
  // reclaim global memory used by this portion
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Group_reclaimGroupMemory (JNIEnv *env, jclass cls)
  {
!   if( groupCls ) {
!       (*env)->DeleteGlobalRef(env, groupCls);
!       groupCls = 0;
!   }
  }
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/Internal.c
diff -c openafs/src/JAVA/libjafs/Internal.c:1.4 openafs/src/JAVA/libjafs/Internal.c:1.4.2.1
*** openafs/src/JAVA/libjafs/Internal.c:1.4	Fri Aug  8 17:54:30 2003
--- openafs/src/JAVA/libjafs/Internal.c	Fri Oct 14 22:14:12 2005
***************
*** 27,42 ****
  
  extern int errno;
  
- jmethodID MID_String_getBytes = 0;
- 
  #ifndef LIBJUAFS
! /* User Class and Fields */
  jclass userCls = 0;
  jfieldID user_ptsField = 0;
  jfieldID user_kasField = 0;
  jfieldID user_nameField = 0;
  jfieldID user_cachedInfoField = 0;
! /* PTS Fields */
  jfieldID user_nameUidField = 0;
  jfieldID user_ownerUidField = 0;
  jfieldID user_creatorUidField = 0;
--- 27,41 ----
  
  extern int errno;
  
  #ifndef LIBJUAFS
! // user class and fields //
  jclass userCls = 0;
  jfieldID user_ptsField = 0;
  jfieldID user_kasField = 0;
  jfieldID user_nameField = 0;
+ //jfieldID user_cellHandleField = 0;
  jfieldID user_cachedInfoField = 0;
! //pts fields
  jfieldID user_nameUidField = 0;
  jfieldID user_ownerUidField = 0;
  jfieldID user_creatorUidField = 0;
***************
*** 47,53 ****
  jfieldID user_groupMembershipCountField = 0;
  jfieldID user_ownerField = 0;
  jfieldID user_creatorField = 0;
! /* KAS Fields */
  jfieldID user_adminSettingField = 0;
  jfieldID user_tgsSettingField = 0;
  jfieldID user_encSettingField = 0;
--- 46,52 ----
  jfieldID user_groupMembershipCountField = 0;
  jfieldID user_ownerField = 0;
  jfieldID user_creatorField = 0;
! // kas fields
  jfieldID user_adminSettingField = 0;
  jfieldID user_tgsSettingField = 0;
  jfieldID user_encSettingField = 0;
***************
*** 66,74 ****
  jfieldID user_lockTimeField = 0;
  jfieldID user_lockedUntilField = 0;
  
! /* Group Class and Fields */
  jclass groupCls = 0;
  jfieldID group_nameField = 0;
  jfieldID group_cachedInfoField = 0;
  jfieldID group_nameUidField = 0;
  jfieldID group_ownerUidField = 0;
--- 65,74 ----
  jfieldID user_lockTimeField = 0;
  jfieldID user_lockedUntilField = 0;
  
! // group class and fields //
  jclass groupCls = 0;
  jfieldID group_nameField = 0;
+ //jfieldID group_cellHandleField = 0;
  jfieldID group_cachedInfoField = 0;
  jfieldID group_nameUidField = 0;
  jfieldID group_ownerUidField = 0;
***************
*** 82,90 ****
  jfieldID group_ownerField = 0;
  jfieldID group_creatorField = 0;
  
! /* Server Class and Fields */
  jclass serverCls = 0;
  jfieldID server_nameField = 0;
  jfieldID server_cachedInfoField = 0;
  jfieldID server_databaseField = 0;
  jfieldID server_fileServerField = 0;
--- 82,91 ----
  jfieldID group_ownerField = 0;
  jfieldID group_creatorField = 0;
  
! // server class and fields //
  jclass serverCls = 0;
  jfieldID server_nameField = 0;
+ //jfieldID server_cellHandleField = 0;
  jfieldID server_cachedInfoField = 0;
  jfieldID server_databaseField = 0;
  jfieldID server_fileServerField = 0;
***************
*** 92,98 ****
  jfieldID server_badFileServerField = 0;
  jfieldID server_IPAddressField = 0;
  
! /* Executable Time Class and Fields */
  jclass exectimeCls = 0;
  jfieldID exectime_HourField = 0;
  jfieldID exectime_MinField = 0;
--- 93,99 ----
  jfieldID server_badFileServerField = 0;
  jfieldID server_IPAddressField = 0;
  
! // executable time class and fields //
  jclass exectimeCls = 0;
  jfieldID exectime_HourField = 0;
  jfieldID exectime_MinField = 0;
***************
*** 101,107 ****
  jfieldID exectime_NowField = 0;
  jfieldID exectime_NeverField = 0;
  
! /* Partition Class and Fields */
  jclass partitionCls = 0;
  jfieldID partition_nameField = 0;
  jfieldID partition_cachedInfoField = 0;
--- 102,108 ----
  jfieldID exectime_NowField = 0;
  jfieldID exectime_NeverField = 0;
  
! // partition class and fields //
  jclass partitionCls = 0;
  jfieldID partition_nameField = 0;
  jfieldID partition_cachedInfoField = 0;
***************
*** 111,117 ****
  jfieldID partition_totalSpaceField = 0;
  jfieldID partition_totalFreeSpaceField = 0;
  
! /* Volume Class and Fields */
  jclass volumeCls = 0;
  jfieldID volume_nameField = 0;
  jfieldID volume_cachedInfoField = 0;
--- 112,118 ----
  jfieldID partition_totalSpaceField = 0;
  jfieldID partition_totalFreeSpaceField = 0;
  
! // volume class and fields //
  jclass volumeCls = 0;
  jfieldID volume_nameField = 0;
  jfieldID volume_cachedInfoField = 0;
***************
*** 132,138 ****
  jfieldID volume_dispositionField = 0;
  jfieldID volume_typeField = 0;
  
! /* Key Class and Fields */
  jclass keyCls = 0;
  jfieldID key_cachedInfoField = 0;
  jfieldID key_versionField = 0;
--- 133,139 ----
  jfieldID volume_dispositionField = 0;
  jfieldID volume_typeField = 0;
  
! // key class and fields //
  jclass keyCls = 0;
  jfieldID key_cachedInfoField = 0;
  jfieldID key_versionField = 0;
***************
*** 141,150 ****
  jfieldID key_lastModMsField = 0;
  jfieldID key_checkSumField = 0;
  
! /* Process Class and Fields */
  jclass processCls = 0;
  jfieldID process_cachedInfoField = 0;
  jfieldID process_nameField = 0;
  jfieldID process_typeField = 0;
  jfieldID process_stateField = 0;
  jfieldID process_goalField = 0;
--- 142,152 ----
  jfieldID key_lastModMsField = 0;
  jfieldID key_checkSumField = 0;
  
! // process class and fields //
  jclass processCls = 0;
  jfieldID process_cachedInfoField = 0;
  jfieldID process_nameField = 0;
+ //jfieldID process_serverHandleField = 0;
  jfieldID process_typeField = 0;
  jfieldID process_stateField = 0;
  jfieldID process_goalField = 0;
***************
*** 157,163 ****
  jfieldID process_stateOkField = 0;
  jfieldID process_stateTooManyErrorsField = 0;
  jfieldID process_stateBadFileAccessField = 0;
- 
  #endif /* !LIBJUAFS */
  
  /**
--- 159,164 ----
***************
*** 165,201 ****
   * for the exception.  See Exceptions.h for the available
   * exceptions.
   */
! void
! throwException(JNIEnv * env, jclass * excCls, char *excClsName,
! 	       jmethodID * initID, int code)
  {
!     jobject exc;
!     if (*excCls == 0) {
! 	*excCls =
! 	    (*env)->NewGlobalRef(env, (*env)->FindClass(env, excClsName));
! 	if (!*excCls) {
! 	    fprintf(stderr,
! 		    "ERROR: Internal::throwException()\n Cannot find class: %s\n",
! 		    excClsName);
! 	    return;
! 	}
! 	*initID = (*env)->GetMethodID(env, *excCls, "<init>", "(I)V");
! 	if (!*initID) {
! 	    fprintf(stderr,
! 		    "ERROR: Internal::throwException()\n Cannot find construction method: %s\n",
! 		    excClsName);
! 	    return;
! 	}
!     }
! 
!     exc = (*env)->NewObject(env, *excCls, *initID, code);
!     if (!exc) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwException()\n Cannot construct new exception object: %s\n",
! 		excClsName);
! 	return;
!     }
!     (*env)->Throw(env, exc);
  }
  
  /**
--- 166,196 ----
   * for the exception.  See Exceptions.h for the available
   * exceptions.
   */
! void throwException
!   (JNIEnv *env, jclass *excCls, char *excClsName, jmethodID *initID, int code)
  {
!   jobject exc;
!   if( *excCls == 0 ) {
!     *excCls = (*env)->NewGlobalRef(env, (*env)->FindClass(env, excClsName ));
!     if( !*excCls ) {
!       fprintf(stderr, "ERROR: Internal::throwException()\n Cannot find class: %s\n", excClsName);
! 	return;
!     }
!     *initID = (*env)->GetMethodID( env, *excCls, "<init>", "(I)V" );
!     if( !*initID ) {
!       fprintf(stderr, "ERROR: Internal::throwException()\n Cannot find construction method: %s\n",
! 	      excClsName);
! 	return;
!     }
!   }
!   
!   exc = (*env)->NewObject( env, *excCls, *initID, code );
!   if( !exc ) {
!     fprintf(stderr, "ERROR: Internal::throwException()\n Cannot construct new exception object: %s\n",
!                      excClsName);
!     return;
!   }
!   (*env)->Throw(env, exc);
  }
  
  /**
***************
*** 204,220 ****
   * is unavailable and it is necessary to interrupt the Java call with an
   * exception. See Exceptions.h for the available exceptions.
   */
! void
! throwMessageException(JNIEnv * env, char *msg)
  {
!     jclass excCls = (*env)->FindClass(env, afsExceptionName);
!     if (excCls == 0) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwMessageException()\n Cannot find class: %s\n",
! 		afsExceptionName);
! 	return;
!     }
!     (*env)->ThrowNew(env, excCls, msg);
  }
  
  /**
--- 199,212 ----
   * is unavailable and it is necessary to interrupt the Java call with an
   * exception. See Exceptions.h for the available exceptions.
   */
! void throwMessageException( JNIEnv *env, char *msg )
  {
!   jclass excCls = (*env)->FindClass(env, afsExceptionName);
!   if(excCls == 0) {
!     fprintf(stderr, "ERROR: Internal::throwMessageException()\n Cannot find class: %s\n", afsExceptionName);
!     return;
!   }
!   (*env)->ThrowNew(env, excCls, msg);
  }
  
  /**
***************
*** 222,260 ****
   * for the exception.  See Exceptions.h for the available
   * exceptions.
   */
! void
! throwAFSException(JNIEnv * env, int code)
  {
!     jclass afsExceptionCls;
!     jmethodID afsExceptionInit;
!     jthrowable exc;
! 
!     afsExceptionCls = (*env)->FindClass(env, afsExceptionName);
!     if (!afsExceptionCls) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwAFSException()\n Cannot find class: %s\n",
! 		afsExceptionName);
! 	return;
!     }
! 
!     afsExceptionInit =
! 	(*env)->GetMethodID(env, afsExceptionCls, "<init>", "(I)V");
!     if (!afsExceptionInit) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwAFSException()\n Cannot find construction method: %s\n",
! 		afsExceptionName);
! 	return;
!     }
! 
!     exc = (*env)->NewObject(env, afsExceptionCls, afsExceptionInit, code);
! 
!     if (!exc) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwAFSException()\n Cannot construct new exception object: %s\n",
! 		afsExceptionName);
! 	return;
!     }
!     (*env)->Throw(env, exc);
  }
  
  /**
--- 214,247 ----
   * for the exception.  See Exceptions.h for the available
   * exceptions.
   */
! void throwAFSException( JNIEnv *env, int code )
  {
!   jclass afsExceptionCls;
!   jmethodID afsExceptionInit;
!   jthrowable exc;
! 
!   afsExceptionCls = (*env)->FindClass(env, afsExceptionName);
!   if( !afsExceptionCls ) {
!     fprintf(stderr, "ERROR: Internal::throwAFSException()\n Cannot find class: %s\n", afsExceptionName);
!     return;
!   }
! 
!   afsExceptionInit = (*env)->GetMethodID( env, afsExceptionCls, 
!                              "<init>", "(I)V" );
!   if( !afsExceptionInit ) {
!     fprintf(stderr, "ERROR: Internal::throwAFSException()\n Cannot find construction method: %s\n",
!                      afsExceptionName);
!     return;
!   }
!   
!   exc = (*env)->NewObject( env, afsExceptionCls, afsExceptionInit, code );
! 
!   if( !exc ) {
!     fprintf(stderr, "ERROR: Internal::throwAFSException()\n Cannot construct new exception object: %s\n",
!                      afsExceptionName);
!     return;
!   }
!   (*env)->Throw(env, exc);
  }
  
  /**
***************
*** 262,303 ****
   * for the exception.  See Exceptions.h for the available
   * exceptions.
   */
! void
! throwAFSFileException(JNIEnv * env, int code, char *msg)
  {
!     jclass afsFileExceptionCls;
!     jmethodID afsFileExceptionInit;
!     jthrowable exc;
! 
!     afsFileExceptionCls = (*env)->FindClass(env, afsFileExceptionName);
!     if (!afsFileExceptionCls) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwAFSFileException()\n Cannot find class: %s\n",
! 		afsFileExceptionName);
! 	return;
!     }
! 
!     afsFileExceptionInit =
! 	(*env)->GetMethodID(env, afsFileExceptionCls, "<init>",
! 			    "(Ljava/lang/String;I)V");
! 
!     if (!afsFileExceptionInit) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwAFSFileException()\n Cannot find construction method: %s\n",
! 		afsFileExceptionName);
! 	return;
!     }
! 
!     exc =
! 	(*env)->NewObject(env, afsFileExceptionCls, afsFileExceptionInit, msg,
! 			  code);
!     if (!exc) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwAFSFileException()\n Cannot construct new exception object: %s\n",
! 		afsFileExceptionName);
! 	return;
!     }
!     (*env)->Throw(env, exc);
  }
  
  /**
--- 249,282 ----
   * for the exception.  See Exceptions.h for the available
   * exceptions.
   */
! void throwAFSFileException( JNIEnv *env, int code, char *msg )
  {
!   jclass afsFileExceptionCls;
!   jmethodID afsFileExceptionInit;
!   jthrowable exc;
! 
!   afsFileExceptionCls = (*env)->FindClass(env, afsFileExceptionName);
!   if( !afsFileExceptionCls ) {
!     fprintf(stderr, "ERROR: Internal::throwAFSFileException()\n Cannot find class: %s\n", afsFileExceptionName);
!     return;
!   }
! 
!   afsFileExceptionInit = (*env)->GetMethodID( env, afsFileExceptionCls, 
!                          "<init>", "(Ljava/lang/String;I)V" );
!   if( !afsFileExceptionInit ) {
!     fprintf(stderr, "ERROR: Internal::throwAFSFileException()\n Cannot find construction method: %s\n",
!                      afsFileExceptionName);
!     return;
!   }
!   
!   exc = (*env)->NewObject( env, afsFileExceptionCls,
!                            afsFileExceptionInit, msg, code );
!   if( !exc ) {
!     fprintf(stderr, "ERROR: Internal::throwAFSFileException()\n Cannot construct new exception object: %s\n",
!                      afsFileExceptionName);
!     return;
!   }
!   (*env)->Throw(env, exc);
  }
  
  /**
***************
*** 305,460 ****
   * for the exception.  See Exceptions.h for the available
   * exceptions.
   */
! void
! throwAFSSecurityException(JNIEnv * env, int code)
! {
!     jclass afsSecurityExceptionCls;
!     jmethodID afsSecurityExceptionInit;
!     jthrowable exc;
! 
!     afsSecurityExceptionCls =
! 	(*env)->FindClass(env, afsSecurityExceptionName);
!     if (!afsSecurityExceptionCls) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwAFSSecurityException()\n Cannot find class: %s\n",
! 		afsSecurityExceptionName);
! 	return;
!     }
! 
!     afsSecurityExceptionInit =
! 	(*env)->GetMethodID(env, afsSecurityExceptionCls, "<init>", "(I)V");
!     if (!afsSecurityExceptionInit) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwAFSSecurityException()\n Cannot find construction method: %s\n",
! 		afsSecurityExceptionName);
! 	return;
!     }
! 
!     exc =
! 	(*env)->NewObject(env, afsSecurityExceptionCls,
! 			  afsSecurityExceptionInit, code);
! 
!     if (!exc) {
! 	fprintf(stderr,
! 		"ERROR: Internal::throwAFSSecurityException()\n Cannot construct new exception object: %s\n",
! 		afsSecurityExceptionName);
! 	return;
!     }
!     (*env)->Throw(env, exc);
! }
! 
! int
! setError(JNIEnv * env, jobject * obj, int code)
! {
!     jfieldID fid;
!     jclass cls = (*env)->GetObjectClass(env, *obj);
!     if (cls != NULL) {
! 	fid = (*env)->GetFieldID(env, cls, "errno", "I");
! 	if (fid) {
! 	    (*env)->SetIntField(env, *obj, fid, code);
! 	    return 0;
! 	}
!     }
!     return -1;
! }
! 
! int
! setString(JNIEnv * env, jobject * obj, char *field, char *string)
! {
!     jclass cls;
!     jstring jstr;
!     jfieldID fid;
! 
!     cls = (*env)->GetObjectClass(env, *obj);
!     /*fprintf(stderr, "setString: env=0x%x, obj=0x%x, cls=0x%x\n", env, obj, cls); */
!     if (cls != NULL) {
! 	fid = (*env)->GetFieldID(env, cls, field, "Ljava/lang/String;");
! 	/*fprintf(stderr, "setString: field=%s, fid=0x%x\n", field, fid); */
! 	if (fid) {
! 	    jstr = (*env)->NewStringUTF(env, (string));
! 	    /*fprintf(stderr, "jstr = 0x%x\n", jstr); */
! 	    (*env)->SetObjectField(env, *obj, fid, jstr);
! 	    return 0;
! 	}
!     }
!     return -1;
! }
! 
! /**
!  * Translates a jstring to a locale-specific native C string.
!  * Use in place of "GetStringUTFChars()" for internationalization
!  * purposes.
!  * 
!  * Make sure to "free()" any strings created by this function.
!  *
!  * A NULL (zero) return indicates a critical error has occurred and 
!  * relies on the caller of this function to throw a Java exception.
!  *
!  * This function does not throw any Java exceptions.
!  * 
!  *  env         the Java environment
!  *  jstr        the Java string (UTF) to translate
!  *
!  * @returns	    native C string with the appropriate locale-specific 
!  *              representation
!  */
! char *
! getNativeString(JNIEnv * env, const jstring jstr)
  {
!     jbyteArray bytes = 0;
!     char *result = NULL;
!     jint len = 0;
! 
!     if ((*env)->EnsureLocalCapacity(env, 2) < 0) {
! 	// Out of memory error
! 	fprintf(stderr, "Internal::getNativeString(): ");
! 	fprintf(stderr,
! 		"EnsureLocalCapacity() failed: Most likely out of memory\n");
! 	return NULL;
!     }
! 
!     if (!MID_String_getBytes) {
! 	jclass stringClass = (*env)->FindClass(env, "java/lang/String");
! 	if (!stringClass) {
! 	    fprintf(stderr, "Internal::getNativeString(): ");
! 	    fprintf(stderr,
! 		    "Could not locate Java class: java.lang.String.\n");
! 	    return NULL;
! 	}
! 
! 	MID_String_getBytes =
! 	    (*env)->GetMethodID(env, stringClass, "getBytes", "()[B");
! 	if (!MID_String_getBytes) {
! 	    fprintf(stderr, "Internal::getNativeString(): ");
! 	    fprintf(stderr,
! 		    "Could not get Java method id for java.lang.String method \"getBytes()\".\n");
! 	    return NULL;
! 	}
!     }
! 
!     bytes = (*env)->CallObjectMethod(env, jstr, MID_String_getBytes);
!     if (!bytes) {
! 	fprintf(stderr, "Internal::getNativeString(): ");
! 	fprintf(stderr,
! 		"CallObjectMethod() failed for java.lang.String.getBytes().\n");
! 	fprintf(stderr, "\tMID_String_getBytes = %d\n", MID_String_getBytes);
! 	return NULL;
!     }
! 
!     len = (*env)->GetArrayLength(env, bytes);
!     result = (char *)malloc(len + 1);
! 
!     if (!result) {
! 	fprintf(stderr, "Internal::getNativeString(): ");
! 	fprintf(stderr, "Could not allocate memory for byte array.\n");
! 	(*env)->DeleteLocalRef(env, bytes);
! 	return NULL;
      }
!     (*env)->GetByteArrayRegion(env, bytes, 0, len, (jbyte *) result);
!     result[len] = '\0';		// NULL-terminate
! 
!     (*env)->DeleteLocalRef(env, bytes);
!     return result;
  }
  
  #ifdef LIBJUAFS
--- 284,332 ----
   * for the exception.  See Exceptions.h for the available
   * exceptions.
   */
! void throwAFSSecurityException( JNIEnv *env, int code )
  {
!   jclass afsSecurityExceptionCls;
!   jmethodID afsSecurityExceptionInit;
!   jthrowable exc;
! 
!   afsSecurityExceptionCls = (*env)->FindClass(env, afsSecurityExceptionName);
!   if( !afsSecurityExceptionCls ) {
!     fprintf(stderr, "ERROR: Internal::throwAFSSecurityException()\n Cannot find class: %s\n", afsSecurityExceptionName);
!     return;
!   }
! 
!   afsSecurityExceptionInit = (*env)->GetMethodID( env, afsSecurityExceptionCls, 
!                              "<init>", "(I)V" );
!   if( !afsSecurityExceptionInit ) {
!     fprintf(stderr, "ERROR: Internal::throwAFSSecurityException()\n Cannot find construction method: %s\n",
!                      afsSecurityExceptionName);
!     return;
!   }
!   
!   exc = (*env)->NewObject( env, afsSecurityExceptionCls,
!                            afsSecurityExceptionInit, code );
!   if( !exc ) {
!     fprintf(stderr, "ERROR: Internal::throwAFSSecurityException()\n Cannot construct new exception object: %s\n",
!                      afsSecurityExceptionName);
!     return;
!   }
!   (*env)->Throw(env, exc);
! }
! 
! int setError(JNIEnv *env, jobject *obj, int code)
! {
!   jfieldID fid;
!   jclass cls = (*env)->GetObjectClass(env, *obj);
!   if (cls != NULL) {
!     fid = (*env)->GetFieldID(env, cls, "errno", "I");
!     if (fid)
!     {
!       (*env)->SetIntField(env, *obj, fid, code);
!       return 0;
      }
!   }
!   return -1;
  }
  
  #ifdef LIBJUAFS
***************
*** 471,591 ****
   *
   * @returns		file descriptor
   */
! int
! openAFSFile(JNIEnv * env, jstring filenameUTF, int flags, int mode, int *err)
  {
!     char *filename;
      int fd = -1;
  
      *err = 0;
      errno = 0;
!     filename = getNativeString(env, filenameUTF);
!     if (filename == NULL) {
! 	fprintf(stderr, "Internal::openAFSFile(): failed to get filename\n");
! 	*err = -1;
! 	return fd;
      }
!     fd = uafs_open(filename, flags, mode);
!     free(filename);
      *err = errno;
      if (errno != 0) {
! 	fprintf(stderr, "Internal::openAFSFile(): errno=%d\n", errno);
! 	fprintf(stderr, "Internal::openAFSFile(): fd=%d\n", fd);
      }
      if (fd < 0) {
! 	fprintf(stderr, "Internal::openAFSFile(): failed to open filename\n");
! 	fprintf(stderr, "Internal::openAFSFile(): fd=%d\n", fd);
! 	return -1;
      }
      return fd;
  }
  
! /**
!  * Reads the "CacheConfig" file for user space configuration.
!  * By default, this file resides in "/usr/afswsp/etc/CacheConfig",
!  * however if the environment variable "LIBJAFS_CACHE_CONFIG" is
!  * set this function will use that value instead.
!  *
!  * The CacheConfig file contains several cache tuning parameters 
!  * as well as a few parameters that define the runtime environment 
!  * for the user space client, including: mount point location, 
!  * configuration directory (where to find ThisCell and CellServDB), 
!  * cache directory, debug and verbose options, and log file location.
!  */
! int
! readCacheParms(char *afsMountPoint, char *afsConfDir, char *afsCacheDir,
! 	       int *cacheBlocks, int *cacheFiles, int *cacheStatEntries,
! 	       int *dCacheSize, int *vCacheSize, int *chunkSize,
! 	       int *closeSynch, int *debug, int *nDaemons, int *cacheFlags,
! 	       char *logFile)
! {
!     FILE *f;
!     char line[100];
!     char *p;
!     int len1, len2, n;
!     char cacheConfigFile[100];
! 
!     p = (char *)getenv("LIBJAFS_CACHE_CONFIG");
!     if (p) {
! 	strcpy(cacheConfigFile, p);
!     } else {
! 	strcpy(cacheConfigFile, "/usr/afswsp/etc/CacheConfig");
!     }
! 
!     f = fopen(cacheConfigFile, "r");
!     if (!f) {
! 	fprintf(stderr, "Could not open cache config file: %s\n",
! 		cacheConfigFile);
! 	return -1;
!     }
! 
!     while (1) {
! 	fgets(line, 100, f);
! 	if (feof(f))
! 	    break;
! 	p = (char *)strchr(line, '\n');
! 	if (p)
! 	    *p = '\0';
! 	if (strncmp(line, "#", 1) == 0)
! 	    continue;		/* comment */
! 
! 	p = (char *)strchr(line, ' ');
! 	if (!p)
! 	    continue;
! 	len1 = p - line;
! 	p++;
! 	len2 = strlen(p);
! 
! 	if (strncmp(line, "MountPoint", len1) == 0)
! 	    strcpy(afsMountPoint, p);
! 	else if (strncmp(line, "ConfDir", len1) == 0)
! 	    strcpy(afsConfDir, p);
! 	else if (strncmp(line, "CacheDir", len1) == 0)
! 	    strcpy(afsCacheDir, p);
! 	else if (strncmp(line, "CacheBlocks", len1) == 0)
! 	    *cacheBlocks = atoi(p);
! 	else if (strncmp(line, "CacheFiles", len1) == 0)
! 	    *cacheFiles = atoi(p);
! 	else if (strncmp(line, "CacheStatEntries", len1) == 0)
! 	    *cacheStatEntries = atoi(p);
! 	else if (strncmp(line, "DCacheSize", len1) == 0)
! 	    *dCacheSize = atoi(p);
! 	else if (strncmp(line, "VCacheSize", len1) == 0)
! 	    *vCacheSize = atoi(p);
! 	else if (strncmp(line, "ChunkSize", len1) == 0)
! 	    *chunkSize = atoi(p);
! 	else if (strncmp(line, "CloseSynch", len1) == 0)
! 	    *closeSynch = atoi(p);
! 	else if (strncmp(line, "Debug", len1) == 0)
! 	    *debug = atoi(p);
! 	else if (strncmp(line, "NDaemons", len1) == 0)
! 	    *nDaemons = atoi(p);
! 	else if (strncmp(line, "CacheFlags", len1) == 0)
! 	    *cacheFlags = atoi(p);
! 	else if (strncmp(line, "LogFile", len1) == 0)
! 	    strcpy(logFile, p);
      }
!     return 0;
  }
  
  #else
--- 343,466 ----
   *
   * @returns		file descriptor
   */
! int openAFSFile
!   (JNIEnv *env, jstring fileNameUTF, int flags, int mode, int *err)
  {
!     char *fileName;
      int fd = -1;
  
      *err = 0;
      errno = 0;
!     fileName=(char*) (*env)->GetStringUTFChars(env, fileNameUTF, 0);
!     if(fileName == NULL) {
!       fprintf(stderr, "Internal::openAFSFile(): failed to get fileName\n");
!       *err = -1;
!       return fd;
      }
!     fd  = uafs_open(fileName, flags, mode);
      *err = errno;
      if (errno != 0) {
!       fprintf(stderr, "Internal::openAFSFile(): errno=%d\n", errno);
!       fprintf(stderr, "Internal::openAFSFile(): fd=%d\n", fd);
      }
+     (*env)->ReleaseStringUTFChars(env, fileNameUTF, fileName);
      if (fd < 0) {
!       fprintf(stderr, "Internal::openAFSFile(): failed to open fileName\n");
!       fprintf(stderr, "Internal::openAFSFile(): fd=%d\n", fd);
!       return -1;
      }
      return fd;
  }
  
! int readCacheParms(char *afsMountPoint, char *afsConfDir, char *afsCacheDir,
!                    int *cacheBlocks, int *cacheFiles, int *cacheStatEntries,
!                    int *dCacheSize, int *vCacheSize, int *chunkSize,
!                    int *closeSynch, int *debug, int *nDaemons, int *cacheFlags,
!                    char *logFile)
! {
!   FILE *f;
!   char line[100];
!   char *p;
!   int len1, len2, n;
!   char cacheConfigFile[100];
!   
!   p = (char *)getenv("LIBJAFS_CACHE_CONFIG");
!   if (p) {
!     strcpy(cacheConfigFile, p);
!   } else {
!     strcpy(cacheConfigFile, "/usr/afswsp/etc/CacheConfig");
!   }
! 
!   f = fopen(cacheConfigFile, "r");
!   if (!f) {
!     fprintf(stderr, "Could not open cache config file: %s\n",
!             cacheConfigFile);
!     return -1;
!   }
! 
!   while (1) {
!     fgets(line, 100, f);
!     if (feof(f)) break;
!     p = (char *)strchr(line, '\n');
!     if (p) *p = '\0';
!     if (strncmp(line, "#", 1) == 0) continue;  /* comment */
! 
!     p = (char *)strchr(line, ' ');
!     if (!p) continue;
!     len1 = p - line;
!     p++; len2 = strlen(p);
! 
!     if (strncmp(line, "MountPoint", len1) == 0)
!        strcpy(afsMountPoint, p);
!     else if (strncmp(line, "ConfDir", len1) == 0)
!        strcpy(afsConfDir, p);
!     else if (strncmp(line, "CacheDir", len1) == 0)
!        strcpy(afsCacheDir, p);
!     else if (strncmp(line, "CacheBlocks", len1) == 0)
!        *cacheBlocks = atoi(p);
!     else if (strncmp(line, "CacheFiles", len1) == 0)
!        *cacheFiles = atoi(p);
!     else if (strncmp(line, "CacheStatEntries", len1) == 0)
!        *cacheStatEntries = atoi(p);
!     else if (strncmp(line, "DCacheSize", len1) == 0)
!        *dCacheSize = atoi(p);
!     else if (strncmp(line, "VCacheSize", len1) == 0)
!        *vCacheSize = atoi(p);
!     else if (strncmp(line, "ChunkSize", len1) == 0)
!        *chunkSize = atoi(p);
!     else if (strncmp(line, "CloseSynch", len1) == 0)
!        *closeSynch = atoi(p);
!     else if (strncmp(line, "Debug", len1) == 0)
!        *debug = atoi(p);
!     else if (strncmp(line, "NDaemons", len1) == 0)
!        *nDaemons = atoi(p);
!     else if (strncmp(line, "CacheFlags", len1) == 0)
!        *cacheFlags = atoi(p);
!     else if (strncmp(line, "LogFile", len1) == 0)
!        strcpy(logFile, p);
!   }
!   return 0;
! }
! 
! int setString(JNIEnv *env, jobject *obj, char *field, char *string)
! {
!   jclass cls;
!   jstring jstr;
!   jfieldID fid;
! 
!   cls = (*env)->GetObjectClass(env, *obj);
!   /*fprintf(stderr, "setString: env=0x%x, obj=0x%x, cls=0x%x\n", env, obj, cls);*/
!   if (cls != NULL) {
!     fid = (*env)->GetFieldID(env, cls, field, "Ljava/lang/String;");
!     /*fprintf(stderr, "setString: field=%s, fid=0x%x\n", field, fid);*/
!     if (fid) {
!       jstr = (*env)->NewStringUTF(env, (string));
!       /*fprintf(stderr, "jstr = 0x%x\n", jstr);*/
!       (*env)->SetObjectField(env, *obj, fid, jstr);
!       return 0;
      }
!   }
!   return -1;
  }
  
  #else
***************
*** 597,810 ****
   * the instance is the empty string.  The memory for who 
   * that's passed in should be fully allocated in advance.
   */
! void
! internal_makeKasIdentity(const char *fullName, kas_identity_p who)
! {
!     char *period;
  
-     if ((period = (char *)strchr(fullName, '.')) != NULL) {
- 	strncpy(who->principal, fullName, period - fullName);
- 	who->principal[period - fullName] = '\0';
- 	strncpy(who->instance, period + 1,
- 		strlen(fullName) - (period - fullName));
-     } else {
- 	strcpy(who->principal, fullName);
- 	strcpy(who->instance, "");
-     }
  }
  
  /**
   * Given a Java environment and an instance of a user, gets the object and
   * field information for the user object from the Java environment.
   */
! void
! internal_getUserClass(JNIEnv * env, jobject user)
! {
!     if (userCls == 0) {
! 	userCls =
! 	    (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, user));
! 	if (!userCls) {
! 	    throwAFSException(env, JAFSADMCLASSNOTFOUND);
! 	    return;
! 	}
! 	user_ptsField = (*env)->GetFieldID(env, userCls, "pts", "Z");
! 	user_kasField = (*env)->GetFieldID(env, userCls, "kas", "Z");
! 	user_nameField =
! 	    (*env)->GetFieldID(env, userCls, "name", "Ljava/lang/String;");
! 	user_cachedInfoField =
! 	    (*env)->GetFieldID(env, userCls, "cachedInfo", "Z");
! 	// pts fields
! 	user_nameUidField = (*env)->GetFieldID(env, userCls, "nameUID", "I");
! 	user_ownerUidField =
! 	    (*env)->GetFieldID(env, userCls, "ownerUID", "I");
! 	user_creatorUidField =
! 	    (*env)->GetFieldID(env, userCls, "creatorUID", "I");
! 	user_listStatusField =
! 	    (*env)->GetFieldID(env, userCls, "listStatus", "I");
! 	user_listGroupsOwnedField =
! 	    (*env)->GetFieldID(env, userCls, "listGroupsOwned", "I");
! 	user_listMembershipField =
! 	    (*env)->GetFieldID(env, userCls, "listMembership", "I");
! 	user_groupCreationQuotaField =
! 	    (*env)->GetFieldID(env, userCls, "groupCreationQuota", "I");
! 	user_groupMembershipCountField =
! 	    (*env)->GetFieldID(env, userCls, "groupMembershipCount", "I");
! 	user_ownerField =
! 	    (*env)->GetFieldID(env, userCls, "owner", "Ljava/lang/String;");
! 	user_creatorField =
! 	    (*env)->GetFieldID(env, userCls, "creator", "Ljava/lang/String;");
! 	// kas fields
! 	user_adminSettingField =
! 	    (*env)->GetFieldID(env, userCls, "adminSetting", "I");
! 	user_tgsSettingField =
! 	    (*env)->GetFieldID(env, userCls, "tgsSetting", "I");
! 	user_encSettingField =
! 	    (*env)->GetFieldID(env, userCls, "encSetting", "I");
! 	user_cpwSettingField =
! 	    (*env)->GetFieldID(env, userCls, "cpwSetting", "I");
! 	user_rpwSettingField =
! 	    (*env)->GetFieldID(env, userCls, "rpwSetting", "I");
! 	user_userExpirationField =
! 	    (*env)->GetFieldID(env, userCls, "userExpiration", "I");
! 	user_lastModTimeField =
! 	    (*env)->GetFieldID(env, userCls, "lastModTime", "I");
! 	user_lastModNameField =
! 	    (*env)->GetFieldID(env, userCls, "lastModName",
! 			       "Ljava/lang/String;");
! 	user_lastChangePasswordTimeField =
! 	    (*env)->GetFieldID(env, userCls, "lastChangePasswordTime", "I");
! 	user_maxTicketLifetimeField =
! 	    (*env)->GetFieldID(env, userCls, "maxTicketLifetime", "I");
! 	user_keyVersionField =
! 	    (*env)->GetFieldID(env, userCls, "keyVersion", "I");
! 	user_encryptionKeyField =
! 	    (*env)->GetFieldID(env, userCls, "encryptionKey",
! 			       "Ljava/lang/String;");
! 	user_keyCheckSumField =
! 	    (*env)->GetFieldID(env, userCls, "keyCheckSum", "J");
! 	user_daysToPasswordExpireField =
! 	    (*env)->GetFieldID(env, userCls, "daysToPasswordExpire", "I");
! 	user_failLoginCountField =
! 	    (*env)->GetFieldID(env, userCls, "failLoginCount", "I");
! 	user_lockTimeField =
! 	    (*env)->GetFieldID(env, userCls, "lockTime", "I");
! 	user_lockedUntilField =
! 	    (*env)->GetFieldID(env, userCls, "lockedUntil", "I");
! 	if (!user_ptsField || !user_kasField || !user_nameField
! 	    || !user_cachedInfoField || !user_nameUidField
! 	    || !user_ownerUidField || !user_creatorUidField
! 	    || !user_listStatusField || !user_listGroupsOwnedField
! 	    || !user_listMembershipField || !user_groupCreationQuotaField
! 	    || !user_groupMembershipCountField || !user_ownerField
! 	    || !user_creatorField || !user_adminSettingField
! 	    || !user_tgsSettingField || !user_encSettingField
! 	    || !user_cpwSettingField || !user_rpwSettingField
! 	    || !user_userExpirationField || !user_lastModTimeField
! 	    || !user_lastModNameField || !user_lastChangePasswordTimeField
! 	    || !user_maxTicketLifetimeField || !user_keyVersionField
! 	    || !user_encryptionKeyField || !user_keyCheckSumField
! 	    || !user_daysToPasswordExpireField || !user_failLoginCountField
! 	    || !user_lockTimeField || !user_lockedUntilField) {
! 
! 	    throwAFSException(env, JAFSADMFIELDNOTFOUND);
! 	    return;
! 	}
      }
  }
  
  /**
   * Given a Java environment and an instance of a group, gets the object and
   * field information for the group object from the Java environment.
   */
! void
! internal_getGroupClass(JNIEnv * env, jobject group)
! {
!     if (groupCls == 0) {
! 	groupCls =
! 	    (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, group));
! 	if (!groupCls) {
! 	    throwAFSException(env, JAFSADMCLASSNOTFOUND);
! 	    return;
! 	}
! 	group_nameField =
! 	    (*env)->GetFieldID(env, groupCls, "name", "Ljava/lang/String;");
! 	group_cachedInfoField =
! 	    (*env)->GetFieldID(env, groupCls, "cachedInfo", "Z");
! 	group_nameUidField =
! 	    (*env)->GetFieldID(env, groupCls, "nameUID", "I");
! 	group_ownerUidField =
! 	    (*env)->GetFieldID(env, groupCls, "ownerUID", "I");
! 	group_creatorUidField =
! 	    (*env)->GetFieldID(env, groupCls, "creatorUID", "I");
! 	group_listStatusField =
! 	    (*env)->GetFieldID(env, groupCls, "listStatus", "I");
! 	group_listGroupsOwnedField =
! 	    (*env)->GetFieldID(env, groupCls, "listGroupsOwned", "I");
! 	group_listMembershipField =
! 	    (*env)->GetFieldID(env, groupCls, "listMembership", "I");
! 	group_listAddField =
! 	    (*env)->GetFieldID(env, groupCls, "listAdd", "I");
! 	group_listDeleteField =
! 	    (*env)->GetFieldID(env, groupCls, "listDelete", "I");
! 	group_membershipCountField =
! 	    (*env)->GetFieldID(env, groupCls, "membershipCount", "I");
! 	group_ownerField =
! 	    (*env)->GetFieldID(env, groupCls, "owner", "Ljava/lang/String;");
! 	group_creatorField =
! 	    (*env)->GetFieldID(env, groupCls, "creator",
! 			       "Ljava/lang/String;");
! 	if (!group_nameField || !group_cachedInfoField || !group_nameUidField
! 	    || !group_ownerUidField || !group_creatorUidField
! 	    || !group_listStatusField || !group_listGroupsOwnedField
! 	    || !group_listMembershipField || !group_listAddField
! 	    || !group_listDeleteField || !group_membershipCountField
! 	    || !group_ownerField || !group_creatorField) {
! 
! 	    throwAFSException(env, JAFSADMFIELDNOTFOUND);
! 	    return;
! 	}
      }
  }
  
  /**
   * Given a Java environment and an instance of a server, gets the object and
   * field information for the server object from the Java environment.
   */
! void
! internal_getServerClass(JNIEnv * env, jobject server)
! {
!     if (serverCls == 0) {
! 	serverCls =
! 	    (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, server));
! 	if (!serverCls) {
! 	    throwAFSException(env, JAFSADMCLASSNOTFOUND);
! 	    return;
! 	}
! 	server_nameField =
! 	    (*env)->GetFieldID(env, serverCls, "name", "Ljava/lang/String;");
! 	server_cachedInfoField =
! 	    (*env)->GetFieldID(env, serverCls, "cachedInfo", "Z");
! 	server_databaseField =
! 	    (*env)->GetFieldID(env, serverCls, "database", "Z");
! 	server_fileServerField =
! 	    (*env)->GetFieldID(env, serverCls, "fileServer", "Z");
! 	server_badDatabaseField =
! 	    (*env)->GetFieldID(env, serverCls, "badDatabase", "Z");
! 	server_badFileServerField =
! 	    (*env)->GetFieldID(env, serverCls, "badFileServer", "Z");
! 	server_IPAddressField =
! 	    (*env)->GetFieldID(env, serverCls, "ipAddresses",
! 			       "[Ljava/lang/String;");
! 	if (!server_nameField || !server_cachedInfoField
! 	    || !server_databaseField || !server_fileServerField
! 	    || !server_badDatabaseField || !server_badFileServerField
! 	    || !server_IPAddressField) {
  
! 	    throwAFSException(env, JAFSADMFIELDNOTFOUND);
! 	    return;
  
- 	}
      }
  }
  
  /**
--- 472,675 ----
   * the instance is the empty string.  The memory for who 
   * that's passed in should be fully allocated in advance.
   */
! void internal_makeKasIdentity( const char *fullName, 
! 				       kas_identity_p who ) {
! 
!   char *period;
! 
!   if( (period = (char *) strchr( fullName, '.' )) != NULL ) {
!     strncpy( who->principal, fullName, period - fullName );
!     who->principal[period - fullName] = '\0';
!     strncpy( who->instance, period + 1, 
! 	     strlen(fullName) - (period - fullName) );
!   } else {
!     strcpy( who->principal, fullName);
!     strcpy( who->instance, "" );
!   }
  
  }
  
  /**
   * Given a Java environment and an instance of a user, gets the object and
   * field information for the user object from the Java environment.
   */
! void internal_getUserClass( JNIEnv *env, jobject user ) {
!   if( userCls == 0 ) {
!     userCls = (*env)->NewGlobalRef( env, (*env)->GetObjectClass(env, user) );
!     if( !userCls ) {
! 	throwAFSException( env, JAFSADMCLASSNOTFOUND );
! 	return;
!     }
!     user_ptsField = (*env)->GetFieldID( env, userCls, "pts", "Z" );
!     user_kasField = (*env)->GetFieldID( env, userCls, "kas", "Z" );
!     user_nameField = (*env)->GetFieldID( env, userCls, "name", 
! 					 "Ljava/lang/String;" );
!     user_cachedInfoField = (*env)->GetFieldID( env, userCls, "cachedInfo", 
! 					       "Z" );
!     // pts fields
!     user_nameUidField = (*env)->GetFieldID( env, userCls, "nameUID", "I" );
!     user_ownerUidField = (*env)->GetFieldID( env, userCls, "ownerUID", "I" );
!     user_creatorUidField = (*env)->GetFieldID( env, userCls, "creatorUID", 
! 					       "I" );
!     user_listStatusField = (*env)->GetFieldID( env, userCls, "listStatus", 
! 					       "I" );
!     user_listGroupsOwnedField = (*env)->GetFieldID( env, userCls, 
! 						    "listGroupsOwned", "I" );
!     user_listMembershipField = (*env)->GetFieldID( env, userCls, 
! 						   "listMembership", "I" );
!     user_groupCreationQuotaField = (*env)->GetFieldID( env, userCls, 
! 						       "groupCreationQuota", 
! 						       "I" );
!     user_groupMembershipCountField = (*env)->GetFieldID( env, userCls, 
! 							"groupMembershipCount",
! 							 "I" );
!     user_ownerField = (*env)->GetFieldID( env, userCls, "owner", 
! 					  "Ljava/lang/String;" );
!     user_creatorField = (*env)->GetFieldID( env, userCls, "creator", 
! 					    "Ljava/lang/String;" );
!     // kas fields
!     user_adminSettingField = (*env)->GetFieldID( env, userCls, "adminSetting",
! 						 "I" );
!     user_tgsSettingField = (*env)->GetFieldID( env, userCls, "tgsSetting", 
! 					       "I" );
!     user_encSettingField = (*env)->GetFieldID( env, userCls, "encSetting", 
! 					       "I" );
!     user_cpwSettingField = (*env)->GetFieldID( env, userCls, "cpwSetting", 
! 					       "I" );
!     user_rpwSettingField = (*env)->GetFieldID( env, userCls, "rpwSetting", 
! 					       "I" );
!     user_userExpirationField = (*env)->GetFieldID( env, userCls, 
! 						   "userExpiration", "I" );
!     user_lastModTimeField = (*env)->GetFieldID( env, userCls, "lastModTime", 
! 						"I" );
!     user_lastModNameField = (*env)->GetFieldID( env, userCls, "lastModName", 
! 						"Ljava/lang/String;" );
!     user_lastChangePasswordTimeField = (*env)->GetFieldID( env, userCls, 
! 						      "lastChangePasswordTime",
! 							   "I" );
!     user_maxTicketLifetimeField = (*env)->GetFieldID( env, userCls, 
! 						      "maxTicketLifetime", 
! 						      "I" );
!     user_keyVersionField = (*env)->GetFieldID( env, userCls, "keyVersion", 
! 					       "I" );
!     user_encryptionKeyField = (*env)->GetFieldID( env, userCls, 
! 						  "encryptionKey", 
! 						  "Ljava/lang/String;" );
!     user_keyCheckSumField = (*env)->GetFieldID( env, userCls, "keyCheckSum", 
! 						"J" );
!     user_daysToPasswordExpireField = (*env)->GetFieldID( env, userCls, 
! 							"daysToPasswordExpire",
! 							 "I" );
!     user_failLoginCountField = (*env)->GetFieldID( env, userCls, 
! 						   "failLoginCount", "I" );
!     user_lockTimeField = (*env)->GetFieldID( env, userCls, "lockTime", "I" );
!     user_lockedUntilField = (*env)->GetFieldID( env, userCls, "lockedUntil", 
! 						"I" );
!     if( !user_ptsField || !user_kasField || !user_nameField || 
! 	!user_cachedInfoField || !user_nameUidField || !user_ownerUidField || 
! 	!user_creatorUidField || !user_listStatusField || 
! 	!user_listGroupsOwnedField || !user_listMembershipField || 
! 	!user_groupCreationQuotaField || !user_groupMembershipCountField || 
! 	!user_ownerField || !user_creatorField || !user_adminSettingField || 
! 	!user_tgsSettingField || !user_encSettingField || 
! 	!user_cpwSettingField || !user_rpwSettingField || 
! 	!user_userExpirationField || !user_lastModTimeField || 
! 	!user_lastModNameField || !user_lastChangePasswordTimeField || 
! 	!user_maxTicketLifetimeField || !user_keyVersionField || 
! 	!user_encryptionKeyField || !user_keyCheckSumField || 
! 	!user_daysToPasswordExpireField || !user_failLoginCountField || 
! 	!user_lockTimeField || !user_lockedUntilField ) {
! 
! 	throwAFSException( env, JAFSADMFIELDNOTFOUND );
! 	return;
! 
      }
+   } 
  }
  
  /**
   * Given a Java environment and an instance of a group, gets the object and
   * field information for the group object from the Java environment.
   */
! void internal_getGroupClass( JNIEnv *env, jobject group ) {
!   if( groupCls == 0 ) {
!     groupCls = (*env)->NewGlobalRef( env, (*env)->GetObjectClass(env, group) );
!     if( !groupCls ) {
! 	throwAFSException( env, JAFSADMCLASSNOTFOUND );
! 	return;
!     }
!     group_nameField = (*env)->GetFieldID( env, groupCls, "name", 
! 					  "Ljava/lang/String;" );
!     group_cachedInfoField = (*env)->GetFieldID( env, groupCls, "cachedInfo", 
! 						"Z" );
!     group_nameUidField = (*env)->GetFieldID( env, groupCls, "nameUID", "I" );
!     group_ownerUidField = (*env)->GetFieldID( env, groupCls, "ownerUID", "I" );
!     group_creatorUidField = (*env)->GetFieldID( env, groupCls, "creatorUID", 
! 						"I" );
!     group_listStatusField = (*env)->GetFieldID( env, groupCls, "listStatus", 
! 						"I" );
!     group_listGroupsOwnedField = (*env)->GetFieldID( env, groupCls, 
! 						     "listGroupsOwned", "I" );
!     group_listMembershipField = (*env)->GetFieldID( env, groupCls, 
! 						    "listMembership", "I" );
!     group_listAddField = (*env)->GetFieldID( env, groupCls, "listAdd", "I" );
!     group_listDeleteField = (*env)->GetFieldID( env, groupCls, "listDelete", 
! 						"I" );
!     group_membershipCountField = (*env)->GetFieldID( env, groupCls, 
! 						     "membershipCount", "I" );
!     group_ownerField = (*env)->GetFieldID( env, groupCls, "owner", 
! 					   "Ljava/lang/String;" );
!     group_creatorField = (*env)->GetFieldID( env, groupCls, "creator", 
! 					     "Ljava/lang/String;" );
!     if( !group_nameField || !group_cachedInfoField || !group_nameUidField || 
! 	!group_ownerUidField || !group_creatorUidField || 
! 	!group_listStatusField || !group_listGroupsOwnedField || 
! 	!group_listMembershipField || !group_listAddField || 
! 	!group_listDeleteField || !group_membershipCountField || 
! 	!group_ownerField || !group_creatorField ) {
! 
! 	throwAFSException( env, JAFSADMFIELDNOTFOUND );
! 	return;
! 
      }
+   }
  }
  
  /**
   * Given a Java environment and an instance of a server, gets the object and
   * field information for the server object from the Java environment.
   */
! void internal_getServerClass( JNIEnv *env, jobject server ) {
!   if( serverCls == 0 ) {
!     serverCls = (*env)->NewGlobalRef( env,
!                                       (*env)->GetObjectClass(env, server) );
!     if( !serverCls ) {
! 	throwAFSException( env, JAFSADMCLASSNOTFOUND );
! 	return;
!     }
!     server_nameField = (*env)->GetFieldID( env, serverCls, "name", 
! 					   "Ljava/lang/String;" );
!     server_cachedInfoField = (*env)->GetFieldID( env, serverCls, "cachedInfo",
! 						 "Z" );
!     server_databaseField = (*env)->GetFieldID( env, serverCls, "database", 
! 					       "Z" );
!     server_fileServerField = (*env)->GetFieldID( env, serverCls, "fileServer", 
! 						 "Z" );
!     server_badDatabaseField = (*env)->GetFieldID( env, serverCls, 
! 						  "badDatabase", "Z" );
!     server_badFileServerField = (*env)->GetFieldID( env, serverCls, 
! 						    "badFileServer", "Z" );
!     server_IPAddressField = (*env)->GetFieldID( env, serverCls, "ipAddresses",
! 						"[Ljava/lang/String;" );
!     if( !server_nameField || !server_cachedInfoField || !server_databaseField 
! 	|| !server_fileServerField || !server_badDatabaseField || 
! 	!server_badFileServerField || !server_IPAddressField ) {
  
! 	throwAFSException( env, JAFSADMFIELDNOTFOUND );
! 	return;
  
      }
+   }
  }
  
  /**
***************
*** 812,1042 ****
   * object and field information for the executableTime object from the 
   * Java environment.
   */
! void
! internal_getExecTimeClass(JNIEnv * env, jobject exectime)
! {
!     if (exectimeCls == 0) {
! 	exectimeCls =
! 	    (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, exectime));
! 	if (!exectimeCls) {
! 	    throwAFSException(env, JAFSADMCLASSNOTFOUND);
! 	    return;
! 	}
! 	exectime_HourField =
! 	    (*env)->GetFieldID(env, exectimeCls, "hour", "S");
! 	exectime_MinField =
! 	    (*env)->GetFieldID(env, exectimeCls, "minute", "S");
! 	exectime_SecField =
! 	    (*env)->GetFieldID(env, exectimeCls, "second", "S");
! 	exectime_DayField = (*env)->GetFieldID(env, exectimeCls, "day", "S");
! 	exectime_NowField = (*env)->GetFieldID(env, exectimeCls, "now", "Z");
! 	exectime_NeverField =
! 	    (*env)->GetFieldID(env, exectimeCls, "never", "Z");
! 	if (!exectime_HourField || !exectime_MinField || !exectime_SecField
! 	    || !exectime_DayField || !exectime_NowField
! 	    || !exectime_NeverField) {
  
! 	    throwAFSException(env, JAFSADMFIELDNOTFOUND);
! 	    return;
  
- 	}
      }
  }
  
  /**
   * Given a Java environment and an instance of a partition, gets the object and
   * field information for the partition object from the Java environment.
   */
! void
! internal_getPartitionClass(JNIEnv * env, jobject partition)
! {
!     if (partitionCls == 0) {
! 	partitionCls =
! 	    (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, partition));
! 	if (!partitionCls) {
! 	    throwAFSException(env, JAFSADMCLASSNOTFOUND);
! 	    return;
! 	}
! 	partition_nameField =
! 	    (*env)->GetFieldID(env, partitionCls, "name",
! 			       "Ljava/lang/String;");
! 	partition_deviceNameField =
! 	    (*env)->GetFieldID(env, partitionCls, "deviceName",
! 			       "Ljava/lang/String;");
! 	partition_idField = (*env)->GetFieldID(env, partitionCls, "id", "I");
! 	partition_cachedInfoField =
! 	    (*env)->GetFieldID(env, partitionCls, "cachedInfo", "Z");
! 	partition_lockFileDescriptorField =
! 	    (*env)->GetFieldID(env, partitionCls, "lockFileDescriptor", "I");
! 	partition_totalSpaceField =
! 	    (*env)->GetFieldID(env, partitionCls, "totalSpace", "I");
! 	partition_totalFreeSpaceField =
! 	    (*env)->GetFieldID(env, partitionCls, "totalFreeSpace", "I");
! 	if (!partition_nameField || !partition_cachedInfoField
! 	    || !partition_idField || !partition_deviceNameField
! 	    || !partition_lockFileDescriptorField
! 	    || !partition_totalSpaceField || !partition_totalFreeSpaceField) {
  
! 	    throwAFSException(env, JAFSADMFIELDNOTFOUND);
! 	    return;
  
- 	}
      }
  }
  
  /**
   * Given a Java environment and an instance of a volume, gets the object and
   * field information for the volume object from the Java environment.
   */
! void
! internal_getVolumeClass(JNIEnv * env, jobject volume)
! {
!     if (volumeCls == 0) {
! 	volumeCls =
! 	    (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, volume));
! 	if (!volumeCls) {
! 	    throwAFSException(env, JAFSADMCLASSNOTFOUND);
! 	    return;
! 	}
! 	volume_nameField =
! 	    (*env)->GetFieldID(env, volumeCls, "name", "Ljava/lang/String;");
! 	volume_cachedInfoField =
! 	    (*env)->GetFieldID(env, volumeCls, "cachedInfo", "Z");
! 	volume_idField = (*env)->GetFieldID(env, volumeCls, "id", "I");
! 	volume_readWriteIdField =
! 	    (*env)->GetFieldID(env, volumeCls, "readWriteID", "I");
! 	volume_readOnlyIdField =
! 	    (*env)->GetFieldID(env, volumeCls, "readOnlyID", "I");
! 	volume_backupIdField =
! 	    (*env)->GetFieldID(env, volumeCls, "backupID", "I");
! 	volume_creationDateField =
! 	    (*env)->GetFieldID(env, volumeCls, "creationDate", "J");
! 	volume_lastAccessDateField =
! 	    (*env)->GetFieldID(env, volumeCls, "lastAccessDate", "J");
! 	volume_lastUpdateDateField =
! 	    (*env)->GetFieldID(env, volumeCls, "lastUpdateDate", "J");
! 	volume_lastBackupDateField =
! 	    (*env)->GetFieldID(env, volumeCls, "lastBackupDate", "J");
! 	volume_copyCreationDateField =
! 	    (*env)->GetFieldID(env, volumeCls, "copyCreationDate", "J");
! 	volume_accessesSinceMidnightField =
! 	    (*env)->GetFieldID(env, volumeCls, "accessesSinceMidnight", "I");
! 	volume_fileCountField =
! 	    (*env)->GetFieldID(env, volumeCls, "fileCount", "I");
! 	volume_maxQuotaField =
! 	    (*env)->GetFieldID(env, volumeCls, "maxQuota", "I");
! 	volume_currentSizeField =
! 	    (*env)->GetFieldID(env, volumeCls, "currentSize", "I");
! 	volume_statusField =
! 	    (*env)->GetFieldID(env, volumeCls, "status", "I");
! 	volume_dispositionField =
! 	    (*env)->GetFieldID(env, volumeCls, "disposition", "I");
! 	volume_typeField = (*env)->GetFieldID(env, volumeCls, "type", "I");
! 	if (!volume_nameField || !volume_cachedInfoField || !volume_idField
! 	    || !volume_readWriteIdField || !volume_readOnlyIdField
! 	    || !volume_backupIdField || !volume_creationDateField
! 	    || !volume_lastAccessDateField || !volume_lastUpdateDateField
! 	    || !volume_lastBackupDateField || !volume_copyCreationDateField
! 	    || !volume_accessesSinceMidnightField || !volume_fileCountField
! 	    || !volume_maxQuotaField || !volume_currentSizeField
! 	    || !volume_statusField || !volume_dispositionField
! 	    || !volume_typeField) {
  
! 	    throwAFSException(env, JAFSADMFIELDNOTFOUND);
! 	    return;
  
- 	}
      }
  }
  
  /**
   * Given a Java environment and an instance of a key, gets the object and
   * field information for the key object from the Java environment.
   */
! void
! internal_getKeyClass(JNIEnv * env, jobject key)
! {
!     if (keyCls == 0) {
! 	keyCls = (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, key));
! 	if (!keyCls) {
! 	    throwAFSException(env, JAFSADMCLASSNOTFOUND);
! 	    return;
! 	}
! 	key_encryptionKeyField =
! 	    (*env)->GetFieldID(env, keyCls, "encryptionKey",
! 			       "Ljava/lang/String;");
! 	key_cachedInfoField =
! 	    (*env)->GetFieldID(env, keyCls, "cachedInfo", "Z");
! 	key_versionField = (*env)->GetFieldID(env, keyCls, "version", "I");
! 	key_lastModDateField =
! 	    (*env)->GetFieldID(env, keyCls, "lastModDate", "I");
! 	key_lastModMsField =
! 	    (*env)->GetFieldID(env, keyCls, "lastModMs", "I");
! 	key_checkSumField = (*env)->GetFieldID(env, keyCls, "checkSum", "J");
! 	if (!key_cachedInfoField || !key_versionField
! 	    || !key_encryptionKeyField || !key_lastModDateField
! 	    || !key_lastModMsField || !key_checkSumField) {
  
! 	    throwAFSException(env, JAFSADMFIELDNOTFOUND);
! 	    return;
  
- 	}
      }
  }
  
  /**
   * Given a Java environment and an instance of a process, gets the object and
   * field information for the process object from the Java environment.
   */
! void
! internal_getProcessClass(JNIEnv * env, jobject process)
! {
!     if (processCls == 0) {
! 	processCls =
! 	    (*env)->NewGlobalRef(env, (*env)->GetObjectClass(env, process));
! 	if (!processCls) {
! 	    throwAFSException(env, JAFSADMCLASSNOTFOUND);
! 	    return;
! 	}
! 	process_cachedInfoField =
! 	    (*env)->GetFieldID(env, processCls, "cachedInfo", "Z");
! 	process_nameField =
! 	    (*env)->GetFieldID(env, processCls, "name", "Ljava/lang/String;");
! 	process_typeField = (*env)->GetFieldID(env, processCls, "type", "I");
! 	process_stateField =
! 	    (*env)->GetFieldID(env, processCls, "state", "I");
! 	process_goalField = (*env)->GetFieldID(env, processCls, "goal", "I");
! 	process_startTimeField =
! 	    (*env)->GetFieldID(env, processCls, "startTime", "J");
! 	process_numberStartsField =
! 	    (*env)->GetFieldID(env, processCls, "numberStarts", "J");
! 	process_exitTimeField =
! 	    (*env)->GetFieldID(env, processCls, "exitTime", "J");
! 	process_exitErrorTimeField =
! 	    (*env)->GetFieldID(env, processCls, "exitErrorTime", "J");
! 	process_errorCodeField =
! 	    (*env)->GetFieldID(env, processCls, "errorCode", "J");
! 	process_errorSignalField =
! 	    (*env)->GetFieldID(env, processCls, "errorSignal", "J");
! 	process_stateOkField =
! 	    (*env)->GetFieldID(env, processCls, "stateOk", "Z");
! 	process_stateTooManyErrorsField =
! 	    (*env)->GetFieldID(env, processCls, "stateTooManyErrors", "Z");
! 	process_stateBadFileAccessField =
! 	    (*env)->GetFieldID(env, processCls, "stateBadFileAccess", "Z");
! 	if (!process_cachedInfoField || !process_nameField
! 	    || !process_typeField || !process_stateField || !process_goalField
! 	    || !process_startTimeField || !process_numberStartsField
! 	    || !process_exitTimeField || !process_exitErrorTimeField
! 	    || !process_errorCodeField || !process_errorSignalField
! 	    || !process_stateOkField || !process_stateTooManyErrorsField
! 	    || !process_stateBadFileAccessField) {
  
! 	    throwAFSException(env, JAFSADMFIELDNOTFOUND);
! 	    return;
  
- 	}
      }
  }
  
  #endif /* LIBJUAFS */
--- 677,896 ----
   * object and field information for the executableTime object from the 
   * Java environment.
   */
! void internal_getExecTimeClass( JNIEnv *env, jobject exectime ) {
!   if( exectimeCls == 0 ) {
!     exectimeCls = (*env)->NewGlobalRef( env, 
! 				       (*env)->GetObjectClass(env, exectime) );
!     if( !exectimeCls ) {
! 	throwAFSException( env, JAFSADMCLASSNOTFOUND );
! 	return;
!     }
!     exectime_HourField  = (*env)->GetFieldID( env, exectimeCls, "hour", "S" );
!     exectime_MinField   = (*env)->GetFieldID( env, exectimeCls, "minute", 
! 					      "S" );
!     exectime_SecField   = (*env)->GetFieldID( env, exectimeCls, "second", 
! 					      "S" );
!     exectime_DayField   = (*env)->GetFieldID( env, exectimeCls, "day", "S" );
!     exectime_NowField   = (*env)->GetFieldID( env, exectimeCls, "now", "Z" );
!     exectime_NeverField = (*env)->GetFieldID( env, exectimeCls, "never", "Z" );
!     if( !exectime_HourField || !exectime_MinField || !exectime_SecField || 
! 	!exectime_DayField || !exectime_NowField || !exectime_NeverField ) {
  
! 	throwAFSException( env, JAFSADMFIELDNOTFOUND );
! 	return;
  
      }
+   }
  }
  
  /**
   * Given a Java environment and an instance of a partition, gets the object and
   * field information for the partition object from the Java environment.
   */
! void internal_getPartitionClass( JNIEnv *env, jobject partition ) {
!   if( partitionCls == 0 ) {
!     partitionCls = (*env)->NewGlobalRef( env, 
! 				      (*env)->GetObjectClass(env, partition) );
!     if( !partitionCls ) {
! 	throwAFSException( env, JAFSADMCLASSNOTFOUND );
! 	return;
!     }
!     partition_nameField = (*env)->GetFieldID( env, partitionCls, "name", 
! 					      "Ljava/lang/String;" );
!     partition_deviceNameField = (*env)->GetFieldID( env, partitionCls, 
! 						    "deviceName", 
! 						    "Ljava/lang/String;" );
!     partition_idField = (*env)->GetFieldID( env, partitionCls, "id", "I" );
!     partition_cachedInfoField = (*env)->GetFieldID( env, partitionCls, 
! 						    "cachedInfo", "Z" );
!     partition_lockFileDescriptorField = (*env)->GetFieldID( env, partitionCls,
! 							  "lockFileDescriptor",
! 							    "I" );
!     partition_totalSpaceField = (*env)->GetFieldID( env, partitionCls, 
! 						    "totalSpace", "I" );
!     partition_totalFreeSpaceField = (*env)->GetFieldID( env, partitionCls, 
! 							"totalFreeSpace", "I");
!     if( !partition_nameField || !partition_cachedInfoField || 
! 	!partition_idField || !partition_deviceNameField || 
! 	!partition_lockFileDescriptorField || !partition_totalSpaceField || 
! 	!partition_totalFreeSpaceField ) {
  
! 	throwAFSException( env, JAFSADMFIELDNOTFOUND );
! 	return;
  
      }
+   }
  }
  
  /**
   * Given a Java environment and an instance of a volume, gets the object and
   * field information for the volume object from the Java environment.
   */
! void internal_getVolumeClass( JNIEnv *env, jobject volume ) {
!   if( volumeCls == 0 ) {
!     volumeCls = (*env)->NewGlobalRef( env, 
! 				      (*env)->GetObjectClass(env, volume) );
!     if( !volumeCls ) {
! 	throwAFSException( env, JAFSADMCLASSNOTFOUND );
! 	return;
!     }
!     volume_nameField = (*env)->GetFieldID( env, volumeCls, "name", 
! 					   "Ljava/lang/String;" );
!     volume_cachedInfoField = (*env)->GetFieldID( env, volumeCls, "cachedInfo", 
! 						 "Z" );
!     volume_idField = (*env)->GetFieldID( env, volumeCls, "id", "I" );
!     volume_readWriteIdField = (*env)->GetFieldID( env, volumeCls, 
! 						  "readWriteID", "I" );
!     volume_readOnlyIdField = (*env)->GetFieldID( env, volumeCls, "readOnlyID", 
! 						 "I" );
!     volume_backupIdField = (*env)->GetFieldID( env, volumeCls, "backupID", 
! 					       "I" );
!     volume_creationDateField = (*env)->GetFieldID( env, volumeCls, 
! 						   "creationDate", "J" );
!     volume_lastAccessDateField = (*env)->GetFieldID( env, volumeCls, 
! 						     "lastAccessDate", "J" );
!     volume_lastUpdateDateField = (*env)->GetFieldID( env, volumeCls, 
! 						     "lastUpdateDate", "J" );
!     volume_lastBackupDateField = (*env)->GetFieldID( env, volumeCls, 
! 						     "lastBackupDate", "J" );
!     volume_copyCreationDateField = (*env)->GetFieldID( env, volumeCls, 
! 						       "copyCreationDate", 
! 						       "J" );
!     volume_accessesSinceMidnightField = (*env)->GetFieldID( env, volumeCls, 
! 						       "accessesSinceMidnight",
! 							    "I" );
!     volume_fileCountField = (*env)->GetFieldID( env, volumeCls, "fileCount", 
! 						"I" );
!     volume_maxQuotaField = (*env)->GetFieldID( env, volumeCls, "maxQuota", 
! 					       "I" );
!     volume_currentSizeField = (*env)->GetFieldID( env, volumeCls, 
! 						  "currentSize", "I" );
!     volume_statusField = (*env)->GetFieldID( env, volumeCls, "status", "I" );
!     volume_dispositionField = (*env)->GetFieldID( env, volumeCls, 
! 						  "disposition", "I" );
!     volume_typeField = (*env)->GetFieldID( env, volumeCls, "type", "I" );
!     if( !volume_nameField || !volume_cachedInfoField || !volume_idField || 
! 	!volume_readWriteIdField || !volume_readOnlyIdField || 
! 	!volume_backupIdField || !volume_creationDateField || 
! 	!volume_lastAccessDateField || !volume_lastUpdateDateField || 
! 	!volume_lastBackupDateField || !volume_copyCreationDateField || 
! 	!volume_accessesSinceMidnightField || !volume_fileCountField || 
! 	!volume_maxQuotaField || !volume_currentSizeField || 
! 	!volume_statusField || !volume_dispositionField || 
! 	!volume_typeField ) {
  
! 	throwAFSException( env, JAFSADMFIELDNOTFOUND );
! 	return;
  
      }
+   }
  }
  
  /**
   * Given a Java environment and an instance of a key, gets the object and
   * field information for the key object from the Java environment.
   */
! void internal_getKeyClass( JNIEnv *env, jobject key ) {
!   if( keyCls == 0 ) {
!     keyCls = (*env)->NewGlobalRef( env, (*env)->GetObjectClass(env, key) );
!     if( !keyCls ) {
! 	throwAFSException( env, JAFSADMCLASSNOTFOUND );
! 	return;
!     }
!     key_encryptionKeyField = (*env)->GetFieldID( env, keyCls, 
! 						 "encryptionKey", 
! 						 "Ljava/lang/String;" );
!     key_cachedInfoField = (*env)->GetFieldID( env, keyCls, "cachedInfo", "Z" );
!     key_versionField = (*env)->GetFieldID( env, keyCls, "version", "I" );
!     key_lastModDateField = (*env)->GetFieldID( env, keyCls, "lastModDate", 
! 					       "I" );
!     key_lastModMsField = (*env)->GetFieldID( env, keyCls, "lastModMs", "I" );
!     key_checkSumField = (*env)->GetFieldID( env, keyCls, "checkSum", "J" );
!     if( !key_cachedInfoField || !key_versionField || !key_encryptionKeyField 
! 	|| !key_lastModDateField || !key_lastModMsField || 
! 	!key_checkSumField ) {
  
! 	throwAFSException( env, JAFSADMFIELDNOTFOUND );
! 	return;
  
      }
+   }
  }
  
  /**
   * Given a Java environment and an instance of a process, gets the object and
   * field information for the process object from the Java environment.
   */
! void internal_getProcessClass( JNIEnv *env, jobject process ) {
!   if( processCls == 0 ) {
!     processCls = (*env)->NewGlobalRef( env, 
! 				       (*env)->GetObjectClass(env, process) );
!     if( !processCls ) {
! 	throwAFSException( env, JAFSADMCLASSNOTFOUND );
! 	return;
!     }
!     process_cachedInfoField = (*env)->GetFieldID( env, processCls, 
! 						  "cachedInfo", "Z" );
!     process_nameField = (*env)->GetFieldID( env, processCls, "name", 
! 					    "Ljava/lang/String;" );
!     process_typeField = (*env)->GetFieldID( env, processCls, "type", "I" );
!     process_stateField = (*env)->GetFieldID( env, processCls, "state", "I" );
!     process_goalField = (*env)->GetFieldID( env, processCls, "goal", "I" );
!     process_startTimeField = (*env)->GetFieldID( env, processCls, "startTime", 
! 						 "J" ); 
!     process_numberStartsField = (*env)->GetFieldID( env, processCls, 
! 						    "numberStarts", "J" ); 
!     process_exitTimeField = (*env)->GetFieldID( env, processCls, "exitTime", 
! 						"J" ); 
!     process_exitErrorTimeField = (*env)->GetFieldID( env, processCls, 
! 						     "exitErrorTime", "J" ); 
!     process_errorCodeField = (*env)->GetFieldID( env, processCls, "errorCode", 
! 						 "J" ); 
!     process_errorSignalField = (*env)->GetFieldID( env, processCls, 
! 						   "errorSignal", "J" ); 
!     process_stateOkField = (*env)->GetFieldID( env, processCls, "stateOk", 
! 					       "Z" ); 
!     process_stateTooManyErrorsField = (*env)->GetFieldID( env, processCls, 
! 							  "stateTooManyErrors",
! 							  "Z" ); 
!     process_stateBadFileAccessField = (*env)->GetFieldID( env, processCls, 
! 							  "stateBadFileAccess",
! 							  "Z" ); 
!     if( !process_cachedInfoField || !process_nameField || !process_typeField 
! 	|| !process_stateField || !process_goalField || 
! 	!process_startTimeField || !process_numberStartsField || 
! 	!process_exitTimeField || !process_exitErrorTimeField || 
! 	!process_errorCodeField || !process_errorSignalField || 
! 	!process_stateOkField || !process_stateTooManyErrorsField || 
! 	!process_stateBadFileAccessField ) {
  
! 	throwAFSException( env, JAFSADMFIELDNOTFOUND );
! 	return;
  
      }
+   }
  }
  
  #endif /* LIBJUAFS */
+ 
+ 
Index: openafs/src/JAVA/libjafs/Internal.h
diff -c openafs/src/JAVA/libjafs/Internal.h:1.3 openafs/src/JAVA/libjafs/Internal.h:1.3.2.1
*** openafs/src/JAVA/libjafs/Internal.h:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/Internal.h	Fri Oct 14 22:14:12 2005
***************
*** 4,80 ****
  #include <jni.h>
  #include "Exceptions.h"
  
- /** 
-  * ERROR CODES
-  *
-  * Please add any internal error codes to the ErrorMessages.properties
-  * file located in src/JAVA/classes/
-  */
- #define JAFSADMNOMEM          1050	// Memory problems
- #define JAFSADMCLASSNOTFOUND  1051	// Trouble finding a Java class
- #define JAFSADMMETHODNOTFOUND 1052	// Trouble finding a Java method
- #define JAFSADMFIELDNOTFOUND  1053	// Trouble finding a Java field
- #define JAFSNULLARG           1054	// Null argument (general)
- #define JAFSNULLUSER          1055	// User argument null
- #define JAFSNULLPASS          1056	// Password argument null
- #define JAFSNULLGROUP         1057	// Group name argument null
- #define JAFSNULLOWNER         1058	// Group owner name argument null
- #define JAFSNULLVOLUME        1059	// Volume name argument null
- #define JAFSNULLPART          1060	// Partition name argument null
- #define JAFSNULLPROCESS       1061	// Process name argument null
- #define JAFSNULLSERVER        1062	// Server name argument null
- #define JAFSNULLCELL          1063	// Cell name argument null
- #define JAFSNULLPATH          1064	// Path argument null
- #define JAFSNULLACL           1065	// ACL string argument null
- 
  #ifndef LIBJUAFS
  #include <afs_Admin.h>
  #include <afs_kasAdmin.h>
  
  // make an identity out of a full name (possibly including an instance ) 
! void internal_makeKasIdentity(const char *fullName, kas_identity_p who);
  
! void internal_getUserClass(JNIEnv * env, jobject user);
! void internal_getGroupClass(JNIEnv * env, jobject group);
! void internal_getServerClass(JNIEnv * env, jobject server);
! void internal_getPartitionClass(JNIEnv * env, jobject partition);
! void internal_getVolumeClass(JNIEnv * env, jobject volume);
! void internal_getKeyClass(JNIEnv * env, jobject key);
! void internal_getProcessClass(JNIEnv * env, jobject process);
  #else
! int openAFSFile(JNIEnv * env, jstring fileNameUTF, int flags, int mode,
! 		int *err);
  int readCacheParms(char *afsMountPoint, char *afsConfDir, char *afsCacheDir,
! 		   int *cacheBlocks, int *cacheFiles, int *cacheStatEntries,
! 		   int *dCacheSize, int *vCacheSize, int *chunkSize,
! 		   int *closeSynch, int *debug, int *nDaemons,
! 		   int *cacheFlags, char *logFile);
  #endif /* !LIBJUAFS */
  
  // throw a non-AFS exception with a message
! void throwMessageException(JNIEnv * env, char *msg);
  
  // throw an AFS exception with a message
! void throwAFSException(JNIEnv * env, int code);
  
  // throw an AFS Admin exception with a message
! void throwAFSException(JNIEnv * env, int code);
  
  // throw an AFS File or I/O related exception with a message
! void throwFileAdminException(JNIEnv * env, int code, char *msg);
  
  // throw an AFS Security exception with a message
! void throwAFSSecurityException(JNIEnv * env, int code);
  
  // throw an exception with an error code
! void throwException(JNIEnv * env, jclass * excCls, char *excClsName,
! 		    jmethodID * initID, int code);
  
  // reclaim global memory used by exceptions 
! void reclaimExceptionMemory(JNIEnv * env, jclass cls);
  
! int setError(JNIEnv * env, jobject * obj, int code);
! int setString(JNIEnv * env, jobject * obj, char *field, char *string);
! char *getNativeString(JNIEnv * env, jstring jstr);
  
  #endif
--- 4,63 ----
  #include <jni.h>
  #include "Exceptions.h"
  
  #ifndef LIBJUAFS
  #include <afs_Admin.h>
  #include <afs_kasAdmin.h>
  
+ // error codes
+ #define JAFSADMNOMEM 1050             // Memory problems
+ #define JAFSADMCLASSNOTFOUND  1051    // Trouble finding a Java class
+ #define JAFSADMMETHODNOTFOUND 1052    // Trouble finding a Java method
+ #define JAFSADMFIELDNOTFOUND  1053    // Trouble finding a Java field
+ 
  // make an identity out of a full name (possibly including an instance ) 
! void internal_makeKasIdentity( const char *fullName, kas_identity_p who );
  
! void internal_getUserClass( JNIEnv *env, jobject user );
! void internal_getGroupClass( JNIEnv *env, jobject group );
! void internal_getServerClass( JNIEnv *env, jobject server );
! void internal_getPartitionClass( JNIEnv *env, jobject partition );
! void internal_getVolumeClass( JNIEnv *env, jobject volume );
! void internal_getKeyClass( JNIEnv *env, jobject key );
! void internal_getProcessClass( JNIEnv *env, jobject process );
  #else
! int openAFSFile(JNIEnv *env, jstring fileNameUTF, int flags, int mode, int *err);
  int readCacheParms(char *afsMountPoint, char *afsConfDir, char *afsCacheDir,
!                    int *cacheBlocks, int *cacheFiles, int *cacheStatEntries,
!                    int *dCacheSize, int *vCacheSize, int *chunkSize,
!                    int *closeSynch, int *debug, int *nDaemons, int *cacheFlags,
!                    char *logFile);
  #endif /* !LIBJUAFS */
  
  // throw a non-AFS exception with a message
! void throwMessageException( JNIEnv *env, char *msg );
  
  // throw an AFS exception with a message
! void throwAFSException( JNIEnv *env, int code );
  
  // throw an AFS Admin exception with a message
! void throwAFSException( JNIEnv *env, int code );
  
  // throw an AFS File or I/O related exception with a message
! void throwFileAdminException( JNIEnv *env, int code, char *msg );
  
  // throw an AFS Security exception with a message
! void throwAFSSecurityException( JNIEnv *env, int code );
  
  // throw an exception with an error code
! void throwException( JNIEnv *env, jclass *excCls, char *excClsName, jmethodID *initID, int code );
  
  // reclaim global memory used by exceptions 
! void reclaimExceptionMemory( JNIEnv *env, jclass cls );
  
! int setError(JNIEnv *env, jobject *obj, int code);
! int setString(JNIEnv *env, jobject *obj, char *field, char *string);
  
  #endif
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/JAFS_Version.h
diff -c /dev/null openafs/src/JAVA/libjafs/JAFS_Version.h:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:20 2006
--- openafs/src/JAVA/libjafs/JAFS_Version.h	Fri Oct 14 22:14:12 2005
***************
*** 0 ****
--- 1,10 ----
+ #ifndef __JAFS_VERSION_H_1234__
+ #define __JAFS_VERSION_H_1234__
+ 
+ #include "Internal.h"
+ 
+ #define VERSION_LIB_JAVA_OPENAFS "20050928_01"
+ 
+ extern char cml_version_number[]; /* from AFS_component_number.c */
+ 
+ #endif /* __JAFS_VERSION_H_1234__ */
Index: openafs/src/JAVA/libjafs/Key.c
diff -c openafs/src/JAVA/libjafs/Key.c:1.3 openafs/src/JAVA/libjafs/Key.c:1.3.2.1
*** openafs/src/JAVA/libjafs/Key.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/Key.c	Fri Oct 14 22:14:12 2005
***************
*** 44,84 ****
   * key      the Key object to populate with the info
   * keyEntry     the container of the key's information
   */
! void
! fillKeyInfo(JNIEnv * env, jobject key, bos_KeyInfo_t keyEntry)
  {
!     jstring jencryptionKey;
!     char *convertedKey;
!     int i;
! 
!     // get the class fields if need be
!     if (keyCls == 0) {
! 	internal_getKeyClass(env, key);
!     }
!     // set all the fields
!     (*env)->SetIntField(env, key, key_versionField,
! 			keyEntry.keyVersionNumber);
! 
!     convertedKey =
! 	(char *)malloc(sizeof(char *) * (sizeof(keyEntry.key.key) * 4 + 1));
!     if (!convertedKey) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
!     for (i = 0; i < sizeof(keyEntry.key.key); i++) {
! 	sprintf(&(convertedKey[i * 4]), "\\%0.3o", keyEntry.key.key[i]);
!     }
!     jencryptionKey = (*env)->NewStringUTF(env, convertedKey);
!     (*env)->SetObjectField(env, key, key_encryptionKeyField, jencryptionKey);
  
!     (*env)->SetIntField(env, key, key_lastModDateField,
! 			keyEntry.keyStatus.lastModificationDate);
!     (*env)->SetIntField(env, key, key_lastModMsField,
! 			keyEntry.keyStatus.lastModificationMicroSeconds);
!     (*env)->SetLongField(env, key, key_checkSumField,
! 			 (unsigned int)keyEntry.keyStatus.checkSum);
! 
!     free(convertedKey);
  }
  
  /**
--- 44,83 ----
   * key      the Key object to populate with the info
   * keyEntry     the container of the key's information
   */
! void fillKeyInfo( JNIEnv *env, jobject key, bos_KeyInfo_t keyEntry )
  {
!   jstring jencryptionKey;
!   char *convertedKey;
!   int i;
! 
!   // get the class fields if need be
!   if( keyCls == 0 ) {
!     internal_getKeyClass( env, key );
!   }
! 
!   // set all the fields
!   (*env)->SetIntField( env, key, key_versionField, keyEntry.keyVersionNumber );
!   
!   convertedKey = (char *) malloc( sizeof(char *)*
! 				  (sizeof(keyEntry.key.key)*4+1) );
!   if( !convertedKey ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
!   for( i = 0; i < sizeof(keyEntry.key.key); i++ ) {
!     sprintf( &(convertedKey[i*4]), "\\%0.3o", keyEntry.key.key[i] );
!   }
!   jencryptionKey = (*env)->NewStringUTF(env, convertedKey);
!   (*env)->SetObjectField( env, key, key_encryptionKeyField, jencryptionKey );
!   
!   (*env)->SetIntField( env, key, key_lastModDateField, 
! 		       keyEntry.keyStatus.lastModificationDate );
!   (*env)->SetIntField( env, key, key_lastModMsField, 
! 		       keyEntry.keyStatus.lastModificationMicroSeconds );
!   (*env)->SetLongField( env, key, key_checkSumField, 
! 			(unsigned int) keyEntry.keyStatus.checkSum );
  
!   free( convertedKey );
  }
  
  /**
***************
*** 92,147 ****
   * key     the Key object in which to fill in the 
   *                information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Key_getKeyInfo(JNIEnv * env, jclass cls,
! 				     jint serverHandle, jint version,
! 				     jobject key)
  {
!     afs_status_t ast;
!     bos_KeyInfo_t keyEntry;
!     void *iterationId;
!     int done;
! 
!     if (!bos_KeyGetBegin((void *)serverHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
! 
!     done = FALSE;
! 
!     // there's no KeyGet function, so we must iterate and find the 
!     // one with the matching version
!     while (!done) {
! 
! 	if (!bos_KeyGetNext(iterationId, &keyEntry, &ast)) {
! 	    // no matching key
! 	    if (ast == ADMITERATORDONE) {
! 		afs_status_t astnew;
! 		if (!bos_KeyGetDone(iterationId, &astnew)) {
! 		    throwAFSException(env, astnew);
! 		    return;
! 		}
! 		throwAFSException(env, KAUNKNOWNKEY);
! 		return;
! 		// other
! 	    } else {
! 		throwAFSException(env, ast);
! 		return;
! 	    }
! 	}
! 
! 	if (keyEntry.keyVersionNumber == version) {
! 	    done = TRUE;
! 	}
! 
!     }
! 
!     fillKeyInfo(env, key, keyEntry);
! 
!     if (!bos_KeyGetDone(iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
  }
  
--- 91,145 ----
   * key     the Key object in which to fill in the 
   *                information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Key_getKeyInfo
!   (JNIEnv *env, jclass cls, jlong serverHandle, jint version, jobject key)
  {
!   afs_status_t ast;
!   bos_KeyInfo_t keyEntry;
!   void *iterationId;
!   int done;
! 
!   if( !bos_KeyGetBegin( (void *) serverHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   done = FALSE;
! 
!   // there's no KeyGet function, so we must iterate and find the 
!   // one with the matching version
!   while( !done ) {
! 
!     if( !bos_KeyGetNext( iterationId, &keyEntry, &ast ) ) {
!       // no matching key
!       if( ast == ADMITERATORDONE ) {
!         afs_status_t astnew;
!         if( !bos_KeyGetDone( iterationId, &astnew ) ) {
!           throwAFSException( env, astnew );
!           return;
!         }
!         throwAFSException( env, KAUNKNOWNKEY );
!         return;
!         // other
!       } else {
!         throwAFSException( env, ast );
!         return;
!       }
!     }
! 
!     if( keyEntry.keyVersionNumber == version ) {
!       done = TRUE;
!     }
! 
!   }
! 
!   fillKeyInfo( env, key, keyEntry );
! 
!   if( !bos_KeyGetDone( iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
***************
*** 157,216 ****
   * jkeyString     the String version of the key that will
   *                      be encrypted
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Key_create(JNIEnv * env, jclass cls, jint cellHandle,
! 				 jint serverHandle, jint version,
! 				 jstring jkeyString)
  {
      afs_status_t ast;
!     char *keyString;
      char *cellName;
!     kas_encryptionKey_p key =
! 	(kas_encryptionKey_p) malloc(sizeof(kas_encryptionKey_t));
! 
!     if (!key) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
      }
  
!     if (jkeyString != NULL) {
! 	keyString = getNativeString(env, jkeyString);
! 	if (keyString == NULL) {
! 	    free(key);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
      } else {
! 	keyString = NULL;
      }
  
!     if (!afsclient_CellNameGet((void *)cellHandle, &cellName, &ast)) {
! 	free(key);
! 	if (keyString != NULL)
! 	    free(keyString);
! 	throwAFSException(env, ast);
  	return;
!     }
  
!     if (!kas_StringToKey(cellName, keyString, key, &ast)) {
! 	free(key);
! 	if (keyString != NULL)
! 	    free(keyString);
! 	throwAFSException(env, ast);
  	return;
      }
  
!     if (!bos_KeyCreate((void *)serverHandle, version, key, &ast)) {
! 	free(key);
! 	if (keyString != NULL)
! 	    free(keyString);
! 	throwAFSException(env, ast);
  	return;
      }
  
!     free(key);
!     if (keyString != NULL)
! 	free(keyString);
  }
  
  /**
--- 155,217 ----
   * jkeyString     the String version of the key that will
   *                      be encrypted
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Key_create
!   (JNIEnv *env, jclass cls, jlong cellHandle, jlong serverHandle, jint version, 
!    jstring jkeyString)
  {
      afs_status_t ast;
!     const char *keyString;
      char *cellName;
!     kas_encryptionKey_p key = 
!       (kas_encryptionKey_p) malloc( sizeof(kas_encryptionKey_t) );
!     
!     if( !key ) {
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
      }
  
!     if( jkeyString != NULL ) {
!       keyString = (*env)->GetStringUTFChars(env, jkeyString, 0);
!       if( !keyString ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
      } else {
!       keyString = NULL;
      }
  
!     if( !afsclient_CellNameGet( (void *) cellHandle, &cellName, &ast ) ) {
! 	free( key );
! 	if( keyString != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jkeyString, keyString);
! 	}
! 	throwAFSException( env, ast );
  	return;
!     }   
  
!     if( !kas_StringToKey( cellName, keyString, key, &ast ) ) {
! 	free( key );
! 	if( keyString != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jkeyString, keyString);
! 	}
! 	throwAFSException( env, ast );
  	return;
      }
  
!     if( !bos_KeyCreate( (void *) serverHandle, version, key, &ast ) ) {
! 	free( key );
! 	if( keyString != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jkeyString, keyString);
! 	}
! 	throwAFSException( env, ast );
  	return;
      }
  
!     free( key );
!     if( keyString != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jkeyString, keyString);
!     }
  }
  
  /**
***************
*** 221,244 ****
   * serverHandle  the bos handle of the server to which the key belongs
   * versionNumber   the version number of the key to remove (0 to 255)
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Key_delete(JNIEnv * env, jclass cls, jint serverHandle,
! 				 jint version)
  {
      afs_status_t ast;
  
!     if (!bos_KeyDelete((void *)serverHandle, version, &ast)) {
! 	throwAFSException(env, ast);
  	return;
      }
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Key_reclaimKeyMemory(JNIEnv * env, jclass cls)
  {
!     if (keyCls) {
! 	(*env)->DeleteGlobalRef(env, keyCls);
! 	keyCls = 0;
!     }
  }
--- 222,249 ----
   * serverHandle  the bos handle of the server to which the key belongs
   * versionNumber   the version number of the key to remove (0 to 255)
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Key_delete
!   (JNIEnv *env, jclass cls, jlong serverHandle, jint version )
  {
      afs_status_t ast;
  
!     if( !bos_KeyDelete( (void *) serverHandle, version, &ast ) ) {
! 	throwAFSException( env, ast );
  	return;
      }
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Key_reclaimKeyMemory (JNIEnv *env, jclass cls)
  {
!   if( keyCls ) {
!       (*env)->DeleteGlobalRef(env, keyCls);
!       keyCls = 0;
!   }
  }
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/Makefile.in
diff -c openafs/src/JAVA/libjafs/Makefile.in:1.3 openafs/src/JAVA/libjafs/Makefile.in:1.3.2.1
*** openafs/src/JAVA/libjafs/Makefile.in:1.3	Thu Jun 19 12:53:15 2003
--- openafs/src/JAVA/libjafs/Makefile.in	Fri Oct 14 22:14:12 2005
***************
*** 5,17 ****
  # License.  For details, see the LICENSE file in the top-level source
  # directory or online at http://www.openafs.org/dl/license10.html
  
  DEST=@DEST@
  TOP_SRCDIR=@TOP_SRCDIR@
  TOP_INCDIR=@TOP_INCDIR@
  TOP_LIBDIR=@TOP_LIBDIR@
! TOP_JLIBDIR=@TOP_JLIBDIR@
! JAVA_HOME=@JAVA_HOME@
! JNI_INC=@JNI_INC@
  prefix=@prefix@
  exec_prefix=@exec_prefix@
  bindir=@bindir@
--- 5,19 ----
  # License.  For details, see the LICENSE file in the top-level source
  # directory or online at http://www.openafs.org/dl/license10.html
  
+ include ../../config/Makefile.config
+ #${SYS_NAME}
+ 
  DEST=@DEST@
  TOP_SRCDIR=@TOP_SRCDIR@
  TOP_INCDIR=@TOP_INCDIR@
  TOP_LIBDIR=@TOP_LIBDIR@
! TOP_JLIBDIR=@TOP_SRCDIR@/JAVA/libjafs
! JNI_INC=${JAVA_HOME}/include
  prefix=@prefix@
  exec_prefix=@exec_prefix@
  bindir=@bindir@
***************
*** 27,62 ****
  RXGEN=${TOP_SRCDIR}/rxgen/rxgen
  SYS_NAME=@AFS_SYSNAME@
  
- include ../../config/Makefile.${SYS_NAME}
  
  CC = ${MT_CC}
! SHARED_FLAGS = -shared
  OBJECT_FLAGS = -fPIC -c
  
  ifeq "$(BUILD_TYPE)" "admin"
! 	INC := -I${TOP_INCDIR} -I${TOP_INCDIR}/afs/ ${JNI_INC}
  	CFLAGS := ${INC} ${DBG} ${OPTMZ} -I${TOP_SRCDIR}/config ${MT_CFLAGS}
  else
! 	INC := -I${TOP_SRCDIR}/libuafs -I${TOP_INCDIR} -I${TOP_SRCDIR} ${JNI_INC}
  	CFLAGS := ${INC} ${DBG} ${OPTMZ} ${FSINCLUDES} -D_REENTRANT -DLIBJUAFS ${MT_CFLAGS}
  endif
  
- ifeq "$(INCREMENT_BUILD)" "false"
- 	INCREMENT_CMD :=
- else
- 	INCREMENT_CMD := ${RM} -f ${LIBJAFSADMDIR}VersionInfo.o; perl buildinfo.pl ${LIBJAFSADMDIR}VersionInfo.h -i;
- endif
  
  LIBJAFSADMDIR = ./
  ROOTPACKAGEDIR = ../classes
  RELPACKAGEDIR = org/openafs/jafs/
  PACKAGEDIR = ${ROOTPACKAGEDIR}/${RELPACKAGEDIR}
! JAVADOCSDIR = ../javadocs/
! BUILD_VERSION = `perl buildinfo.pl ${LIBJAFSADMDIR}VersionInfo.h -version`
  
  JAVAH = ${JAVA_HOME}/bin/javah -classpath ${ROOTPACKAGEDIR} -jni -d ${LIBJAFSADMDIR}
  JAVAC = ${JAVA_HOME}/bin/javac -classpath ${ROOTPACKAGEDIR}
- JAVADOC = ${JAVA_HOME}/bin/javadoc
  
  J_NATIVE_PREFIX = org.openafs.jafs.
  C_NATIVE_PREFIX = org_openafs_jafs_
--- 29,56 ----
  RXGEN=${TOP_SRCDIR}/rxgen/rxgen
  SYS_NAME=@AFS_SYSNAME@
  
  
  CC = ${MT_CC}
! SHARED_FLAGS = -shared -Xlinker -Bsymbolic
  OBJECT_FLAGS = -fPIC -c
  
  ifeq "$(BUILD_TYPE)" "admin"
! 	INC := -I${TOP_INCDIR} -I${TOP_INCDIR}/afs/ -I${JAVA_HOME}/include -I ${JNI_INC}
  	CFLAGS := ${INC} ${DBG} ${OPTMZ} -I${TOP_SRCDIR}/config ${MT_CFLAGS}
  else
! 	INC := -I${TOP_SRCDIR}/libuafs -I${TOP_INCDIR} -I${JAVA_HOME}/include -I ${JNI_INC}
  	CFLAGS := ${INC} ${DBG} ${OPTMZ} ${FSINCLUDES} -D_REENTRANT -DLIBJUAFS ${MT_CFLAGS}
  endif
  
  
  LIBJAFSADMDIR = ./
  ROOTPACKAGEDIR = ../classes
  RELPACKAGEDIR = org/openafs/jafs/
  PACKAGEDIR = ${ROOTPACKAGEDIR}/${RELPACKAGEDIR}
! JAVADOCSDIR = javadocs/
  
  JAVAH = ${JAVA_HOME}/bin/javah -classpath ${ROOTPACKAGEDIR} -jni -d ${LIBJAFSADMDIR}
  JAVAC = ${JAVA_HOME}/bin/javac -classpath ${ROOTPACKAGEDIR}
  
  J_NATIVE_PREFIX = org.openafs.jafs.
  C_NATIVE_PREFIX = org_openafs_jafs_
***************
*** 77,95 ****
  	${PACKAGEDIR}Server.class \
  	${PACKAGEDIR}Token.class \
  	${PACKAGEDIR}User.class \
! 	${PACKAGEDIR}VersionInfo.class \
! 	${PACKAGEDIR}Volume.class
  
  LIBJAFS_OBJS =\
! 	${LIBJAFSADMDIR}ACL.o \
  	${LIBJAFSADMDIR}File.o \
  	${LIBJAFSADMDIR}FileInputStream.o \
  	${LIBJAFSADMDIR}FileOutputStream.o \
  	${LIBJAFSADMDIR}Internal.o \
  	${LIBJAFSADMDIR}UserToken.o \
! 	${LIBJAFSADMDIR}VersionInfo.o
  
  LIBJAFSADM_OBJS =\
  	${LIBJAFSADMDIR}AdminToken.o \
  	${LIBJAFSADMDIR}Cell.o \
  	${LIBJAFSADMDIR}Group.o \
--- 71,117 ----
  	${PACKAGEDIR}Server.class \
  	${PACKAGEDIR}Token.class \
  	${PACKAGEDIR}User.class \
! 	${PACKAGEDIR}Volume.class \
! 	${PACKAGEDIR}VersionInfo.class
  
+ ifeq (${SYS_NAME}, ppc64_linux26)
+ LIBJAFS_OBJS =
+ else
+ ifeq (${SYS_NAME}, s390x_linux26)
+ LIBJAFS_OBJS =
+ else
  LIBJAFS_OBJS =\
!         ${LIBJAFSADMDIR}GetNativeString.o \
!         ${LIBJAFSADMDIR}ACL.o
! endif
! endif
! 
! LIBJAFS_OBJS +=\
  	${LIBJAFSADMDIR}File.o \
  	${LIBJAFSADMDIR}FileInputStream.o \
  	${LIBJAFSADMDIR}FileOutputStream.o \
  	${LIBJAFSADMDIR}Internal.o \
  	${LIBJAFSADMDIR}UserToken.o \
! 	${LIBJAFSADMDIR}VersionInfo.o \
! 	${TOP_SRCDIR}/libuafs/UAFS/AFS_component_version_number.o \
! 	${TOP_SRCDIR}/libuafs/UAFS/xdr_int32.o \
!         ${TOP_SRCDIR}/util/rxkstats.o
  
+ ifeq (${SYS_NAME}, ppc64_linux26)
+ LIBJAFSADM_OBJS =\
+         ${LIBJAFSADMDIR}GetNativeString.o \
+         ${LIBJAFSADMDIR}ACL.o
+ else
+ ifeq (${SYS_NAME}, s390x_linux26)
  LIBJAFSADM_OBJS =\
+         ${LIBJAFSADMDIR}GetNativeString.o \
+         ${LIBJAFSADMDIR}ACL.o
+ else
+ LIBJAFSADM_OBJS =
+ endif
+ endif
+ 
+ LIBJAFSADM_OBJS +=\
  	${LIBJAFSADMDIR}AdminToken.o \
  	${LIBJAFSADMDIR}Cell.o \
  	${LIBJAFSADMDIR}Group.o \
***************
*** 99,105 ****
  	${LIBJAFSADMDIR}Process.o \
  	${LIBJAFSADMDIR}Server.o \
  	${LIBJAFSADMDIR}User.o \
! 	${LIBJAFSADMDIR}VersionInfo.o \
  	${LIBJAFSADMDIR}Volume.o
  
  CORRELATING_SOURCE_FILES =\
--- 121,128 ----
  	${LIBJAFSADMDIR}Process.o \
  	${LIBJAFSADMDIR}Server.o \
  	${LIBJAFSADMDIR}User.o \
! 	${LIBJAFSADMDIR}Version2.o \
! 	${TOP_SRCDIR}/libuafs/UAFS/AFS_component_version_number.o \
  	${LIBJAFSADMDIR}Volume.o
  
  CORRELATING_SOURCE_FILES =\
***************
*** 114,121 ****
  	${LIBJAFSADMDIR}Process.c \
  	${LIBJAFSADMDIR}Server.c \
  	${LIBJAFSADMDIR}User.c \
! 	${LIBJAFSADMDIR}VersionInfo.c \
! 	${LIBJAFSADMDIR}Volume.c
  
  JAVA_HEADERS = ${PACKAGE:${PACKAGEDIR}%.class=${C_NATIVE_PREFIX}%.h}
  
--- 137,145 ----
  	${LIBJAFSADMDIR}Process.c \
  	${LIBJAFSADMDIR}Server.c \
  	${LIBJAFSADMDIR}User.c \
! 	${LIBJAFSADMDIR}Volume.c \
! 	${LIBJAFSADMDIR}VersionInfo.c
! 
  
  JAVA_HEADERS = ${PACKAGE:${PACKAGEDIR}%.class=${C_NATIVE_PREFIX}%.h}
  
***************
*** 151,157 ****
  
  JARFILE = jafs.jar
  
! all:  ${TOP_JLIBDIR} libjafs libjafsadm ${PACKAGE} jar
  
  install:  all ${DESTDIR}${libdir}/libjafs.so ${DESTDIR}${libdir}/libjafsadm.so ${PACKAGE} install_jar
  	if [ ! -e /usr/afswsp ]; then \
--- 175,181 ----
  
  JARFILE = jafs.jar
  
! all:  ${TOP_JLIBDIR} libjafs libjafsadm ${PACKAGE} all_jar
  
  install:  all ${DESTDIR}${libdir}/libjafs.so ${DESTDIR}${libdir}/libjafsadm.so ${PACKAGE} install_jar
  	if [ ! -e /usr/afswsp ]; then \
***************
*** 174,212 ****
  	  ln -s /usr/vice/etc/ThisCell /usr/afswsp/etc/; \
  	fi
  
- ### Clean "C" and Java objects
  clean:
! 	${RM} -f ${PACKAGEDIR}*.class ${LIBJAFSADMDIR}*.o ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}*.h ${LIBJAFSADMDIR}acltest
! 	${RM} -fR ${JAVADOCSDIR}
! 
! ### Clean just "C" objects
! cleanc:
! 	${RM} -f ${LIBJAFSADMDIR}*.o ${LIBJAFSADMDIR}acltest
! 
! increment-build:
! 	${INCREMENT_CMD} \
!         export INCREMENT_BUILD=false;
  
  setup:	FORCE
  
  ${TOP_JLIBDIR}:
  	mkdir -p $@
  
  FORCE: ;
  
- ############# Test program   ###############################
- 
- acltest: ${LIBJAFSADMDIR}/acltest.c
- 	${CC} ${CFLAGS} -o $@ $^ ${LIBJAFS_LIBS}
- 
  ############# Shared library ###############################
  
! libjafs: setup increment-build
  	${RM} -f ${LIBJAFSADMDIR}Internal.o; \
  	export BUILD_TYPE=user; \
  	${MAKE} ${TOP_LIBDIR}/libjafs.so
  
! libjafsadm: increment-build
  	${RM} -f ${LIBJAFSADMDIR}Internal.o; \
  	export BUILD_TYPE=admin; \
  	${MAKE} ${TOP_LIBDIR}/libjafsadm.so
--- 198,224 ----
  	  ln -s /usr/vice/etc/ThisCell /usr/afswsp/etc/; \
  	fi
  
  clean:
! 	${RM} -f ${PACKAGEDIR}*.class ${LIBJAFSADMDIR}*.o ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}*.h
  
  setup:	FORCE
+ 	if [ ! -e ./h ]; then \
+ 	  ln -s /usr/include/sys h; \
+ 	fi; \
  
  ${TOP_JLIBDIR}:
  	mkdir -p $@
  
  FORCE: ;
  
  ############# Shared library ###############################
  
! libjafs: setup
  	${RM} -f ${LIBJAFSADMDIR}Internal.o; \
  	export BUILD_TYPE=user; \
  	${MAKE} ${TOP_LIBDIR}/libjafs.so
  
! libjafsadm:
  	${RM} -f ${LIBJAFSADMDIR}Internal.o; \
  	export BUILD_TYPE=admin; \
  	${MAKE} ${TOP_LIBDIR}/libjafsadm.so
***************
*** 214,220 ****
  ${TOP_LIBDIR}/libjafs.so: ${LIBJAFS_OBJS}
  	${CC} ${CFLAGS} ${SHARED_FLAGS} -o $@ $^ ${LIBJAFS_LIBS}
  
! ${DESTDIR}${libdir}/libjafs.so: ${LIBJAFS_OBJS}
  	${CC} ${CFLAGS} ${SHARED_FLAGS} -o $@ $^ ${LIBJAFS_LIBS}
  
  ${TOP_LIBDIR}/libjafsadm.so: ${LIBJAFSADM_OBJS}
--- 226,232 ----
  ${TOP_LIBDIR}/libjafs.so: ${LIBJAFS_OBJS}
  	${CC} ${CFLAGS} ${SHARED_FLAGS} -o $@ $^ ${LIBJAFS_LIBS}
  
! ${DESTDIR}${libdir}/libjafs.so: ${LIBJAFS_OBJS}192.168.13.10
  	${CC} ${CFLAGS} ${SHARED_FLAGS} -o $@ $^ ${LIBJAFS_LIBS}
  
  ${TOP_LIBDIR}/libjafsadm.so: ${LIBJAFSADM_OBJS}
***************
*** 230,244 ****
  
  ############## C files #####################################
  
! ${CORRELATING_SOURCE_FILES}: ${LIBJAFSADMDIR}%.c: ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}%.h ${LIBJAFSADMDIR}Internal.h ${LIBJAFSADMDIR}VersionInfo.h
  
  ${LIBJAFSADMDIR}AdminToken.c: ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}Token.h ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}Cell.h
  
  ${LIBJAFSADMDIR}Internal.c: ${LIBJAFSADMDIR}Internal.h
  
! ${LIBJAFSADMDIR}UserToken.c: ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}Token.h
  
! ${LIBJAFSADMDIR}VersionInfo.c: ${LIBJAFSADMDIR}VersionInfo.h ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}VersionInfo.h
  
  ############## Package javac section #########################
  
--- 242,256 ----
  
  ############## C files #####################################
  
! ${CORRELATING_SOURCE_FILES}: ${LIBJAFSADMDIR}%.c: ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}%.h ${LIBJAFSADMDIR}Internal.h
  
  ${LIBJAFSADMDIR}AdminToken.c: ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}Token.h ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}Cell.h
  
  ${LIBJAFSADMDIR}Internal.c: ${LIBJAFSADMDIR}Internal.h
  
! ${LIBJAFSADMDIR}Version2.c: ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}VersionInfo.h ${LIBJAFSADMDIR}JAFS_Version.h
  
! ${LIBJAFSADMDIR}UserToken.c: ${LIBJAFSADMDIR}${C_NATIVE_PREFIX}Token.h
  
  ############## Package javac section #########################
  
***************
*** 250,271 ****
  ${JAVA_HEADERS}: ${C_NATIVE_PREFIX}%.h: ${PACKAGEDIR}%.class
  	${JAVAH} ${J_NATIVE_PREFIX}$*
  
- ############## Javadoc section ###############################
- 
- javadocs:
- 	echo "Preparing Javadoc API documentation..."
- 	${JAVADOC} -version -breakiterator \
- 	-link http://java.sun.com/j2se/1.4/docs/api/ \
- 	-windowtitle "Java AFS API" -header "<B>JAFS API v${BUILD_VERSION}</B>" \
- 	-doctitle "<B>JAFS</B> API v${BUILD_VERSION}" \
- 	-use -d ${JAVADOCSDIR} \
- 	-sourcepath ${ROOTPACKAGEDIR} \
- 	-classpath ${ROOTPACKAGEDIR} \
- 	-package org.openafs.jafs
- 
  ############# JAR file #####################################
  
! jar: clean_jar
  	cd ${ROOTPACKAGEDIR}; ${JAVA_HOME}/bin/jar -cMf ${TOP_JLIBDIR}/${JARFILE} *.properties ${RELPACKAGEDIR}*.class
  
  install_jar: clean_jar
--- 262,270 ----
  ${JAVA_HEADERS}: ${C_NATIVE_PREFIX}%.h: ${PACKAGEDIR}%.class
  	${JAVAH} ${J_NATIVE_PREFIX}$*
  
  ############# JAR file #####################################
  
! all_jar: clean_jar
  	cd ${ROOTPACKAGEDIR}; ${JAVA_HOME}/bin/jar -cMf ${TOP_JLIBDIR}/${JARFILE} *.properties ${RELPACKAGEDIR}*.class
  
  install_jar: clean_jar
***************
*** 274,279 ****
  clean_jar:
  	${RM} -f ${TOP_JLIBDIR}/${JARFILE}
  
! clean_libs:
! 	${RM} -f ${TOP_LIBDIR}/libjafs.so ${TOP_LIBDIR}/libjafsadm.so
  
--- 273,277 ----
  clean_jar:
  	${RM} -f ${TOP_JLIBDIR}/${JARFILE}
  
! 
  
Index: openafs/src/JAVA/libjafs/Partition.c
diff -c openafs/src/JAVA/libjafs/Partition.c:1.3 openafs/src/JAVA/libjafs/Partition.c:1.3.2.1
*** openafs/src/JAVA/libjafs/Partition.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/Partition.c	Fri Oct 14 22:14:12 2005
***************
*** 40,49 ****
  
  //////////////////////////////////////////////////////////
  
! ///// Definition in jafs_Volume.c /////////////////
  
! extern void fillVolumeInfo(JNIEnv * env, jobject volume,
! 			   vos_volumeEntry_t volEntry);
  
  ///////////////////////////////////////////////////
  
--- 40,49 ----
  
  //////////////////////////////////////////////////////////
  
! ///// definition in jafs_Volume.c /////////////////
  
! extern void fillVolumeInfo
!             ( JNIEnv *env, jobject volume, vos_volumeEntry_t volEntry );
  
  ///////////////////////////////////////////////////
  
***************
*** 56,95 ****
   * partition      the Partition object to populate with the info
   * partEntry     the container of the partition's information
   */
! void
! fillPartitionInfo(JNIEnv * env, jobject partition,
! 		  vos_partitionEntry_t partEntry)
! {
!     jstring jdeviceName;
!     jstring jpartition;
!     jint id;
!     afs_status_t ast;
! 
!     // get the class fields if need be
!     if (partitionCls == 0) {
! 	internal_getPartitionClass(env, partition);
!     }
!     // fill name and id in case it's a blank object
!     jpartition = (*env)->NewStringUTF(env, partEntry.name);
!     // get the id
!     if (!vos_PartitionNameToId(partEntry.name, (int *)&id, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
!     (*env)->SetObjectField(env, partition, partition_nameField, jpartition);
!     (*env)->SetIntField(env, partition, partition_idField, id);
! 
!     jdeviceName = (*env)->NewStringUTF(env, partEntry.deviceName);
!     (*env)->SetObjectField(env, partition, partition_deviceNameField,
! 			   jdeviceName);
! 
!     (*env)->SetIntField(env, partition, partition_lockFileDescriptorField,
! 			partEntry.lockFileDescriptor);
!     (*env)->SetIntField(env, partition, partition_totalSpaceField,
! 			partEntry.totalSpace);
!     (*env)->SetIntField(env, partition, partition_totalFreeSpaceField,
! 			partEntry.totalFreeSpace);
! 
  }
  
  /**
--- 56,95 ----
   * partition      the Partition object to populate with the info
   * partEntry     the container of the partition's information
   */
! void fillPartitionInfo
!   (JNIEnv *env, jobject partition, vos_partitionEntry_t partEntry)
! {
!   jstring jdeviceName;
!   jstring jpartition;
!   jint id;
!   afs_status_t ast;
! 
!   // get the class fields if need be
!   if( partitionCls == 0 ) {
!     internal_getPartitionClass( env, partition );
!   }
! 
!   // fill name and id in case it's a blank object
!   jpartition = (*env)->NewStringUTF(env, partEntry.name);
!   // get the id
!   if( !vos_PartitionNameToId( partEntry.name, (int *) &id, &ast ) ) {
!       throwAFSException( env, ast );
!       return;
!   } 
!   (*env)->SetObjectField(env, partition, partition_nameField, jpartition);
!   (*env)->SetIntField(env, partition, partition_idField, id);
! 
!   jdeviceName = (*env)->NewStringUTF(env, partEntry.deviceName);
!   (*env)->SetObjectField(env, partition, partition_deviceNameField, 
! 			 jdeviceName);
! 
!   (*env)->SetIntField(env, partition, partition_lockFileDescriptorField, 
! 		      partEntry.lockFileDescriptor);
!   (*env)->SetIntField(env, partition, partition_totalSpaceField, 
! 		      partEntry.totalSpace);
!   (*env)->SetIntField(env, partition, partition_totalFreeSpaceField, 
! 		      partEntry.totalFreeSpace);
!   
  }
  
  /**
***************
*** 105,129 ****
   * jpartitionObject   the Partition object in which to 
   *                    fill in the information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Partition_getPartitionInfo(JNIEnv * env, jclass cls,
! 						 jint cellHandle,
! 						 jint serverHandle,
! 						 jint partition,
! 						 jobject jpartitionObject)
! {
!     afs_status_t ast;
!     vos_partitionEntry_t partEntry;
! 
!     // get the partition entry
!     if (!vos_PartitionGet
! 	((void *)cellHandle, (void *)serverHandle, NULL,
! 	 (unsigned int)partition, &partEntry, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
!     fillPartitionInfo(env, jpartitionObject, partEntry);
  
  }
  
--- 105,126 ----
   * jpartitionObject   the Partition object in which to 
   *                    fill in the information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Partition_getPartitionInfo
!   (JNIEnv *env, jclass cls, jlong cellHandle, jlong serverHandle, 
!    jint partition, jobject jpartitionObject)
! {
!   afs_status_t ast;
!   vos_partitionEntry_t partEntry;
! 
!   // get the partition entry
!   if ( !vos_PartitionGet( (void *) cellHandle, (void *) serverHandle, NULL, 
! 			  (unsigned int) partition, &partEntry, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   fillPartitionInfo( env, jpartitionObject, partEntry );
  
  }
  
***************
*** 135,168 ****
   * jname  the name of the partition in question
   * returns   the id of the partition in question
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Partition_translateNameToID(JNIEnv * env, jclass cls,
! 						  jstring jname)
! {
!     afs_status_t ast;
!     jint id;
!     char *name;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (name == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return -1;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLPART);
! 	return -1;
!     }
! 
!     // get the id
!     if (!vos_PartitionNameToId(name, (unsigned int *)&id, &ast)) {
! 	id = -1;
! 	throwAFSException(env, ast);
!     }
  
!     free(name);
  
-     return id;
  }
  
  /**
--- 132,170 ----
   * jname  the name of the partition in question
   * returns   the id of the partition in question
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Partition_translateNameToID
!   (JNIEnv *env, jclass cls, jstring jname)
! {
!   afs_status_t ast;
!   jint id;
!   const char *name;
! 
!   if( jname != NULL ) {
!     name = (*env)->GetStringUTFChars(env, jname, 0);
!     if( !name ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     name = NULL;
!   }
! 
!   // get the id
!   if( !vos_PartitionNameToId( name, (unsigned int *) &id, &ast ) ) {
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!     }
!     throwAFSException( env, ast );
!     return -1;
!   } 
! 
!   if( name != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
  
!   return id;
  
  }
  
  /**
***************
*** 173,199 ****
   * id  the id of the partition in question
   * returns   the name of the partition in question
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Partition_translateIDToName(JNIEnv * env, jclass cls,
! 						  jint id)
! {
!     afs_status_t ast;
!     char *name = (char *)malloc(sizeof(char) * VOS_MAX_PARTITION_NAME_LEN);
!     jstring jname = NULL;
! 
!     if (name == NULL) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return NULL;
!     }
!     // get the name
!     if (vos_PartitionIdToName((unsigned int)id, name, &ast)) {
! 	jname = (*env)->NewStringUTF(env, name);
!     } else {
! 	throwAFSException(env, ast);
!     }
      free(name);
  
-     return jname;
  }
  
  /**
--- 175,204 ----
   * id  the id of the partition in question
   * returns   the name of the partition in question
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Partition_translateIDToName
!  (JNIEnv *env, jclass cls, jint id)
! {
!   afs_status_t ast;
!   char *name = (char *) malloc( sizeof(char)*VOS_MAX_PARTITION_NAME_LEN);
!   jstring jname;
! 
!   if( !name ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return NULL;    
!   }
! 
!   // get the name
!   if( !vos_PartitionIdToName( (unsigned int) id, name, &ast ) ) {
      free(name);
+     throwAFSException( env, ast );
+     return NULL;
+   } 
+ 
+   jname = (*env)->NewStringUTF(env, name);
+   free(name);
+   return jname;
  
  }
  
  /**
***************
*** 208,240 ****
   *                    reside
   * returns total number of volumes hosted by this partition
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Partition_getVolumeCount(JNIEnv * env, jclass cls,
! 					       jint cellHandle,
! 					       jint serverHandle,
! 					       jint partition)
! {
!     afs_status_t ast;
!     void *iterationId;
!     vos_volumeEntry_t volEntry;
!     int i = 0;
! 
!     if (!vos_VolumeGetBegin
! 	((void *)cellHandle, (void *)serverHandle, NULL,
! 	 (unsigned int)partition, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     while (vos_VolumeGetNext((void *)iterationId, &volEntry, &ast))
! 	i++;
! 
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     return i;
  }
  
  /**
--- 213,241 ----
   *                    reside
   * returns total number of volumes hosted by this partition
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Partition_getVolumeCount
!  (JNIEnv *env, jclass cls, jlong cellHandle, jlong serverHandle, jint partition)
! {
!   afs_status_t ast;
!   void *iterationId;
!   vos_volumeEntry_t volEntry;
!   int i = 0;
! 
!   if( !vos_VolumeGetBegin( (void *) cellHandle, (void *) serverHandle, NULL, 
! 			   (unsigned int) partition, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   while ( vos_VolumeGetNext( (void *) iterationId, &volEntry, &ast ) ) i++;
! 
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   return i;
  }
  
  /**
***************
*** 251,274 ****
   *                    reside
   * returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Partition_getVolumesBegin(JNIEnv * env, jclass cls,
! 						jint cellHandle,
! 						jint serverHandle,
! 						jint partition)
  {
  
!     afs_status_t ast;
!     void *iterationId;
! 
!     if (!vos_VolumeGetBegin
! 	((void *)cellHandle, (void *)serverHandle, NULL,
! 	 (unsigned int)partition, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     return (jint) iterationId;
  }
  
  /**
--- 252,272 ----
   *                    reside
   * returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Partition_getVolumesBegin
!  (JNIEnv *env, jclass cls, jlong cellHandle, jlong serverHandle, jint partition)
  {
  
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( !vos_VolumeGetBegin( (void *) cellHandle, (void *) serverHandle, NULL, 
! 			   (unsigned int) partition, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jlong) iterationId;
  }
  
  /**
***************
*** 285,321 ****
   *                    reside
   * returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Partition_getVolumesBeginAt(JNIEnv * env, jclass cls,
! 						  jint cellHandle,
! 						  jint serverHandle,
! 						  jint partition, jint index)
! {
! 
!     afs_status_t ast;
!     void *iterationId;
!     vos_volumeEntry_t volEntry;
!     int i;
! 
!     if (!vos_VolumeGetBegin
! 	((void *)cellHandle, (void *)serverHandle, NULL,
! 	 (unsigned int)partition, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
      }
  
!     for (i = 1; i < index; i++) {
! 	if (!vos_VolumeGetNext((void *)iterationId, &volEntry, &ast)) {
! 	    if (ast == ADMITERATORDONE) {
! 		return 0;
! 	    } else {
! 		throwAFSException(env, ast);
! 		return 0;
! 	    }
! 	}
!     }
! 
!     return (jint) iterationId;
  
  }
  
--- 283,317 ----
   *                    reside
   * returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Partition_getVolumesBeginAt
!   (JNIEnv *env, jclass cls, jlong cellHandle, jlong serverHandle,
!    jint partition, jint index)
! {
! 
!   afs_status_t ast;
!   void *iterationId;
!   vos_volumeEntry_t volEntry;
!   int i;
! 
!   if( !vos_VolumeGetBegin( (void *) cellHandle, (void *) serverHandle, NULL, 
! 			   (unsigned int) partition, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   for ( i = 1; i < index; i++) {
!     if( !vos_VolumeGetNext( (void *) iterationId, &volEntry, &ast ) ) {
!       if( ast == ADMITERATORDONE ) {
!         return 0;
!       } else {
!         throwAFSException( env, ast );
!         return 0;
!       }
      }
+   }
  
!   return (jlong) iterationId;
  
  }
  
***************
*** 328,352 ****
   * iterationId   the iteration ID of this iteration
   * returns the name of the next volume of the server
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Partition_getVolumesNextString(JNIEnv * env, jclass cls,
! 						     jint iterationId)
! {
!     afs_status_t ast;
!     jstring jvolume;
!     vos_volumeEntry_t volEntry;
! 
!     if (!vos_VolumeGetNext((void *)iterationId, &volEntry, &ast)) {
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return NULL;
! 	}
      }
  
!     jvolume = (*env)->NewStringUTF(env, volEntry.name);
!     return jvolume;
  
  }
  
--- 324,348 ----
   * iterationId   the iteration ID of this iteration
   * returns the name of the next volume of the server
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Partition_getVolumesNextString
!   (JNIEnv *env, jclass cls, jlong iterationId)
! {
!   afs_status_t ast;
!   jstring jvolume;
!   vos_volumeEntry_t volEntry;
! 
!   if( !vos_VolumeGetNext( (void *) iterationId, &volEntry, &ast ) ) {
!     if( ast == ADMITERATORDONE ) {
!       return NULL;
!     } else {
!       throwAFSException( env, ast );
!       return;
      }
+   }
  
!   jvolume = (*env)->NewStringUTF(env, volEntry.name);
!   return jvolume;
  
  }
  
***************
*** 361,394 ****
   *                         of the next volume
   * returns 0 if there are no more volumes, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Partition_getVolumesNext(JNIEnv * env, jclass cls,
! 					       jint iterationId,
! 					       jobject jvolumeObject)
! {
!     afs_status_t ast;
!     jstring jvolume;
!     vos_volumeEntry_t volEntry;
! 
!     if (!vos_VolumeGetNext((void *)iterationId, &volEntry, &ast)) {
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
      }
  
  
!     fillVolumeInfo(env, jvolumeObject, volEntry);
  
!     // get the class fields if need be
!     if (volumeCls == 0) {
! 	internal_getVolumeClass(env, jvolumeObject);
!     }
!     (*env)->SetBooleanField(env, jvolumeObject, volume_cachedInfoField, TRUE);
! 
!     return 1;
  
  }
  
--- 357,389 ----
   *                         of the next volume
   * returns 0 if there are no more volumes, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Partition_getVolumesNext
!   (JNIEnv *env, jclass cls, jlong iterationId, jobject jvolumeObject)
! {
!   afs_status_t ast;
!   jstring jvolume;
!   vos_volumeEntry_t volEntry;
! 
!   if( !vos_VolumeGetNext( (void *) iterationId, &volEntry, &ast ) ) {
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
      }
+   }
  
  
!   fillVolumeInfo( env, jvolumeObject, volEntry );
  
!   // get the class fields if need be
!   if( volumeCls == 0 ) {
!     internal_getVolumeClass( env, jvolumeObject );
!   }
!   (*env)->SetBooleanField( env, jvolumeObject, volume_cachedInfoField, TRUE );
!     
!   return 1;
  
  }
  
***************
*** 404,441 ****
   * advanceCount     the number of volumes to advance past
   * returns 0 if there are no more volumes, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Partition_getVolumesAdvanceTo(JNIEnv * env, jclass cls,
! 						    jint iterationId,
! 						    jobject jvolumeObject,
! 						    jint advanceCount)
! {
!     afs_status_t ast;
!     jstring jvolume;
!     vos_volumeEntry_t volEntry;
!     int i;
! 
!     for (i = 0; i < advanceCount; i++) {
! 	if (!vos_VolumeGetNext((void *)iterationId, &volEntry, &ast)) {
! 	    if (ast == ADMITERATORDONE) {
! 		return 0;
! 	    } else {
! 		throwAFSException(env, ast);
! 		return 0;
! 	    }
! 	}
!     }
! 
! 
!     fillVolumeInfo(env, jvolumeObject, volEntry);
! 
!     // get the class fields if need be
!     if (volumeCls == 0) {
! 	internal_getVolumeClass(env, jvolumeObject);
!     }
!     (*env)->SetBooleanField(env, jvolumeObject, volume_cachedInfoField, TRUE);
! 
!     return 1;
  }
  
  /**
--- 399,435 ----
   * advanceCount     the number of volumes to advance past
   * returns 0 if there are no more volumes, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Partition_getVolumesAdvanceTo
!   (JNIEnv *env, jclass cls, jlong iterationId, jobject jvolumeObject,
!    jint advanceCount)
! {
!   afs_status_t ast;
!   jstring jvolume;
!   vos_volumeEntry_t volEntry;
!   int i;
! 
!   for ( i = 0; i < advanceCount; i++) {
!     if( !vos_VolumeGetNext( (void *) iterationId, &volEntry, &ast ) ) {
!       if( ast == ADMITERATORDONE ) {
!         return 0;
!       } else {
!         throwAFSException( env, ast );
!         return 0;
!       }
!     }
!   }
! 
! 
!   fillVolumeInfo( env, jvolumeObject, volEntry );
! 
!   // get the class fields if need be
!   if( volumeCls == 0 ) {
!     internal_getVolumeClass( env, jvolumeObject );
!   }
!   (*env)->SetBooleanField( env, jvolumeObject, volume_cachedInfoField, TRUE );
!     
!   return 1;
  }
  
  /**
***************
*** 445,469 ****
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Partition_getVolumesDone(JNIEnv * env, jclass cls,
! 					       jint iterationId)
! {
!     afs_status_t ast;
! 
!     if (!vos_VolumeGetDone((void *)iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Partition_reclaimPartitionMemory(JNIEnv * env,
! 						       jclass cls)
  {
!     if (partitionCls) {
! 	(*env)->DeleteGlobalRef(env, partitionCls);
! 	partitionCls = 0;
!     }
  }
--- 439,482 ----
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Partition_getVolumesDone
!   (JNIEnv *env, jclass cls, jlong iterationId)
! {
!   afs_status_t ast;
! 
!   if( !vos_VolumeGetDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Partition_reclaimPartitionMemory
!  (JNIEnv *env, jclass cls)
  {
!   if( partitionCls ) {
!       (*env)->DeleteGlobalRef(env, partitionCls);
!       partitionCls = 0;
!   }
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/Process.c
diff -c openafs/src/JAVA/libjafs/Process.c:1.3 openafs/src/JAVA/libjafs/Process.c:1.3.2.1
*** openafs/src/JAVA/libjafs/Process.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/Process.c	Fri Oct 14 22:14:12 2005
***************
*** 52,193 ****
   * processName      the name of the process for which to get the info
   * process      the Process object to populate with the info
   */
! void
! getProcessInfoChar(JNIEnv * env, void *serverHandle, const char *processName,
! 		   jobject process)
! {
!     afs_status_t ast;
!     bos_ProcessType_t type;
!     bos_ProcessInfo_t infoEntry;
!     bos_ProcessExecutionState_t state;
!     char *auxStatus;
! 
!     // get class fields if need be
!     if (processCls == 0) {
! 	internal_getProcessClass(env, process);
!     }
! 
!     if (!bos_ProcessInfoGet
! 	(serverHandle, processName, &type, &infoEntry, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
!     // set type variable
!     switch (type) {
!     case BOS_PROCESS_SIMPLE:
! 	(*env)->SetIntField(env, process, process_typeField,
! 			    org_openafs_jafs_Process_SIMPLE_PROCESS);
! 	break;
!     case BOS_PROCESS_FS:
! 	(*env)->SetIntField(env, process, process_typeField,
! 			    org_openafs_jafs_Process_FS_PROCESS);
! 	break;
!     case BOS_PROCESS_CRON:
! 	(*env)->SetIntField(env, process, process_typeField,
! 			    org_openafs_jafs_Process_CRON_PROCESS);
! 	break;
!     default:
! 	throwAFSException(env, type);
! 	return;
!     }
! 
!     // set goal variable
!     switch (infoEntry.processGoal) {
!     case BOS_PROCESS_STOPPED:
! 	(*env)->SetIntField(env, process, process_goalField,
! 			    org_openafs_jafs_Process_STOPPED);
! 	break;
!     case BOS_PROCESS_RUNNING:
! 	(*env)->SetIntField(env, process, process_goalField,
! 			    org_openafs_jafs_Process_RUNNING);
! 	break;
!     case BOS_PROCESS_STOPPING:
! 	(*env)->SetIntField(env, process, process_goalField,
! 			    org_openafs_jafs_Process_STOPPING);
! 	break;
!     case BOS_PROCESS_STARTING:
! 	(*env)->SetIntField(env, process, process_goalField,
! 			    org_openafs_jafs_Process_STARTING);
! 	break;
!     default:
! 	throwAFSException(env, infoEntry.processGoal);
! 	return;
!     }
! 
!     // set state variable
!     auxStatus = (char *)malloc(sizeof(char) * BOS_MAX_NAME_LEN);
!     if (!auxStatus) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
!     if (!bos_ProcessExecutionStateGet
! 	((void *)serverHandle, processName, &state, auxStatus, &ast)) {
! 	free(auxStatus);
! 	throwAFSException(env, ast);
! 	return;
!     }
!     free(auxStatus);
! 
!     switch (state) {
!     case BOS_PROCESS_STOPPED:
! 	(*env)->SetIntField(env, process, process_stateField,
! 			    org_openafs_jafs_Process_STOPPED);
! 	break;
!     case BOS_PROCESS_RUNNING:
! 	(*env)->SetIntField(env, process, process_stateField,
! 			    org_openafs_jafs_Process_RUNNING);
! 	break;
!     case BOS_PROCESS_STOPPING:
! 	(*env)->SetIntField(env, process, process_stateField,
! 			    org_openafs_jafs_Process_STOPPING);
! 	break;
!     case BOS_PROCESS_STARTING:
! 	(*env)->SetIntField(env, process, process_stateField,
! 			    org_openafs_jafs_Process_STARTING);
! 	break;
!     default:
! 	throwAFSException(env, state);
! 	return;
!     }
! 
!     // set longs
!     (*env)->SetLongField(env, process, process_startTimeField,
! 			 infoEntry.processStartTime);
!     (*env)->SetLongField(env, process, process_numberStartsField,
! 			 infoEntry.numberProcessStarts);
!     (*env)->SetLongField(env, process, process_exitTimeField,
! 			 infoEntry.processExitTime);
!     (*env)->SetLongField(env, process, process_exitErrorTimeField,
! 			 infoEntry.processExitErrorTime);
!     (*env)->SetLongField(env, process, process_errorCodeField,
! 			 infoEntry.processErrorCode);
!     (*env)->SetLongField(env, process, process_errorSignalField,
! 			 infoEntry.processErrorSignal);
! 
!     // set stateOk to true if no core dump
!     if (infoEntry.state & BOS_PROCESS_CORE_DUMPED) {
! 	(*env)->SetBooleanField(env, process, process_stateOkField, FALSE);
!     } else {
! 	(*env)->SetBooleanField(env, process, process_stateOkField, TRUE);
!     }
! 
!     // set stateTooManyErrors
!     if (infoEntry.state & BOS_PROCESS_TOO_MANY_ERRORS) {
! 	(*env)->SetBooleanField(env, process, process_stateTooManyErrorsField,
! 				TRUE);
!     } else {
! 	(*env)->SetBooleanField(env, process, process_stateTooManyErrorsField,
! 				FALSE);
!     }
  
!     // set stateBadFileAccess
!     if (infoEntry.state & BOS_PROCESS_BAD_FILE_ACCESS) {
! 	(*env)->SetBooleanField(env, process, process_stateBadFileAccessField,
! 				TRUE);
!     } else {
! 	(*env)->SetBooleanField(env, process, process_stateBadFileAccessField,
! 				FALSE);
!     }
  
  }
  
--- 52,192 ----
   * processName      the name of the process for which to get the info
   * process      the Process object to populate with the info
   */
! void getProcessInfoChar( JNIEnv *env, void *serverHandle, 
! 			 const char *processName, jobject process ) {
  
!   afs_status_t ast;
!   bos_ProcessType_t type;
!   bos_ProcessInfo_t infoEntry;
!   bos_ProcessExecutionState_t state;
!   char *auxStatus;
! 
!   // get class fields if need be
!   if( processCls == 0 ) {
!     internal_getProcessClass( env, process );
!   }
! 
!   if( !bos_ProcessInfoGet( serverHandle, processName, &type, 
! 			   &infoEntry, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   // set type variable
!   switch( type ) {
!   case BOS_PROCESS_SIMPLE :
!       (*env)->SetIntField(env, process, process_typeField, 
! 			  org_openafs_jafs_Process_SIMPLE_PROCESS);
!       break;
!   case BOS_PROCESS_FS :
!       (*env)->SetIntField(env, process, process_typeField, 
! 			  org_openafs_jafs_Process_FS_PROCESS);
!       break;
!   case BOS_PROCESS_CRON :
!       (*env)->SetIntField(env, process, process_typeField, 
! 			  org_openafs_jafs_Process_CRON_PROCESS);
!       break;
!   default:
!       throwAFSException( env, type );
!       return;
!   }
! 
!   // set goal variable
!   switch( infoEntry.processGoal ) {
!   case BOS_PROCESS_STOPPED :
!       (*env)->SetIntField(env, process, process_goalField, 
! 			  org_openafs_jafs_Process_STOPPED);
!       break;
!   case BOS_PROCESS_RUNNING :
!       (*env)->SetIntField(env, process, process_goalField, 
! 			  org_openafs_jafs_Process_RUNNING);
!       break;
!   case BOS_PROCESS_STOPPING :
!       (*env)->SetIntField(env, process, process_goalField, 
! 			  org_openafs_jafs_Process_STOPPING);
!       break;
!   case BOS_PROCESS_STARTING :
!       (*env)->SetIntField(env, process, process_goalField, 
! 			  org_openafs_jafs_Process_STARTING);
!       break;
!   default:
!       throwAFSException( env, infoEntry.processGoal );
!       return;
!   }
! 
!   // set state variable
!   auxStatus = (char *) malloc( sizeof(char)*BOS_MAX_NAME_LEN );
!   if( !auxStatus ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
!   if( !bos_ProcessExecutionStateGet( (void *) serverHandle, processName, 
! 				     &state, auxStatus, &ast ) ) {
!       free( auxStatus );
!       throwAFSException( env, ast );
!       return;
!   }
!   free( auxStatus );
!   switch( state ) {
!   case BOS_PROCESS_STOPPED :
!       (*env)->SetIntField(env, process, process_stateField, 
! 			  org_openafs_jafs_Process_STOPPED);
!       break;
!   case BOS_PROCESS_RUNNING :
!       (*env)->SetIntField(env, process, process_stateField, 
! 			  org_openafs_jafs_Process_RUNNING);
!       break;
!   case BOS_PROCESS_STOPPING :
!       (*env)->SetIntField(env, process, process_stateField, 
! 			  org_openafs_jafs_Process_STOPPING);
!       break;
!   case BOS_PROCESS_STARTING :
!       (*env)->SetIntField(env, process, process_stateField, 
! 			  org_openafs_jafs_Process_STARTING);
!       break;
!   default:
!       throwAFSException( env, state );
!       return;
!   }
! 
!   // set longs
!   (*env)->SetLongField(env, process, process_startTimeField, 
! 		       infoEntry.processStartTime );
!   (*env)->SetLongField(env, process, process_numberStartsField, 
! 		       infoEntry.numberProcessStarts );
!   (*env)->SetLongField(env, process, process_exitTimeField, 
! 		       infoEntry.processExitTime );
!   (*env)->SetLongField(env, process, process_exitErrorTimeField, 
! 		       infoEntry.processExitErrorTime );
!   (*env)->SetLongField(env, process, process_errorCodeField, 
! 		       infoEntry.processErrorCode );
!   (*env)->SetLongField(env, process, process_errorSignalField, 
! 		       infoEntry.processErrorSignal );
! 
!   // set stateOk to true if no core dump
!   if( infoEntry.state & BOS_PROCESS_CORE_DUMPED ) {
!     (*env)->SetBooleanField(env, process, process_stateOkField, FALSE );
!   } else {
!     (*env)->SetBooleanField(env, process, process_stateOkField, TRUE );
!   }
! 
!   // set stateTooManyErrors
!   if( infoEntry.state & BOS_PROCESS_TOO_MANY_ERRORS ) {
!     (*env)->SetBooleanField(env, process, 
! 			    process_stateTooManyErrorsField, TRUE );
!   } else {
!     (*env)->SetBooleanField(env, process, 
! 			    process_stateTooManyErrorsField, FALSE );
!   }
! 
!   // set stateBadFileAccess
!   if( infoEntry.state & BOS_PROCESS_BAD_FILE_ACCESS ) {
!     (*env)->SetBooleanField(env, process, 
! 			    process_stateBadFileAccessField, TRUE );
!   } else {
!     (*env)->SetBooleanField(env, process, 
! 			    process_stateBadFileAccessField, FALSE );
!   }
  
  }
  
***************
*** 202,233 ****
   * process     the Process object in which to fill 
   *                    in the information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Process_getProcessInfo(JNIEnv * env, jclass cls,
! 					     jint serverHandle, jstring jname,
! 					     jobject process)
! {
!     char *name;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (name == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLPROCESS);
! 	return;
!     }
! 
!     getProcessInfoChar(env, (void *)serverHandle, name, process);
! 
!     // set name in case blank object
!     if (processCls == NULL) {
! 	internal_getProcessClass(env, process);
      }
      (*env)->SetObjectField(env, process, process_nameField, jname);
!     free(name);
  }
  
  /**
--- 201,235 ----
   * process     the Process object in which to fill 
   *                    in the information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Process_getProcessInfo (JNIEnv *env, jclass cls, 
! 						 jlong serverHandle, 
! 						 jstring jname, 
! 						 jobject process) {
! 
!   const char *name;
! 
!   if( jname != NULL ) {
!     name = (*env)->GetStringUTFChars(env, jname, 0);
!     if( !name ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     name = NULL;
!   }
! 
!   getProcessInfoChar( env, (void *) serverHandle, name, process );
! 
!   // set name in case blank object
!   if( name != NULL ) {
!     if( processCls == 0 ) {
!       internal_getProcessClass( env, process );
      }
      (*env)->SetObjectField(env, process, process_nameField, jname);
!     (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
! 
  }
  
  /**
***************
*** 255,296 ****
   *                   be called when the process terminates.  Can be 
   *                   null
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Process_create(JNIEnv * env, jclass cls,
! 				     jint serverHandle, jstring jname,
! 				     jint jtype, jstring jpath,
! 				     jstring jcronTime, jstring jnotifier)
! {
      afs_status_t ast;
      bos_ProcessType_t type;
!     char *name;
!     char *path;
!     char *cronTime;
!     char *notifier;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (name == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLPROCESS);
! 	return;
!     }
! 
!     if (jpath != NULL) {
! 	path = getNativeString(env, jpath);
! 	if (path == NULL) {
! 	    free(name);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
  	}
      } else {
! 	path = NULL;
      }
  
!     switch (jtype) {
      case org_openafs_jafs_Process_SIMPLE_PROCESS:
  	type = BOS_PROCESS_SIMPLE;
  	break;
--- 257,300 ----
   *                   be called when the process terminates.  Can be 
   *                   null
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Process_create (JNIEnv *env, jclass cls, 
! 					 jlong serverHandle, jstring jname, 
! 					 jint jtype, jstring jpath, 
! 					 jstring jcronTime, 
! 					 jstring jnotifier) {
! 
      afs_status_t ast;
      bos_ProcessType_t type;
!     const char *name;
!     const char *path;
!     const char *cronTime;
!     const char *notifier;
! 
!     if( jname != NULL ) {
!       name = (*env)->GetStringUTFChars(env, jname, 0);
!       if( !name ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
!     } else {
!       name = NULL;
!     }
! 
!     if( jpath != NULL ) {
!       path = (*env)->GetStringUTFChars(env, jpath, 0);
!       if( !path ) {
! 	if( name != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jname, name);
  	}
+ 	throwAFSException( env, JAFSADMNOMEM );
+ 	return;    
+       }
      } else {
!       path = NULL;
      }
  
!     switch( jtype ) {
      case org_openafs_jafs_Process_SIMPLE_PROCESS:
  	type = BOS_PROCESS_SIMPLE;
  	break;
***************
*** 301,353 ****
  	type = BOS_PROCESS_CRON;
  	break;
      default:
! 	free(name);
! 	if (path != NULL)
! 	    free(path);
! 	throwAFSException(env, jtype);
! 	return;
!     }
! 
!     if (jcronTime != NULL) {
! 	cronTime = getNativeString(env, jcronTime);
! 	if (!cronTime) {
! 	    free(name);
! 	    if (path != NULL)
! 		free(path);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
  	}
      } else {
  	cronTime = NULL;
      }
  
!     if (jnotifier != NULL) {
! 	notifier = getNativeString(env, jnotifier);
! 	if (!notifier) {
! 	    free(name);
! 	    if (path != NULL)
! 		free(path);
! 	    if (cronTime != NULL)
! 		free(cronTime);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
  	}
      } else {
  	notifier = NULL;
      }
  
!     if (!bos_ProcessCreate
! 	((void *)serverHandle, name, type, path, cronTime, notifier, &ast)) {
! 	throwAFSException(env, ast);
      }
      // release strings
!     free(name);
!     if (path != NULL)
! 	free(path);
!     if (cronTime != NULL)
! 	free(cronTime);
!     if (notifier != NULL)
! 	free(notifier);
  }
  
  /**
--- 305,389 ----
  	type = BOS_PROCESS_CRON;
  	break;
      default:
!       if( name != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jname, name);
!       }
!       if( path != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jpath, path);
!       }
!       throwAFSException( env, jtype );
!       return;
!     }
! 
!     if( jcronTime != NULL ) {
! 	cronTime = (*env)->GetStringUTFChars(env, jcronTime, 0);
! 	if( !cronTime ) {
! 	  if( name != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, jname, name);
! 	  }
! 	  if( path != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, jpath, path);
! 	  }
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
  	}
      } else {
  	cronTime = NULL;
      }
  
!     if( jnotifier != NULL ) {
! 	notifier = (*env)->GetStringUTFChars(env, jnotifier, 0);
! 	if( !notifier ) {
! 	  if( name != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, jname, name);
! 	  }
! 	  if( path != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, jpath, path);
! 	  }
! 	  if( cronTime != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, jcronTime, cronTime);
! 	  }
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
  	}
      } else {
  	notifier = NULL;
      }
  
!     if( !bos_ProcessCreate( (void *) serverHandle, name, type, path, 
! 			    cronTime, notifier, &ast ) ) {
! 	// release strings
! 	if( cronTime != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, jcronTime, cronTime);
! 	}
! 	if( notifier != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, jnotifier, notifier);
! 	}
! 	if( name != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jname, name);
! 	}
! 	if( path != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jpath, path);
! 	}
! 	throwAFSException( env, ast );
! 	return;
      }
+ 
+ 
      // release strings
!     if( cronTime != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jcronTime, cronTime);
!     }
!     if( notifier != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jnotifier, notifier);
!     }
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!     }
!     if( path != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jpath, path);
!     }
! 
  }
  
  /**
***************
*** 359,387 ****
   *                      belongs
   * jname   the name of the process to remove
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Process_delete(JNIEnv * env, jclass cls,
! 				     jint serverHandle, jstring jname)
! {
      afs_status_t ast;
!     char *name;
  
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (!name) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
      } else {
! 	throwAFSException(env, JAFSNULLPROCESS);
! 	return;
      }
  
!     if (!bos_ProcessDelete((void *)serverHandle, name, &ast)) {
! 	throwAFSException(env, ast);
      }
  
-     free(name);
  }
  
  /**
--- 395,429 ----
   *                      belongs
   * jname   the name of the process to remove
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Process_delete (JNIEnv *env, jclass cls, 
! 					 jlong serverHandle, jstring jname) {
! 
      afs_status_t ast;
!     const char *name;
  
!     if( jname != NULL ) {
!       name = (*env)->GetStringUTFChars(env, jname, 0);
!       if( !name ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
      } else {
!       name = NULL;
      }
  
!     if( !bos_ProcessDelete( (void *) serverHandle, name, &ast ) ) {
!       if( name != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jname, name);
!       }
!       throwAFSException( env, ast );
!       return;
!     }
! 
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
      }
  
  }
  
  /**
***************
*** 393,422 ****
   *                      belongs
   * jname   the name of the process to stop
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Process_stop(JNIEnv * env, jclass cls,
! 				   jint serverHandle, jstring jname)
! {
      afs_status_t ast;
!     char *name;
  
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (!name) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
      } else {
! 	throwAFSException(env, JAFSNULLPROCESS);
! 	return;
      }
  
!     if (!bos_ProcessExecutionStateSet
! 	((void *)serverHandle, name, BOS_PROCESS_STOPPED, &ast)) {
! 	throwAFSException(env, ast);
      }
  
-     free(name);
  }
  
  /**
--- 435,470 ----
   *                      belongs
   * jname   the name of the process to stop
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Process_stop (JNIEnv *env, jclass cls, 
! 				       jlong serverHandle, jstring jname) {
! 
      afs_status_t ast;
!     const char *name;
  
!     if( jname != NULL ) {
!       name = (*env)->GetStringUTFChars(env, jname, 0);
!       if( !name ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
      } else {
!       name = NULL;
      }
  
!     if( !bos_ProcessExecutionStateSet( (void *) serverHandle, name, 
! 				       BOS_PROCESS_STOPPED, &ast ) ) {
!       if( name != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jname, name);
!       }
!       throwAFSException( env, ast );
!       return;
!     }
! 
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
      }
  
  }
  
  /**
***************
*** 428,457 ****
   *                      belongs
   * jname   the name of the process to start
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Process_start(JNIEnv * env, jclass cls,
! 				    jint serverHandle, jstring jname)
! {
      afs_status_t ast;
!     char *name;
  
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (!name) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
      } else {
! 	throwAFSException(env, JAFSNULLPROCESS);
! 	return;
      }
  
!     if (!bos_ProcessExecutionStateSet
! 	((void *)serverHandle, name, BOS_PROCESS_RUNNING, &ast)) {
! 	throwAFSException(env, ast);
      }
  
-     free(name);
  }
  
  /**
--- 476,511 ----
   *                      belongs
   * jname   the name of the process to start
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Process_start (JNIEnv *env, jclass cls, 
! 					jlong serverHandle, jstring jname) {
! 
      afs_status_t ast;
!     const char *name;
  
!     if( jname != NULL ) {
!       name = (*env)->GetStringUTFChars(env, jname, 0);
!       if( !name ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
      } else {
!       name = NULL;
!     }
! 
!     if( !bos_ProcessExecutionStateSet( (void *) serverHandle, name, 
! 				       BOS_PROCESS_RUNNING, &ast ) ) {
!       if( name != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jname, name);
!       }
!       throwAFSException( env, ast );
!       return;
      }
  
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
      }
  
  }
  
  /**
***************
*** 463,499 ****
   *                      belongs
   * jname   the name of the process to restart
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Process_restart(JNIEnv * env, jclass cls,
! 				      jint serverHandle, jstring jname)
! {
      afs_status_t ast;
!     char *name;
  
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (!name) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
      } else {
! 	throwAFSException(env, JAFSNULLPROCESS);
! 	return;
      }
  
!     if (!bos_ProcessRestart((void *)serverHandle, name, &ast)) {
! 	throwAFSException(env, ast);
      }
  
-     free(name);
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Process_reclaimProcessMemory(JNIEnv * env, jclass cls)
! {
!     if (processCls) {
! 	(*env)->DeleteGlobalRef(env, processCls);
! 	processCls = 0;
!     }
  }
--- 517,567 ----
   *                      belongs
   * jname   the name of the process to restart
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Process_restart (JNIEnv *env, jclass cls, 
! 					  jlong serverHandle, jstring jname) {
! 
      afs_status_t ast;
!     const char *name;
  
!     if( jname != NULL ) {
!       name = (*env)->GetStringUTFChars(env, jname, 0);
!       if( !name ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
      } else {
!       name = NULL;
!     }
! 
!     if( !bos_ProcessRestart( (void *) serverHandle, name, &ast ) ) {
!       if( name != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jname, name);
!       }
!       throwAFSException( env, ast );
!       return;
      }
  
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
      }
  
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Process_reclaimProcessMemory (JNIEnv *env, 
! 						       jclass cls) {
! 
!   if( processCls ) {
!       (*env)->DeleteGlobalRef(env, processCls);
!       processCls = 0;
!   }
! 
  }
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/README
diff -c /dev/null openafs/src/JAVA/libjafs/README:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:21 2006
--- openafs/src/JAVA/libjafs/README	Fri Oct 14 22:14:12 2005
***************
*** 0 ****
--- 1,259 ----
+ Java API for OpenAFS (JAFS) README
+ Current as of June 4, 2003
+ 
+ ##########################################################################
+ # Copyright (c) 2001-2002 International Business Machines Corp.          #
+ # 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        #
+ #                                                                        #
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS    #
+ # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT      #
+ # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR  #
+ # A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR #
+ # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,  #
+ # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,    #
+ # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR     #
+ # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF #
+ # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING   #
+ # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS     #
+ # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.           #
+ ##########################################################################
+ 
+ ---------------------------------------------------------------------------
+ *
+ * INTRODUCTION
+ *
+ ---------------------------------------------------------------------------
+ 
+ JAFS is an open source API designed to allow Java programmers the ability
+ to create applications for the administration or use of OpenAFS file systems.
+ It works by accessing libadmin and libuafs (administrative and user-level 
+ libraries that come with OpenAFS) through JNI.  It consists of a Java package 
+ called org.openafs.jafs, and two shared libraries libjafsadm.so and libjafs.so.
+ 
+ ---------------------------------------------------------------------------
+ *
+ * USE
+ *
+ ---------------------------------------------------------------------------
+ 
+ There is a version of JAFS that has been compiled on Red Hat Linux 7.3, 
+ and can be directly used without compilation.  It was compiled using
+ OpenAFS 1.2.10a libraries (with a modified version of libjuafs.a).  It 
+ consists of a JAR file (jafs-1.2.10a.jar) and two shared libraries 
+ (libjafsadm.so and libjafs.so).  It was compiled using the 
+ --enable-transarc-paths on compilation (for use with the OpenAFS RPMs), 
+ gcc 2.96, and Java Classic VM version 1.4.1_02.
+ 
+ When you write Java code to use this API, import the
+ org.openafs.jafs package. During compilation of your Java code, 
+ ensure one of the following conditions are met:
+   - Use the "-classpath" option to javac to specify the jafs.jar file.
+   - Change your $CLASSPATH environment variable to include the
+     jafs.jar file (e.g. export CLASSPATH=$CLASSPATH:jafs.jar
+ 
+ When running an application that uses JAFS, the shared libraries
+ need to be found by Java's library loader.  The easiest way to
+ accomplish this is to copy these files into the /usr/local/lib/ directory,
+ or create symbolic links from that directory to the files.  Alternatively, 
+ the directory containing the libraries can also be added to the
+ LD_LIBRARY_PATH environment variable.
+ 
+ You also need to have an OpenAFS client set up on your machine
+ (preferably version 1.2.10a, but it should work for some past versions as well).
+ You can obtain the OpenAFS client and view installation documentation at 
+ http://www.openafs.org (the RPMs are easiest to use for Linux).  Also any 
+ cells you plan to access through the API must have entries in your
+ client's CellServDB file (located in the /usr/vice/etc/ directory in most
+ setups).
+ 
+ This API is most effective when used with a cell that uses the kaserver
+ for authentication.  It does not currently support alternative methods of
+ authentication such as Kerberos V.
+ 
+ If you have successfully set up your Linux 7.3 environment as described
+ above, you will be able to develop and execute applications that use
+ the JAFS API.
+ 
+ ---------------------------------------------------------------------------
+ *
+ * BUILD
+ *
+ ---------------------------------------------------------------------------
+ 
+  ** DOWNLOAD SOURCE
+   The first step in compiling your own versions of the library and jar file
+   is to download the OpenAFS source code.  Please follow the directions for
+   for the source you download:
+ 
+  ** APPLY THE APPROPRIATE PATCH
+   You can apply the appropriate JAFS patch with the following command, 
+   executed from the root directory of the download code 
+   (i.e. openafs-1.2.10a/):
+ 
+       patch -p1 < xxx.diff
+       (where xxx.diff is one of the following patch files)
+ 
+   Use the patch respective to the source you are using:
+   * OpenAFS 1.2.6 Source (openafs-1.2.6-src.tar.gz)
+     OpenAFS 1.2.7 Source (openafs-1.2.7-src.tar.gz)
+     OpenAFS 1.2.8 Source (openafs-1.2.8-src.tar.gz)
+ 
+       jafs-1.2.6-8.diff 
+ 
+   * OpenAFS 1.2.9 Source (openafs-1.2.9-src.tar.gz)
+ 
+       jafs-1.2.9.diff 
+ 
+   * OpenAFS 1.2.10a Source (openafs-1.2.10a-src.tar.gz)
+ 
+       jafs-1.2.10a.diff 
+ 
+   * Daily Snapshot / CVS (example: openafs-snap-2003-05-21.tar.gz)
+ 
+       jafs.diff
+ 
+ 
+  ** RUN CONFIGURE
+   From the same directory, run the configure script as you normally would 
+   to compile OpenAFS, but run it with a java-home argument so the script can
+   find your java distribution.  For example:
+ 
+   ./configure [other options] --java-home=/usr/java/jdk
+ 
+   NOTE: If the configure script is not within the root source directory,
+         then you will need to first run ./regen.sh to generate the 
+         configure script.  In this case you will need to manually
+         modify the JAFS Makefile by setting the JAVA_HOME variable
+         to your local system's JAVA_HOME. (i.e. /usr/java/jdk)
+ 
+   The configure script will ensure that this directory contains bin/ and lib/ 
+   subdirectories, and that there are /bin/javac and/bin/javah executables and 
+   an include/jni.h file.  If you don't supply a command line argument for the 
+   java home, the script will look for it in environment variables: first in
+   $JAVA_HOME and then in $JDK_HOME.  Also, note that if you have installed
+   (or are planning to install) OpenAFS by using the RPMs for Linux, you
+   should provide the --enable-transarc-paths configuration option.  If you
+   get a "** Can't determine local cell name" error message, the most likely
+   reason is that you didn't supply this option.
+ 
+  ** RUN MAKE
+   Finally, do a full build of OpenAFS by executing 'make' in the current
+   directory.  After it finishes, you are ready to compile JAFS.  Execute
+   'make jafs' from that same directory.  Afterward, there will be 
+   libjafsadm.so and libjafs.so in the lib/ directory, and a jafs.jar in the 
+   jlib/ directory. These can be used according to the instructions in the 
+   'USE' section of this document. 
+ 
+   For additional make options, please refer to the next section "MAKE OPTIONS"
+ 
+ 
+ ---------------------------------------------------------------------------
+ *
+ * MAKE OPTIONS
+ *
+ ---------------------------------------------------------------------------
+ 
+ Additional make options are available by running 'make' from the 
+ src/JAVA/libjafs directory; they are as follows:
+ 
+ make            - Perform a full make of all Java classes, jar archive, and JNI
+                   libraries
+ make acltest    - Builds the ACL test program.  Program usage is available by
+                   simply invoking './acltest'
+ make clean      - Delete all Java classes, Java API docs, test programs, and C
+                   object files
+ make cleanc     - Only delete test programs and C object files.
+ make clean_jar  - Delete the Java archive library (jlib/jafs.jar)
+ make clean_libs - Delete both JNI shared libraries (lib/libjafs.so and
+                   lib/libjafsadm.so)
+ make install    - Performs a full make of all components and then installs all
+                   necessary components to your local system.  This option 
+                   prepares the required '/usr/afswsp/' directory for use by 
+                   the native library.
+ make javadocs   - Generate Java API documents (in javadoc format).  Docs are
+                   saved to src/JAVA/javadocs
+ make jar        - Builds the Java archive library (containing all Java classes)
+ make libjafs    - Builds the user-space library (used for ACL and file access)
+ make libjafsadm - Builds the administrative library (used for all admin related 
+                   functions)
+ 
+ ---------------------------------------------------------------------------
+ *
+ * DIRECTORIES, FILES, AND TEST PROGRAMS
+ *
+ ---------------------------------------------------------------------------
+ 
+ src/JAVA/libjafs:
+ 
+   Within the src/JAVA/libjafs directory you will find a few items in addition
+   to the C source code and Makefiles.  In particular, you will find 'acltest.c',
+   'buildinfo.pl', and a subdirectory 'etc'.
+ 
+   acltest.c     - A test program that allows testing of the native libraries
+                   ACL calls without going through Java.  
+ 
+                   *Usage information for this program is available by simply 
+                   invoking './acltest' without any parameters.
+ 
+   buildinfo.pl  - A perl script that automatically updates the build information
+                   every time the native libraries are compiled.  Additionally,
+                   it automatically increments the build number associate with
+                   the native libraries (found in VersionInfo.h).  It may also
+                   be used to programatically query for build information.
+ 
+                   *Usage information for this program is available by simply 
+                   invoking 'perl buildinfo.pl' without any parameters.
+ 
+   etc/          - A directory containing user-space configuration files. These 
+                   files are used for user-space initialization and cache 
+                   configuration and are copied to '/usr/afswsp/etc' if a
+                   'make install' is issued.
+ 
+ src/JAVA/classes:
+ 
+   Within the src/JAVA/classes directory you will find the root of the Java 
+   package, the error message catalog file, and a test program:
+ 
+   *.java        - Java classes that comprise the test program.
+ 
+   adminTest     - A script that invokes the Java console-based test program.
+                   This program can be used to exercise all major API calls 
+                   from Java, thus testing JNI libraries as well as Java code.
+ 
+                   *Usage information for this program is available via its
+                   help menu: './adminTest help'
+ 
+   adminTest.properties
+                 - Configuration file for the Admin test program (only contains
+                   default cell name for administrator)
+ 
+   ErrorMessages.properties
+                 - Error message catalog file used by the ErrorTable class. Note
+                   that an additional message file can be generated that represents
+                   a language other than english (refer to the ErrorTable API docs
+                   for more information)
+ 
+   org/          - Root of the Java class package (package: org.openafs.jafs)
+ 
+ 
+ src/JAVA/javadocs:
+ 
+   This directory is dynamically generated when you issue a 'make javadocs' from
+   the src/JAVA/libjafs directory. It contains all Java API documentation
+   generated from the Java classes.
+ 
+ ---------------------------------------------------------------------------
+ *
+ * MISC
+ *
+ ---------------------------------------------------------------------------
+ 
+ If you'd like to edit the source code, you'll find the native C code in
+ the src/JAVA/libjafs directory, and the Java code in the 
+ src/JAVA/classes/org/openafs/jafs/ directory.  Please reference the 
+ src/TechNotes-JavaAPI document for more information.
+ 
Index: openafs/src/JAVA/libjafs/Server.c
diff -c openafs/src/JAVA/libjafs/Server.c:1.3 openafs/src/JAVA/libjafs/Server.c:1.3.2.1
*** openafs/src/JAVA/libjafs/Server.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/Server.c	Fri Oct 14 22:14:12 2005
***************
*** 66,89 ****
  
  ///// definition in jafs_Partition.c /////////////////
  
! extern void fillPartitionInfo(JNIEnv * env, jobject partition,
! 			      vos_partitionEntry_t partEntry);
  
  ///////////////////////////////////////////////////
  
  ///// definition in jafs_Key.c /////////////////
  
! extern void fillKeyInfo(JNIEnv * env, jobject key, bos_KeyInfo_t keyEntry);
  
  ///////////////////////////////////////////////////
  
  ///// definition in jafs_Process.c /////////////////
  
! extern void getProcessInfoChar(JNIEnv * env, void *serverHandle,
! 			       const char *processName, jobject process);
  
  ///////////////////////////////////////////////////
  
  /**
   * Extract the information from the given server entry and populate the
   * given object
--- 66,100 ----
  
  ///// definition in jafs_Partition.c /////////////////
  
! extern void fillPartitionInfo( JNIEnv *env, jobject partition, 
! 			       vos_partitionEntry_t partEntry );
  
  ///////////////////////////////////////////////////
  
  ///// definition in jafs_Key.c /////////////////
  
! extern void fillKeyInfo( JNIEnv *env, jobject key, bos_KeyInfo_t keyEntry );
  
  ///////////////////////////////////////////////////
  
  ///// definition in jafs_Process.c /////////////////
  
! extern void getProcessInfoChar( JNIEnv *env, void *serverHandle, 
! 				const char *processName, jobject process );
  
  ///////////////////////////////////////////////////
  
+ 
+ void IntIPAddressToString(int iIPAddress, char *strIPAddress)
+ {
+     sprintf(strIPAddress, "%d.%d.%d.%d",
+ 	    (int)((iIPAddress >> 24) & 0xFF),
+ 	    (int)((iIPAddress >> 16) & 0xFF),
+ 	    (int)((iIPAddress >>  8) & 0xFF),
+ 	    (int)((iIPAddress	  ) & 0xFF)
+     );
+ } //IntIPAddressToString
+ 
  /**
   * Extract the information from the given server entry and populate the
   * given object
***************
*** 93,190 ****
   * server      the Server object to populate with the info
   * servEntry     the container of the server's information
   */
! void
! fillServerInfo(JNIEnv * env, jint cellHandle, jobject server,
! 	       afs_serverEntry_t servEntry)
  {
!     jstring jip;
!     jobjectArray jaddresses;
!     jstring jserver;
!     int i = 0;
! 
!     // get the class fields if need be
!     if (serverCls == 0) {
! 	internal_getServerClass(env, server);
!     }
!     // in case it's blank
!     jserver = (*env)->NewStringUTF(env, servEntry.serverName);
!     (*env)->SetObjectField(env, server, server_nameField, jserver);
! 
!     // let's convert just the addresses in the address array into an IP
!     jaddresses =
! 	(jobjectArray) (*env)->GetObjectField(env, server,
! 					      server_IPAddressField);
!     for (i = 0; i < 16; i++) {
! 	if (servEntry.serverAddress[i] != 0) {
! 	    jip = (*env)->NewStringUTF(env, (char *)
! 				       inet_ntoa(htonl
! 						 (servEntry.
! 						  serverAddress[i])));
! 	    (*env)->SetObjectArrayElement(env, jaddresses, i, jip);
! 	} else {
! 	    break;
! 	}
!     }
  
!     // let's check if this is really a database server
!     (*env)->SetBooleanField(env, server, server_databaseField,
! 			    servEntry.serverType & DATABASE_SERVER);
!     if (servEntry.serverType & DATABASE_SERVER) {
! 	// for now, if it thinks it's a database server than it is
! 	// later, add checks for database configuration, and actual 
! 	// on-ness of the machine
! 	(*env)->SetBooleanField(env, server, server_badDatabaseField, FALSE);
!     } else {
! 	(*env)->SetBooleanField(env, server, server_badDatabaseField, FALSE);
!     }
! 
!     // we should check to see if this is truly a file server or not
!     // it could just be an old remnant, left over inside the vldb that 
!     // should be removed.
!     // if it is a file server, mark it as such.  If not, mark it as faulty.
!     (*env)->SetBooleanField(env, server, server_fileServerField,
! 			    servEntry.serverType & FILE_SERVER);
!     if (servEntry.serverType & FILE_SERVER) {
! 
! 	// to see if it's really a file server, make sure the 
! 	// "fs" process is running
! 	void *bosHandle;
! 	afs_status_t ast;
! 	bos_ProcessType_t processTypeT;
! 	bos_ProcessInfo_t processInfoT;
! 	char *fileServerProcessName = "fs";
! 
! 	// set the file server to true (it thinks it's a file server)
! 	(*env)->SetBooleanField(env, server, server_fileServerField, TRUE);
! 
! 	if (!bos_ServerOpen
! 	    ((void *)cellHandle, servEntry.serverName, &bosHandle, &ast)) {
! 	    throwAFSException(env, ast);
! 	    return;
! 	}
! 	if (!bos_ProcessInfoGet
! 	    (bosHandle, fileServerProcessName, &processTypeT, &processInfoT,
! 	     &ast)) {
! 	    // if the machine does not have a fs process or is not responding 
! 	    // or is part of another cell
! 	    if (ast == BZNOENT || ast == -1 || ast == RXKADBADTICKET) {
! 		(*env)->SetBooleanField(env, server,
! 					server_badFileServerField, TRUE);
! 		// otherwise
! 	    } else {
! 		throwAFSException(env, ast);
! 		return;
! 	    }
  	} else {
! 	    // it's good
! 	    (*env)->SetBooleanField(env, server, server_badFileServerField,
! 				    FALSE);
  	}
!     } else {
! 	(*env)->SetBooleanField(env, server, server_badFileServerField,
! 				FALSE);
!     }
  
  }
  
  /**
--- 104,203 ----
   * server      the Server object to populate with the info
   * servEntry     the container of the server's information
   */
! void fillServerInfo
!   ( JNIEnv *env, void *cellHandle, jobject server, afs_serverEntry_t servEntry )
  {
!   jstring jip;
!   jobjectArray jaddresses;
!   jstring jserver;
!   int i = 0;
!   char szServerAddr[AFS_MAX_SERVER_NAME_LEN];
! 
!   // get the class fields if need be
!   if( serverCls == 0 ) {
!     internal_getServerClass( env, server );
!   }
! 
!   // in case it's blank
!   jserver = (*env)->NewStringUTF(env, servEntry.serverName);
!   (*env)->SetObjectField(env, server, server_nameField, jserver);
! 
!   // let's convert just the addresses in the address array into an IP
!   jaddresses = (jobjectArray) (*env)->GetObjectField( env, server, 
! 						      server_IPAddressField );
  
!   for (i = 0; i < AFS_MAX_SERVER_ADDRESS; i++) {
! 	if (servEntry.serverAddress[i] != 0) {
! 	  IntIPAddressToString(servEntry.serverAddress[i], szServerAddr);
! 	  jip = (*env)->NewStringUTF(env, szServerAddr);
! 	  (*env)->SetObjectArrayElement(env, jaddresses, i, jip);
  	} else {
! 	  break;
  	}
!   }
  
+   // let's check if this is really a database server
+   (*env)->SetBooleanField(env, server, server_databaseField, 
+ 			  servEntry.serverType & DATABASE_SERVER);
+ 
+   if( servEntry.serverType & DATABASE_SERVER ) {
+     // for now, if it thinks it's a database server than it is
+     // later, add checks for database configuration, and actual 
+     // on-ness of the machine
+     (*env)->SetBooleanField(env, server, server_badDatabaseField, FALSE);
+   } else {
+     (*env)->SetBooleanField(env, server, server_badDatabaseField, FALSE);
+   }
+ 
+   // we should check to see if this is truly a file server or not
+   // it could just be an old remnant, left over inside the vldb that 
+   // should be removed.
+   // if it is a file server, mark it as such.  If not, mark it as faulty.
+   (*env)->SetBooleanField(env, server, server_fileServerField,  
+ 			  servEntry.serverType & FILE_SERVER);
+ 
+   if( servEntry.serverType & FILE_SERVER ) {
+     
+     // to see if it's really a file server, make sure the 
+     // "fs" process is running
+     void *bosHandle;
+     afs_status_t ast, ast2;
+     bos_ProcessType_t processTypeT;
+     bos_ProcessInfo_t processInfoT;
+     char *fileServerProcessName = "fs";
+ 
+     // set the file server to true (it thinks it's a file server)
+     (*env)->SetBooleanField(env, server, server_fileServerField, TRUE);
+ 
+     if( !bos_ServerOpen( cellHandle, servEntry.serverName, 
+ 			 &bosHandle, &ast ) ) {
+       throwAFSException( env, ast );
+       return;
+     }
+ 
+     if( !bos_ProcessInfoGet( bosHandle, fileServerProcessName, &processTypeT, 
+ 			     &processInfoT, &ast ) ) {
+       // if the machine does not have a fs process or is not responding 
+       // or is part of another cell
+       if( ast == BZNOENT || ast == -1 || ast == RXKADBADTICKET ) {
+         (*env)->SetBooleanField(env, server, server_badFileServerField, TRUE);
+       // otherwise
+       } else {
+         bos_ServerClose( bosHandle, &ast2 );
+         throwAFSException( env, ast );
+         return;
+       }
+     } else {
+       // it's good
+       (*env)->SetBooleanField(env, server, server_badFileServerField, FALSE);
+     }
+     if (!bos_ServerClose( bosHandle, &ast )) {
+       throwAFSException( env, ast );
+       return;
+     }
+   } else {
+     (*env)->SetBooleanField(env, server, server_badFileServerField, FALSE);
+   }
  }
  
  /**
***************
*** 197,230 ****
   * server     the Server object in which to fill in 
   *                   the information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_getServerInfo(JNIEnv * env, jclass cls,
! 					   jint cellHandle, jstring jname,
! 					   jobject server)
! {
!     char *name;
!     afs_status_t ast;
!     afs_serverEntry_t servEntry;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (name == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLSERVER);
! 	return;
!     }
  
-     // get the server entry
-     if (!afsclient_AFSServerGet((void *)cellHandle, name, &servEntry, &ast)) {
- 	throwAFSException(env, ast);
-     }
- 
-     fillServerInfo(env, cellHandle, server, servEntry);
- 
-     free(name);
  }
  
  /**
--- 210,250 ----
   * server     the Server object in which to fill in 
   *                   the information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_getServerInfo (JNIEnv *env, jclass cls, 
! 					       jlong cellHandle, jstring jname, 
! 					       jobject server) {
! 
!   const char *name;
!   afs_status_t ast;
!   afs_serverEntry_t servEntry;
! 
!   if( jname != NULL ) {
!     name = (*env)->GetStringUTFChars(env, jname, 0);
!     if( !name ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     name = NULL;
!   }
! 
!   // get the server entry
!   if ( !afsclient_AFSServerGet( (void *) cellHandle, name, 
! 				&servEntry, &ast ) ) {
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   fillServerInfo( env, cellHandle, server, servEntry );
! 
!   if( name != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
  
  }
  
  /**
***************
*** 238,269 ****
   *                      partitions belong
   * returns total number of partitions
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getPartitionCount(JNIEnv * env, jclass cls,
! 					       jint cellHandle,
! 					       jint serverHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
!     vos_partitionEntry_t partEntry;
!     int i = 0;
  
!     if (!vos_PartitionGetBegin
! 	((void *)cellHandle, (void *)serverHandle, NULL, &iterationId,
! 	 &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     while (vos_PartitionGetNext((void *)iterationId, &partEntry, &ast))
! 	i++;
! 
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     return i;
  }
  
  /**
--- 258,287 ----
   *                      partitions belong
   * returns total number of partitions
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Server_getPartitionCount (JNIEnv *env, jclass cls, 
! 						   jlong cellHandle, 
! 						   jlong serverHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
!   vos_partitionEntry_t partEntry;
!   int i = 0;
! 
!   if( !vos_PartitionGetBegin( (void *) cellHandle, (void *) serverHandle, 
! 			      NULL, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   while ( vos_PartitionGetNext( (void *) iterationId, &partEntry, &ast ) ) i++;
! 
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   return i;
  }
  
  /**
***************
*** 278,299 ****
   *                      partitions belong
   * returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getPartitionsBegin(JNIEnv * env, jclass cls,
! 						jint cellHandle,
! 						jint serverHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
! 
!     if (!vos_PartitionGetBegin
! 	((void *)cellHandle, (void *)serverHandle, NULL, &iterationId,
! 	 &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
!     return (jint) iterationId;
  
  }
  
--- 296,316 ----
   *                      partitions belong
   * returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Server_getPartitionsBegin (JNIEnv *env, jclass cls, 
! 						    jlong cellHandle, 
! 						    jlong serverHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( !vos_PartitionGetBegin( (void *) cellHandle, (void *) serverHandle, 
! 			      NULL, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jlong) iterationId;
  
  }
  
***************
*** 306,330 ****
   * iterationId   the iteration ID of this iteration
   * returns the name of the next partition of the server
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Server_getPartitionsNextString(JNIEnv * env, jclass cls,
! 						     jint iterationId)
! {
!     afs_status_t ast;
!     jstring jpartition;
!     vos_partitionEntry_t partEntry;
! 
!     if (!vos_PartitionGetNext((void *)iterationId, &partEntry, &ast)) {
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return;
! 	}
      }
  
!     jpartition = (*env)->NewStringUTF(env, partEntry.name);
!     return jpartition;
  
  }
  
--- 323,348 ----
   * iterationId   the iteration ID of this iteration
   * returns the name of the next partition of the server
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Server_getPartitionsNextString (JNIEnv *env, 
! 							 jclass cls, 
! 							 jlong iterationId) {
! 
!   afs_status_t ast;
!   jstring jpartition;
!   vos_partitionEntry_t partEntry;
! 
!   if( !vos_PartitionGetNext( (void *) iterationId, &partEntry, &ast ) ) {
!     if( ast == ADMITERATORDONE ) {
!       return NULL;
!     } else {
!       throwAFSException( env, ast );
!       return;
      }
+   }
  
!   jpartition = (*env)->NewStringUTF(env, partEntry.name);
!   return jpartition;
  
  }
  
***************
*** 339,372 ****
   *                       values of the next partition
   * returns 0 if there are no more servers, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getPartitionsNext(JNIEnv * env, jclass cls,
! 					       jint iterationId,
! 					       jobject jpartitionObject)
! {
!     afs_status_t ast;
!     vos_partitionEntry_t partEntry;
! 
!     if (!vos_PartitionGetNext((void *)iterationId, &partEntry, &ast)) {
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
!     }
  
!     fillPartitionInfo(env, jpartitionObject, partEntry);
! 
!     // get the class fields if need be
!     if (partitionCls == 0) {
! 	internal_getPartitionClass(env, jpartitionObject);
!     }
!     (*env)->SetBooleanField(env, jpartitionObject, partition_cachedInfoField,
! 			    TRUE);
! 
! 
!     return 1;
  
  }
  
--- 357,390 ----
   *                       values of the next partition
   * returns 0 if there are no more servers, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Server_getPartitionsNext (JNIEnv *env, jclass cls, 
! 						   jlong iterationId, 
! 						   jobject jpartitionObject) {
!     
!   afs_status_t ast;
!   vos_partitionEntry_t partEntry;
! 
!   if( !vos_PartitionGetNext( (void *) iterationId, &partEntry, &ast ) ) {
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
!     }
!   }
! 
!   fillPartitionInfo( env, jpartitionObject, partEntry );
! 
!   // get the class fields if need be
!   if( partitionCls == 0 ) {
!     internal_getPartitionClass( env, jpartitionObject );
!   }
!   (*env)->SetBooleanField( env, jpartitionObject, partition_cachedInfoField, 
! 			   TRUE );
  
!     
!   return 1;
  
  }
  
***************
*** 377,392 ****
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_getPartitionsDone(JNIEnv * env, jclass cls,
! 					       jint iterationId)
! {
!     afs_status_t ast;
! 
!     if (!vos_PartitionGetDone((void *)iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
  }
  
--- 395,410 ----
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_getPartitionsDone (JNIEnv *env, jclass cls, 
! 						   jlong iterationId) {
! 
!   afs_status_t ast;
! 
!   if( !vos_PartitionGetDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
***************
*** 399,427 ****
   *                      partitions belong
   * jnewAdmin   the name of the admin to add to the list
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_addBosAdmin(JNIEnv * env, jclass cls,
! 					 jint serverHandle, jstring jnewAdmin)
! {
!     afs_status_t ast;
!     char *newAdmin;
! 
!     if (jnewAdmin != NULL) {
! 	newAdmin = getNativeString(env, jnewAdmin);
! 	if (newAdmin == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
! 
!     if (!bos_AdminCreate((void *)serverHandle, newAdmin, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     free(newAdmin);
  
  }
  
--- 417,451 ----
   *                      partitions belong
   * jnewAdmin   the name of the admin to add to the list
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_addBosAdmin (JNIEnv *env, jclass cls, 
! 					     jlong serverHandle, 
! 					     jstring jnewAdmin) {
! 
!   afs_status_t ast;
!   const char *newAdmin;
! 
!   if( jnewAdmin != NULL ) {
!     newAdmin = (*env)->GetStringUTFChars(env, jnewAdmin, 0);
!     if( !newAdmin ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     newAdmin = NULL;
!   }
! 
!   if( !bos_AdminCreate( (void *) serverHandle, newAdmin, &ast ) ) {
!     if( newAdmin != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jnewAdmin, newAdmin);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( newAdmin != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jnewAdmin, newAdmin);
!   }
  
  }
  
***************
*** 435,464 ****
   *                      partitions belong
   * joldAdmin   the name of the admin to remove from the list
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_removeBosAdmin(JNIEnv * env, jclass cls,
! 					    jint serverHandle,
! 					    jstring joldAdmin)
! {
!     afs_status_t ast;
!     char *oldAdmin;
  
-     if (joldAdmin != NULL) {
- 	oldAdmin = getNativeString(env, joldAdmin);
- 	if (oldAdmin == NULL) {
- 	    throwAFSException(env, JAFSADMNOMEM);
- 	    return;
- 	}
-     } else {
- 	throwAFSException(env, JAFSNULLUSER);
- 	return;
-     }
- 
-     if (!bos_AdminDelete((void *)serverHandle, oldAdmin, &ast)) {
- 	throwAFSException(env, ast);
-     }
- 
-     free(oldAdmin);
  }
  
  /**
--- 459,494 ----
   *                      partitions belong
   * joldAdmin   the name of the admin to remove from the list
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_removeBosAdmin (JNIEnv *env, jclass cls, 
! 						jlong serverHandle, 
! 						jstring joldAdmin) {
! 
!   afs_status_t ast;
!   const char *oldAdmin;
! 
!   if( joldAdmin != NULL ) {
!     oldAdmin = (*env)->GetStringUTFChars(env, joldAdmin, 0);
!     if( !oldAdmin ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     oldAdmin = NULL;
!   }
! 
!   if( !bos_AdminDelete( (void *) serverHandle, oldAdmin, &ast ) ) {
!     if( oldAdmin != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, joldAdmin, oldAdmin);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( oldAdmin != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, joldAdmin, oldAdmin);
!   }
  
  }
  
  /**
***************
*** 471,509 ****
   *                      BOS admins belong
   * returns total number of BOS administrators
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getBosAdminCount(JNIEnv * env, jclass cls,
! 					      jint serverHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
!     char *admin;
!     jstring jadmin;
!     int i = 0;
! 
!     if (!bos_AdminGetBegin((void *)serverHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     admin = (char *)malloc(sizeof(char) * BOS_MAX_NAME_LEN);
! 
!     if (!admin) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return -1;
!     }
! 
!     while (bos_AdminGetNext((void *)iterationId, admin, &ast))
! 	i++;
! 
!     free(admin);
! 
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     return i;
  }
  
  /**
--- 501,538 ----
   *                      BOS admins belong
   * returns total number of BOS administrators
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Server_getBosAdminCount (JNIEnv *env, jclass cls, 
! 						  jlong serverHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
!   char *admin;
!   jstring jadmin;
!   int i = 0;
! 
!   if( !bos_AdminGetBegin( (void *) serverHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   admin = (char *) malloc( sizeof(char)*BOS_MAX_NAME_LEN);
! 
!   if( !admin ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return -1;
!   }
! 
!   while ( bos_AdminGetNext( (void *) iterationId, admin, &ast ) ) i++;
! 
!   free(admin);
! 
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   return i;
  }
  
  /**
***************
*** 517,535 ****
   *                      partitions belong
   * returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getBosAdminsBegin(JNIEnv * env, jclass cls,
! 					       jint serverHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
  
!     if (!bos_AdminGetBegin((void *)serverHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
-     return (jint) iterationId;
  }
  
  /**
--- 546,565 ----
   *                      partitions belong
   * returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Server_getBosAdminsBegin (JNIEnv *env, jclass cls, 
! 						   jlong serverHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( !bos_AdminGetBegin( (void *) serverHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 541,573 ****
   * iterationId   the iteration ID of this iteration
   * returns the name of the next admin of the server
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Server_getBosAdminsNextString(JNIEnv * env, jclass cls,
! 						    jint iterationId)
! {
! 
!     afs_status_t ast;
!     jstring jadmin;
!     char *admin = (char *)malloc(sizeof(char) * BOS_MAX_NAME_LEN);
! 
!     if (!admin) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
  
!     if (!bos_AdminGetNext((void *)iterationId, admin, &ast)) {
! 	free(admin);
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return;
! 	}
      }
  
!     jadmin = (*env)->NewStringUTF(env, admin);
!     free(admin);
!     return jadmin;
  
  }
  
--- 571,603 ----
   * iterationId   the iteration ID of this iteration
   * returns the name of the next admin of the server
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Server_getBosAdminsNextString (JNIEnv *env, 
! 							jclass cls, 
! 							jlong iterationId) {
! 
!   afs_status_t ast;
!   jstring jadmin;
!   char *admin = (char *) malloc( sizeof(char)*BOS_MAX_NAME_LEN );
! 
!   if( !admin ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
  
!   if( !bos_AdminGetNext( (void *) iterationId, admin, &ast ) ) {
!     free(admin);
!     if( ast == ADMITERATORDONE ) {
!       return NULL;
!     } else {
!       throwAFSException( env, ast );
!       return;
      }
+   }
  
!   jadmin = (*env)->NewStringUTF(env, admin);
!   free(admin);
!   return jadmin;
  
  }
  
***************
*** 582,627 ****
   * juserObject   the user object in which to fill the values of this admin
   * returns 0 if no more admins, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getBosAdminsNext(JNIEnv * env, jclass cls,
! 					      jint cellHandle,
! 					      jint iterationId,
! 					      jobject juserObject)
! {
!     afs_status_t ast;
!     char *admin;
!     jstring jadmin;
! 
!     admin = (char *)malloc(sizeof(char) * BOS_MAX_NAME_LEN);
! 
!     if (!admin) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
  
!     if (!bos_AdminGetNext((void *)iterationId, admin, &ast)) {
! 	free(admin);
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
!     }
! 
!     jadmin = (*env)->NewStringUTF(env, admin);
! 
!     if (userCls == 0) {
! 	internal_getUserClass(env, juserObject);
!     }
  
!     (*env)->SetObjectField(env, juserObject, user_nameField, jadmin);
  
!     getUserInfoChar(env, cellHandle, admin, juserObject);
!     (*env)->SetBooleanField(env, juserObject, user_cachedInfoField, TRUE);
! 
!     free(admin);
!     return 1;
  
  }
  
--- 612,657 ----
   * juserObject   the user object in which to fill the values of this admin
   * returns 0 if no more admins, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Server_getBosAdminsNext (JNIEnv *env, jclass cls, 
! 						  jlong cellHandle, 
! 						  jlong iterationId, 
! 						  jobject juserObject ) {
!     
!   afs_status_t ast;
!   char *admin;
!   jstring jadmin;
! 
!   admin = (char *) malloc( sizeof(char)*BOS_MAX_NAME_LEN);
! 
!   if( !admin ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !bos_AdminGetNext( (void *) iterationId, admin, &ast ) ) {
!     free( admin );
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
!     }
!   }
! 
!   jadmin = (*env)->NewStringUTF(env, admin);
! 
!   if( userCls == 0 ) {
!     internal_getUserClass( env, juserObject );
!   }
  
!   (*env)->SetObjectField(env, juserObject, user_nameField, jadmin);
  
!   getUserInfoChar( env, cellHandle, admin, juserObject );
!   (*env)->SetBooleanField( env, juserObject, user_cachedInfoField, TRUE );
  
!   free( admin );
!   return 1;
  
  }
  
***************
*** 632,647 ****
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_getBosAdminsDone(JNIEnv * env, jclass cls,
! 					      jint iterationId)
! {
!     afs_status_t ast;
  
-     if (!bos_AdminGetDone((void *)iterationId, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 662,678 ----
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_getBosAdminsDone (JNIEnv *env, jclass cls, 
! 						  jlong iterationId) {
! 
!   afs_status_t ast;
! 
!   if( !bos_AdminGetDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 654,682 ****
   *                      keys belong
   * returns total number of keys
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getKeyCount(JNIEnv * env, jclass cls,
! 					 jint serverHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
!     bos_KeyInfo_t keyEntry;
!     int i = 0;
! 
!     if (!bos_KeyGetBegin((void *)serverHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
  
!     while (bos_KeyGetNext((void *)iterationId, &keyEntry, &ast))
! 	i++;
! 
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     return i;
  }
  
  /**
--- 685,712 ----
   *                      keys belong
   * returns total number of keys
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Server_getKeyCount (JNIEnv *env, jclass cls, 
! 					     jlong serverHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
!   bos_KeyInfo_t keyEntry;
!   int i = 0;
! 
!   if( !bos_KeyGetBegin( (void *) serverHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   while ( bos_KeyGetNext( (void *) iterationId, &keyEntry, &ast ) ) i++;
! 
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   return i;
  }
  
  /**
***************
*** 689,707 ****
   * serverHandle  the bos handle of the server to which the keys belong
   * returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getKeysBegin(JNIEnv * env, jclass cls,
! 					  jint serverHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
  
!     if (!bos_KeyGetBegin((void *)serverHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
-     return (jint) iterationId;
  }
  
  /**
--- 719,738 ----
   * serverHandle  the bos handle of the server to which the keys belong
   * returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Server_getKeysBegin (JNIEnv *env, jclass cls, 
! 					      jlong serverHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( !bos_KeyGetBegin( (void *) serverHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 715,747 ****
   *                 properties of the next key.
   * returns 0 if there are no more keys, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getKeysNext(JNIEnv * env, jclass cls,
! 					 jint iterationId, jobject jkeyObject)
! {
! 
!     afs_status_t ast;
!     bos_KeyInfo_t keyEntry;
  
!     if (!bos_KeyGetNext((void *)iterationId, &keyEntry, &ast)) {
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
      }
  
!     fillKeyInfo(env, jkeyObject, keyEntry);
  
!     // get the class fields if need be
!     if (keyCls == 0) {
! 	internal_getKeyClass(env, jkeyObject);
!     }
  
!     (*env)->SetBooleanField(env, jkeyObject, key_cachedInfoField, TRUE);
  
-     return 1;
  }
  
  /**
--- 746,779 ----
   *                 properties of the next key.
   * returns 0 if there are no more keys, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Server_getKeysNext (JNIEnv *env, jclass cls, 
! 					     jlong iterationId, 
! 					     jobject jkeyObject) {
!     
!   afs_status_t ast;
!   bos_KeyInfo_t keyEntry;
  
!   if( !bos_KeyGetNext( (void *) iterationId, &keyEntry, &ast ) ) {
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
      }
+   }
  
!   fillKeyInfo( env, jkeyObject, keyEntry );
  
!   // get the class fields if need be
!   if( keyCls == 0 ) {
!     internal_getKeyClass( env, jkeyObject );
!   }
! 
!   (*env)->SetBooleanField( env, jkeyObject, key_cachedInfoField, TRUE );
  
!   return 1;
  
  }
  
  /**
***************
*** 751,766 ****
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_getKeysDone(JNIEnv * env, jclass cls,
! 					 jint iterationId)
! {
!     afs_status_t ast;
  
-     if (!bos_KeyGetDone((void *)iterationId, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 783,799 ----
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_getKeysDone (JNIEnv *env, jclass cls, 
! 					     jlong iterationId) {
! 
!   afs_status_t ast;
! 
!   if( !bos_KeyGetDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 773,811 ****
   *                      processes belong
   * returns total number of processes
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getProcessCount(JNIEnv * env, jclass cls,
! 					     jint serverHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
!     char *process;
!     jstring jprocess;
!     int i = 0;
! 
!     if (!bos_ProcessNameGetBegin((void *)serverHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     process = (char *)malloc(sizeof(char) * BOS_MAX_NAME_LEN);
! 
!     if (!process) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return -1;
!     }
! 
!     while (bos_ProcessNameGetNext((void *)iterationId, process, &ast))
! 	i++;
  
!     free(process);
! 
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     return i;
  }
  
  /**
--- 806,843 ----
   *                      processes belong
   * returns total number of processes
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Server_getProcessCount (JNIEnv *env, jclass cls, 
! 						 jlong serverHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
!   char *process;
!   jstring jprocess;
!   int i = 0;
! 
!   if( !bos_ProcessNameGetBegin( (void *) serverHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
! 
!   process = (char *) malloc( sizeof(char)*BOS_MAX_NAME_LEN );
! 
!   if( !process ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return -1;
!   }
! 
!   while ( bos_ProcessNameGetNext( (void *) iterationId, process, &ast ) ) i++;
! 
!   free( process );
! 
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   return i;
  }
  
  /**
***************
*** 819,837 ****
   *                      processes belong
   * returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getProcessesBegin(JNIEnv * env, jclass cls,
! 					       jint serverHandle)
! {
!     afs_status_t ast;
!     void *iterationId;
  
!     if (!bos_ProcessNameGetBegin((void *)serverHandle, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
-     return (jint) iterationId;
  }
  
  /**
--- 851,870 ----
   *                      processes belong
   * returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_Server_getProcessesBegin (JNIEnv *env, jclass cls, 
! 						   jlong serverHandle) {
! 
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( !bos_ProcessNameGetBegin( (void *) serverHandle, &iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 843,874 ****
   * iterationId   the iteration ID of this iteration
   * returns the name of the next process of the cell
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Server_getProcessesNextString(JNIEnv * env, jclass cls,
! 						    jint iterationId)
! {
!     afs_status_t ast;
!     jstring jprocess;
!     char *process = (char *)malloc(sizeof(char) * BOS_MAX_NAME_LEN);
  
-     if (!process) {
- 	throwAFSException(env, JAFSADMNOMEM);
- 	return;
-     }
- 
-     if (!bos_ProcessNameGetNext((void *)iterationId, process, &ast)) {
- 	free(process);
- 	if (ast == ADMITERATORDONE) {
- 	    return NULL;
- 	} else {
- 	    throwAFSException(env, ast);
- 	    return;
- 	}
-     }
- 
-     jprocess = (*env)->NewStringUTF(env, process);
-     free(process);
-     return jprocess;
  }
  
  /**
--- 876,909 ----
   * iterationId   the iteration ID of this iteration
   * returns the name of the next process of the cell
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Server_getProcessesNextString (JNIEnv *env, 
! 							jclass cls, 
! 							jlong iterationId) {
! 
!   afs_status_t ast;
!   jstring jprocess;
!   char *process = (char *) malloc( sizeof(char)*BOS_MAX_NAME_LEN );
! 
!   if( !process ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !bos_ProcessNameGetNext( (void *) iterationId, process, &ast ) ) {
!     free( process );
!     if( ast == ADMITERATORDONE ) {
!       return NULL;
!     } else {
!       throwAFSException( env, ast );
!       return;
!     }
!   }
! 
!   jprocess = (*env)->NewStringUTF(env, process);
!   free( process );
!   return jprocess;
  
  }
  
  /**
***************
*** 883,927 ****
   *                          values of the next process
   * returns 0 if there are no more processes, != otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Server_getProcessesNext(JNIEnv * env, jclass cls,
! 					      jint serverHandle,
! 					      jint iterationId,
! 					      jobject jprocessObject)
! {
!     afs_status_t ast;
!     char *process = (char *)malloc(sizeof(char) * BOS_MAX_NAME_LEN);
!     jstring jprocess;
  
!     if (!process) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
  
!     if (!bos_ProcessNameGetNext((void *)iterationId, process, &ast)) {
! 	free(process);
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
!     }
!     // get the class fields if need be
!     if (processCls == 0) {
! 	internal_getProcessClass(env, jprocessObject);
!     }
  
!     jprocess = (*env)->NewStringUTF(env, process);
!     (*env)->SetObjectField(env, jprocessObject, process_nameField, jprocess);
  
-     getProcessInfoChar(env, (void *)serverHandle, process, jprocessObject);
- 
-     (*env)->SetBooleanField(env, jprocessObject, process_cachedInfoField,
- 			    TRUE);
- 
-     free(process);
-     return 1;
  }
  
  /**
--- 918,964 ----
   *                          values of the next process
   * returns 0 if there are no more processes, != otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Server_getProcessesNext (JNIEnv *env, jclass cls, 
! 						  jlong serverHandle, 
! 						  jlong iterationId, 
! 						  jobject jprocessObject) {
!     
!   afs_status_t ast;
!   char *process = (char *) malloc( sizeof(char)*BOS_MAX_NAME_LEN );
!   jstring jprocess;
! 
!   if( !process ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !bos_ProcessNameGetNext( (void *) iterationId, process, &ast ) ) {
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       free( process );
!       throwAFSException( env, ast );
!       return 0;
!     }
!   }
! 
!   // get the class fields if need be
!   if( processCls == 0 ) {
!     internal_getProcessClass( env, jprocessObject );
!   }
! 
!   jprocess = (*env)->NewStringUTF(env, process);
!   (*env)->SetObjectField(env, jprocessObject, process_nameField, jprocess);
  
!   getProcessInfoChar( env, (void *) serverHandle, process, jprocessObject );
  
!   (*env)->SetBooleanField( env, jprocessObject, 
! 			   process_cachedInfoField, TRUE );
  
!   free( process );
!   return 1;
  
  }
  
  /**
***************
*** 931,946 ****
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_getProcessesDone(JNIEnv * env, jclass cls,
! 					      jint iterationId)
! {
!     afs_status_t ast;
  
-     if (!bos_ProcessNameGetDone((void *)iterationId, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 968,984 ----
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_getProcessesDone (JNIEnv *env, jclass cls, 
! 						  jlong iterationId) {
! 
!   afs_status_t ast;
! 
!   if( !bos_ProcessNameGetDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 975,1106 ****
   *                          one block at a time and skip badly damaged 
   *                          blocks.  Use if partition has disk errors
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_salvage(JNIEnv * env, jclass cls,
! 				     jint cellHandle, jint serverHandle,
! 				     jstring jpartName, jstring jvolName,
! 				     jint numSalvagers, jstring jtempDir,
! 				     jstring jlogFile,
! 				     jboolean inspectAllVolumes,
! 				     jboolean removeBadlyDamaged,
! 				     jboolean writeInodes,
! 				     jboolean writeRootInodes,
! 				     jboolean forceDirectory,
! 				     jboolean forceBlockReads)
! {
!     afs_status_t ast;
!     char *partName;
!     char *volName;
!     char *tempDir;
!     char *logFile;
!     vos_force_t force;
!     bos_SalvageDamagedVolumes_t sdv;
!     bos_WriteInodes_t wi;
!     bos_WriteRootInodes_t wri;
!     bos_ForceDirectory_t forceD;
!     bos_ForceBlockRead_t forceBR;
! 
!     // convert strings
!     if (jpartName != NULL) {
! 	partName = getNativeString(env, jpartName);
! 	if (!partName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	partName = NULL;
!     }
! 
!     if (jvolName != NULL) {
! 	volName = getNativeString(env, jvolName);
! 	if (!volName) {
! 	    if (partName != NULL)
! 		free(partName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	volName = NULL;
!     }
! 
!     if (jtempDir != NULL) {
! 	tempDir = getNativeString(env, jtempDir);
! 	if (!tempDir) {
! 	    if (partName != NULL)
! 		free(partName);
! 	    if (volName != NULL)
! 		free(volName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	tempDir = NULL;
!     }
! 
!     if (jlogFile != NULL) {
! 	logFile = getNativeString(env, jlogFile);
! 	if (!logFile) {
! 	    if (partName != NULL)
! 		free(partName);
! 	    if (volName != NULL)
! 		free(volName);
! 	    if (tempDir != NULL)
! 		free(tempDir);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	logFile = NULL;
!     }
! 
!     // deal with booleans
!     if (inspectAllVolumes) {
! 	force = VOS_FORCE;
!     } else {
! 	force = VOS_NORMAL;
!     }
!     if (removeBadlyDamaged) {
! 	sdv = BOS_DONT_SALVAGE_DAMAGED_VOLUMES;
!     } else {
! 	sdv = BOS_SALVAGE_DAMAGED_VOLUMES;
!     }
!     if (writeInodes) {
! 	wi = BOS_SALVAGE_WRITE_INODES;
!     } else {
! 	wi = BOS_SALVAGE_DONT_WRITE_INODES;
!     }
!     if (writeRootInodes) {
! 	wri = BOS_SALVAGE_WRITE_ROOT_INODES;
!     } else {
! 	wri = BOS_SALVAGE_DONT_WRITE_ROOT_INODES;
!     }
!     if (forceDirectory) {
! 	forceD = BOS_SALVAGE_FORCE_DIRECTORIES;
!     } else {
! 	forceD = BOS_SALVAGE_DONT_FORCE_DIRECTORIES;
!     }
!     if (forceBlockReads) {
! 	forceBR = BOS_SALVAGE_FORCE_BLOCK_READS;
!     } else {
! 	forceBR = BOS_SALVAGE_DONT_FORCE_BLOCK_READS;
!     }
! 
!     //salvage!
!     if (!bos_Salvage
! 	((void *)cellHandle, (void *)serverHandle, partName, volName,
! 	 (int)numSalvagers, tempDir, logFile, force, sdv, wi, wri, forceD,
! 	 forceBR, &ast)) {
! 	throwAFSException(env, ast);
!     }
!     // release strings
!     if (partName != NULL)
! 	free(partName);
!     if (volName != NULL)
! 	free(volName);
!     if (tempDir != NULL)
! 	free(tempDir);
!     if (logFile != NULL)
! 	free(logFile);
  
  }
  
--- 1013,1164 ----
   *                          one block at a time and skip badly damaged 
   *                          blocks.  Use if partition has disk errors
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_salvage (JNIEnv *env, jclass cls, 
! 					 jlong cellHandle, jlong serverHandle, 
! 					 jstring jpartName, jstring jvolName, 
! 					 jint numSalvagers, jstring jtempDir, 
! 					 jstring jlogFile, 
! 					 jboolean inspectAllVolumes, 
! 					 jboolean removeBadlyDamaged, 
! 					 jboolean writeInodes, 
! 					 jboolean writeRootInodes, 
! 					 jboolean forceDirectory, 
! 					 jboolean forceBlockReads) {
! 
!   afs_status_t ast;
!   const char *partName;
!   const char *volName;
!   const char *tempDir;
!   const char *logFile;
!   vos_force_t force;
!   bos_SalvageDamagedVolumes_t sdv;
!   bos_WriteInodes_t wi;
!   bos_WriteRootInodes_t wri;
!   bos_ForceDirectory_t forceD;
!   bos_ForceBlockRead_t forceBR;
!   
!   // convert strings
!   if( jpartName != NULL ) {
!     partName = (*env)->GetStringUTFChars(env, jpartName, 0);    
!     if( !partName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     partName = NULL;
!   }
!   if( jvolName != NULL ) {
!     volName = (*env)->GetStringUTFChars(env, jvolName, 0);    
!     if( !volName ) {
!       if( partName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jpartName, partName);    
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     volName = NULL;
!   }
!   if( jtempDir != NULL ) {
!     tempDir = (*env)->GetStringUTFChars(env, jtempDir, 0);    
!     if( !tempDir ) {
!       if( partName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jpartName, partName);    
!       }
!       if( volName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jvolName, volName);    
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     tempDir = NULL;
!   }
!   if( jlogFile != NULL ) {
!     logFile = (*env)->GetStringUTFChars(env, jlogFile, 0);    
!     if( !logFile ) {
!       if( partName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jpartName, partName);    
!       }
!       if( volName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jvolName, volName);    
!       }
!       if( tempDir != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jtempDir, tempDir);    
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     logFile = NULL;
!   }
! 
!   // deal with booleans
!   if( inspectAllVolumes ) {
!     force = VOS_FORCE;
!   } else {
!     force = VOS_NORMAL;
!   }
!   if( removeBadlyDamaged ) {
!     sdv = BOS_DONT_SALVAGE_DAMAGED_VOLUMES;
!   } else {
!     sdv = BOS_SALVAGE_DAMAGED_VOLUMES;
!   }
!   if( writeInodes ) {
!     wi = BOS_SALVAGE_WRITE_INODES;
!   } else {
!     wi = BOS_SALVAGE_DONT_WRITE_INODES;
!   }
!   if( writeRootInodes ) {
!     wri = BOS_SALVAGE_WRITE_ROOT_INODES;
!   } else {
!     wri = BOS_SALVAGE_DONT_WRITE_ROOT_INODES;
!   }
!   if( forceDirectory ) {
!     forceD = BOS_SALVAGE_FORCE_DIRECTORIES;
!   } else {
!     forceD = BOS_SALVAGE_DONT_FORCE_DIRECTORIES;
!   }
!   if( forceBlockReads ) {
!     forceBR = BOS_SALVAGE_FORCE_BLOCK_READS;
!   } else {
!     forceBR = BOS_SALVAGE_DONT_FORCE_BLOCK_READS;
!   }
! 
!   //salvage!
!   if( !bos_Salvage( (void *) cellHandle, (void *) serverHandle, partName, 
! 		    volName, (int) numSalvagers, tempDir, logFile, force, sdv, 
! 		    wi, wri, forceD, forceBR, &ast ) ) {
!     if( partName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jpartName, partName);    
!     }
!     if( volName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jvolName, volName);    
!     }
!     if( tempDir != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jtempDir, tempDir);    
!     }
!     if( logFile != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jlogFile, logFile);    
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   // release strings
!   if( partName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jpartName, partName);    
!   }
!   if( volName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jvolName, volName);    
!   }
!   if( tempDir != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jtempDir, tempDir);    
!   }
!   if( logFile != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jlogFile, logFile);    
!   }
  
  }
  
***************
*** 1118,1184 ****
   * execTime   the ExecutableTime object, in which 
   *                   to fill the restart time fields
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_getRestartTime(JNIEnv * env, jclass cls,
! 					    jint serverHandle, jint jtype,
! 					    jobject exectime)
! {
!     afs_status_t ast;
!     bos_Restart_t type;
!     bos_RestartTime_t time;
!     jfieldID hourField;
!     jfieldID minField;
!     jfieldID secField;
!     jfieldID dayField;
!     jfieldID neverField;
!     jfieldID nowField;
! 
!     // get the class fields if need be
!     if (exectimeCls == 0) {
! 	internal_getExecTimeClass(env, exectime);
!     }
! 
!     if (jtype == org_openafs_jafs_Server_RESTART_BINARY) {
! 	type = BOS_RESTART_DAILY;
!     } else {
! 	type = BOS_RESTART_WEEKLY;
!     }
! 
!     hourField = exectime_HourField;
!     minField = exectime_MinField;
!     secField = exectime_SecField;
!     dayField = exectime_DayField;
!     neverField = exectime_NeverField;
!     nowField = exectime_NowField;
! 
!     if (!bos_ExecutableRestartTimeGet
! 	((void *)serverHandle, type, &time, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
!     // set now
!     (*env)->SetBooleanField(env, exectime, nowField,
! 			    (time.mask & BOS_RESTART_TIME_NOW));
! 
!     // set never
!     (*env)->SetBooleanField(env, exectime, neverField,
! 			    (time.mask & BOS_RESTART_TIME_NEVER));
! 
!     // set hour
!     (*env)->SetShortField(env, exectime, hourField, time.hour);
! 
!     // set minute
!     (*env)->SetShortField(env, exectime, minField, time.min);
! 
!     // set second
!     (*env)->SetShortField(env, exectime, secField, time.sec);
! 
!     // set day
!     if (time.mask & BOS_RESTART_TIME_DAY) {
! 	(*env)->SetShortField(env, exectime, dayField, time.day);
!     } else {
! 	(*env)->SetShortField(env, exectime, dayField, (jshort) - 1);
!     }
  
  }
  
--- 1176,1242 ----
   * execTime   the ExecutableTime object, in which 
   *                   to fill the restart time fields
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_getRestartTime
!   (JNIEnv *env, jclass cls, jlong serverHandle, jint jtype, jobject exectime)
! {
!   afs_status_t ast;
!   bos_Restart_t type;
!   bos_RestartTime_t time;
!   jfieldID hourField;
!   jfieldID minField;
!   jfieldID secField;
!   jfieldID dayField;
!   jfieldID neverField;
!   jfieldID nowField;
! 
!   // get the class fields if need be
!   if( exectimeCls == 0 ) {
!     internal_getExecTimeClass( env, exectime );
!   }
! 
!   if( jtype == org_openafs_jafs_Server_RESTART_BINARY ) {
!     type = BOS_RESTART_DAILY;
!   } else {
!     type = BOS_RESTART_WEEKLY;
!   }
! 
!   hourField  = exectime_HourField;
!   minField   = exectime_MinField;
!   secField   = exectime_SecField;
!   dayField   = exectime_DayField;
!   neverField = exectime_NeverField;
!   nowField   = exectime_NowField;
! 
!   if( !bos_ExecutableRestartTimeGet( (void *) serverHandle, type, 
! 				     &time, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
!   
!   // set now
!   (*env)->SetBooleanField(env, exectime, nowField, 
! 			  (time.mask & BOS_RESTART_TIME_NOW) );
!   
!   // set never
!   (*env)->SetBooleanField(env, exectime, neverField, 
! 			  (time.mask & BOS_RESTART_TIME_NEVER) );
! 
!   // set hour
!   (*env)->SetShortField(env, exectime, hourField, time.hour );
! 
!   // set minute
!   (*env)->SetShortField(env, exectime, minField, time.min );
! 
!   // set second
!   (*env)->SetShortField(env, exectime, secField, time.sec );
! 
!   // set day
!   if( time.mask & BOS_RESTART_TIME_DAY ) {
!     (*env)->SetShortField(env, exectime, dayField, time.day );
!   } else {
!     (*env)->SetShortField(env, exectime, dayField, (jshort) -1 );
!   }
  
  }
  
***************
*** 1195,1305 ****
   * executableTime   the ExecutableTime object containing the 
   *                         desired information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_setRestartTime(JNIEnv * env, jclass cls,
! 					    jint serverHandle, jint jtype,
! 					    jobject exectime)
! {
!     afs_status_t ast;
!     bos_Restart_t type;
!     bos_RestartTime_t time;
!     jboolean doHour;
!     jboolean doMinute;
!     jboolean doSecond;
!     jboolean doDay;
!     jboolean doNever;
!     jboolean doNow;
!     jshort hour;
!     jshort minute;
!     jshort second;
!     jshort day;
!     jfieldID hourField;
!     jfieldID minField;
!     jfieldID secField;
!     jfieldID dayField;
!     jfieldID neverField;
!     jfieldID nowField;
! 
!     // get the class fields if need be
!     if (exectimeCls == 0) {
! 	internal_getExecTimeClass(env, exectime);
!     }
! 
!     if (jtype == org_openafs_jafs_Server_RESTART_BINARY) {
! 	type = BOS_RESTART_DAILY;
!     } else {
! 	type = BOS_RESTART_WEEKLY;
!     }
! 
!     hourField = exectime_HourField;
!     minField = exectime_MinField;
!     secField = exectime_SecField;
!     dayField = exectime_DayField;
!     neverField = exectime_NeverField;
!     nowField = exectime_NowField;
! 
!     hour = (*env)->GetShortField(env, exectime, hourField);
!     if (hour != 0) {
! 	doHour = TRUE;
!     } else {
! 	doHour = FALSE;
!     }
!     minute = (*env)->GetShortField(env, exectime, minField);
!     if (minute != 0) {
! 	doMinute = TRUE;
!     } else {
! 	doMinute = FALSE;
!     }
!     second = (*env)->GetShortField(env, exectime, secField);
!     if (second != 0) {
! 	doSecond = TRUE;
!     } else {
! 	doSecond = FALSE;
!     }
!     day = (*env)->GetShortField(env, exectime, dayField);
!     if (day != -1) {
! 	doDay = TRUE;
!     } else {
! 	doDay = FALSE;
!     }
!     doNever = (*env)->GetBooleanField(env, exectime, neverField);
!     doNow = (*env)->GetBooleanField(env, exectime, nowField);
! 
!     bzero(&time, sizeof(time));
  
-     if (jtype == org_openafs_jafs_Server_RESTART_BINARY) {
- 	type = BOS_RESTART_DAILY;
-     } else {
- 	type = BOS_RESTART_WEEKLY;
-     }
- 
-     if (doHour) {
- 	time.mask |= BOS_RESTART_TIME_HOUR;
-     }
-     if (doMinute) {
- 	time.mask |= BOS_RESTART_TIME_MINUTE;
-     }
-     if (doSecond) {
- 	time.mask |= BOS_RESTART_TIME_SECOND;
-     }
-     if (doDay) {
- 	time.mask |= BOS_RESTART_TIME_DAY;
-     }
-     if (doNever) {
- 	time.mask |= BOS_RESTART_TIME_NEVER;
-     }
-     if (doNow) {
- 	time.mask |= BOS_RESTART_TIME_NOW;
-     }
- 
-     time.hour = hour;
-     time.min = minute;
-     time.sec = second;
-     time.day = day;
- 
-     if (!bos_ExecutableRestartTimeSet((void *)serverHandle, type, time, &ast)) {
- 	throwAFSException(env, ast);
-     }
  }
  
  /**
--- 1253,1366 ----
   * executableTime   the ExecutableTime object containing the 
   *                         desired information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_setRestartTime (JNIEnv *env, jclass cls, 
! 						jlong serverHandle, jint jtype, 
! 						jobject exectime ) {
! 
!   afs_status_t ast;
!   bos_Restart_t type;
!   bos_RestartTime_t time;
!   jboolean doHour;
!   jboolean doMinute;
!   jboolean doSecond;
!   jboolean doDay;
!   jboolean doNever;
!   jboolean doNow;  
!   jshort hour;
!   jshort minute;
!   jshort second;
!   jshort day;
!   jfieldID hourField;
!   jfieldID minField;
!   jfieldID secField;
!   jfieldID dayField;
!   jfieldID neverField;
!   jfieldID nowField;
! 
!   // get the class fields if need be
!   if( exectimeCls == 0 ) {
!     internal_getExecTimeClass( env, exectime );
!   }
! 
!   if( jtype == org_openafs_jafs_Server_RESTART_BINARY ) {
!     type = BOS_RESTART_DAILY;
!   } else {
!     type = BOS_RESTART_WEEKLY;
!   }
! 
!   hourField  = exectime_HourField;
!   minField   = exectime_MinField;
!   secField   = exectime_SecField;
!   dayField   = exectime_DayField;
!   neverField = exectime_NeverField;
!   nowField   = exectime_NowField;
! 
!   hour = (*env)->GetShortField(env, exectime, hourField );
!   if( hour != 0 ) {
!     doHour = TRUE;
!   } else {
!     doHour = FALSE;
!   }
!   minute = (*env)->GetShortField(env, exectime, minField );
!   if( minute != 0 ) {
!     doMinute = TRUE;
!   } else {
!     doMinute = FALSE;
!   }
!   second = (*env)->GetShortField(env, exectime, secField );
!   if( second != 0 ) {
!     doSecond = TRUE;
!   } else {
!     doSecond = FALSE;
!   }
!   day = (*env)->GetShortField(env, exectime, dayField );
!   if( day != -1 ) {
!     doDay = TRUE;
!   } else {
!     doDay = FALSE;
!   }
!   doNever = (*env)->GetBooleanField(env, exectime, neverField );
!   doNow = (*env)->GetBooleanField(env, exectime, nowField );
! 
!   bzero(&time, sizeof(time));
! 
!   if( jtype == org_openafs_jafs_Server_RESTART_BINARY ) {
!     type = BOS_RESTART_DAILY;
!   } else {
!     type = BOS_RESTART_WEEKLY;
!   }  
! 
!   if( doHour ) {
!     time.mask |= BOS_RESTART_TIME_HOUR;
!   }
!   if( doMinute ) {
!     time.mask |= BOS_RESTART_TIME_MINUTE;
!   }
!   if( doSecond ) {
!     time.mask |= BOS_RESTART_TIME_SECOND;
!   }
!   if( doDay ) {
!     time.mask |= BOS_RESTART_TIME_DAY;
!   }
!   if( doNever ) {
!     time.mask |= BOS_RESTART_TIME_NEVER;
!   }
!   if( doNow ) {
!     time.mask |= BOS_RESTART_TIME_NOW;
!   }
! 
!   time.hour = hour;
!   time.min = minute;
!   time.sec = second;
!   time.day = day;
! 
!   if( !bos_ExecutableRestartTimeSet( (void *) serverHandle, type, 
! 				     time, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 1311,1335 ****
   * serverHandle  the vos handle of the server     
   * partition   the id of the partition to sync, can be -1 to ignore
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_syncServerWithVLDB(JNIEnv * env, jclass cls,
! 						jint cellHandle,
! 						jint serverHandle,
! 						jint partition)
! {
!     afs_status_t ast;
!     int *part;
! 
!     if (partition == -1) {
! 	part = NULL;
!     } else {
! 	part = (int *)&partition;
!     }
  
-     if (!vos_ServerSync
- 	((void *)cellHandle, (void *)serverHandle, NULL, part, &ast)) {
- 	throwAFSException(env, ast);
-     }
  }
  
  /**
--- 1372,1398 ----
   * serverHandle  the vos handle of the server     
   * partition   the id of the partition to sync, can be -1 to ignore
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_syncServerWithVLDB (JNIEnv *env, jclass cls, 
! 						    jlong cellHandle, 
! 						    jlong serverHandle, 
! 						    jint partition) {
! 
!   afs_status_t ast;
!   int *part;
! 
!   if( partition == -1 ) {
!     part = NULL;
!   } else {
!     part = (int *) &partition;
!   }
! 
!   if( !vos_ServerSync( (void *) cellHandle, (void *) serverHandle, 
! 		       NULL, part, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 1342,1374 ****
   * partition   the id of the partition to sync, can be -1 to ignore
   * forceDeletion   whether or not to force the deletion of bad volumes
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_syncVLDBWithServer(JNIEnv * env, jclass cls,
! 						jint cellHandle,
! 						jint serverHandle,
! 						jint partition,
! 						jboolean forceDeletion)
! {
!     afs_status_t ast;
!     int *part;
!     vos_force_t force;
  
-     if (partition == -1) {
- 	part = NULL;
-     } else {
- 	part = (int *)&partition;
-     }
- 
-     if (forceDeletion) {
- 	force = VOS_FORCE;
-     } else {
- 	force = VOS_NORMAL;
-     }
- 
-     if (!vos_VLDBSync
- 	((void *)cellHandle, (void *)serverHandle, NULL, part, force, &ast)) {
- 	throwAFSException(env, ast);
-     }
  }
  
  /**
--- 1405,1439 ----
   * partition   the id of the partition to sync, can be -1 to ignore
   * forceDeletion   whether or not to force the deletion of bad volumes
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_syncVLDBWithServer (JNIEnv *env, jclass cls, 
! 						    jlong cellHandle, 
! 						    jlong serverHandle, 
! 						    jint partition, 
! 						    jboolean forceDeletion) {
! 
!   afs_status_t ast;
!   int *part;
!   vos_force_t force;
! 
!   if( partition == -1 ) {
!     part = NULL;
!   } else {
!     part = (int *) &partition;
!   }
!   
!   if( forceDeletion ) {
!     force = VOS_FORCE;
!   } else {
!     force = VOS_NORMAL;
!   }
! 
!   if( !vos_VLDBSync( (void *) cellHandle, (void *) serverHandle, NULL, part, 
! 		     force, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 1379,1394 ****
   * serverHandle  the bos handle of the server to which the 
   *                      processes belong
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_startAllProcesses(JNIEnv * env, jclass cls,
! 					       jint serverHandle)
! {
!     afs_status_t ast;
  
-     if (!bos_ProcessAllStart((void *)serverHandle, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 1444,1460 ----
   * serverHandle  the bos handle of the server to which the 
   *                      processes belong
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_startAllProcesses (JNIEnv *env, jclass cls, 
! 						   jlong serverHandle) {
! 
!   afs_status_t ast;
! 
!   if( !bos_ProcessAllStart( (void *) serverHandle, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 1399,1414 ****
   * serverHandle  the bos handle of the server to which the 
   *                      processes belong
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_stopAllProcesses(JNIEnv * env, jclass cls,
! 					      jint serverHandle)
! {
!     afs_status_t ast;
  
-     if (!bos_ProcessAllStop((void *)serverHandle, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 1465,1481 ----
   * serverHandle  the bos handle of the server to which the 
   *                      processes belong
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_stopAllProcesses (JNIEnv *env, jclass cls, 
! 						  jlong serverHandle) {
! 
!   afs_status_t ast;
! 
!   if( !bos_ProcessAllStop( (void *) serverHandle, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 1420,1443 ****
   *                      processes belong
   * restartBosServer   whether or not to restart the bos server as well
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_restartAllProcesses(JNIEnv * env, jclass cls,
! 						 jint serverHandle,
! 						 jboolean restartBosServer)
! {
!     afs_status_t ast;
!     bos_RestartBosServer_t rbs;
  
-     if (restartBosServer) {
- 	rbs = BOS_RESTART_BOS_SERVER;
-     } else {
- 	rbs = BOS_DONT_RESTART_BOS_SERVER;
-     }
- 
-     if (!bos_ProcessAllStopAndRestart((void *)serverHandle, rbs, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 1487,1511 ----
   *                      processes belong
   * restartBosServer   whether or not to restart the bos server as well
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_restartAllProcesses (JNIEnv *env, jclass cls, 
! 						     jlong serverHandle, 
! 						   jboolean restartBosServer) {
! 
!   afs_status_t ast;
!   bos_RestartBosServer_t rbs;
!   
!   if( restartBosServer ) {
!     rbs = BOS_RESTART_BOS_SERVER;
!   } else {
!     rbs = BOS_DONT_RESTART_BOS_SERVER;
!   }
! 
!   if( !bos_ProcessAllStopAndRestart( (void *) serverHandle, rbs, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 1450,1526 ****
   * serverHandle  the bos handle of the server to which the key belongs
   * jlogFile   the full path and name of the desired bos log
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_Server_getLog(JNIEnv * env, jclass cls,
! 				    jint serverHandle, jstring jlogFile)
! {
      afs_status_t ast;
!     char *logFile;
      char *logData;
      unsigned long currInLogSize = 1;
      unsigned long currOutLogSize = 0;
      jstring logOut;
  
!     logData = (char *)malloc(sizeof(char) * currInLogSize);
!     if (logData == NULL) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return NULL;
      }
  
!     if (jlogFile != NULL) {
! 	logFile = getNativeString(env, jlogFile);
! 	if (logFile == NULL) {
! 	    free(logData);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return NULL;
! 	}
!     } else {
! 	free(logData);
! 	throwAFSException(env, JAFSNULLARG);
! 	return NULL;
      }
  
      // check how big the log is . . .
!     if (!bos_LogGet
! 	((void *)serverHandle, logFile, &currOutLogSize, logData, &ast)) {
! 	// anything but not enough room in buffer
! 	if (ast != ADMMOREDATA) {
! 	    free(logData);
! 	    free(logFile);
! 	    throwAFSException(env, ast);
! 	    return NULL;
  	}
      }
!     // free previous allocation
!     free(logData);
  
      // increase log size (plus one for terminator)
      currInLogSize = currOutLogSize + 1;
- 
      // allocate buffer
!     logData = (char *)malloc(sizeof(char) * currInLogSize);
!     if (logData == NULL) {
! 	free(logFile);
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return NULL;
      }
      // get the log for real
!     if (!bos_LogGet
! 	((void *)serverHandle, logFile, &currOutLogSize, logData, &ast)) {
! 	free(logData);
! 	free(logFile);
! 	throwAFSException(env, ast);
  	return NULL;
      }
!     // NULL-terminate
      logData[currOutLogSize] == '\0';
  
      logOut = (*env)->NewStringUTF(env, logData);
! 
!     free(logData);
!     free(logFile);
! 
      return logOut;
  }
  
  
--- 1518,1606 ----
   * serverHandle  the bos handle of the server to which the key belongs
   * jlogFile   the full path and name of the desired bos log
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_Server_getLog(JNIEnv *env, jclass cls, 
! 				       jlong serverHandle, jstring jlogFile) {
! 
      afs_status_t ast;
!     const char *logFile;
      char *logData;
      unsigned long currInLogSize = 1;
      unsigned long currOutLogSize = 0;
      jstring logOut;
  
!     if( jlogFile != NULL ) {
!       logFile = (*env)->GetStringUTFChars(env, jlogFile, 0);
!       if( !logFile ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
!     } else {
!       logFile = NULL;
      }
  
!     logData = (char *) malloc( sizeof(char)*currInLogSize );
!     if( !logData ) {
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
      }
  
      // check how big the log is . . .
!     if( !bos_LogGet( (void *) serverHandle, logFile, 
! 		     &currOutLogSize, logData, &ast ) ) {
!       // anything but not enough room in buffer
!       if( ast != ADMMOREDATA ) {
! 	free( logData );
! 	if( logFile != NULL ) { 
! 	  (*env)->ReleaseStringUTFChars(env, jlogFile, logFile);
  	}
+ 	throwAFSException( env, ast );
+ 	return NULL;
+       }
      }
! 
!     free( logData );
  
      // increase log size (plus one for terminator)
      currInLogSize = currOutLogSize + 1;
      // allocate buffer
!     logData = (char *) malloc( sizeof(char)*currInLogSize );
!     if( !logData ) {
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
      }
+ 
+     if( !logData ) {
+       // memory exception
+       if( logFile != NULL ) { 
+ 	  (*env)->ReleaseStringUTFChars(env, jlogFile, logFile);
+       }
+       throwAFSException( env, ast );
+       return NULL;
+     }
+ 
      // get the log for real
!     if( !bos_LogGet( (void *) serverHandle, logFile, &currOutLogSize, 
! 		     logData, &ast ) ) {
! 	free( logData );
! 	if( logFile != NULL ) { 
! 	  (*env)->ReleaseStringUTFChars(env, jlogFile, logFile);
! 	}
! 	(*env)->ReleaseStringUTFChars(env, jlogFile, logFile);
! 	throwAFSException( env, ast );
  	return NULL;
      }
!     
      logData[currOutLogSize] == '\0';
  
      logOut = (*env)->NewStringUTF(env, logData);
!     
!     free( logData );
!     if( logFile != NULL ) { 
!       (*env)->ReleaseStringUTFChars(env, jlogFile, logFile);
!     }
      return logOut;
+ 
  }
  
  
***************
*** 1532,1569 ****
   * serverHandle  the bos handle of the server to which the key belongs
   * jcommand     the text of the commmand to execute
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_executeCommand(JNIEnv * env, jclass cls,
! 					    jint serverHandle,
! 					    jstring jcommand)
! {
!     afs_status_t ast;
!     char *command;
  
-     if (jcommand != NULL) {
- 	command = getNativeString(env, jcommand);
- 	if (command == NULL) {
- 	    throwAFSException(env, JAFSADMNOMEM);
- 	    return;
- 	}
-     } else {
- 	throwAFSException(env, JAFSNULLARG);
- 	return;
-     }
- 
-     if (!bos_CommandExecute((void *)serverHandle, command, &ast)) {
- 	throwAFSException(env, ast);
-     }
- 
-     free(command);
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_reclaimServerMemory(JNIEnv * env, jclass cls)
! {
!     if (serverCls) {
! 	(*env)->DeleteGlobalRef(env, serverCls);
! 	serverCls = 0;
!     }
  }
--- 1612,1676 ----
   * serverHandle  the bos handle of the server to which the key belongs
   * jcommand     the text of the commmand to execute
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Server_executeCommand (JNIEnv *env, jclass cls, 
! 						jlong serverHandle, 
! 						jstring jcommand) {
! 
!   afs_status_t ast;
!   const char *command;
! 
!   if( jcommand != NULL ) {
!     command = (*env)->GetStringUTFChars(env, jcommand, 0);
!     if( !command ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     command = NULL;
!   }
! 
!   if( !bos_CommandExecute( (void *) serverHandle, command, &ast ) ) {
!     if( command != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jcommand, command);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( command != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jcommand, command);
!   }
  
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Server_reclaimServerMemory (JNIEnv *env, jclass cls) {
! 
!   if( serverCls ) {
!       (*env)->DeleteGlobalRef(env, serverCls);
!       serverCls = 0;
!   }
! 
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/User.c
diff -c openafs/src/JAVA/libjafs/User.c:1.3 openafs/src/JAVA/libjafs/User.c:1.3.2.1
*** openafs/src/JAVA/libjafs/User.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/User.c	Fri Oct 14 22:14:12 2005
***************
*** 68,73 ****
--- 68,74 ----
  extern jfieldID user_lockedUntilField;
  
  extern jclass groupCls;
+ //extern jfieldID group_cellHandleField;
  extern jfieldID group_nameField;
  extern jfieldID group_cachedInfoField;
  
***************
*** 80,186 ****
   * env      the Java environment
   * cls      the current Java class
   * cellHandle    the handle of the cell to which the user belongs
!  * jusername      the name of the user to create
   * jpassword      the password for the new user
   * uid     the user id to assign to the user (0 to have one 
   *                automatically assigned)
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_create(JNIEnv * env, jclass cls, jint cellHandle,
! 				  jstring jusername, jstring jpassword,
! 				  jint uid)
  {
!     afs_status_t ast;
!     char *username;
!     char *password;
!     kas_identity_p who = (kas_identity_p) malloc(sizeof(kas_identity_t));
! 
!     if (!who) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
!     // convert java strings
!     if (jusername != NULL) {
! 	username = getNativeString(env, jusername);
! 	if (username == NULL) {
! 	    free(who);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(who);
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
! 
!     if (jpassword != NULL) {
! 	password = getNativeString(env, jpassword);
! 	if (password == NULL) {
! 	    free(who);
! 	    free(username);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(who);
! 	free(username);
! 	throwAFSException(env, JAFSNULLPASS);
! 	return;
!     }
! 
!     // make sure the name is within the allowed bounds
!     if (strlen(username) > KAS_MAX_NAME_LEN) {
! 	free(who);
! 	free(username);
! 	free(password);
! 	throwAFSException(env, ADMPTSUSERNAMETOOLONG);
! 	return;
!     }
!     // make sure name doesn't have ":" in it
!     if (strchr(username, ':') != (int)NULL) {
! 	free(who);
! 	free(username);
! 	free(password);
! 	throwAFSException(env, PRBADNAM);
! 	return;
!     }
!     // make sure the id isn't negative
!     if (uid < 0) {
! 	free(who);
! 	free(username);
! 	free(password);
! 	// use the "bad arg" error code even though it's an ID exception.  
! 	// There isn't a bad user ID error code
! 	throwAFSException(env, PRBADARG);
! 	return;
!     }
! 
!     if (username != NULL) {
! 	internal_makeKasIdentity(username, who);
!     }
!     // create the kas entry
!     if (!kas_PrincipalCreate((void *)cellHandle, NULL, who, password, &ast)) {
! 	free(who);
! 	free(username);
! 	free(password);
! 	throwAFSException(env, ast);
! 	return;
!     }
!     // create the pts entry - if there's an error, make sure to delete 
!     // the kas entry 
!     if (!pts_UserCreate((void *)cellHandle, username, (int *)&uid, &ast)) {
! 	afs_status_t ast_kd;
! 	kas_PrincipalDelete((void *)cellHandle, NULL, who, &ast_kd);
! 	free(who);
! 	free(username);
! 	free(password);
! 	throwAFSException(env, ast);
! 	return;
!     }
! 
      free(who);
!     free(username);
!     free(password);
  }
  
  /**
--- 81,220 ----
   * env      the Java environment
   * cls      the current Java class
   * cellHandle    the handle of the cell to which the user belongs
!  * juserName      the name of the user to create
   * jpassword      the password for the new user
   * uid     the user id to assign to the user (0 to have one 
   *                automatically assigned)
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_User_create
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring juserName, 
!    jstring jpassword, jint uid )
  {
!   afs_status_t ast;
!   const char *userName;
!   const char *password;
!   kas_identity_p who = (kas_identity_p) malloc( sizeof(kas_identity_t) );
!   
!   if( !who ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   // convert java strings
!   if( juserName != NULL ) {
!     userName = (*env)->GetStringUTFChars(env, juserName, 0);
!     if( !userName ) {
!       free( who );
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     userName = NULL;
!   }
!   if( jpassword != NULL ) {
!     password = (*env)->GetStringUTFChars(env, jpassword, 0);
!     if( !password ) {
!       free( who );
!       if( userName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, juserName, userName);
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     password = NULL;
!   }
! 
!   // make sure the name is within the allowed bounds
!   if( userName != NULL && strlen( userName ) > KAS_MAX_NAME_LEN ) {
!     free( who );
!     // release converted java strings
!     if( userName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     if( password != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jpassword, password);
!     }
!     throwAFSException( env, ADMPTSUSERNAMETOOLONG  );
!     return;
!   }
! 
!   // make sure name doesn't have ":" in it
!   if( userName != NULL && strchr( userName, ':' ) != (int) NULL ) {
!       free(who);
!       // release converted java strings
!       if( userName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, juserName, userName);
!       }
!       if( password != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jpassword, password);
!       }
!       throwAFSException( env, PRBADNAM );
!       return;
!   }
! 
!   // make sure the id isn't negative
!   if( uid < 0 ) {
!       free(who);
!       // release converted java strings
!       if( userName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, juserName, userName);
!       }
!       if( password != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jpassword, password);
!       }
!       // use the "bad arg" error code even though it's an ID exception.  
!       // There isn't a bad user ID error code
!       throwAFSException( env, PRBADARG );
!       return;
!   }
! 
!   if( userName != NULL ) {
!     internal_makeKasIdentity( userName, who );
!   }
! 
!   // create the kas entry
!   if (!kas_PrincipalCreate( (void *) cellHandle, NULL, who, 
! 			    password, &ast ) ) {
      free(who);
!     // release converted java strings
!     if( userName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     if( password != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jpassword, password);
!     }
!     throwAFSException( env, ast );
!     return;
!   } 
! 
!   // create the pts entry - if there's an error, make sure to delete 
!   // the kas entry 
!   if( !pts_UserCreate( (void *) cellHandle, userName, (int *) &uid, &ast ) ) {
!     afs_status_t ast_kd;
!     kas_PrincipalDelete( (void *) cellHandle, NULL, who, &ast_kd );
!     free( who );
!     // release converted java strings
!     if( userName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     if( password != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jpassword, password);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   free( who );
!   // release converted java strings
!   if( userName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, juserName, userName);
!   }
!   if( password != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jpassword, password);
!   }
! 
  }
  
  /**
***************
*** 191,261 ****
   * env      the Java environment
   * cls      the current Java class
   * cellHandle    the handle of the cell to which the user belongs
!  * jusername      the name of the user to delete
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_delete(JNIEnv * env, jclass cls, jint cellHandle,
! 				  jstring jusername)
  {
!     afs_status_t ast;
!     char *username;
!     kas_identity_p who = (kas_identity_p) malloc(sizeof(kas_identity_t));
!     int kas;
! 
!     if (!who) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (jusername != NULL) {
! 	username = getNativeString(env, jusername);
! 	if (username == NULL) {
! 	    free(who);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(who);
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
! 
!     // make sure the name is within the allowed bounds
!     if (strlen(username) > KAS_MAX_NAME_LEN) {
! 	free(who);
! 	free(username);
! 	throwAFSException(env, ADMPTSUSERNAMETOOLONG);
! 	return;
!     }
! 
!     internal_makeKasIdentity(username, who);
! 
!     // delete the kas entry
!     if (!kas_PrincipalDelete((void *)cellHandle, NULL, who, &ast)) {
! 	if (ast != KANOENT) {
! 	    free(who);
! 	    free(username);
! 	    throwAFSException(env, ast);
! 	    return;
! 	} else {
! 	    kas = FALSE;
! 	}
!     }
!     //delete the pts entry
!     if (!pts_UserDelete((void *)cellHandle, username, &ast)) {
! 	// throw exception if there was no such pts user only if there was 
! 	// also no such kas user
! 	if ((ast == ADMPTSFAILEDNAMETRANSLATE && !kas)
! 	    || ast != ADMPTSFAILEDNAMETRANSLATE) {
! 	    free(who);
! 	    free(username);
! 	    throwAFSException(env, ast);
! 	    return;
! 	}
!     }
! 
!     free(who);
!     free(username);
  }
  
  /**
--- 225,305 ----
   * env      the Java environment
   * cls      the current Java class
   * cellHandle    the handle of the cell to which the user belongs
!  * juserName      the name of the user to delete
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_User_delete
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring juserName )
  {
!   afs_status_t ast;
!   const char *userName;
!   kas_identity_p who = (kas_identity_p) malloc( sizeof(kas_identity_t) );  
!   int kas;
!   
!   if( !who ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( juserName != NULL ) {
!       userName = (*env)->GetStringUTFChars(env, juserName, 0);
!       if( !userName ) {
! 	free( who );
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!       }
!   } else {
!       userName = NULL;
!   }
! 
!   // make sure the name is within the allowed bounds
!   if( userName != NULL && strlen( userName ) > KAS_MAX_NAME_LEN ) {
!     free( who );
!     if( userName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     throwAFSException( env, ADMPTSUSERNAMETOOLONG  );
!     return;
!   }
! 
!   if( userName != NULL ) {
!       internal_makeKasIdentity( userName, who );
!   }
! 
!   // delete the kas entry
!   if( !kas_PrincipalDelete( (void *) cellHandle, NULL, who, &ast ) ) {
!       if( ast != KANOENT ) {
! 	  free(who);
! 	  if( userName != NULL ) {
! 	      (*env)->ReleaseStringUTFChars(env, juserName, userName);
! 	  }
! 	  throwAFSException( env, ast );
! 	  return;
!       } else {
! 	  kas = FALSE;
!       }
!   }
! 
!   //delete the pts entry
!   if( !pts_UserDelete( (void *) cellHandle, userName, &ast ) ) {
!       // throw exception if there was no such pts user only if there was 
!       // also no such kas user
!       if( (ast == ADMPTSFAILEDNAMETRANSLATE && !kas ) || 
! 	  ast != ADMPTSFAILEDNAMETRANSLATE ) {
! 	  free( who );
! 	  if( userName != NULL ) {
! 	      (*env)->ReleaseStringUTFChars(env, juserName, userName);
! 	  }
! 	  throwAFSException( env, ast );
! 	  return;
!       }
!   }
! 
!   free( who );
!   // release converted java strings
!   if( userName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, juserName, userName);
!   }
  }
  
  /**
***************
*** 264,316 ****
   * env      the Java environment
   * cls      the current Java class
   * cellHandle    the handle of the cell to which the user belongs
!  * jusername      the name of the user to unlock
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_unlock(JNIEnv * env, jclass cls, jint cellHandle,
! 				  jstring jusername)
  {
!     afs_status_t ast;
!     char *username;
!     kas_identity_p who = (kas_identity_p) malloc(sizeof(kas_identity_t));
! 
!     if (!who) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
!     // convert java strings
!     if (jusername != NULL) {
! 	username = getNativeString(env, jusername);
! 	if (username == NULL) {
! 	    free(who);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(who);
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
! 
!     // make sure the name is within the allowed bounds
!     if (strlen(username) > KAS_MAX_NAME_LEN) {
! 	free(who);
! 	free(username);
! 	throwAFSException(env, ADMPTSUSERNAMETOOLONG);
! 	return;
!     }
! 
!     internal_makeKasIdentity(username, who);
! 
!     if (!kas_PrincipalUnlock((void *)cellHandle, NULL, who, &ast)) {
! 	free(who);
! 	free(username);
! 	throwAFSException(env, ast);
! 	return;
!     }
! 
!     free(who);
!     free(username);
  }
  
  /**
--- 308,367 ----
   * env      the Java environment
   * cls      the current Java class
   * cellHandle    the handle of the cell to which the user belongs
!  * juserName      the name of the user to unlock
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_User_unlock
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring juserName )
  {
!   afs_status_t ast;
!   const char *userName;
!   kas_identity_p who = (kas_identity_p) malloc( sizeof(kas_identity_t) );  
!   
!   if( !who ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   // convert java strings
!   if( juserName != NULL ) {
!       userName = (*env)->GetStringUTFChars(env, juserName, 0);
!     if( !userName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!       userName = NULL;
!   }
! 
!   // make sure the name is within the allowed bounds
!   if( userName != NULL && strlen( userName ) > KAS_MAX_NAME_LEN ) {
!     free( who );
!     if( userName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     throwAFSException( env, ADMPTSUSERNAMETOOLONG  );
!     return;
!   }  
! 
!   if( userName != NULL ) {
!     internal_makeKasIdentity( userName, who );
!   }
! 
!   if( !kas_PrincipalUnlock( (void *) cellHandle, NULL, who, &ast ) ) {
!     free( who );
!     if( userName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   free( who );
!   // release converted java strings
!   if( userName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, juserName, userName);
!   }
  }
  
  /**
***************
*** 322,528 ****
   * name      the name of the user for which to get the info
   * user      the User object to populate with the info
   */
! void
! getUserInfoChar(JNIEnv * env, int cellHandle, const char *name, jobject user)
  {
!     jstring jowner;
!     jstring jcreator;
!     jstring jlastModName;
!     jstring jencryptionKey;
!     jboolean pts;
!     jboolean kas;
!     pts_UserEntry_t ptsEntry;
!     afs_status_t ast;
!     kas_identity_p who = (kas_identity_p) malloc(sizeof(kas_identity_t));
!     kas_principalEntry_t kasEntry;
!     unsigned int lockedUntil;
! 
!     if (!who) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
!     // make sure the name is within the allowed bounds
!     if (name != NULL && strlen(name) > KAS_MAX_NAME_LEN) {
! 	free(who);
! 	throwAFSException(env, ADMPTSUSERNAMETOOLONG);
  	return;
      }
! 
!     if (name != NULL) {
! 	internal_makeKasIdentity(name, who);
!     }
!     // get all the field ids, if you haven't done so already
!     if (userCls == 0) {
! 	internal_getUserClass(env, user);
!     }
!     // get the pts entry
!     if (!pts_UserGet((void *)cellHandle, name, &ptsEntry, &ast)) {
! 	// if the user has no pts ptsEntry
! 	if (ast == ADMPTSFAILEDNAMETRANSLATE) {
! 	    pts = FALSE;
! 	} else {
! 	    free(who);
! 	    throwAFSException(env, ast);
  	    return;
- 	}
-     } else {
- 	pts = TRUE;
-     }
- 
- 
-     // get the kas entry
-     if (!kas_PrincipalGet((void *)cellHandle, NULL, who, &kasEntry, &ast)) {
- 	// no kas entry
- 	if (ast == KANOENT) {
- 	    if (!pts) {
- 		free(who);
- 		throwAFSException(env, ast);
- 		return;
- 	    } else {
- 		kas = FALSE;
- 	    }
- 	    // other
  	} else {
! 	    free(who);
! 	    throwAFSException(env, ast);
! 	    return;
  	}
      } else {
! 	kas = TRUE;
!     }
! 
!     // get the lock status
!     if (kas
! 	&& !kas_PrincipalLockStatusGet((void *)cellHandle, NULL, who,
! 				       &lockedUntil, &ast)) {
! 	free(who);
! 	throwAFSException(env, ast);
  	return;
      }
! 
!     (*env)->SetBooleanField(env, user, user_ptsField, pts);
!     (*env)->SetBooleanField(env, user, user_kasField, kas);
! 
!     // set the pts fields
!     if (pts) {
! 	(*env)->SetIntField(env, user, user_nameUidField, ptsEntry.nameUid);
! 	(*env)->SetIntField(env, user, user_ownerUidField, ptsEntry.ownerUid);
! 	(*env)->SetIntField(env, user, user_creatorUidField,
! 			    ptsEntry.creatorUid);
! 	(*env)->SetIntField(env, user, user_groupCreationQuotaField,
! 			    ptsEntry.groupCreationQuota);
! 	(*env)->SetIntField(env, user, user_groupMembershipCountField,
! 			    ptsEntry.groupMembershipCount);
! 
! 	if (ptsEntry.listStatus == PTS_USER_OWNER_ACCESS) {
! 	    (*env)->SetIntField(env, user, user_listStatusField,
! 				org_openafs_jafs_User_USER_OWNER_ACCESS);
! 	} else {
! 	    (*env)->SetIntField(env, user, user_listStatusField,
! 				org_openafs_jafs_User_USER_ANYUSER_ACCESS);
! 	}
! 	if (ptsEntry.listGroupsOwned == PTS_USER_OWNER_ACCESS) {
! 	    (*env)->SetIntField(env, user, user_listGroupsOwnedField,
! 				org_openafs_jafs_User_USER_OWNER_ACCESS);
! 	} else {
! 	    (*env)->SetIntField(env, user, user_listGroupsOwnedField,
! 				org_openafs_jafs_User_USER_ANYUSER_ACCESS);
! 	}
! 	if (ptsEntry.listMembership == PTS_USER_OWNER_ACCESS) {
! 	    (*env)->SetIntField(env, user, user_listMembershipField,
! 				org_openafs_jafs_User_USER_OWNER_ACCESS);
! 	} else {
! 	    (*env)->SetIntField(env, user, user_listMembershipField,
! 				org_openafs_jafs_User_USER_ANYUSER_ACCESS);
! 	}
! 
! 	jowner = (*env)->NewStringUTF(env, ptsEntry.owner);
! 	jcreator = (*env)->NewStringUTF(env, ptsEntry.creator);
! 
! 	(*env)->SetObjectField(env, user, user_ownerField, jowner);
! 	(*env)->SetObjectField(env, user, user_creatorField, jcreator);
! 
!     }
!     // set the kas fields
!     if (kas) {
! 	char *convertedKey;
! 	int i;
! 	if (kasEntry.adminSetting == KAS_ADMIN) {
! 	    (*env)->SetIntField(env, user, user_adminSettingField,
! 				org_openafs_jafs_User_ADMIN);
! 	} else {
! 	    (*env)->SetIntField(env, user, user_adminSettingField,
! 				org_openafs_jafs_User_NO_ADMIN);
! 	}
! 	if (kasEntry.tgsSetting == TGS) {
! 	    (*env)->SetIntField(env, user, user_tgsSettingField,
! 				org_openafs_jafs_User_GRANT_TICKETS);
! 	} else {
! 	    (*env)->SetIntField(env, user, user_tgsSettingField,
! 				org_openafs_jafs_User_NO_GRANT_TICKETS);
! 	}
! 	if (kasEntry.encSetting != NO_ENCRYPT) {
! 	    (*env)->SetIntField(env, user, user_encSettingField,
! 				org_openafs_jafs_User_ENCRYPT);
! 	} else {
! 	    (*env)->SetIntField(env, user, user_encSettingField,
! 				org_openafs_jafs_User_NO_ENCRYPT);
! 	}
! 	if (kasEntry.cpwSetting == CHANGE_PASSWORD) {
! 	    (*env)->SetIntField(env, user, user_cpwSettingField,
! 				org_openafs_jafs_User_CHANGE_PASSWORD);
! 	} else {
! 	    (*env)->SetIntField(env, user, user_cpwSettingField,
! 				org_openafs_jafs_User_NO_CHANGE_PASSWORD);
! 	}
! 	if (kasEntry.rpwSetting == REUSE_PASSWORD) {
! 	    (*env)->SetIntField(env, user, user_rpwSettingField,
! 				org_openafs_jafs_User_REUSE_PASSWORD);
! 	} else {
! 	    (*env)->SetIntField(env, user, user_rpwSettingField,
! 				org_openafs_jafs_User_NO_REUSE_PASSWORD);
! 	}
! 	(*env)->SetIntField(env, user, user_userExpirationField,
! 			    kasEntry.userExpiration);
! 	(*env)->SetIntField(env, user, user_lastModTimeField,
! 			    kasEntry.lastModTime);
! 	(*env)->SetIntField(env, user, user_lastChangePasswordTimeField,
! 			    kasEntry.lastChangePasswordTime);
! 	(*env)->SetIntField(env, user, user_maxTicketLifetimeField,
! 			    kasEntry.maxTicketLifetime);
! 	(*env)->SetIntField(env, user, user_keyVersionField,
! 			    kasEntry.keyVersion);
! 	(*env)->SetLongField(env, user, user_keyCheckSumField,
! 			     (unsigned int)kasEntry.keyCheckSum);
! 	(*env)->SetIntField(env, user, user_daysToPasswordExpireField,
! 			    kasEntry.daysToPasswordExpire);
! 	(*env)->SetIntField(env, user, user_failLoginCountField,
! 			    kasEntry.failLoginCount);
! 	(*env)->SetIntField(env, user, user_lockTimeField, kasEntry.lockTime);
! 	(*env)->SetIntField(env, user, user_lockedUntilField, lockedUntil);
! 
! 	jlastModName =
! 	    (*env)->NewStringUTF(env, kasEntry.lastModPrincipal.principal);
! 	(*env)->SetObjectField(env, user, user_lastModNameField,
! 			       jlastModName);
! 
! 	convertedKey =
! 	    (char *)malloc(sizeof(char *) *
! 			   (sizeof(kasEntry.key.key) * 4 + 1));
! 	if (!convertedKey) {
! 	    free(who);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
! 	for (i = 0; i < sizeof(kasEntry.key.key); i++) {
! 	    sprintf(&(convertedKey[i * 4]), "\\%0.3o", kasEntry.key.key[i]);
! 	}
! 	jencryptionKey = (*env)->NewStringUTF(env, convertedKey);
! 	(*env)->SetObjectField(env, user, user_encryptionKeyField,
! 			       jencryptionKey);
! 	free(convertedKey);
!     }
!     free(who);
  }
  
  /**
--- 373,579 ----
   * name      the name of the user for which to get the info
   * user      the User object to populate with the info
   */
! void getUserInfoChar
!   (JNIEnv *env, void *cellHandle, const char *name, jobject user)
  {
!   jstring jowner;
!   jstring jcreator;
!   jstring jlastModName;
!   jstring jencryptionKey;
!   jboolean pts;
!   jboolean kas;
!   pts_UserEntry_t ptsEntry;
!   afs_status_t ast;
!   kas_identity_p who = (kas_identity_p) malloc( sizeof(kas_identity_t) );
!   kas_principalEntry_t kasEntry;
!   unsigned int lockedUntil;
! 
!   if( !who ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   // make sure the name is within the allowed bounds
!   if( name != NULL && strlen( name ) > KAS_MAX_NAME_LEN ) {
!     free( who );
!     throwAFSException( env, ADMPTSUSERNAMETOOLONG );
!     return;
!   }
!   
!   if( name != NULL ) {
!       internal_makeKasIdentity( name, who );
!   }
! 
!   // get all the field ids, if you haven't done so already
!   if( userCls == 0 ) {
!     internal_getUserClass( env, user );
!   }
! 
!   // get the pts entry
!   if ( !pts_UserGet( cellHandle, name, &ptsEntry, &ast ) ) {
!     // if the user has no pts ptsEntry
!     if( ast == ADMPTSFAILEDNAMETRANSLATE ) {
! 	pts = FALSE;	
!     } else {
! 	free( who );
! 	throwAFSException( env, ast );
  	return;
      }
!   } else {
!       pts = TRUE;
!   }
!   
! 
!   // get the kas entry
!   if( !kas_PrincipalGet( cellHandle, NULL, who, &kasEntry, &ast ) ) {
!     // no kas entry
!     if( ast == KANOENT ) { 
! 	if( !pts ) {
! 	    free( who );
! 	    throwAFSException( env, ast );
  	    return;
  	} else {
! 	    kas = FALSE;
  	}
+     // other
      } else {
! 	free( who );
! 	throwAFSException( env, ast );
  	return;
      }
!   } else {
!       kas = TRUE;
!   }
! 
!   // get the lock status
!   if( kas && !kas_PrincipalLockStatusGet( cellHandle, NULL, who, 
! 					  &lockedUntil, &ast ) ) {
!     free( who );
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   (*env)->SetBooleanField(env, user, user_ptsField, pts);
!   (*env)->SetBooleanField(env, user, user_kasField, kas);
! 
!   // set the pts fields
!   if( pts ) {
!       (*env)->SetIntField(env, user, user_nameUidField, ptsEntry.nameUid);
!       (*env)->SetIntField(env, user, user_ownerUidField, ptsEntry.ownerUid);
!       (*env)->SetIntField(env, user, user_creatorUidField, 
! 			  ptsEntry.creatorUid);
!       (*env)->SetIntField(env, user, user_groupCreationQuotaField, 
! 			  ptsEntry.groupCreationQuota);
!       (*env)->SetIntField(env, user, user_groupMembershipCountField, 
! 			  ptsEntry.groupMembershipCount);
!       
!       if( ptsEntry.listStatus == PTS_USER_OWNER_ACCESS ) {
! 	  (*env)->SetIntField(env, user, user_listStatusField, 
! 			      org_openafs_jafs_User_USER_OWNER_ACCESS);
!       } else {
! 	  (*env)->SetIntField(env, user, user_listStatusField, 
! 			      org_openafs_jafs_User_USER_ANYUSER_ACCESS);
!       }
!       if( ptsEntry.listGroupsOwned == PTS_USER_OWNER_ACCESS ) {
! 	  (*env)->SetIntField(env, user, user_listGroupsOwnedField, 
! 			      org_openafs_jafs_User_USER_OWNER_ACCESS);
!       } else {
! 	  (*env)->SetIntField(env, user, user_listGroupsOwnedField, 
! 			      org_openafs_jafs_User_USER_ANYUSER_ACCESS);
!       }
!       if( ptsEntry.listMembership == PTS_USER_OWNER_ACCESS ) {
! 	  (*env)->SetIntField(env, user, user_listMembershipField, 
! 			      org_openafs_jafs_User_USER_OWNER_ACCESS);
!       } else {
! 	  (*env)->SetIntField(env, user, user_listMembershipField, 
! 			      org_openafs_jafs_User_USER_ANYUSER_ACCESS);
!       }
!       
!       jowner = (*env)->NewStringUTF(env, ptsEntry.owner);
!       jcreator =  (*env)->NewStringUTF(env, ptsEntry.creator);
!       
!       (*env)->SetObjectField(env, user, user_ownerField, jowner);
!       (*env)->SetObjectField(env, user, user_creatorField, jcreator);
! 
!   }
! 
!   // set the kas fields
!   if( kas ) {
!       char *convertedKey;
!       int i;
!       if( kasEntry.adminSetting == KAS_ADMIN ) {
! 	  (*env)->SetIntField(env, user, user_adminSettingField, 
! 			      org_openafs_jafs_User_ADMIN);
!       } else {
! 	  (*env)->SetIntField(env, user, user_adminSettingField, 
! 			      org_openafs_jafs_User_NO_ADMIN);
!       }
!       if( kasEntry.tgsSetting == TGS ) {
! 	  (*env)->SetIntField(env, user, user_tgsSettingField, 
! 			      org_openafs_jafs_User_GRANT_TICKETS);
!       } else {
! 	  (*env)->SetIntField(env, user, user_tgsSettingField, 
! 			      org_openafs_jafs_User_NO_GRANT_TICKETS);
!       }
!       if( kasEntry.encSetting != NO_ENCRYPT ) {
! 	  (*env)->SetIntField(env, user, user_encSettingField, 
! 			      org_openafs_jafs_User_ENCRYPT);
!       } else {
! 	  (*env)->SetIntField(env, user, user_encSettingField, 
! 			      org_openafs_jafs_User_NO_ENCRYPT);
!       }
!       if( kasEntry.cpwSetting == CHANGE_PASSWORD ) {
! 	  (*env)->SetIntField(env, user, user_cpwSettingField, 
! 			      org_openafs_jafs_User_CHANGE_PASSWORD);
!       } else {
! 	  (*env)->SetIntField(env, user, user_cpwSettingField, 
! 			      org_openafs_jafs_User_NO_CHANGE_PASSWORD);
!       }
!       if( kasEntry.rpwSetting == REUSE_PASSWORD ) {
! 	  (*env)->SetIntField(env, user, user_rpwSettingField, 
! 			      org_openafs_jafs_User_REUSE_PASSWORD);
!       } else {
! 	  (*env)->SetIntField(env, user, user_rpwSettingField, 
! 			      org_openafs_jafs_User_NO_REUSE_PASSWORD);
!       }
!       (*env)->SetIntField(env, user, user_userExpirationField, 
! 			  kasEntry.userExpiration);
!       (*env)->SetIntField(env, user, user_lastModTimeField, 
! 			  kasEntry.lastModTime);
!       (*env)->SetIntField(env, user, user_lastChangePasswordTimeField, 
! 			  kasEntry.lastChangePasswordTime);
!       (*env)->SetIntField(env, user, user_maxTicketLifetimeField, 
! 			  kasEntry.maxTicketLifetime);
!       (*env)->SetIntField(env, user, user_keyVersionField, 
! 			  kasEntry.keyVersion);
!       (*env)->SetLongField(env, user, user_keyCheckSumField, 
! 			   (unsigned int) kasEntry.keyCheckSum);
!       (*env)->SetIntField(env, user, user_daysToPasswordExpireField, 
! 			  kasEntry.daysToPasswordExpire);
!       (*env)->SetIntField(env, user, user_failLoginCountField, 
! 			  kasEntry.failLoginCount);
!       (*env)->SetIntField(env, user, user_lockTimeField, kasEntry.lockTime);
!       (*env)->SetIntField(env, user, user_lockedUntilField, lockedUntil);
!       
!       jlastModName = (*env)->NewStringUTF(env, 
! 					  kasEntry.lastModPrincipal.principal);
!       (*env)->SetObjectField(env, user, user_lastModNameField, jlastModName);
! 
!       convertedKey = (char *) malloc( sizeof(char *)*
! 				      (sizeof(kasEntry.key.key)*4+1) );
!       if( !convertedKey ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!       }
!       for( i = 0; i < sizeof(kasEntry.key.key); i++ ) {
! 	sprintf( &(convertedKey[i*4]), "\\%0.3o", kasEntry.key.key[i] );
!       }
!       jencryptionKey =  (*env)->NewStringUTF(env, convertedKey);
!       (*env)->SetObjectField(env, user, user_encryptionKeyField, 
! 			     jencryptionKey);
!       free( convertedKey );
!   }
!   free(who);
  }
  
  /**
***************
*** 536,569 ****
   * user     the User object in which to fill in the 
   *                 information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_getUserInfo(JNIEnv * env, jclass cls,
! 				       jint cellHandle, jstring jname,
! 				       jobject user)
  {
!     char *name;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (!name) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
! 
!     getUserInfoChar(env, cellHandle, name, user);
! 
!     // get class fields if need be
!     if (userCls == 0) {
! 	internal_getUserClass(env, user);
!     }
!     // set name in case blank object
!     (*env)->SetObjectField(env, user, user_nameField, jname);
  
!     free(name);
  }
  
  /**
--- 587,621 ----
   * user     the User object in which to fill in the 
   *                 information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_User_getUserInfo
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jname, jobject user)
  {
!   const char *name;
  
!   if( jname != NULL ) {
!       name = (*env)->GetStringUTFChars(env, jname, 0);
!     if( !name ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!       name = NULL;
!   }
! 
!   getUserInfoChar( env, cellHandle, name, user );
!  
!   // get class fields if need be
!   if( userCls == 0 ) {
!     internal_getUserClass( env, user );
!   }
!   
!   // set name in case blank object
!   (*env)->SetObjectField(env, user, user_nameField, jname);
!   
!   if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!   }      
  }
  
  /**
***************
*** 577,727 ****
   * user  the User object containing the desired 
   *                 information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_setUserInfo(JNIEnv * env, jclass cls,
! 				       jint cellHandle, jstring jname,
! 				       jobject user)
  {
!     char *name;
!     kas_identity_p who = (kas_identity_p) malloc(sizeof(kas_identity_t));
!     pts_UserUpdateEntry_t ptsEntry;
!     afs_status_t ast;
!     kas_admin_t isAdmin;
!     kas_tgs_t grantTickets;
!     kas_enc_t canEncrypt;
!     kas_cpw_t canChangePassword;
!     kas_rpw_t passwordReuse;
!     unsigned int expirationDate;
!     unsigned int maxTicketLifetime;
!     unsigned int passwordExpires;
!     unsigned int failedPasswordAttempts;
!     unsigned int failedPasswordLockTime;
!     int kas;
!     int pts;
! 
!     if (!who) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (name == NULL) {
! 	    free(who);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(who);
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
! 
!     // make sure the name is within the allowed bounds
!     if (strlen(name) > KAS_MAX_NAME_LEN) {
! 	free(who);
! 	free(name);
! 	throwAFSException(env, ADMPTSUSERNAMETOOLONG);
! 	return;
!     }
! 
!     internal_makeKasIdentity(name, who);
! 
!     // get class fields if need be
!     if (userCls == 0) {
! 	internal_getUserClass(env, user);
!     }
! 
!     kas = (*env)->GetBooleanField(env, user, user_kasField);
!     pts = (*env)->GetBooleanField(env, user, user_ptsField);
! 
!     if (pts) {
! 	// set the pts fields: 
! 	ptsEntry.flag =
! 	    PTS_USER_UPDATE_GROUP_CREATE_QUOTA | PTS_USER_UPDATE_PERMISSIONS;
! 	ptsEntry.groupCreationQuota =
! 	    (*env)->GetIntField(env, user, user_groupCreationQuotaField);
! 	if ((*env)->GetIntField(env, user, user_listStatusField) ==
! 	    org_openafs_jafs_User_USER_OWNER_ACCESS) {
! 	    ptsEntry.listStatus = PTS_USER_OWNER_ACCESS;
! 	} else {
! 	    ptsEntry.listStatus = PTS_USER_ANYUSER_ACCESS;
! 	}
! 	if ((*env)->GetIntField(env, user, user_listGroupsOwnedField) ==
! 	    org_openafs_jafs_User_USER_OWNER_ACCESS) {
! 	    ptsEntry.listGroupsOwned = PTS_USER_OWNER_ACCESS;
! 	} else {
! 	    ptsEntry.listGroupsOwned = PTS_USER_ANYUSER_ACCESS;
! 	}
! 	if ((*env)->GetIntField(env, user, user_listMembershipField) ==
! 	    org_openafs_jafs_User_USER_OWNER_ACCESS) {
! 	    ptsEntry.listMembership = PTS_USER_OWNER_ACCESS;
! 	} else {
! 	    ptsEntry.listMembership = PTS_USER_ANYUSER_ACCESS;
! 	}
! 	if (!pts_UserModify((void *)cellHandle, name, &ptsEntry, &ast)) {
! 	    free(who);
! 	    free(name);
! 	    throwAFSException(env, ast);
! 	    return;
! 	}
!     }
! 
!     if (kas) {
! 	// set the kas fields:
! 	if ((*env)->GetIntField(env, user, user_adminSettingField) ==
! 	    org_openafs_jafs_User_ADMIN) {
! 	    isAdmin = KAS_ADMIN;
! 	} else {
! 	    isAdmin = NO_KAS_ADMIN;
! 	}
! 	if ((*env)->GetIntField(env, user, user_tgsSettingField) ==
! 	    org_openafs_jafs_User_GRANT_TICKETS) {
! 	    grantTickets = TGS;
! 	} else {
! 	    grantTickets = NO_TGS;
! 	}
! 	if ((*env)->GetIntField(env, user, user_encSettingField) ==
! 	    org_openafs_jafs_User_ENCRYPT) {
! 	    canEncrypt = 0;
! 	} else {
! 	    canEncrypt = NO_ENCRYPT;
! 	}
! 	if ((*env)->GetIntField(env, user, user_cpwSettingField) ==
! 	    org_openafs_jafs_User_CHANGE_PASSWORD) {
! 	    canChangePassword = CHANGE_PASSWORD;
! 	} else {
! 	    canChangePassword = NO_CHANGE_PASSWORD;
! 	}
! 	if ((*env)->GetIntField(env, user, user_rpwSettingField) ==
! 	    org_openafs_jafs_User_REUSE_PASSWORD) {
! 	    passwordReuse = REUSE_PASSWORD;
! 	} else {
! 	    passwordReuse = NO_REUSE_PASSWORD;
! 	}
! 	expirationDate =
! 	    (*env)->GetIntField(env, user, user_userExpirationField);
! 	maxTicketLifetime =
! 	    (*env)->GetIntField(env, user, user_maxTicketLifetimeField);
! 	passwordExpires =
! 	    (*env)->GetIntField(env, user, user_daysToPasswordExpireField);
! 	failedPasswordAttempts =
! 	    (*env)->GetIntField(env, user, user_failLoginCountField);
! 	failedPasswordLockTime =
! 	    (*env)->GetIntField(env, user, user_lockTimeField);
! 
! 
! 	if (!kas_PrincipalFieldsSet
! 	    ((void *)cellHandle, NULL, who, &isAdmin, &grantTickets,
! 	     &canEncrypt, &canChangePassword, &expirationDate,
! 	     &maxTicketLifetime, &passwordExpires, &passwordReuse,
! 	     &failedPasswordAttempts, &failedPasswordLockTime, &ast)) {
! 	    throwAFSException(env, ast);
! 	}
!     }
! 
!     free(who);
!     free(name);
  }
  
  /**
--- 629,786 ----
   * user  the User object containing the desired 
   *                 information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_User_setUserInfo
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jname, jobject user )
  {
!   const char *name;
!   kas_identity_p who = (kas_identity_p) malloc( sizeof(kas_identity_t) );
!   pts_UserUpdateEntry_t ptsEntry;
!   afs_status_t ast;
!   kas_admin_t isAdmin;
!   kas_tgs_t grantTickets;
!   kas_enc_t canEncrypt;
!   kas_cpw_t canChangePassword;
!   kas_rpw_t passwordReuse;
!   unsigned int expirationDate;
!   unsigned int maxTicketLifetime;
!   unsigned int passwordExpires;
!   unsigned int failedPasswordAttempts;
!   unsigned int failedPasswordLockTime;
!   int kas;
!   int pts;
! 
!   if( !who ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( jname != NULL ) {
!       name = (*env)->GetStringUTFChars(env, jname, 0);
!     if( !name ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!       name = NULL;
!   }
! 
!   // make sure the name is within the allowed bounds
!   if( name != NULL && strlen( name ) > KAS_MAX_NAME_LEN ) {
!     free( who );
!     (*env)->ReleaseStringUTFChars(env, jname, name);
!     throwAFSException( env, ADMPTSUSERNAMETOOLONG );
!     return;
!   }
! 
!   if( name != NULL ) {
!       internal_makeKasIdentity( name, who );
!   }
! 
!   // get class fields if need be
!   if( userCls == 0 ) {
!     internal_getUserClass( env, user );
!   }
! 
!   kas = (*env)->GetBooleanField(env, user, user_kasField);
!   pts = (*env)->GetBooleanField(env, user, user_ptsField);
! 
!   if( pts ) {
!       // set the pts fields: 
!       ptsEntry.flag = PTS_USER_UPDATE_GROUP_CREATE_QUOTA | 
! 	PTS_USER_UPDATE_PERMISSIONS;
!       ptsEntry.groupCreationQuota = 
! 	(*env)->GetIntField(env, user, user_groupCreationQuotaField);
!       if( (*env)->GetIntField(env, user, user_listStatusField) == 
! 	  org_openafs_jafs_User_USER_OWNER_ACCESS ) {
! 	  ptsEntry.listStatus = PTS_USER_OWNER_ACCESS;
!       } else {
! 	  ptsEntry.listStatus = PTS_USER_ANYUSER_ACCESS;
!       }
!       if( (*env)->GetIntField(env, user, user_listGroupsOwnedField) == 
! 	  org_openafs_jafs_User_USER_OWNER_ACCESS ) {
! 	  ptsEntry.listGroupsOwned = PTS_USER_OWNER_ACCESS;
!       } else {
! 	  ptsEntry.listGroupsOwned = PTS_USER_ANYUSER_ACCESS;
!       }
!       if( (*env)->GetIntField(env, user, user_listMembershipField) == 
! 	  org_openafs_jafs_User_USER_OWNER_ACCESS ) {
! 	  ptsEntry.listMembership = PTS_USER_OWNER_ACCESS;
!       } else {
! 	  ptsEntry.listMembership = PTS_USER_ANYUSER_ACCESS;
!       }
!       if( !pts_UserModify( (void *) cellHandle, name, &ptsEntry, &ast ) ) {
! 	  free( who );
! 	  if( name != NULL ) {
! 	      (*env)->ReleaseStringUTFChars(env, jname, name);
! 	  }
! 	  throwAFSException( env, ast );
! 	  return;    
!       }
!   }
! 
!   if( kas ) {
!       // set the kas fields:
!       if( (*env)->GetIntField(env, user, user_adminSettingField) == 
! 	  org_openafs_jafs_User_ADMIN ) {
! 	  isAdmin = KAS_ADMIN;
!       } else {
! 	  isAdmin = NO_KAS_ADMIN;
!       }
!       if( (*env)->GetIntField(env, user, user_tgsSettingField) == 
! 	  org_openafs_jafs_User_GRANT_TICKETS ) {
! 	  grantTickets = TGS;
!       } else {
! 	  grantTickets = NO_TGS;
!       }
!       if( (*env)->GetIntField(env, user, user_encSettingField) == 
! 	  org_openafs_jafs_User_ENCRYPT ) {
! 	  canEncrypt = 0;
!       } else {
! 	  canEncrypt = NO_ENCRYPT;
!       }
!       if( (*env)->GetIntField(env, user, user_cpwSettingField) == 
! 	  org_openafs_jafs_User_CHANGE_PASSWORD ) {
! 	  canChangePassword = CHANGE_PASSWORD;
!       } else {
! 	  canChangePassword = NO_CHANGE_PASSWORD;
!       }
!       if( (*env)->GetIntField(env, user, user_rpwSettingField) == 
! 	  org_openafs_jafs_User_REUSE_PASSWORD ) {
! 	  passwordReuse = REUSE_PASSWORD;
!       } else {
! 	  passwordReuse = NO_REUSE_PASSWORD;
!       }
!       expirationDate = (*env)->GetIntField(env, user, 
! 					   user_userExpirationField);
!       maxTicketLifetime = (*env)->GetIntField(env, user, 
! 					      user_maxTicketLifetimeField);
!       passwordExpires = (*env)->GetIntField(env, user, 
! 					    user_daysToPasswordExpireField);
!       failedPasswordAttempts = (*env)->GetIntField(env, user, 
! 						   user_failLoginCountField);
!       failedPasswordLockTime =  (*env)->GetIntField(env, user, 
! 						    user_lockTimeField);
!       
!       if( !kas_PrincipalFieldsSet( (void *) cellHandle, NULL, who, &isAdmin, 
! 				   &grantTickets, &canEncrypt, 
! 				   &canChangePassword, &expirationDate, 
! 				   &maxTicketLifetime, &passwordExpires, 
! 				   &passwordReuse, &failedPasswordAttempts, 
! 				   &failedPasswordLockTime, &ast ) ) {
! 	  free( who );
! 	  if( name != NULL ) {
! 	      (*env)->ReleaseStringUTFChars(env, jname, name);
! 	  }
! 	  throwAFSException( env, ast );
! 	  return;    
!       }
!   }      
! 
!   free( who );
!   if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
  }
  
  /**
***************
*** 734,902 ****
   * joldName     the name of the user to rename
   * jnewName     the new name for the user
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_rename(JNIEnv * env, jclass cls, jint cellHandle,
! 				  jstring joldName, jstring jnewName)
  {
!     char *oldName;
!     char *newName;
!     kas_identity_p whoOld = (kas_identity_p) malloc(sizeof(kas_identity_t));
!     kas_identity_p whoNew = (kas_identity_p) malloc(sizeof(kas_identity_t));
      kas_principalEntry_t kasEntry;
      pts_UserEntry_t ptsEntry;
      afs_status_t ast;
      int kas;
  
!     if (!whoOld || !whoNew) {
! 	if (whoOld) {
! 	    free(whoOld);
! 	}
! 	if (whoNew) {
! 	    free(whoNew);
! 	}
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (joldName != NULL) {
! 	oldName = getNativeString(env, joldName);
! 	if (oldName == NULL) {
! 	    free(whoOld);
! 	    free(whoNew);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
  	}
      } else {
  	oldName = NULL;
      }
!     if (jnewName != NULL) {
! 	newName = getNativeString(env, jnewName);
! 	if (newName == NULL) {
! 	    free(whoOld);
! 	    free(whoNew);
! 	    if (oldName != NULL)
! 		free(oldName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
  	}
      } else {
  	newName = NULL;
      }
  
      // make sure the names are within the allowed bounds
!     if ((oldName != NULL && strlen(oldName) > KAS_MAX_NAME_LEN)
! 	|| (newName != NULL && strlen(newName) > KAS_MAX_NAME_LEN)) {
! 	free(whoOld);
! 	free(whoNew);
! 	if (oldName != NULL)
! 	    free(oldName);
! 	if (newName != NULL)
! 	    free(newName);
! 	throwAFSException(env, ADMPTSUSERNAMETOOLONG);
  	return;
      }
! 
!     if (oldName != NULL) {
! 	internal_makeKasIdentity(oldName, whoOld);
      }
!     if (newName != NULL) {
! 	internal_makeKasIdentity(newName, whoNew);
      }
      // retrieve the old kas info
!     if (!kas_PrincipalGet((void *)cellHandle, NULL, whoOld, &kasEntry, &ast)) {
! 	if (ast != KANOENT) {
! 	    free(whoOld);
! 	    free(whoNew);
! 	    if (oldName != NULL)
! 		free(oldName);
! 	    if (newName != NULL)
! 		free(newName);
! 	    throwAFSException(env, ast);
  	    return;
  	} else {
  	    kas = FALSE;
  	}
      } else {
  	kas = TRUE;
!     }
! 
!     if (kas) {
  	// create a new kas entry
  	// temporarily set the password equal to the new name
! 	if (!kas_PrincipalCreate
! 	    ((void *)cellHandle, NULL, whoNew, newName, &ast)) {
! 	    free(whoOld);
! 	    free(whoNew);
! 	    if (oldName != NULL)
! 		free(oldName);
! 	    if (newName != NULL)
! 		free(newName);
! 	    throwAFSException(env, ast);
  	    return;
! 	}
  	// set the password 
  	ast = 0;
  	// For some reason kas_PrincipalKeySet doesn't set the return code 
  	// correctly.  It always returns 0.
  	// So instead of checking the return code, we see if there's an 
  	// error in the status variable.
! 	kas_PrincipalKeySet((void *)cellHandle, NULL, whoNew, 0,
! 			    &(kasEntry.key), &ast);
! 	if (ast) {
  	    afs_status_t ast_kd;
! 	    kas_PrincipalDelete((void *)cellHandle, NULL, whoNew, &ast_kd);
! 	    free(whoOld);
! 	    free(whoNew);
! 	    if (oldName != NULL)
! 		free(oldName);
! 	    if (newName != NULL)
! 		free(newName);
! 	    throwAFSException(env, ast);
  	    return;
  	}
      }
      // rename the pts entry
!     if (!pts_UserRename((void *)cellHandle, oldName, newName, &ast)) {
  	// throw exception if there was no such pts user only if 
! 	// there was also no such kas user
! 	if ((ast == ADMPTSFAILEDNAMETRANSLATE && !kas)
! 	    || ast != ADMPTSFAILEDNAMETRANSLATE) {
  	    afs_status_t ast_kd;
! 	    if (kas) {
! 		kas_PrincipalDelete((void *)cellHandle, NULL, whoNew,
! 				    &ast_kd);
  	    }
! 	    free(whoOld);
! 	    free(whoNew);
! 	    if (oldName != NULL)
! 		free(oldName);
! 	    if (newName != NULL)
! 		free(newName);
! 	    throwAFSException(env, ast);
  	    return;
  	}
      }
  
!     if (kas) {
  	// delete the old kas entry
! 	if (!kas_PrincipalDelete((void *)cellHandle, NULL, whoOld, &ast)) {
! 	    free(whoOld);
! 	    free(whoNew);
! 	    if (oldName != NULL)
! 		free(oldName);
! 	    if (newName != NULL)
! 		free(newName);
! 	    throwAFSException(env, ast);
  	    return;
  	}
!     }
  
!     free(whoOld);
!     free(whoNew);
!     if (oldName != NULL)
! 	free(oldName);
!     if (newName != NULL)
! 	free(newName);
  }
  
  /**
--- 793,988 ----
   * joldName     the name of the user to rename
   * jnewName     the new name for the user
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_User_rename
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring joldName, jstring jnewName)
  {
! 
!     const char *oldName;
!     const char *newName;
!     kas_identity_p whoOld = (kas_identity_p) malloc( sizeof(kas_identity_t) );
!     kas_identity_p whoNew = (kas_identity_p) malloc( sizeof(kas_identity_t) );
      kas_principalEntry_t kasEntry;
      pts_UserEntry_t ptsEntry;
      afs_status_t ast;
      int kas;
  
!     if( !whoOld || !whoNew ) {
!       if( whoOld ) {
! 	free( whoOld );
!       }
!       if( whoNew ) {
! 	free( whoNew );
!       } 
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
! 
!     if( joldName != NULL ) {
! 	oldName = (*env)->GetStringUTFChars(env, joldName, 0);
! 	if( !oldName ) {
! 	    throwAFSException( env, JAFSADMNOMEM );
! 	    return;    
  	}
      } else {
  	oldName = NULL;
      }
!     if( jnewName != NULL ) {
! 	newName = (*env)->GetStringUTFChars(env, jnewName, 0);
! 	if( !newName ) {
! 	  if( oldName != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, joldName, oldName);
! 	  }
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
  	}
      } else {
  	newName = NULL;
      }
  
      // make sure the names are within the allowed bounds
!     if( oldName != NULL && strlen( oldName ) > KAS_MAX_NAME_LEN ) {
! 	free( whoOld );
! 	free( whoNew );
! 	if( oldName != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, joldName, oldName);
! 	}
! 	if( newName != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, jnewName, newName);
! 	}
! 	throwAFSException( env, ADMPTSUSERNAMETOOLONG );
  	return;
      }
!     if( newName != NULL && strlen( newName ) > KAS_MAX_NAME_LEN ) {
! 	free( whoOld );
! 	free( whoNew );
! 	if( oldName != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, joldName, oldName);
! 	}
! 	if( newName != NULL ) {
! 	    (*env)->ReleaseStringUTFChars(env, jnewName, newName);
! 	}
! 	throwAFSException( env, ADMPTSUSERNAMETOOLONG );
! 	return;
!     }
!     
!     if( oldName != NULL ) {
! 	internal_makeKasIdentity( oldName, whoOld );
      }
!     if( newName != NULL ) {
! 	internal_makeKasIdentity( newName, whoNew );
      }
+ 
      // retrieve the old kas info
!     if( !kas_PrincipalGet( (void *) cellHandle, NULL, whoOld, 
! 			   &kasEntry, &ast ) ) {
! 	if( ast != KANOENT ) {
! 	    free( whoOld );
! 	    free( whoNew );
! 	    if( oldName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, joldName, oldName);
! 	    }
! 	    if( newName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, jnewName, newName);
! 	    }
! 	    throwAFSException( env, ast );
  	    return;
  	} else {
  	    kas = FALSE;
  	}
      } else {
  	kas = TRUE;
!     }   
! 	
!     if( kas ) {
  	// create a new kas entry
  	// temporarily set the password equal to the new name
! 	if (!kas_PrincipalCreate( (void *) cellHandle, NULL, whoNew, 
! 				  newName, &ast ) ) {	    
! 	    free( whoOld );
! 	    free( whoNew );
! 	    if( oldName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, joldName, oldName);
! 	    }
! 	    if( newName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, jnewName, newName);
! 	    }
! 	    throwAFSException( env, ast );
  	    return;
! 	} 
! 
  	// set the password 
  	ast = 0;
  	// For some reason kas_PrincipalKeySet doesn't set the return code 
  	// correctly.  It always returns 0.
  	// So instead of checking the return code, we see if there's an 
  	// error in the status variable.
! 	kas_PrincipalKeySet( (void *) cellHandle, NULL, whoNew, 0, 
! 			     &(kasEntry.key), &ast );
! 	if( ast ) {
  	    afs_status_t ast_kd;
! 	    kas_PrincipalDelete( (void *) cellHandle, NULL, whoNew, &ast_kd );
! 	    free( whoOld );
! 	    free( whoNew );
! 	    if( oldName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, joldName, oldName);
! 	    }
! 	    if( newName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, jnewName, newName);
! 	    }
! 	    throwAFSException( env, ast );
  	    return;
  	}
      }
+ 
      // rename the pts entry
!     if( !pts_UserRename( (void *) cellHandle, oldName, newName, &ast ) ) {
  	// throw exception if there was no such pts user only if 
!         // there was also no such kas user
! 	if( (ast == ADMPTSFAILEDNAMETRANSLATE && !kas ) || 
! 	    ast != ADMPTSFAILEDNAMETRANSLATE ) {
  	    afs_status_t ast_kd;
! 	    if( kas ) {
! 		kas_PrincipalDelete( (void *) cellHandle, NULL, whoNew, 
! 				     &ast_kd );
  	    }
! 	    free( whoOld );
! 	    free( whoNew );
! 	    if( oldName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, joldName, oldName);
! 	    }
! 	    if( newName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, jnewName, newName);
! 	    }
! 	    throwAFSException( env, ast );
  	    return;
  	}
      }
  
!     if( kas ) {
  	// delete the old kas entry
! 	if( !kas_PrincipalDelete( (void *) cellHandle, NULL, whoOld, &ast ) ) {
! 	    free( whoOld );
! 	    free( whoNew );
! 	    if( oldName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, joldName, oldName);
! 	    }
! 	    if( newName != NULL ) {
! 		(*env)->ReleaseStringUTFChars(env, jnewName, newName);
! 	    }
! 	    throwAFSException( env, ast );
  	    return;
  	}
!     }    
  
!     free( whoOld );
!     free( whoNew );
!     if( oldName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, joldName, oldName);
!     }
!     if( newName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jnewName, newName);
!     }
  }
  
  /**
***************
*** 905,1013 ****
   * env      the Java environment
   * cls      the current Java class
   * cellHandle    the handle of the cell to which the user belongs
!  * jusername     the name of the user for which to set the password
   * jnewPassword     the new password for the user
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_setPassword(JNIEnv * env, jclass cls,
! 				       jint cellHandle, jstring jusername,
! 				       jstring jnewPassword)
  {
!     afs_status_t ast;
!     char *cellName;
!     char *username;
!     char *newPassword;
!     kas_encryptionKey_p newKey =
! 	(kas_encryptionKey_p) malloc(sizeof(kas_encryptionKey_t));
!     kas_identity_p who = (kas_identity_p) malloc(sizeof(kas_identity_t));
! 
!     if (!who || !newKey) {
! 	if (who) {
! 	    free(who);
! 	}
! 	if (newKey) {
! 	    free(newKey);
! 	}
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (jusername != NULL) {
! 	username = getNativeString(env, jusername);
! 	if (username == NULL) {
! 	    free(who);
! 	    free(newKey);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(who);
! 	free(newKey);
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
! 
!     if (jnewPassword != NULL) {
! 	newPassword = getNativeString(env, jnewPassword);
! 	if (newPassword == NULL) {
! 	    free(who);
! 	    free(newKey);
! 	    free(username);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	free(who);
! 	free(newKey);
! 	free(username);
! 	throwAFSException(env, JAFSNULLPASS);
! 	return;
!     }
! 
!     // make sure the name is within the allowed bounds
!     if (strlen(username) > KAS_MAX_NAME_LEN) {
! 	free(who);
! 	free(newKey);
! 	free(username);
! 	free(newPassword);
! 	throwAFSException(env, ADMPTSUSERNAMETOOLONG);
! 	return;
!     }
! 
!     if (!afsclient_CellNameGet((void *)cellHandle, &cellName, &ast)) {
! 	free(who);
! 	free(newKey);
! 	free(username);
! 	free(newPassword);
! 	throwAFSException(env, ast);
! 	return;
!     }
! 
!     if (!kas_StringToKey(cellName, newPassword, newKey, &ast)) {
! 	free(who);
! 	free(newKey);
! 	free(username);
! 	free(newPassword);
! 	throwAFSException(env, ast);
! 	return;
!     }
! 
!     internal_makeKasIdentity(username, who);
! 
!     ast = 0;
!     // For some reason kas_PrincipalKeySet doesn't set the return code correctly.
!     //  It always returns 0.
!     // So instead of checking the return code, we see if there's an error 
!     // in the status variable.
!     kas_PrincipalKeySet((void *)cellHandle, NULL, who, 0, newKey, &ast);
!     if (ast) {
! 	throwAFSException(env, ast);
!     }
  
      free(who);
!     free(newKey);
!     free(username);
!     free(newPassword);
  }
  
  /**
--- 991,1114 ----
   * env      the Java environment
   * cls      the current Java class
   * cellHandle    the handle of the cell to which the user belongs
!  * juserName     the name of the user for which to set the password
   * jnewPassword     the new password for the user
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_User_setPassword
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring juserName,
!    jstring jnewPassword)
  {
!   afs_status_t ast;
!   char *cellName;
!   const char *userName;
!   const char *newPassword;
!   kas_encryptionKey_p newKey = 
!     (kas_encryptionKey_p) malloc( sizeof(kas_encryptionKey_t) );
!   kas_identity_p who = (kas_identity_p) malloc( sizeof(kas_identity_t) );
! 
!   if( !who || !newKey ) {
!     if( who ) {
!       free( who );
!     }
!     if( newKey ) {
!       free( newKey );
!     }
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( juserName != NULL ) {
!       userName = (*env)->GetStringUTFChars(env, juserName, 0);
!       if( !userName ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
!   } else {
!       userName = NULL;
!   }
!   if( jnewPassword != NULL ) {
!       newPassword = (*env)->GetStringUTFChars(env, jnewPassword, 0);
!       if( !newPassword ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
!   } else {
!       newPassword = NULL;
!   }
  
+   // make sure the name is within the allowed bounds
+   if( userName != NULL && strlen( userName ) > KAS_MAX_NAME_LEN ) {
      free(who);
!     free( newKey );
!     if( userName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     if( newPassword != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jnewPassword, newPassword);
!     }
!     throwAFSException( env, ADMPTSUSERNAMETOOLONG );
!     return;
!   }
! 
!   if( !afsclient_CellNameGet( (void *) cellHandle, &cellName, &ast ) ) {
!       free(who);
!       free( newKey );
!       if( userName != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, juserName, userName);
!       }
!       if( newPassword != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jnewPassword, newPassword);
!       }
!       throwAFSException( env, ast );
!       return;
!   }
!   
!   if( !kas_StringToKey( cellName, newPassword, newKey, &ast ) ) {
!       free(who);
!       free( newKey );
!       if( userName != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, juserName, userName);
!       }
!       if( newPassword != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jnewPassword, newPassword);
!       }
!       throwAFSException( env, ast );
!       return;
!   }
! 
!   if( userName != NULL ) {
!       internal_makeKasIdentity( userName, who );
!   }
! 
!   ast = 0;
!   // For some reason kas_PrincipalKeySet doesn't set the return code correctly.
!   //  It always returns 0.
!   // So instead of checking the return code, we see if there's an error 
!   // in the status variable.
!   kas_PrincipalKeySet( (void *) cellHandle, NULL, who, 0, newKey, &ast );
!   if( ast ) {
!     free( who );
!     free( newKey );
!     if( userName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, juserName, userName);
!     }
!     if( newPassword != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jnewPassword, newPassword);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   free( who );
!   free( newKey );
!   if( userName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, juserName, userName);
!   }
!   if( newPassword != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jnewPassword, newPassword);
!   }
! 
  }
  
  /**
***************
*** 1021,1053 ****
   * jname          the name of the user for which to get the groups
   * returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_User_getUserGroupsBegin(JNIEnv * env, jclass cls,
! 					      jint cellHandle, jstring jname)
  {
!     char *name;
!     afs_status_t ast;
!     void *iterationId;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (name == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLUSER);
! 	return;
!     }
  
!     if (!pts_UserMemberListBegin
! 	((void *)cellHandle, name, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     free(name);
  
-     return (jint) iterationId;
  }
  
  /**
--- 1122,1160 ----
   * jname          the name of the user for which to get the groups
   * returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_User_getUserGroupsBegin
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jname)
  {
!   const char *name;
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( jname != NULL ) {
!       name = (*env)->GetStringUTFChars(env, jname, 0);
!       if( !name ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
!   } else {
!       name = NULL;
!   }
! 
!   if( !pts_UserMemberListBegin( (void *) cellHandle, name, &iterationId, 
! 				&ast ) ) {
!       if( name != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jname, name);
!       }
!       throwAFSException( env, ast );
!       return;
!   }
! 
!   if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 1059,1090 ****
   * iterationId   the iteration ID of this iteration
   * returns the name of the next group
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_User_getUserGroupsNextString(JNIEnv * env, jclass cls,
! 						   jint iterationId)
  {
!     afs_status_t ast;
!     char *groupName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
!     jstring jgroup;
! 
!     if (!groupName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (!pts_UserMemberListNext((void *)iterationId, groupName, &ast)) {
! 	free(groupName);
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return;
! 	}
      }
! 
!     jgroup = (*env)->NewStringUTF(env, groupName);
!     free(groupName);
!     return jgroup;
  }
  
  /**
--- 1166,1197 ----
   * iterationId   the iteration ID of this iteration
   * returns the name of the next group
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_User_getUserGroupsNextString
!   (JNIEnv *env, jclass cls, jlong iterationId)
  {
!   afs_status_t ast;
!   char *groupName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
!   jstring jgroup;
! 
!   if( !groupName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !pts_UserMemberListNext( (void *) iterationId, groupName, &ast ) ) {
!     free( groupName );
!     if( ast == ADMITERATORDONE ) {
!       return NULL;
!     } else {
!       throwAFSException( env, ast );
!       return;
      }
!   }
!   
!   jgroup = (*env)->NewStringUTF(env, groupName);
!   free( groupName );
!   return jgroup;
  }
  
  /**
***************
*** 1099,1144 ****
   *                   next group
   * returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_User_getUserGroupsNext(JNIEnv * env, jclass cls,
! 					     jint cellHandle,
! 					     jint iterationId,
! 					     jobject jgroupObject)
  {
!     afs_status_t ast;
!     char *groupName;
!     jstring jgroup;
! 
!     groupName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!groupName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (!pts_UserMemberListNext((void *)iterationId, groupName, &ast)) {
! 	free(groupName);
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
      }
  
!     jgroup = (*env)->NewStringUTF(env, groupName);
  
!     if (groupCls == 0) {
! 	internal_getGroupClass(env, jgroupObject);
!     }
  
!     (*env)->SetObjectField(env, jgroupObject, group_nameField, jgroup);
  
!     getGroupInfoChar(env, (void *)cellHandle, groupName, jgroupObject);
!     (*env)->SetBooleanField(env, jgroupObject, group_cachedInfoField, TRUE);
  
!     free(groupName);
!     return 1;
  
  }
  
--- 1206,1250 ----
   *                   next group
   * returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_User_getUserGroupsNext
!   (JNIEnv *env, jclass cls, jlong cellHandle, jlong iterationId,
!    jobject jgroupObject)
  {
!   afs_status_t ast;
!   char *groupName;
!   jstring jgroup;
! 
!   groupName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
! 
!   if( !groupName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !pts_UserMemberListNext( (void *) iterationId, groupName, &ast ) ) {
!     free( groupName );
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
      }
+   }
  
!   jgroup = (*env)->NewStringUTF(env, groupName);
  
!   if( groupCls == 0 ) {
!     internal_getGroupClass( env, jgroupObject );
!   }
  
!   (*env)->SetObjectField(env, jgroupObject, group_nameField, jgroup);
  
!   getGroupInfoChar( env, (void *) cellHandle, groupName, jgroupObject );
!   (*env)->SetBooleanField( env, jgroupObject, group_cachedInfoField, TRUE );
  
!   free( groupName );
!   return 1;
  
  }
  
***************
*** 1149,1164 ****
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_getUserGroupsDone(JNIEnv * env, jclass cls,
! 					     jint iterationId)
  {
!     afs_status_t ast;
  
!     if (!pts_UserMemberListDone((void *)iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  }
  
  /**
--- 1255,1270 ----
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_User_getUserGroupsDone
!   (JNIEnv *env, jclass cls, jlong iterationId)
  {
!   afs_status_t ast;
  
!   if( !pts_UserMemberListDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  }
  
  /**
***************
*** 1170,1207 ****
   * jname          the name of the user for which to get the groups
   * returns total number of groups owned by the user
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_User_getGroupsOwnedCount(JNIEnv * env, jclass cls,
! 					       jint cellHandle, jstring jname)
  {
!     afs_status_t ast;
!     void *iterationId;
!     char *groupName;
!     int i = 0;
! 
!     iterationId =
! 	(void *)Java_org_openafs_jafs_User_getGroupsOwnedBegin(env, cls,
! 							       cellHandle,
! 							       jname);
  
!     groupName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!groupName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return -1;
!     }
! 
!     while (pts_OwnedGroupListNext((void *)iterationId, groupName, &ast))
! 	i++;
! 
!     free(groupName);
! 
!     if (ast != ADMITERATORDONE) {
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     return i;
  }
  
  /**
--- 1276,1313 ----
   * jname          the name of the user for which to get the groups
   * returns total number of groups owned by the user
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_User_getGroupsOwnedCount
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jname)
  {
!   afs_status_t ast;
!   void *iterationId;
!   char *groupName;
!   int i = 0;
! 
!   iterationId = 
!     (void *) Java_org_openafs_jafs_User_getGroupsOwnedBegin( env, cls, 
! 								cellHandle, 
! 								jname );
! 
!   groupName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
! 
!   if( !groupName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return -1;    
!   }
! 
!   while ( pts_OwnedGroupListNext( (void *) iterationId, groupName, &ast ) ) 
!     i++;
! 
!   free( groupName );  
! 
!   if( ast != ADMITERATORDONE ) {
!     throwAFSException( env, ast );
!     return -1;
!   }
  
!   return i;
  }
  
  /**
***************
*** 1215,1247 ****
   * jname  the name of the user or group for which to get the groups
   * returns an iteration ID
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_User_getGroupsOwnedBegin(JNIEnv * env, jclass cls,
! 					       jint cellHandle, jstring jname)
  {
!     char *name;
!     afs_status_t ast;
!     void *iterationId;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (name == NULL) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return -1;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLUSER);
! 	return -1;
!     }
  
!     if (!pts_OwnedGroupListBegin
! 	((void *)cellHandle, name, &iterationId, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     free(name);
  
-     return (jint) iterationId;
  }
  
  /**
--- 1321,1359 ----
   * jname  the name of the user or group for which to get the groups
   * returns an iteration ID
   */
! JNIEXPORT jlong JNICALL 
! Java_org_openafs_jafs_User_getGroupsOwnedBegin
!   (JNIEnv *env, jclass cls, jlong cellHandle, jstring jname)
  {
!   const char *name;
!   afs_status_t ast;
!   void *iterationId;
! 
!   if( jname != NULL ) {
!       name = (*env)->GetStringUTFChars(env, jname, 0);
!       if( !name ) {
! 	  throwAFSException( env, JAFSADMNOMEM );
! 	  return;    
!       }
!   } else {
!       name = NULL;
!   }
! 
!   if( !pts_OwnedGroupListBegin( (void *) cellHandle, name, 
! 				&iterationId, &ast ) ) {
!       if( jname != NULL ) {
! 	  (*env)->ReleaseStringUTFChars(env, jname, name);
!       }
!       throwAFSException( env, ast );
!       return;
!   }
! 
!   if( jname != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
  
!   return (jlong) iterationId;
  
  }
  
  /**
***************
*** 1253,1284 ****
   * iterationId   the iteration ID of this iteration
   * returns the name of the next group
   */
! JNIEXPORT jstring JNICALL
! Java_org_openafs_jafs_User_getGroupsOwnedNextString(JNIEnv * env, jclass cls,
! 						    jint iterationId)
  {
!     afs_status_t ast;
!     char *groupName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
!     jstring jgroup;
! 
!     if (!groupName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return;
!     }
! 
!     if (!pts_OwnedGroupListNext((void *)iterationId, groupName, &ast)) {
! 	free(groupName);
! 	if (ast == ADMITERATORDONE) {
! 	    return NULL;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return NULL;
! 	}
      }
! 
!     jgroup = (*env)->NewStringUTF(env, groupName);
!     free(groupName);
!     return jgroup;
  
  }
  
--- 1365,1396 ----
   * iterationId   the iteration ID of this iteration
   * returns the name of the next group
   */
! JNIEXPORT jstring JNICALL 
! Java_org_openafs_jafs_User_getGroupsOwnedNextString
!   (JNIEnv *env, jclass cls, jlong iterationId)
  {
!   afs_status_t ast;
!   char *groupName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
!   jstring jgroup;
! 
!   if( !groupName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !pts_OwnedGroupListNext( (void *) iterationId, groupName, &ast ) ) {
!     free( groupName );
!     if( ast == ADMITERATORDONE ) {
!       return NULL;
!     } else {
!       throwAFSException( env, ast );
!       return;
      }
!   }
!   
!   jgroup = (*env)->NewStringUTF(env, groupName);
!   free( groupName );
!   return jgroup;
  
  }
  
***************
*** 1294,1339 ****
   *                   next group
   * returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_User_getGroupsOwnedNext(JNIEnv * env, jclass cls,
! 					      jint cellHandle,
! 					      jint iterationId,
! 					      jobject jgroupObject)
  {
!     afs_status_t ast;
!     char *groupName;
!     jstring jgroup;
! 
!     groupName = (char *)malloc(sizeof(char) * PTS_MAX_NAME_LEN);
! 
!     if (!groupName) {
! 	throwAFSException(env, JAFSADMNOMEM);
! 	return 0;
!     }
! 
!     if (!pts_OwnedGroupListNext((void *)iterationId, groupName, &ast)) {
! 	free(groupName);
! 	if (ast == ADMITERATORDONE) {
! 	    return 0;
! 	} else {
! 	    throwAFSException(env, ast);
! 	    return 0;
! 	}
      }
  
!     jgroup = (*env)->NewStringUTF(env, groupName);
  
!     if (groupCls == 0) {
! 	internal_getGroupClass(env, jgroupObject);
!     }
  
!     (*env)->SetObjectField(env, jgroupObject, group_nameField, jgroup);
  
!     getGroupInfoChar(env, (void *)cellHandle, groupName, jgroupObject);
!     (*env)->SetBooleanField(env, jgroupObject, group_cachedInfoField, TRUE);
  
!     free(groupName);
!     return 1;
  
  }
  
--- 1406,1450 ----
   *                   next group
   * returns 0 if there are no more users, != 0 otherwise
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_User_getGroupsOwnedNext
!   (JNIEnv *env, jclass cls, jlong cellHandle, jlong iterationId, 
!    jobject jgroupObject)
  {
!   afs_status_t ast;
!   char *groupName;
!   jstring jgroup;
! 
!   groupName = (char *) malloc( sizeof(char)*PTS_MAX_NAME_LEN);
! 
!   if( !groupName ) {
!     throwAFSException( env, JAFSADMNOMEM );
!     return;    
!   }
! 
!   if( !pts_OwnedGroupListNext( (void *) iterationId, groupName, &ast ) ) {
!     free( groupName );
!     if( ast == ADMITERATORDONE ) {
!       return 0;
!     } else {
!       throwAFSException( env, ast );
!       return 0;
      }
+   }
  
!   jgroup = (*env)->NewStringUTF(env, groupName);
  
!   if( groupCls == 0 ) {
!     internal_getGroupClass( env, jgroupObject );
!   }
  
!   (*env)->SetObjectField(env, jgroupObject, group_nameField, jgroup);
  
!   getGroupInfoChar( env, (void *) cellHandle, groupName, jgroupObject );
!   (*env)->SetBooleanField( env, jgroupObject, group_cachedInfoField, TRUE );
  
!   free( groupName );
!   return 1;
  
  }
  
***************
*** 1344,1367 ****
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_getGroupsOwnedDone(JNIEnv * env, jclass cls,
! 					      jint iterationId)
  {
!     afs_status_t ast;
  
!     if (!pts_OwnedGroupListDone((void *)iterationId, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_reclaimUserMemory(JNIEnv * env, jclass cls)
  {
!     if (userCls) {
! 	(*env)->DeleteGlobalRef(env, userCls);
! 	userCls = 0;
!     }
  }
--- 1455,1484 ----
   * cls      the current Java class
   * iterationId   the iteration ID of this iteration
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_User_getGroupsOwnedDone
!   (JNIEnv *env, jclass cls, jlong iterationId)
  {
!   afs_status_t ast;
  
!   if( !pts_OwnedGroupListDone( (void *) iterationId, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
!   
  }
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_User_reclaimUserMemory
!   (JNIEnv *env, jclass cls)
  {
!   if( userCls ) {
!       (*env)->DeleteGlobalRef(env, userCls);
!       userCls = 0;
!   }
! 
  }
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/UserToken.c
diff -c openafs/src/JAVA/libjafs/UserToken.c:1.3 openafs/src/JAVA/libjafs/UserToken.c:1.3.2.1
*** openafs/src/JAVA/libjafs/UserToken.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/UserToken.c	Fri Oct 14 22:14:12 2005
***************
*** 27,32 ****
--- 27,33 ----
  #include <sys/stat.h>
  #include <sys/ioctl.h>
  #include <afs/vice.h>
+ #include <netinet/in.h>
  #include <afs/venus.h>
  #include <afs/afs_args.h>
  /*#include <afs/afs_osi.h>
***************
*** 38,74 ****
  #endif
  
  pthread_mutex_t jafs_init_lock;
- 
  extern pthread_mutex_t jafs_login_lock;
- 
  extern int readCacheParms(char *afsMountPoint, char *afsConfDir,
! 			  char *afsCacheDir, int *cacheBlocks,
! 			  int *cacheFiles, int *cacheStatEntries,
! 			  int *dCacheSize, int *vCacheSize, int *chunkSize,
! 			  int *closeSynch, int *debug, int *nDaemons,
! 			  int *cacheFlags, char *logFile);
  
  /**
   * Be carefull with the memory management:
   *
!  * - For every getNativeString call the corresponding free().
   * - For every Get<type>ArrayElements call the corresponding
   *   Release<type>ArrayElements
   * - For every malloc call the corresponding free.
   */
  
! int
! osi_audit(void)
  {
!     return 0;
  }
  
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Token_callDebugger(JNIEnv * env, jobject obj)
  {
      fprintf(stderr, "callDebugger called\n");
      __asm__("int $0x3");
! }
  
  /**
   * Initialize the user space library.
--- 39,72 ----
  #endif
  
  pthread_mutex_t jafs_init_lock;
  extern pthread_mutex_t jafs_login_lock;
  extern int readCacheParms(char *afsMountPoint, char *afsConfDir,
!                           char *afsCacheDir,  int *cacheBlocks, 
!                           int *cacheFiles, int *cacheStatEntries,
!                           int *dCacheSize, int *vCacheSize, int *chunkSize,
!                           int *closeSynch, int *debug, int *nDaemons, 
!                           int *cacheFlags, char *logFile);
  
  /**
   * Be carefull with the memory management:
   *
!  * - For every GetStringUTFChars call the corresponding ReleaseStringUTFChars.
   * - For every Get<type>ArrayElements call the corresponding
   *   Release<type>ArrayElements
   * - For every malloc call the corresponding free.
   */
  
! int osi_audit(void)
  {
!    return 0;
  }
  
! /*JNIEXPORT void JNICALL Java_org_openafs_jafs_Token_callDebugger
!   (JNIEnv *env, jobject obj)
  {
      fprintf(stderr, "callDebugger called\n");
      __asm__("int $0x3");
! }*/
  
  /**
   * Initialize the user space library.
***************
*** 82,148 ****
   *
   * throws AFSException
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Token_initUserSpace(JNIEnv * env, jclass cls)
  {
!     char afsMountPoint[100], afsConfDir[100], afsCacheDir[100], logFile[100];
!     jfieldID fid;
!     int pagval;
! 
!     /* Initialize each init parameter with its associated default value */
!     int cacheBlocks = 100000;
!     int cacheFiles = 12500;
!     int cacheStatEntries = 8192;
!     int dCacheSize = 11398;
!     int vCacheSize = 128;
!     int chunkSize = 0;
!     int closeSynch = 0;
!     int debug = 0;
!     int nDaemons = 3;
!     int cacheFlags = -1;
! 
!     /* Initialize each init parameter with its associated default value */
!     strcpy(afsMountPoint, "/afs");
!     strcpy(afsConfDir, "/usr/afswsp/etc");
!     strcpy(afsCacheDir, "/usr/afswsp/cache");
!     strcpy(logFile, "/usr/afswsp/log/libjafs.log");
! 
!     pthread_mutex_init(&jafs_init_lock, NULL);
!     pthread_mutex_lock(&jafs_init_lock);
! 
!     readCacheParms(afsMountPoint, afsConfDir, afsCacheDir, &cacheBlocks,
! 		   &cacheFiles, &cacheStatEntries, &dCacheSize, &vCacheSize,
! 		   &chunkSize, &closeSynch, &debug, &nDaemons, &cacheFlags,
! 		   logFile);
! 
!     /* See cache.tune for configuration details */
!     if (debug) {
! 	fprintf(stderr, "uafs_Init(\"init_native\", \"%s\", \"%s\", \"%s\",
!                       %d, %d, %d,
!                       %d, %d, %d,
!                       %d, %d, %d, %d, \"%s\");\n", afsMountPoint, afsConfDir, afsCacheDir, cacheBlocks, cacheFiles, cacheStatEntries, dCacheSize, vCacheSize, chunkSize, closeSynch, debug, nDaemons, cacheFlags, logFile);
!     }
!     uafs_Init("init_native", afsMountPoint, afsConfDir, afsCacheDir,
! 	      cacheBlocks, cacheFiles, cacheStatEntries, dCacheSize,
! 	      vCacheSize, chunkSize, closeSynch, debug, nDaemons, cacheFlags,
! 	      logFile);
! 
! 
!     /* make the initial pag the unauthenticated pag */
!     afs_setpag();
!     uafs_unlog();
!     pagval = afs_getpag_val();
! 
!     fid = (*env)->GetStaticFieldID(env, cls, "ANYUSER_PAG_ID", "I");
!     if (fid == 0) {
! 	fprintf(stderr,
! 		"UserToken::init(): GetFieldID (ANYUSER_PAG_ID) failed\n");
! 	return;
!     }
  
!     (*env)->SetStaticIntField(env, cls, fid, pagval);
! 
!     pthread_mutex_unlock(&jafs_init_lock);
  }
  
  /**
--- 80,151 ----
   *
   * throws AFSException
   */
! JNIEXPORT void JNICALL Java_org_openafs_jafs_Token_initUserSpace
!   (JNIEnv *env, jclass cls)
  {
!   char afsMountPoint[100], afsConfDir[100], afsCacheDir[100], logFile[100];
!   jfieldID fid;
!   int pagval;
! 
!   /* Initialize each init parameter with its associated default value */
!   int cacheBlocks = 100000;
!   int cacheFiles  = 12500;
!   int cacheStatEntries = 8192;
!   int dCacheSize  = 11398;
!   int vCacheSize  = 128;
!   int chunkSize   = 0;
!   int closeSynch  = 0;
!   int debug       = 0;
!   int nDaemons    = 3; 
!   int cacheFlags  = -1;
! 
!   /* Initialize each init parameter with its associated default value */
!   strcpy(afsMountPoint, "/afs");
!   strcpy(afsConfDir,  "/usr/afswsp/etc");
!   strcpy(afsCacheDir, "/usr/afswsp/cache");
!   strcpy(logFile,     "/usr/afswsp/log/libjafs.log");
! 
!   pthread_mutex_init(&jafs_init_lock, NULL);
!   pthread_mutex_lock(&jafs_init_lock);
! 
!   readCacheParms(afsMountPoint, afsConfDir, afsCacheDir,
!                  &cacheBlocks, &cacheFiles, &cacheStatEntries,
!                  &dCacheSize, &vCacheSize, &chunkSize,
!                  &closeSynch, &debug, &nDaemons, &cacheFlags,
!                  logFile);
! 
!   /* See cache.tune for configuration details */
!   if (debug) {
!     fprintf(stderr, "uafs_Init(\"init_native\", \"%s\", \"%s\", \"%s\"",
!                       "%d, %d, %d,"
!                       "%d, %d, %d,"
!                       "%d, %d, %d, %d, \"%s\");\n",
!               afsMountPoint, afsConfDir, afsCacheDir,
!               cacheBlocks, cacheFiles, cacheStatEntries,
!               dCacheSize, vCacheSize, chunkSize,
!               closeSynch, debug, nDaemons, cacheFlags, logFile);
!   }
!   uafs_Init("init_native", afsMountPoint, afsConfDir, afsCacheDir,
!              cacheBlocks, cacheFiles, cacheStatEntries,
!              dCacheSize, vCacheSize, chunkSize,
!              closeSynch, debug, nDaemons, cacheFlags, logFile);
! 
! 
!   /* make the initial pag the unauthenticated pag */
!   afs_setpag();
!   uafs_unlog();
!   pagval = afs_getpag_val();
! 
!   fid = (*env)->GetStaticFieldID(env, cls, "ANYUSER_PAG_ID", "I");
!   if (fid == 0) {
!     fprintf(stderr,
!     "UserToken::init(): GetFieldID (ANYUSER_PAG_ID) failed\n");
!     return;
!   }
!     
!   (*env)->SetStaticIntField(env, cls, fid, pagval);
  
!   pthread_mutex_unlock(&jafs_init_lock);
  }
  
  /**
***************
*** 160,262 ****
   * throws AFSException
   */
  JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Token_klog(JNIEnv * env, jobject obj, jstring jusername,
! 				 jstring jpassword, jstring jcell, jint id)
  {
!     char *username;
!     char *password;
!     char *cell;
!     char *reason;
!     int code;
!     jint rc = -1;
! 
!     if (jcell != NULL) {
! 	cell = getNativeString(env, jcell);
! 	if (!cell) {
! 	    fprintf(stderr, "UserToken::klog(): failed to get cell name\n");
! 	    throwMessageException(env,
! 				  "Internal error, failed to translate cell name.");
! 	    return -1;
! 	}
!     } else {
! 	cell = NULL;
      }
! 
!     if (jusername != NULL) {
! 	username = getNativeString(env, jusername);
! 	if (!username) {
! 	    if (cell != NULL)
! 		free(cell);
! 	    fprintf(stderr, "UserToken::klog(): failed to get username\n");
! 	    throwMessageException(env,
! 				  "Internal error, failed to translate username.");
! 	    return -1;
! 	}
!     } else {
! 	if (cell != NULL)
! 	    free(cell);
! 	throwAFSException(env, JAFSNULLUSER);
! 	return -1;
      }
! 
!     if (jpassword != NULL) {
! 	password = getNativeString(env, jpassword);
! 	if (!password) {
! 	    if (cell != NULL)
! 		free(cell);
! 	    free(username);
! 	    fprintf(stderr, "UserToken::klog(): failed to get password\n");
! 	    throwMessageException(env,
! 				  "Internal error, failed to translate password.");
! 	    return -1;
! 	}
!     } else {
! 	if (cell != NULL)
! 	    free(cell);
! 	free(username);
! 	throwAFSException(env, JAFSNULLPASS);
! 	return -1;
      }
! 
!     if (id == 0) {
! 	code = uafs_klog(username, cell, password, &reason);
!     } else {
! 	/* Use existing PAG for this thread */
! 	code = afs_setpag_val(id);
! 	if (code != 0)
! 	    code = 180492L;	/* KABADARGUMENT */
! 	if (!code)
! 	    code = uafs_klog_nopag(username, cell, password, &reason);
      }
! 
!     if (code != 0) {
! 	if (cell != NULL)
! 	    free(cell);
! 	if (username != NULL)
! 	    free(username);
! 	if (password != NULL)
! 	    free(password);
! 	fprintf(stderr,
! 		"UserToken::klog(): uafs_klog failed to cell %s: %s\n", cell,
! 		reason);
! 	fprintf(stderr, "code = %d\n", code);
! 	throwAFSException(env, code);
! 	return -1;
      }
  
!     /* Get the PAG we were assigned as the return value */
!     rc = afs_getpag_val();
! 
!     /* clean up */
!     if (cell != NULL)
! 	free(cell);
!     if (username != NULL)
! 	free(username);
!     if (password != NULL)
! 	free(password);
! 
!     /* return PAG ID */
!     return rc;
  }
  
  /**
--- 163,257 ----
   * throws AFSException
   */
  JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Token_klog (JNIEnv *env, jobject obj,
!   jstring jusername, jstring jpassword, jstring jcell, jint id)
  {
!   char *username;
!   char *password;
!   char *cell;
!   char *reason;
!   jint rc = -1;
!   int code;
! 
!   if( jcell != NULL ) { 
!     cell = (char*) (*env)->GetStringUTFChars(env, jcell, 0);
!     if( !cell ) {
!       char *error = "UserToken::klog(): failed to get cell name\n";
!       fprintf(stderr, error);
!       throwMessageException( env, error );
!       return -1;
      }
!   } else {
!     cell = NULL;
!   }
! 
!   if( jusername != NULL ) {
!     username = (char*) (*env)->GetStringUTFChars(env, jusername, 0);
!     if( !username ) {
!       char *error = "UserToken::klog(): failed to get username\n";
!       (*env)->ReleaseStringUTFChars(env, jcell, cell);
!       fprintf(stderr, error);
!       throwMessageException( env, error );
!       return -1;
      }
!   } else {
!     username = NULL;
!   }
!   if( jpassword != NULL ) {
!     password = (char*) (*env)->GetStringUTFChars(env, jpassword, 0);
!     if( !password ) {
!       char *error = "UserToken::klog(): failed to get password\n";
!       (*env)->ReleaseStringUTFChars(env, jcell, cell);
!       (*env)->ReleaseStringUTFChars(env, jusername, username);
!       fprintf(stderr, error);
!       throwMessageException( env, error );
!       return -1;
      }
!   } else {
!     password = NULL;
!   }
! 
!   if (id == 0) {
!     code = uafs_klog(username, cell, password, &reason);
!   } else {
!     /* Use existing PAG for this thread */
!     code = afs_setpag_val(id);
!     if (code != 0) code = 180492L;  /* KABADARGUMENT */
!     if (!code) code = uafs_klog_nopag(username, cell, password, &reason);
!   }
! 
!   if (code != 0) {
!     if( cell != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jcell, cell);
      }
!     if( username != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jusername, username);
      }
+     if( password != NULL ) {
+       (*env)->ReleaseStringUTFChars(env, jpassword, password);
+     }
+     fprintf(stderr, "UserToken::klog(): uafs_klog failed to cell %s: %s\n",
+                      cell, reason);
+     fprintf(stderr, "code = %d\n", code);
+     throwAFSException( env, code );
+   }
+ 
+   /* Get the PAG we were assigned as the return value */
+   rc = afs_getpag_val();
+ 
+   /* clean up */
+   if( cell != NULL ) {
+     (*env)->ReleaseStringUTFChars(env, jcell, cell);
+   }
+   if( username != NULL ) {
+     (*env)->ReleaseStringUTFChars(env, jusername, username);
+   }
+   if( password != NULL ) {
+     (*env)->ReleaseStringUTFChars(env, jpassword, password);
+   }
  
!   /* return PAG ID */
!   return rc;
  }
  
  /**
***************
*** 273,288 ****
   *
   * throws AFSException
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Token_relog(JNIEnv * env, jobject obj, jint id)
  {
!     int rc;
  
!     rc = afs_setpag_val(id);
  
!     if (rc != 0) {
! 	throwAFSException(env, rc);
!     }
  }
  
  /**
--- 268,283 ----
   *
   * throws AFSException
   */
! JNIEXPORT void JNICALL Java_org_openafs_jafs_Token_relog
!   (JNIEnv *env, jobject obj, jint id)
  {
!   int rc;
  
!   rc = afs_setpag_val(id);
  
!   if (rc != 0) {
!     throwAFSException( env, rc );
!   }
  }
  
  /**
***************
*** 294,309 ****
   *
   * throws AFSException
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Token_unlog(JNIEnv * env, jobject obj)
  {
!     int rc;
  
!     rc = uafs_unlog();
  
!     if (rc != 0) {
! 	throwAFSException(env, rc);
!     }
  }
  
  /**
--- 289,304 ----
   *
   * throws AFSException
   */
! JNIEXPORT void JNICALL Java_org_openafs_jafs_Token_unlog
!   (JNIEnv *env, jobject obj)
  {
!   int rc;
  
!   rc = uafs_unlog();
  
!   if (rc != 0) {
!     throwAFSException( env, rc );
!   }
  }
  
  /**
***************
*** 318,325 ****
   *
   * throws AFSException
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Token_shutdown(JNIEnv * env, jobject obj)
  {
!     uafs_Shutdown();
  }
--- 313,324 ----
   *
   * throws AFSException
   */
! JNIEXPORT void JNICALL Java_org_openafs_jafs_Token_shutdown
!   (JNIEnv *env, jobject obj)
  {
!   uafs_Shutdown();
  }
+ 
+ 
+ 
+ 
Index: openafs/src/JAVA/libjafs/Version2.c
diff -c /dev/null openafs/src/JAVA/libjafs/Version2.c:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:21 2006
--- openafs/src/JAVA/libjafs/Version2.c	Fri Oct 14 22:14:12 2005
***************
*** 0 ****
--- 1,14 ----
+ #include "JAFS_Version.h"
+ #include "org_openafs_jafs_VersionInfo.h"
+ 
+ JNIEXPORT jstring JNICALL Java_org_openafs_jafs_VersionInfo_getVersionOfLibjafsadm
+   (JNIEnv *env, jobject obj)
+ {
+ 	return (*env)->NewStringUTF(env, VERSION_LIB_JAVA_OPENAFS);
+ }
+ 
+ JNIEXPORT jstring JNICALL Java_org_openafs_jafs_VersionInfo_getBuildInfoOfLibjafsadm
+   (JNIEnv *env, jobject obj)
+ {
+ 	return (*env)->NewStringUTF(env, cml_version_number);
+ }
Index: openafs/src/JAVA/libjafs/VersionInfo.c
diff -c /dev/null openafs/src/JAVA/libjafs/VersionInfo.c:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:21 2006
--- openafs/src/JAVA/libjafs/VersionInfo.c	Fri Oct 14 22:14:12 2005
***************
*** 0 ****
--- 1,14 ----
+ #include "JAFS_Version.h"
+ #include "org_openafs_jafs_VersionInfo.h"
+  
+ JNIEXPORT jstring JNICALL Java_org_openafs_jafs_VersionInfo_getVersionOfLibjafs
+   (JNIEnv *env, jobject obj)
+ {
+ 	return (*env)->NewStringUTF(env, VERSION_LIB_JAVA_OPENAFS);
+ }
+ 
+ JNIEXPORT jstring JNICALL Java_org_openafs_jafs_VersionInfo_getBuildInfoOfLibjafs
+   (JNIEnv *env, jobject obj)
+ {
+ 	return (*env)->NewStringUTF(env, cml_version_number);
+ }
Index: openafs/src/JAVA/libjafs/Volume.c
diff -c openafs/src/JAVA/libjafs/Volume.c:1.3 openafs/src/JAVA/libjafs/Volume.c:1.3.2.1
*** openafs/src/JAVA/libjafs/Volume.c:1.3	Tue Jul 15 19:11:26 2003
--- openafs/src/JAVA/libjafs/Volume.c	Fri Oct 14 22:14:12 2005
***************
*** 56,223 ****
   * volume      the Volume object to populate with the info
   * volEntry     the container of the volume's information
   */
! extern void
! fillVolumeInfo(JNIEnv * env, jobject volume, vos_volumeEntry_t volEntry)
! {
!     jstring jvolume;
  
!     // get the class fields if need be
!     if (volumeCls == 0) {
! 	internal_getVolumeClass(env, volume);
!     }
!     // set name, just in case it was a completely blank object
!     jvolume = (*env)->NewStringUTF(env, volEntry.name);
!     (*env)->SetObjectField(env, volume, volume_nameField, jvolume);
! 
!     (*env)->SetIntField(env, volume, volume_idField, volEntry.id);
!     (*env)->SetIntField(env, volume, volume_readWriteIdField,
! 			volEntry.readWriteId);
!     (*env)->SetIntField(env, volume, volume_readOnlyIdField,
! 			volEntry.readOnlyId);
!     (*env)->SetIntField(env, volume, volume_backupIdField, volEntry.backupId);
!     (*env)->SetLongField(env, volume, volume_creationDateField,
! 			 volEntry.creationDate);
!     (*env)->SetLongField(env, volume, volume_lastAccessDateField,
! 			 volEntry.lastAccessDate);
!     (*env)->SetLongField(env, volume, volume_lastUpdateDateField,
! 			 volEntry.lastUpdateDate);
!     (*env)->SetLongField(env, volume, volume_lastBackupDateField,
! 			 volEntry.lastBackupDate);
!     (*env)->SetLongField(env, volume, volume_copyCreationDateField,
! 			 volEntry.copyCreationDate);
!     (*env)->SetIntField(env, volume, volume_accessesSinceMidnightField,
! 			volEntry.accessesSinceMidnight);
!     (*env)->SetIntField(env, volume, volume_fileCountField,
! 			volEntry.fileCount);
!     (*env)->SetIntField(env, volume, volume_maxQuotaField, volEntry.maxQuota);
!     (*env)->SetIntField(env, volume, volume_currentSizeField,
! 			volEntry.currentSize);
! 
!     // set status variable
!     switch (volEntry.status) {
!     case VOS_OK:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_OK);
! 	break;
!     case VOS_SALVAGE:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_SALVAGE);
! 	break;
!     case VOS_NO_VNODE:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_NO_VNODE);
! 	break;
!     case VOS_NO_VOL:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_NO_VOL);
! 	break;
!     case VOS_VOL_EXISTS:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_VOL_EXISTS);
! 	break;
!     case VOS_NO_SERVICE:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_NO_SERVICE);
! 	break;
!     case VOS_OFFLINE:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_OFFLINE);
! 	break;
!     case VOS_ONLINE:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_ONLINE);
! 	break;
!     case VOS_DISK_FULL:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_DISK_FULL);
! 	break;
!     case VOS_OVER_QUOTA:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_OVER_QUOTA);
! 	break;
!     case VOS_BUSY:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_BUSY);
! 	break;
!     case VOS_MOVED:
! 	(*env)->SetIntField(env, volume, volume_statusField,
! 			    org_openafs_jafs_Volume_VOLUME_MOVED);
! 	break;
!     default:
! 	throwAFSException(env, volEntry.status);
!     }
! 
!     // set disposition variable
!     switch (volEntry.volumeDisposition) {
!     case VOS_OK:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_OK);
! 	break;
!     case VOS_SALVAGE:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_SALVAGE);
! 	break;
!     case VOS_NO_VNODE:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_NO_VNODE);
! 	break;
!     case VOS_NO_VOL:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_NO_VOL);
! 	break;
!     case VOS_VOL_EXISTS:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_VOL_EXISTS);
! 	break;
!     case VOS_NO_SERVICE:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_NO_SERVICE);
! 	break;
!     case VOS_OFFLINE:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_OFFLINE);
! 	break;
!     case VOS_ONLINE:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_ONLINE);
! 	break;
!     case VOS_DISK_FULL:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_DISK_FULL);
! 	break;
!     case VOS_OVER_QUOTA:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_OVER_QUOTA);
! 	break;
!     case VOS_BUSY:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_BUSY);
! 	break;
!     case VOS_MOVED:
! 	(*env)->SetIntField(env, volume, volume_dispositionField,
! 			    org_openafs_jafs_Volume_VOLUME_MOVED);
! 	break;
!     default:
! 	throwAFSException(env, volEntry.volumeDisposition);
!     }
! 
!     // set type variable
!     switch (volEntry.type) {
!     case VOS_READ_WRITE_VOLUME:
! 	(*env)->SetIntField(env, volume, volume_typeField,
! 			    org_openafs_jafs_Volume_VOLUME_TYPE_READ_WRITE);
! 	break;
!     case VOS_READ_ONLY_VOLUME:
! 	(*env)->SetIntField(env, volume, volume_typeField,
! 			    org_openafs_jafs_Volume_VOLUME_TYPE_READ_ONLY);
! 	break;
!     case VOS_BACKUP_VOLUME:
! 	(*env)->SetIntField(env, volume, volume_typeField,
! 			    org_openafs_jafs_Volume_VOLUME_TYPE_BACKUP);
! 	break;
!     default:
! 	throwAFSException(env, volEntry.type);
!     }
  
  }
  
--- 56,223 ----
   * volume      the Volume object to populate with the info
   * volEntry     the container of the volume's information
   */
! extern void fillVolumeInfo( JNIEnv *env, jobject volume, 
! 			    vos_volumeEntry_t volEntry ) {
  
!   jstring jvolume;
! 
!   // get the class fields if need be
!   if( volumeCls == 0 ) {
!     internal_getVolumeClass( env, volume );
!   }
! 
!   // set name, just in case it was a completely blank object
!   jvolume = (*env)->NewStringUTF(env, volEntry.name);
!   (*env)->SetObjectField(env, volume, volume_nameField, jvolume);
! 
!   (*env)->SetIntField(env, volume, volume_idField, volEntry.id);
!   (*env)->SetIntField(env, volume, volume_readWriteIdField, 
! 		      volEntry.readWriteId);
!   (*env)->SetIntField(env, volume, volume_readOnlyIdField, 
! 		      volEntry.readOnlyId);
!   (*env)->SetIntField(env, volume, volume_backupIdField, volEntry.backupId);
!   (*env)->SetLongField(env, volume, volume_creationDateField, 
! 		       volEntry.creationDate);
!   (*env)->SetLongField(env, volume, volume_lastAccessDateField, 
! 		       volEntry.lastAccessDate);
!   (*env)->SetLongField(env, volume, volume_lastUpdateDateField, 
! 		       volEntry.lastUpdateDate);
!   (*env)->SetLongField(env, volume, volume_lastBackupDateField, 
! 		       volEntry.lastBackupDate);
!   (*env)->SetLongField(env, volume, volume_copyCreationDateField, 
! 		       volEntry.copyCreationDate);
!   (*env)->SetIntField(env, volume, volume_accessesSinceMidnightField, 
! 		      volEntry.accessesSinceMidnight);
!   (*env)->SetIntField(env, volume, volume_fileCountField, volEntry.fileCount);
!   (*env)->SetIntField(env, volume, volume_maxQuotaField, volEntry.maxQuota);
!   (*env)->SetIntField(env, volume, volume_currentSizeField, 
! 		      volEntry.currentSize);
! 
!   // set status variable
!   switch( volEntry.status ) {
!   case VOS_OK :
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_OK);
!       break;
!   case VOS_SALVAGE :
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_SALVAGE);
!       break;
!   case VOS_NO_VNODE:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_NO_VNODE);
!       break;
!   case VOS_NO_VOL:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_NO_VOL);
!       break;
!   case VOS_VOL_EXISTS:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_VOL_EXISTS);
!       break;
!   case VOS_NO_SERVICE:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_NO_SERVICE);
!       break;
!   case VOS_OFFLINE:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_OFFLINE);
!       break;
!   case VOS_ONLINE:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_ONLINE);
!       break;
!   case VOS_DISK_FULL:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_DISK_FULL);
!       break;
!   case VOS_OVER_QUOTA:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_OVER_QUOTA);
!       break;
!   case VOS_BUSY:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_BUSY);
!       break;
!   case VOS_MOVED:
!       (*env)->SetIntField(env, volume, volume_statusField, 
! 			  org_openafs_jafs_Volume_VOLUME_MOVED);
!       break;
!   default:
!       throwAFSException( env, volEntry.status );
!   }
! 
!   // set disposition variable
!   switch( volEntry.volumeDisposition ) {
!   case VOS_OK :
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_OK);
!       break;
!   case VOS_SALVAGE :
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_SALVAGE);
!       break;
!   case VOS_NO_VNODE:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_NO_VNODE);
!       break;
!   case VOS_NO_VOL:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_NO_VOL);
!       break;
!   case VOS_VOL_EXISTS:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_VOL_EXISTS);
!       break;
!   case VOS_NO_SERVICE:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_NO_SERVICE);
!       break;
!   case VOS_OFFLINE:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_OFFLINE);
!       break;
!   case VOS_ONLINE:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_ONLINE);
!       break;
!   case VOS_DISK_FULL:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_DISK_FULL);
!       break;
!   case VOS_OVER_QUOTA:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_OVER_QUOTA);
!       break;
!   case VOS_BUSY:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_BUSY);
!       break;
!   case VOS_MOVED:
!       (*env)->SetIntField(env, volume, volume_dispositionField, 
! 			  org_openafs_jafs_Volume_VOLUME_MOVED);
!       break;
!   default:
!       throwAFSException( env, volEntry.volumeDisposition );
!   }
! 
!   // set type variable
!   switch( volEntry.type ) {
!   case VOS_READ_WRITE_VOLUME:
!       (*env)->SetIntField(env, volume, volume_typeField, 
! 			  org_openafs_jafs_Volume_VOLUME_TYPE_READ_WRITE);
!       break;
!   case VOS_READ_ONLY_VOLUME:
!       (*env)->SetIntField(env, volume, volume_typeField, 
! 			  org_openafs_jafs_Volume_VOLUME_TYPE_READ_ONLY);
!       break;
!   case VOS_BACKUP_VOLUME:
!       (*env)->SetIntField(env, volume, volume_typeField, 
! 			  org_openafs_jafs_Volume_VOLUME_TYPE_BACKUP);
!       break;
!   default:
!       throwAFSException( env, volEntry.type );
!   }
  
  }
  
***************
*** 235,258 ****
   * jvolumeObject   the Volume object in which to fill in 
   *                        the information
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_getVolumeInfo(JNIEnv * env, jclass cls,
! 					   jint cellHandle, jint serverHandle,
! 					   jint partition, jint volID,
! 					   jobject jvolumeObject)
! {
!     afs_status_t ast;
!     vos_volumeEntry_t volEntry;
  
!     // get the volume entry
!     if (!vos_VolumeGet
! 	((void *)cellHandle, (void *)serverHandle, NULL,
! 	 (unsigned int)partition, (unsigned int)volID, &volEntry, &ast)) {
! 	throwAFSException(env, ast);
! 	return;
!     }
  
-     fillVolumeInfo(env, jvolumeObject, volEntry);
  }
  
  /**
--- 235,260 ----
   * jvolumeObject   the Volume object in which to fill in 
   *                        the information
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_getVolumeInfo (JNIEnv *env, jclass cls, 
! 					       jlong cellHandle, 
! 					       jlong serverHandle, 
! 					       jint partition, jint volID, 
! 					       jobject jvolumeObject) {
! 
!   afs_status_t ast;
!   vos_volumeEntry_t volEntry;
! 
!   // get the volume entry
!   if ( !vos_VolumeGet( (void *) cellHandle, (void *) serverHandle, NULL, 
! 		       (unsigned int) partition, (unsigned int) volID, 
! 		       &volEntry, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
!   fillVolumeInfo( env, jvolumeObject, volEntry );
  
  }
  
  /**
***************
*** 269,303 ****
   * quota    the amount of space (in KB) to set as this volume's quota
   * returns the numeric ID assigned to the volume
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Volume_create(JNIEnv * env, jclass cls, jint cellHandle,
! 				    jint serverHandle, jint partition,
! 				    jstring jvolName, jint quota)
! {
!     afs_status_t ast;
!     char *volName;
!     int id;
! 
!     if (jvolName != NULL) {
! 	volName = getNativeString(env, jvolName);
! 	if (!volName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return -1;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLVOLUME);
! 	return -1;
!     }
! 
!     if (!vos_VolumeCreate
! 	((void *)cellHandle, (void *)serverHandle, NULL,
! 	 (unsigned int)partition, volName, (unsigned int)quota, &id, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     free(volName);
  
-     return (jint) id;
  }
  
  /**
--- 271,311 ----
   * quota    the amount of space (in KB) to set as this volume's quota
   * returns the numeric ID assigned to the volume
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Volume_create (JNIEnv *env, jclass cls, 
! 					jlong cellHandle, jlong serverHandle, 
! 					jint partition, jstring jvolName, 
! 					jint quota) {
! 
!   afs_status_t ast;
!   const char *volName;
!   int id;
! 
!   if( jvolName != NULL ) {
!     volName = (*env)->GetStringUTFChars(env, jvolName, 0);
!     if( !volName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     volName = NULL;
!   }
! 
!   if( !vos_VolumeCreate( (void *) cellHandle, (void *) serverHandle, NULL, 
! 			 (unsigned int) partition, volName, 
! 			 (unsigned int) quota, &id, &ast ) ) {
!     if( volName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jvolName, volName);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( volName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jvolName, volName);
!   }
!   return (jint) id;
  
  }
  
  /**
***************
*** 312,330 ****
   *                    the volume
   * volId   the numeric id of the volume to delete
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_delete(JNIEnv * env, jclass cls, jint cellHandle,
! 				    jint serverHandle, jint partition,
! 				    jint volID)
! {
!     afs_status_t ast;
  
-     if (!vos_VolumeDelete
- 	((void *)cellHandle, (void *)serverHandle, NULL,
- 	 (unsigned int)partition, (unsigned int)volID, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 320,339 ----
   *                    the volume
   * volId   the numeric id of the volume to delete
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_delete (JNIEnv *env, jclass cls, 
! 					jlong cellHandle, jlong serverHandle, 
! 					jint partition, jint volID) {
! 
!   afs_status_t ast;
! 
!   if( !vos_VolumeDelete( (void *) cellHandle, (void *) serverHandle, NULL, 
! 			 (unsigned int) partition, 
! 			 (unsigned int) volID, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 336,352 ****
   * volId  the numeric id of the volume for which to create a backup 
   *               volume
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_createBackupVolume(JNIEnv * env, jclass cls,
! 						jint cellHandle, jint volID)
! {
!     afs_status_t ast;
  
-     if (!vos_BackupVolumeCreate
- 	((void *)cellHandle, NULL, (unsigned int)volID, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 345,363 ----
   * volId  the numeric id of the volume for which to create a backup 
   *               volume
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_createBackupVolume (JNIEnv *env, jclass cls, 
! 						    jlong cellHandle, 
! 						    jint volID) {
! 
!   afs_status_t ast;
! 
!   if( !vos_BackupVolumeCreate( (void *) cellHandle, NULL, 
! 			       (unsigned int) volID, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 362,381 ****
   * volId  the numeric id of the volume for which to 
   *               create a read-only volume
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_createReadOnlyVolume(JNIEnv * env, jclass cls,
! 						  jint cellHandle,
! 						  jint serverHandle,
! 						  jint partition, jint volID)
! {
!     afs_status_t ast;
  
-     if (!vos_VLDBReadOnlySiteCreate
- 	((void *)cellHandle, (void *)serverHandle, NULL,
- 	 (unsigned int)partition, (unsigned int)volID, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 373,394 ----
   * volId  the numeric id of the volume for which to 
   *               create a read-only volume
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_createReadOnlyVolume (JNIEnv *env, jclass cls, 
! 						      jlong cellHandle, 
! 						      jlong serverHandle, 
! 						      jint partition, 
! 						      jint volID) {
! 
!   afs_status_t ast;
! 
!   if( !vos_VLDBReadOnlySiteCreate( (void *) cellHandle, (void *) serverHandle, 
! 				   NULL, (unsigned int) partition, 
! 				   (unsigned int) volID, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 391,410 ****
   * volId  the numeric read-write id of the volume for which to 
   *               delete the read-only volume
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_deleteReadOnlyVolume(JNIEnv * env, jclass cls,
! 						  jint cellHandle,
! 						  jint serverHandle,
! 						  jint partition, jint volID)
! {
!     afs_status_t ast;
  
-     if (!vos_VLDBReadOnlySiteDelete
- 	((void *)cellHandle, (void *)serverHandle, NULL,
- 	 (unsigned int)partition, (unsigned int)volID, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 404,425 ----
   * volId  the numeric read-write id of the volume for which to 
   *               delete the read-only volume
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_deleteReadOnlyVolume (JNIEnv *env, jclass cls, 
! 						      jlong cellHandle, 
! 						      jlong serverHandle, 
! 						      jint partition, 
! 						      jint volID) {
! 
!   afs_status_t ast;
! 
!   if( !vos_VLDBReadOnlySiteDelete( (void *) cellHandle, (void *) serverHandle, 
! 				   NULL, (unsigned int) partition, 
! 				   (unsigned int) volID, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 420,440 ****
   * volId  the numeric id of the volume for which to change the quota
   * newQuota    the new quota (in KB) to assign the volume
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_changeQuota(JNIEnv * env, jclass cls,
! 					 jint cellHandle, jint serverHandle,
! 					 jint partition, jint volID,
! 					 jint newQuota)
! {
!     afs_status_t ast;
  
-     if (!vos_VolumeQuotaChange
- 	((void *)cellHandle, (void *)serverHandle, NULL,
- 	 (unsigned int)partition, (unsigned int)volID, (unsigned int)newQuota,
- 	 &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 435,457 ----
   * volId  the numeric id of the volume for which to change the quota
   * newQuota    the new quota (in KB) to assign the volume
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_changeQuota (JNIEnv *env, jclass cls, 
! 					     jlong cellHandle, 
! 					     jlong serverHandle, 
! 					     jint partition, jint volID, 
! 					     jint newQuota) {
! 
!   afs_status_t ast;
! 
!   if( !vos_VolumeQuotaChange( (void *) cellHandle, (void *) serverHandle, 
! 			      NULL, (unsigned int) partition, 
! 			      (unsigned int) volID, (unsigned int) newQuota, 
! 			      &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 453,473 ****
   *                      should be moved
   * volId  the numeric id of the volume to move
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_move(JNIEnv * env, jclass cls, jint cellHandle,
! 				  jint fromServerHandle, jint fromPartition,
! 				  jint toServerHandle, jint toPartition,
! 				  jint volID)
! {
!     afs_status_t ast;
  
-     if (!vos_VolumeMove
- 	((void *)cellHandle, NULL, (unsigned int)volID,
- 	 (void *)fromServerHandle, (unsigned int)fromPartition,
- 	 (void *)toServerHandle, (unsigned int)toPartition, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 470,490 ----
   *                      should be moved
   * volId  the numeric id of the volume to move
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_move
!   (JNIEnv *env, jclass cls, jlong cellHandle, jlong fromServerHandle, 
!    jint fromPartition, jlong toServerHandle, jint toPartition, jint volID)
! {
!   afs_status_t ast;
! 
!   if( !vos_VolumeMove( (void *) cellHandle, NULL, (unsigned int) volID, 
! 		       (void *) fromServerHandle, (unsigned int) fromPartition,
! 		       (void *) toServerHandle, (unsigned int) toPartition, 
! 		       &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 479,503 ****
   * volId  the numeric id of the volume to release
   * forceComplete  whether or not to force a complete release
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_release(JNIEnv * env, jclass cls,
! 				     jint cellHandle, jint volID,
! 				     jboolean forceComplete)
! {
!     afs_status_t ast;
!     vos_force_t force;
! 
!     if (forceComplete) {
! 	force = VOS_FORCE;
!     } else {
! 	force = VOS_NORMAL;
!     }
  
-     if (!vos_VolumeRelease
- 	((void *)cellHandle, NULL, (unsigned int)volID, force, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 496,520 ----
   * volId  the numeric id of the volume to release
   * forceComplete  whether or not to force a complete release
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_release
!   (JNIEnv *env, jclass cls, jlong cellHandle, jint volID, jboolean forceComplete)
! {
!   afs_status_t ast;
!   vos_force_t force;
! 
!   if( forceComplete ) {
!     force = VOS_FORCE;
!   } else {
!     force = VOS_NORMAL;
!   }
! 
!   if( !vos_VolumeRelease( (void *) cellHandle, NULL, (unsigned int) volID,
!                           force, &ast )) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 515,548 ****
   *                    be dumped
   * jdumpFile   the full path of the file to which to dump
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_dump(JNIEnv * env, jclass cls, jint cellHandle,
! 				  jint serverHandle, jint partition,
! 				  jint volID, jint startTime,
! 				  jstring jdumpFile)
! {
!     afs_status_t ast;
!     char *dumpFile;
! 
!     if (jdumpFile != NULL) {
! 	dumpFile = getNativeString(env, jdumpFile);
! 	if (!dumpFile) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLARG);
! 	return;
!     }
! 
!     if (!vos_VolumeDump
! 	((void *)cellHandle, (void *)serverHandle, NULL,
! 	 (unsigned int *)&partition, (unsigned int)volID,
! 	 (unsigned int)startTime, dumpFile, &ast)) {
! 	throwAFSException(env, ast);
!     }
  
-     free(dumpFile);
  }
  
  /**
--- 532,570 ----
   *                    be dumped
   * jdumpFile   the full path of the file to which to dump
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_dump (JNIEnv *env, jclass cls, 
! 				      jlong cellHandle, jlong serverHandle, 
! 				      jint partition, jint volID, 
! 				      jint startTime, jstring jdumpFile) {
! 
!   afs_status_t ast;
!   const char *dumpFile;
! 
!   if( jdumpFile != NULL ) {
!     dumpFile = (*env)->GetStringUTFChars(env, jdumpFile, 0);
!     if( !dumpFile ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     dumpFile = NULL;
!   }
! 
!   if( !vos_VolumeDump( (void *) cellHandle, (void *) serverHandle, NULL, 
! 		       (unsigned int *) &partition, (unsigned int) volID, 
! 		       (unsigned int) startTime, dumpFile, &ast ) ) {
!     if( dumpFile != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jdumpFile, dumpFile);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( dumpFile != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jdumpFile, dumpFile);
!   }
  
  }
  
  /**
***************
*** 563,625 ****
   *                     indicate the current position of the existing volume),
   *                     otherwise restores a full dump
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_restore(JNIEnv * env, jclass cls,
! 				     jint cellHandle, jint serverHandle,
! 				     jint partition, jint volID,
! 				     jstring jvolName, jstring jdumpFile,
! 				     jboolean incremental)
! {
!     afs_status_t ast;
!     char *volName;
!     char *dumpFile;
!     int *volumeIDp;
!     vos_volumeRestoreType_t vrt;
! 
!     if (jvolName != NULL) {
! 	volName = getNativeString(env, jvolName);
! 	if (!volName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLVOLUME);
! 	return;
!     }
! 
!     if (jdumpFile != NULL) {
! 	dumpFile = getNativeString(env, jdumpFile);
! 	if (!dumpFile) {
! 	    free(volName);
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	dumpFile = NULL;
!     }
! 
!     if (volID == 0) {
! 	volumeIDp = NULL;
!     } else {
! 	volumeIDp = (int *)&volID;
!     }
! 
!     if (incremental) {
! 	vrt = VOS_RESTORE_INCREMENTAL;
!     } else {
! 	vrt = VOS_RESTORE_FULL;
!     }
! 
!     if (!vos_VolumeRestore
! 	((void *)cellHandle, (void *)serverHandle, NULL,
! 	 (unsigned int)partition, (unsigned int *)volumeIDp, volName,
! 	 dumpFile, vrt, &ast)) {
! 	throwAFSException(env, ast);
!     }
! 
!     if (dumpFile != NULL)
! 	free(dumpFile);
!     free(volName);
  }
  
  /**
--- 585,658 ----
   *                     indicate the current position of the existing volume),
   *                     otherwise restores a full dump
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_restore (JNIEnv *env, jclass cls, 
! 					 jlong cellHandle, jlong serverHandle, 
! 					 jint partition, jint volID, 
! 					 jstring jvolName, jstring jdumpFile, 
! 					 jboolean incremental) {
! 
!   afs_status_t ast;
!   const char *volName;
!   const char *dumpFile;
!   int *volumeIDp;
!   vos_volumeRestoreType_t vrt;
! 
!   if( jvolName != NULL ) {
!     volName = (*env)->GetStringUTFChars(env, jvolName, 0);
!     if( !volName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     volName = NULL;
!   }
! 
!   if( jdumpFile != NULL ) {
!     dumpFile = (*env)->GetStringUTFChars(env, jdumpFile, 0);
!     if( !dumpFile ) {
!       if( volName != NULL ) {
! 	(*env)->ReleaseStringUTFChars(env, jvolName, volName);
!       }
!       throwAFSException( env, JAFSADMNOMEM );
!       return;    
!     }
!   } else {
!     dumpFile = NULL;
!   }
! 
!   if( volID == 0 ) {
!     volumeIDp = NULL;
!   } else {
!     volumeIDp = (int *) &volID;
!   }
!   
!   if( incremental ) {
!     vrt = VOS_RESTORE_INCREMENTAL;
!   } else {
!     vrt = VOS_RESTORE_FULL;
!   }
! 
!   if( !vos_VolumeRestore( (void *) cellHandle, (void *) serverHandle, NULL, 
! 			  (unsigned int) partition, (unsigned int *) volumeIDp,
! 			  volName, dumpFile, vrt, &ast ) ) {
!     if( volName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jvolName, volName);
!     }
!     if( dumpFile != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jdumpFile, dumpFile);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( dumpFile != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jdumpFile, dumpFile);
!   }
!   if( volName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jvolName, volName);
!   }
! 
  }
  
  /**
***************
*** 631,660 ****
   * volId  the numeric id of the read-write volume to rename
   * jnewName  the new name for the volume
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_rename(JNIEnv * env, jclass cls, jint cellHandle,
! 				    jint volID, jstring jnewName)
! {
!     afs_status_t ast;
!     char *newName;
! 
!     if (jnewName != NULL) {
! 	newName = getNativeString(env, jnewName);
! 	if (!newName) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLVOLUME);
! 	return;
!     }
! 
!     if (!vos_VolumeRename
! 	((void *)cellHandle, NULL, (unsigned int)volID, newName, &ast)) {
! 	throwAFSException(env, ast);
!     }
  
-     free(newName);
  }
  
  /**
--- 664,700 ----
   * volId  the numeric id of the read-write volume to rename
   * jnewName  the new name for the volume
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_rename (JNIEnv *env, jclass cls, 
! 					jlong cellHandle, jint volID, 
! 					jstring jnewName) {
! 
!   afs_status_t ast;
!   const char *newName;
! 
!   if( jnewName != NULL ) {
!     newName = (*env)->GetStringUTFChars(env, jnewName, 0);
!     if( !newName ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     newName = NULL;
!   }
! 
!   if( !vos_VolumeRename( (void *) cellHandle, NULL, (unsigned int) volID, 
! 			 newName, &ast ) ) {
!     if( newName != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jnewName, newName);
!     }
!     throwAFSException( env, ast );
!     return;
!   }
! 
!   if( newName != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jnewName, newName);
!   }
  
  }
  
  /**
***************
*** 672,698 ****
   * offline   ?  (not sure what this is either, probably the current 
   *                     status of the volume -- busy or offline)
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_mount(JNIEnv * env, jclass cls,
! 				   jint serverHandle, jint partition,
! 				   jint volID, jint sleepTime,
! 				   jboolean offline)
! {
!     afs_status_t ast;
!     vos_volumeOnlineType_t volumeStatus;
! 
!     if (offline) {
! 	volumeStatus = VOS_ONLINE_OFFLINE;
!     } else {
! 	volumeStatus = VOS_ONLINE_BUSY;
!     }
  
-     if (!vos_VolumeOnline
- 	((void *)serverHandle, NULL, (unsigned int)partition,
- 	 (unsigned int)volID, (unsigned int)sleepTime, volumeStatus, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 712,739 ----
   * offline   ?  (not sure what this is either, probably the current 
   *                     status of the volume -- busy or offline)
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_mount (JNIEnv *env, jclass cls, 
! 				       jlong serverHandle, jint partition, 
! 				       jint volID, jint sleepTime, 
! 				       jboolean offline) {
! 
!   afs_status_t ast;
!   vos_volumeOnlineType_t volumeStatus;
! 
!   if( offline ) {
!     volumeStatus = VOS_ONLINE_OFFLINE;
!   } else {
!     volumeStatus = VOS_ONLINE_BUSY;
!   }
! 
!   if( !vos_VolumeOnline( (void *) serverHandle, NULL, (unsigned int) partition,
! 			 (unsigned int) volID, (unsigned int) sleepTime, 
! 			 volumeStatus, &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 706,724 ****
   *                    resides
   * volId  the numeric id of the volume to bring offline
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_unmount(JNIEnv * env, jclass cls,
! 				     jint serverHandle, jint partition,
! 				     jint volID)
! {
!     afs_status_t ast;
  
-     if (!vos_VolumeOffline
- 	((void *)serverHandle, NULL, (unsigned int)partition,
- 	 (unsigned int)volID, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 747,766 ----
   *                    resides
   * volId  the numeric id of the volume to bring offline
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_unmount (JNIEnv *env, jclass cls, 
! 					 jlong serverHandle, jint partition, 
! 					 jint volID) {
! 
!   afs_status_t ast;
! 
!   if( !vos_VolumeOffline( (void *) serverHandle, NULL, 
! 			  (unsigned int) partition, (unsigned int) volID, 
! 			  &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 729,745 ****
   * cellHandle  the handle of the cell on which the volume resides
   * volId  the numeric id of the volume to lock
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_lock(JNIEnv * env, jclass cls, jint cellHandle,
! 				  jint volID)
! {
!     afs_status_t ast;
  
-     if (!vos_VLDBEntryLock
- 	((void *)cellHandle, NULL, (unsigned int)volID, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 771,788 ----
   * cellHandle  the handle of the cell on which the volume resides
   * volId  the numeric id of the volume to lock
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_lock (JNIEnv *env, jclass cls, 
! 				      jlong cellHandle, jint volID ) {
! 
!   afs_status_t ast;
! 
!   if( !vos_VLDBEntryLock( (void *) cellHandle, NULL, (unsigned int) volID, 
! 			  &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 750,766 ****
   * cellHandle  the handle of the cell on which the volume resides
   * volId  the numeric id of the volume to unlock
   */
! JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_unlock(JNIEnv * env, jclass cls, jint cellHandle,
! 				    jint volID)
! {
!     afs_status_t ast;
  
-     if (!vos_VLDBEntryUnlock
- 	((void *)cellHandle, NULL, (unsigned int)volID, &ast)) {
- 	throwAFSException(env, ast);
- 	return;
-     }
  }
  
  /**
--- 793,810 ----
   * cellHandle  the handle of the cell on which the volume resides
   * volId  the numeric id of the volume to unlock
   */
! JNIEXPORT void JNICALL 
! Java_org_openafs_jafs_Volume_unlock (JNIEnv *env, jclass cls, 
! 					jlong cellHandle, jint volID) {
! 
!   afs_status_t ast;
! 
!   if( !vos_VLDBEntryUnlock( (void *) cellHandle, NULL, (unsigned int) volID, 
! 			    &ast ) ) {
!     throwAFSException( env, ast );
!     return;
!   }
  
  }
  
  /**
***************
*** 778,829 ****
   *              org_openafs_jafs_Volume_VOLUME_TYPE_BACKUP
   * returns   the id of the volume in question
   */
! JNIEXPORT jint JNICALL
! Java_org_openafs_jafs_Volume_translateNameToID(JNIEnv * env, jclass cls,
! 					       jint cellHandle, jstring jname,
! 					       jint type)
! {
!     afs_status_t ast;
!     char *name;
!     vos_vldbEntry_t vldbEntry;
! 
!     if (jname != NULL) {
! 	name = getNativeString(env, jname);
! 	if (!name) {
! 	    throwAFSException(env, JAFSADMNOMEM);
! 	    return -1;
! 	}
!     } else {
! 	throwAFSException(env, JAFSNULLVOLUME);
! 	return -1;
!     }
! 
!     // get the id
!     if (!vos_VLDBGet((void *)cellHandle, NULL, NULL, name, &vldbEntry, &ast)) {
! 	free(name);
! 	throwAFSException(env, ast);
! 	return -1;
!     }
! 
!     free(name);
! 
!     if (type == org_openafs_jafs_Volume_VOLUME_TYPE_READ_WRITE) {
! 	return vldbEntry.volumeId[VOS_READ_WRITE_VOLUME];
!     } else if (type == org_openafs_jafs_Volume_VOLUME_TYPE_READ_ONLY) {
! 	return vldbEntry.volumeId[VOS_READ_ONLY_VOLUME];
!     } else {
! 	return vldbEntry.volumeId[VOS_BACKUP_VOLUME];
!     }
  
  }
  
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_reclaimVolumeMemory(JNIEnv * env, jclass cls)
! {
!     if (volumeCls) {
! 	(*env)->DeleteGlobalRef(env, volumeCls);
! 	volumeCls = 0;
!     }
  }
--- 822,901 ----
   *              org_openafs_jafs_Volume_VOLUME_TYPE_BACKUP
   * returns   the id of the volume in question
   */
! JNIEXPORT jint JNICALL 
! Java_org_openafs_jafs_Volume_translateNameToID (JNIEnv *env, jclass cls, 
! 						   jlong cellHandle, 
! 						   jstring jname, jint type) {
! 
!   afs_status_t ast;
!   const char *name;
!   vos_vldbEntry_t vldbEntry;
! 
!   if( jname != NULL ) {
!     name = (*env)->GetStringUTFChars(env, jname, 0);
!     if( !name ) {
! 	throwAFSException( env, JAFSADMNOMEM );
! 	return;    
!     }
!   } else {
!     name = NULL;
!   }
! 
!   // get the id
!   if( !vos_VLDBGet( (void *) cellHandle, NULL, NULL, name, 
! 		    &vldbEntry, &ast ) ) {
!     if( name != NULL ) {
!       (*env)->ReleaseStringUTFChars(env, jname, name);
!     }
!     throwAFSException( env, ast );
!     return -1;
!   } 
! 
!   if( name != NULL ) {
!     (*env)->ReleaseStringUTFChars(env, jname, name);
!   }
! 
!   if( type == org_openafs_jafs_Volume_VOLUME_TYPE_READ_WRITE ) {
!     return vldbEntry.volumeId[VOS_READ_WRITE_VOLUME];
!   } else if( type == org_openafs_jafs_Volume_VOLUME_TYPE_READ_ONLY ) {
!     return vldbEntry.volumeId[VOS_READ_ONLY_VOLUME];
!   } else {
!     return vldbEntry.volumeId[VOS_BACKUP_VOLUME];
!   }
  
  }
  
  
  // reclaim global memory being used by this portion
  JNIEXPORT void JNICALL
! Java_org_openafs_jafs_Volume_reclaimVolumeMemory (JNIEnv *env, jclass cls) {
! 
!   if( volumeCls ) {
!       (*env)->DeleteGlobalRef(env, volumeCls);
!       volumeCls = 0;
!   }
! 
  }
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
Index: openafs/src/WINNT/afsapplib/NTMakefile
diff -c openafs/src/WINNT/afsapplib/NTMakefile:1.5.2.5 openafs/src/WINNT/afsapplib/NTMakefile:1.5.2.6
*** openafs/src/WINNT/afsapplib/NTMakefile:1.5.2.5	Wed Jul  6 20:28:59 2005
--- openafs/src/WINNT/afsapplib/NTMakefile	Sun Apr  9 03:52:50 2006
***************
*** 84,90 ****
  
  DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsAppLib.dll
  
! !IF ("$(AFSVER_CL)"<"1400")
  DEFFILE = TaAfsAppLib.def
  !ELSE
  DEFFILE = TaAfsAppLib2005.def
--- 84,90 ----
  
  DLLFILE = $(DESTDIR)\root.server\usr\afs\bin\TaAfsAppLib.dll
  
! !IF ($(AFSVER_CL) < 1400)
  DEFFILE = TaAfsAppLib.def
  !ELSE
  DEFFILE = TaAfsAppLib2005.def
Index: openafs/src/WINNT/afsd/NTMakefile
diff -c openafs/src/WINNT/afsd/NTMakefile:1.27.2.10 openafs/src/WINNT/afsd/NTMakefile:1.27.2.12
*** openafs/src/WINNT/afsd/NTMakefile:1.27.2.10	Sun Oct  2 02:08:55 2005
--- openafs/src/WINNT/afsd/NTMakefile	Sat Oct 29 16:15:07 2005
***************
*** 131,136 ****
--- 131,139 ----
  
  CMDBGOBJS=$(OUT)\cmdebug.obj
  
+ $(CMDBGOBJS): $(AFSROOT)\src\venus\cmdebug.c
+ 	$(C2OBJ) -DAFS_PTHREAD_ENV /Fo$@ $**
+ 
  SLOBJS=$(OUT)\symlink.obj $(OUT)\fs_utils.obj
  
  ILIBDIR = $(DESTDIR)\lib
Index: openafs/src/WINNT/afsd/afsd_eventmessages.mc
diff -c openafs/src/WINNT/afsd/afsd_eventmessages.mc:1.1 openafs/src/WINNT/afsd/afsd_eventmessages.mc:1.1.2.1
*** openafs/src/WINNT/afsd/afsd_eventmessages.mc:1.1	Thu Feb 26 14:22:44 2004
--- openafs/src/WINNT/afsd/afsd_eventmessages.mc	Sun Jan 15 21:06:58 2006
***************
*** 106,109 ****
--- 106,127 ----
  .
  
  
+ MessageId=
+ Severity=Warning
+ Facility=System
+ SymbolicName=MSG_SMB_SEND_PACKET_FAILURE
+ Language=English
+ Unable to Send SMB Packet: %1.
+ .
+ 
+ 
+ MessageId=
+ Severity=Warning
+ Facility=System
+ SymbolicName=MSG_UNEXPECTED_SMB_SESSION_CLOSE
+ Language=English
+ Unexpected SMB Session Close: %1.
+ .
+ 
+ 
  ;#endif /* __AFSD_EVENTMESSAGES_H_ 1 */
Index: openafs/src/WINNT/afsd/afsd_init.c
diff -c openafs/src/WINNT/afsd/afsd_init.c:1.40.2.24.2.1 openafs/src/WINNT/afsd/afsd_init.c:1.40.2.30
*** openafs/src/WINNT/afsd/afsd_init.c:1.40.2.24.2.1	Mon Oct 17 15:35:44 2005
--- openafs/src/WINNT/afsd/afsd_init.c	Sun Apr  2 19:56:06 2006
***************
*** 279,304 ****
                         KEY_READ|KEY_WRITE,
                         &hkMSV10) == ERROR_SUCCESS )
      {
!         if (RegQueryValueEx( hkMSV10, "BackConnectionHostNames", 0, &dwType, NULL, &dwSize) == ERROR_SUCCESS) {
!             pHostNames = malloc(dwSize + strlen(cm_NetbiosName) + 1);
!             RegQueryValueEx( hkMSV10, "BackConnectionHostNames", 0, &dwType, pHostNames, &dwSize);
! 
!             for (pName = pHostNames; *pName ; pName += strlen(pName) + 1)
!             {
!                 if ( !stricmp(pName, cm_NetbiosName) ) {
!                     bNameFound = TRUE;
!                     break;
!                 }   
!             }
!         }
               
          if ( !bNameFound ) {
              int size = strlen(cm_NetbiosName) + 2;
              if ( !pHostNames ) {
                  pHostNames = malloc(size);
!                 dwSize = 1;
              }
-             pName = pHostNames;
              StringCbCopyA(pName, size, cm_NetbiosName);
              pName += size - 1;
              *pName = '\0';  /* add a second nul terminator */
--- 279,307 ----
                         KEY_READ|KEY_WRITE,
                         &hkMSV10) == ERROR_SUCCESS )
      {
! 	if (RegQueryValueEx( hkMSV10, "BackConnectionHostNames", 0, 
! 			     &dwType, NULL, &dwSize) == ERROR_SUCCESS) {
! 	    dwSize += strlen(cm_NetbiosName) + 1;
! 	    pHostNames = malloc(dwSize);
! 	    if (RegQueryValueEx( hkMSV10, "BackConnectionHostNames", 0, &dwType, 
! 				 pHostNames, &dwSize) == ERROR_SUCCESS) {
! 		for (pName = pHostNames; *pName ; pName += strlen(pName) + 1)
! 		{
! 		    if ( !stricmp(pName, cm_NetbiosName) ) {
! 			bNameFound = TRUE;
! 			break;
! 		    }   
! 		}
! 	    }
! 	}
               
          if ( !bNameFound ) {
              int size = strlen(cm_NetbiosName) + 2;
              if ( !pHostNames ) {
                  pHostNames = malloc(size);
!                 dwSize = size;
! 		pName = pHostNames;
              }
              StringCbCopyA(pName, size, cm_NetbiosName);
              pName += size - 1;
              *pName = '\0';  /* add a second nul terminator */
***************
*** 370,377 ****
--- 373,384 ----
          }
          RegCloseKey(hkMSV10);
      }
+ 
+     if (pHostNames)
+ 	free(pHostNames);
  }
  
+ 
  #if !defined(DJGPP)
  static void afsd_InitServerPreferences(void)
  {
***************
*** 566,580 ****
      WSAStartup(0x0101, &WSAjunk);
  
      afsd_initUpperCaseTable();
  
      /* setup osidebug server at RPC slot 1000 */
      osi_LongToUID(1000, &debugID);
      code = osi_InitDebug(&debugID);
      afsi_log("osi_InitDebug code %d", code);
  
!     //	osi_LockTypeSetDefault("stat");	/* comment this out for speed *
      if (code != 0) {
!         *reasonP = "unknown error";
          return -1;
      }
  
--- 573,591 ----
      WSAStartup(0x0101, &WSAjunk);
  
      afsd_initUpperCaseTable();
+     init_et_to_sys_error();
  
      /* setup osidebug server at RPC slot 1000 */
      osi_LongToUID(1000, &debugID);
      code = osi_InitDebug(&debugID);
      afsi_log("osi_InitDebug code %d", code);
  
!     //	osi_LockTypeSetDefault("stat");	/* comment this out for speed */
      if (code != 0) {
!         if (code == RPC_S_NO_PROTSEQS)
!             *reasonP = "No RPC Protocol Sequences registered.  Check HKLM\\SOFTWARE\\Microsoft\\RPC\\ClientProtocols";
!         else
!             *reasonP = "unknown error";
          return -1;
      }
  
***************
*** 725,754 ****
      dummyLen = sizeof(ltt);
      code = RegQueryValueEx(parmKey, "LogoffTokenTransfer", NULL, NULL,
                              (BYTE *) &ltt, &dummyLen);
!     if (code == ERROR_SUCCESS)
!         afsi_log("Logoff token transfer %s",  (ltt ? "on" : "off"));
!     else {
          ltt = 1;
-         afsi_log("Logoff token transfer on by default");
-     }
      smb_LogoffTokenTransfer = ltt;
!     afsi_log("Logoff token transfer is currently ignored");
  
      if (ltt) {
          dummyLen = sizeof(ltto);
          code = RegQueryValueEx(parmKey, "LogoffTokenTransferTimeout",
                                  NULL, NULL, (BYTE *) &ltto, &dummyLen);
!         if (code == ERROR_SUCCESS)
!             afsi_log("Logoff token tranfer timeout %d seconds", ltto);
!         else {
!             ltto = 10;
!             afsi_log("Default logoff token transfer timeout 10 seconds");
!         }
      } else {
          ltto = 0;
      }   
      smb_LogoffTransferTimeout = ltto;
!     afsi_log("Default logoff token is currently ignored");
  
      dummyLen = sizeof(cm_rootVolumeName);
      code = RegQueryValueEx(parmKey, "RootVolume", NULL, NULL,
--- 736,757 ----
      dummyLen = sizeof(ltt);
      code = RegQueryValueEx(parmKey, "LogoffTokenTransfer", NULL, NULL,
                              (BYTE *) &ltt, &dummyLen);
!     if (code != ERROR_SUCCESS)
          ltt = 1;
      smb_LogoffTokenTransfer = ltt;
!     afsi_log("Logoff token transfer %s",  (ltt ? "on" : "off"));
  
      if (ltt) {
          dummyLen = sizeof(ltto);
          code = RegQueryValueEx(parmKey, "LogoffTokenTransferTimeout",
                                  NULL, NULL, (BYTE *) &ltto, &dummyLen);
!         if (code != ERROR_SUCCESS)
!             ltto = 120;
      } else {
          ltto = 0;
      }   
      smb_LogoffTransferTimeout = ltto;
!     afsi_log("Logoff token transfer timeout %d seconds", ltto);
  
      dummyLen = sizeof(cm_rootVolumeName);
      code = RegQueryValueEx(parmKey, "RootVolume", NULL, NULL,
***************
*** 1477,1483 ****
              DWORD dummyLen;
              DWORD dwValue;
              DWORD code;
!             DWORD dwMiniDumpType = MiniDumpNormal;
  
              code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
                                   0, KEY_QUERY_VALUE, &parmKey);
--- 1480,1486 ----
              DWORD dummyLen;
              DWORD dwValue;
              DWORD code;
!             DWORD dwMiniDumpType = MiniDumpWithDataSegs;
  
              code = RegOpenKeyEx(HKEY_LOCAL_MACHINE, AFSREG_CLT_OPENAFS_SUBKEY,
                                   0, KEY_QUERY_VALUE, &parmKey);
***************
*** 1486,1492 ****
                  code = RegQueryValueEx(parmKey, "MiniDumpType", NULL, NULL,
                                          (BYTE *) &dwValue, &dummyLen);
                  if (code == ERROR_SUCCESS)
!                     dwMiniDumpType = dwValue ? 1 : 0;
                  RegCloseKey (parmKey);
              }
  
--- 1489,1495 ----
                  code = RegQueryValueEx(parmKey, "MiniDumpType", NULL, NULL,
                                          (BYTE *) &dwValue, &dummyLen);
                  if (code == ERROR_SUCCESS)
!                     dwMiniDumpType = dwValue;
                  RegCloseKey (parmKey);
              }
  
Index: openafs/src/WINNT/afsd/afsd_service.c
diff -c openafs/src/WINNT/afsd/afsd_service.c:1.28.2.16 openafs/src/WINNT/afsd/afsd_service.c:1.28.2.17
*** openafs/src/WINNT/afsd/afsd_service.c:1.28.2.16	Wed May 18 18:57:08 2005
--- openafs/src/WINNT/afsd/afsd_service.c	Tue Nov  8 22:05:33 2005
***************
*** 1351,1356 ****
--- 1351,1361 ----
                                           
      RpcShutdown();                       
  
+     cm_ReleaseAllLocks();
+ 
+     rx_Finalize();
+     afsi_log("rx finalization complete");
+ 
      cm_ShutdownMappedMemory();           
  
  #ifdef	REGISTER_POWER_NOTIFICATIONS
Index: openafs/src/WINNT/afsd/afskfw.c
diff -c openafs/src/WINNT/afsd/afskfw.c:1.8.2.15.4.1 openafs/src/WINNT/afsd/afskfw.c:1.8.2.17
*** openafs/src/WINNT/afsd/afskfw.c:1.8.2.15.4.1	Mon Oct 10 19:19:19 2005
--- openafs/src/WINNT/afsd/afskfw.c	Wed Nov 30 01:40:53 2005
***************
*** 3073,3083 ****
      }
      strcpy(aclient.instance, "");
  
!     if ( strcmp(realm_of_cell, creds.realm) ) 
!     {
!         strncat(aclient.name, "@", MAXKTCNAMELEN - 1);
!         strncpy(aclient.name, creds.realm, MAXKTCREALMLEN - 1);
!     }
      aclient.name[MAXKTCREALMLEN-1] = '\0';
  
      strcpy(aclient.cell, CellName);
--- 3073,3080 ----
      }
      strcpy(aclient.instance, "");
  
!     strncat(aclient.name, "@", MAXKTCNAMELEN - 1);
!     strncat(aclient.name, creds.realm, MAXKTCREALMLEN - 1);
      aclient.name[MAXKTCREALMLEN-1] = '\0';
  
      strcpy(aclient.cell, CellName);
Index: openafs/src/WINNT/afsd/afslogon.c
diff -c openafs/src/WINNT/afsd/afslogon.c:1.24.2.15 openafs/src/WINNT/afsd/afslogon.c:1.24.2.20
*** openafs/src/WINNT/afsd/afslogon.c:1.24.2.15	Mon Aug 29 15:40:59 2005
--- openafs/src/WINNT/afsd/afslogon.c	Thu Feb  9 10:29:41 2006
***************
*** 256,262 ****
  
          CloseServiceHandle (hManager);
      }
!     DebugEvent("AFS AfsLogon - Test Service Running","Return Code[%x] ?Running[%d]",Status.dwCurrentState,(Status.dwCurrentState == SERVICE_RUNNING));
      return (Status.dwCurrentState == SERVICE_RUNNING);
  }   
  
--- 256,262 ----
  
          CloseServiceHandle (hManager);
      }
!     DebugEvent("AFS AfsLogon - Test Service Running Return Code[%x] ?Running[%d]",Status.dwCurrentState,(Status.dwCurrentState == SERVICE_RUNNING));
      return (Status.dwCurrentState == SERVICE_RUNNING);
  }   
  
***************
*** 278,284 ****
  
          CloseServiceHandle (hManager);
      }
!     DebugEvent("AFS AfsLogon - Test Service Start Pending","Return Code[%x] ?Start Pending[%d]",Status.dwCurrentState,(Status.dwCurrentState == SERVICE_START_PENDING));
      return (Status.dwCurrentState == SERVICE_START_PENDING);
  }   
  
--- 278,284 ----
  
          CloseServiceHandle (hManager);
      }
!     DebugEvent("AFS AfsLogon - Test Service Start Pending Return Code[%x] ?Start Pending[%d]",Status.dwCurrentState,(Status.dwCurrentState == SERVICE_START_PENDING));
      return (Status.dwCurrentState == SERVICE_START_PENDING);
  }   
  
***************
*** 410,416 ****
      if(ISHIGHSECURITY(opt->LogonOption)) {
          opt->smbName = malloc( MAXRANDOMNAMELEN );
          GenRandomName(opt->smbName);
!     } else {
          /* username and domain for logon session is not necessarily the same as
             username and domain passed into network provider. */
          PSECURITY_LOGON_SESSION_DATA plsd;
--- 410,416 ----
      if(ISHIGHSECURITY(opt->LogonOption)) {
          opt->smbName = malloc( MAXRANDOMNAMELEN );
          GenRandomName(opt->smbName);
!     } else if (lpLogonId) {
          /* username and domain for logon session is not necessarily the same as
             username and domain passed into network provider. */
          PSECURITY_LOGON_SESSION_DATA plsd;
***************
*** 447,452 ****
--- 447,467 ----
  
        bad_strings:
          LsaFreeReturnBuffer(plsd);
+     } else {
+         size_t len;
+ 
+         DebugEvent("No LUID given. Constructing username using [%s] and [%s]",
+                    username, domain);
+  
+         len = strlen(username) + strlen(domain) + 2;
+ 
+         opt->smbName = malloc(len);
+ 
+         StringCbCopy(opt->smbName, len, username);
+         StringCbCat(opt->smbName, len, "\\");
+         StringCbCat(opt->smbName, len, domain);
+ 
+         strlwr(opt->smbName);
      }
  
      DebugEvent("Looking up logon script");
***************
*** 578,584 ****
          DebugEvent("Found TheseCells [%s]", thesecells);
          opt->theseCells = thesecells;
  
!       doneTheseCells:;
      }
  
    cleanup:
--- 593,600 ----
          DebugEvent("Found TheseCells [%s]", thesecells);
          opt->theseCells = thesecells;
  
!       doneTheseCells:
!         ;
      }
  
    cleanup:
***************
*** 755,761 ****
              code = GT_PW_NULL;
              reason = "zero length password is illegal";
              code=0;
!         }       
  
          /* Get cell name if doing integrated logon.  
             We might overwrite this if we are logging into an AD realm and we find out that
--- 771,777 ----
              code = GT_PW_NULL;
              reason = "zero length password is illegal";
              code=0;
!         }
  
          /* Get cell name if doing integrated logon.  
             We might overwrite this if we are logging into an AD realm and we find out that
***************
*** 781,888 ****
      }
  
      /* loop until AFS is started. */
!     while (IsServiceRunning() || IsServiceStartPending()) {
!         DebugEvent("while(autostart) LogonOption[%x], Service AutoStart[%d]",
!                     opt.LogonOption,afsWillAutoStart);
! 
!         if (ISADREALM(opt.flags)) {
!             code = GetFileCellName(homePath,cell,256);
!             if (!code) {
!                 DebugEvent("profile path [%s] is in cell [%s]",homePath,cell);
!             }
!             /* Don't bail out if GetFileCellName failed.
!              * The home dir may not be in AFS after all. 
!              */
!         } else
!             code=0;
! 		
!         /* if Integrated Logon  */
!         if (ISLOGONINTEGRATED(opt.LogonOption))
!         {			
!             if ( KFW_is_available() ) {
!                 code = KFW_AFS_get_cred(uname, cell, password, 0, opt.smbName, &reason);
!                 DebugEvent("KFW_AFS_get_cred  uname=[%s] smbname=[%s] cell=[%s] code=[%d]",uname,opt.smbName,cell,code);
!                 if (code == 0 && opt.theseCells) { 
!                     char * principal, *p;
! 
!                     principal = (char *)malloc(strlen(uname) + strlen(cell) + 2);
!                     if ( principal ) {
!                         strcpy(principal, uname);
!                         p = principal + strlen(uname);
!                         *p++ = '@';
!                         strcpy(p, cell);
!                         for ( ;*p; p++) {
!                             *p = toupper(*p);
!                         }
! 
!                         p = opt.theseCells;
!                         while ( *p ) {
!                             code2 = KFW_AFS_get_cred(principal, p, 0, 0, opt.smbName, &reason);
!                             DebugEvent("KFW_AFS_get_cred  uname=[%s] smbname=[%s] cell=[%s] code=[%d]",
!                                         principal,opt.smbName,p,code2);
!                             p += strlen(p) + 1;
!                         }
!                         
!                         free(principal);
!                     }
!                 }
!             } else {
!                 code = ka_UserAuthenticateGeneral2(KA_USERAUTH_VERSION+KA_USERAUTH_AUTHENT_LOGON,
!                                                     uname, "", cell, password, opt.smbName, 0, &pw_exp, 0,
!                                                     &reason);
!                 DebugEvent("AFS AfsLogon - (INTEGRATED only)ka_UserAuthenticateGeneral2","Code[%x] uname[%s] Cell[%s]",
!                             code,uname,cell);
!             }       
!             if ( code && code != KTC_NOCM && code != KTC_NOCMRPC && !lowercased_name ) {
!                 for ( ctemp = uname; *ctemp ; ctemp++) {
!                     *ctemp = tolower(*ctemp);
!                 }
!                 lowercased_name = TRUE;
!                 goto sleeping;
!             }
! 
!             /* is service started yet?*/
! 
!             /* If we've failed because the client isn't running yet and the
!             * client is set to autostart (and therefore it makes sense for
!             * us to wait for it to start) then sleep a while and try again. 
!             * If the error was something else, then give up. */
!             if (code != KTC_NOCM && code != KTC_NOCMRPC)
!                 break;
!         }
!         else {  
!             /*JUST check to see if its running*/
!             if (IsServiceRunning())
!                 break;
!             if (!IsServiceStartPending()) {
!                 code = KTC_NOCMRPC;
!                 reason = "AFS Service start failed";
!                 break;
!             }
!         }
! 
!         /* If the retry interval has expired and we still aren't
!          * logged in, then just give up if we are not in interactive
!          * mode or the failSilently flag is set, otherwise let the
!          * user know we failed and give them a chance to try again. */
!         if (retryInterval <= 0) {
!             reason = "AFS not running";
!             if (!interactive || opt.failSilently)
!                 break;
!             flag = MessageBox(hwndOwner,
!                                "AFS is still starting.  Retry?",
!                                "AFS Logon",
!                                MB_ICONQUESTION | MB_RETRYCANCEL);
!             if (flag == IDCANCEL)
!                 break;
! 
!             /* Wait just a little while and try again */
!             retryInterval = opt.retryInterval;
!         }
! 
!       sleeping:
!         Sleep(sleepInterval * 1000);
!         retryInterval -= sleepInterval;
      }
  
      DebugEvent("while loop exited");
--- 797,914 ----
      }
  
      /* loop until AFS is started. */
!     if (afsWillAutoStart) {
! 	while (IsServiceRunning() || IsServiceStartPending()) {
! 	    DebugEvent("while(autostart) LogonOption[%x], Service AutoStart[%d]",
! 			opt.LogonOption,afsWillAutoStart);
! 
! 	    if (ISADREALM(opt.flags)) {
! 		code = GetFileCellName(homePath,cell,256);
! 		if (!code) {
! 		    DebugEvent("profile path [%s] is in cell [%s]",homePath,cell);
! 		}
! 		/* Don't bail out if GetFileCellName failed.
! 		 * The home dir may not be in AFS after all. 
! 		 */
! 	    } else
! 		code=0;
! 
! 	    /* if Integrated Logon  */
! 	    if (ISLOGONINTEGRATED(opt.LogonOption))
! 	    {			
! 		if ( KFW_is_available() ) {
! 		    code = KFW_AFS_get_cred(uname, cell, password, 0, opt.smbName, &reason);
! 		    DebugEvent("KFW_AFS_get_cred  uname=[%s] smbname=[%s] cell=[%s] code=[%d]",
! 				uname,opt.smbName,cell,code);
! 		    if (code == 0 && opt.theseCells) { 
! 			char * principal, *p;
! 			size_t len, tlen;
! 
! 			StringCchLength(cell, MAX_DOMAIN_LENGTH, &tlen);
! 			len = tlen;
! 			StringCchLength(uname, MAX_USERNAME_LENGTH, &tlen);
! 			len += tlen + 2;
! 
! 			/* tlen is now the length of uname in characters */
! 			principal = (char *)malloc(len * sizeof(char));
! 			if ( principal ) {
! 			    StringCchCopy(principal, len, uname);
! 			    p = principal + tlen;
! 			    *p++ = '@';
! 			    StringCchCopy(p, len - tlen -1, cell);
! 			    for ( ;*p; p++) {
! 				*p = toupper(*p);
! 			    }
! 
! 			    p = opt.theseCells;
! 			    while ( *p ) {
! 				code2 = KFW_AFS_get_cred(principal, p, 0, 0, opt.smbName, &reason);
! 				DebugEvent("KFW_AFS_get_cred  uname=[%s] smbname=[%s] cell=[%s] code=[%d]",
! 					    principal,opt.smbName,p,code2);
! 				p += strlen(p) + 1;
! 			    }
! 
! 			    free(principal);
! 			}
! 		    }
! 		} else {
! 		    code = ka_UserAuthenticateGeneral2(KA_USERAUTH_VERSION+KA_USERAUTH_AUTHENT_LOGON,
! 							uname, "", cell, password, opt.smbName, 0, &pw_exp, 0,
! 							&reason);
! 		    DebugEvent("AFS AfsLogon - (INTEGRATED only)ka_UserAuthenticateGeneral2 Code[%x] uname[%s] smbname=[%s] Cell[%s] PwExp=[%d] Reason=[%s]",
! 				code,uname,opt.smbName,cell,pw_exp,reason?reason:"");
! 		}       
! 		if ( code && code != KTC_NOCM && code != KTC_NOCMRPC && !lowercased_name ) {
! 		    for ( ctemp = uname; *ctemp ; ctemp++) {
! 			*ctemp = tolower(*ctemp);
! 		    }
! 		    lowercased_name = TRUE;
! 		    goto sleeping;
! 		}
! 
! 		/* is service started yet?*/
! 
! 		/* If we've failed because the client isn't running yet and the
! 		 * client is set to autostart (and therefore it makes sense for
! 		 * us to wait for it to start) then sleep a while and try again. 
! 		 * If the error was something else, then give up. */
! 		if (code != KTC_NOCM && code != KTC_NOCMRPC)
! 		    break;
! 	    }
! 	    else {  
! 		/*JUST check to see if its running*/
! 		if (IsServiceRunning())
! 		    break;
! 		if (!IsServiceStartPending()) {
! 		    code = KTC_NOCMRPC;
! 		    reason = "AFS Service start failed";
! 		    break;
! 		}
! 	    }
! 
! 	    /* If the retry interval has expired and we still aren't
! 	     * logged in, then just give up if we are not in interactive
! 	     * mode or the failSilently flag is set, otherwise let the
! 	     * user know we failed and give them a chance to try again. */
! 	    if (retryInterval <= 0) {
! 		reason = "AFS not running";
! 		if (!interactive || opt.failSilently)
! 		    break;
! 		flag = MessageBox(hwndOwner,
! 				   "AFS is still starting.  Retry?",
! 				   "AFS Logon",
! 				   MB_ICONQUESTION | MB_RETRYCANCEL);
! 		if (flag == IDCANCEL)
! 		    break;
! 
! 		/* Wait just a little while and try again */
! 		retryInterval = opt.retryInterval;
! 	    }
! 
! 	  sleeping:
! 	    Sleep(sleepInterval * 1000);
! 	    retryInterval -= sleepInterval;
! 	}
      }
  
      DebugEvent("while loop exited");
***************
*** 1010,1015 ****
--- 1036,1042 ----
      DWORD LSPtype, LSPsize;
      HKEY NPKey;
      DWORD LogoffPreserveTokens = 0;
+     LogonOptions_t opt;
  
      /* Make sure the AFS Libraries are initialized */
      AfsLogonInit();
***************
*** 1023,1069 ****
                       &LSPtype, (LPBYTE)&LogoffPreserveTokens, &LSPsize);
      RegCloseKey (NPKey);
  
!     if (LogoffPreserveTokens) {
!         if (!GetTokenInformation(pInfo->hToken, TokenUser, NULL, 0, &retLen))
!         {
!             if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER ) {
!                 tokenUser = (PTOKEN_USER) LocalAlloc(LPTR, retLen);
  
!                 if (!GetTokenInformation(pInfo->hToken, TokenUser, tokenUser, retLen, &retLen))
!                 {
!                     DebugEvent("AFS_Logoff_Event - GetTokenInformation failed: GLE = %lX", GetLastError());
!                 }
!             }
!         }
  
!         /* We can't use pInfo->Domain for the domain since in the cross realm case 
!          * this is source domain and not the destination domain.
!          */
!         if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, pInfo->Domain)) {
!             WCHAR Domain[64]=L"";
!             GetLocalShortDomain(Domain, sizeof(Domain));
!             if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, Domain)) {
!                 if (NetUserGetProfilePath(pInfo->Domain, pInfo->UserName, profileDir, len))
!                     GetUserProfileDirectory(pInfo->hToken, profileDir, &len);
!             }
!         }
  
!         if (strlen(profileDir)) {
!             DebugEvent("AFS_Logoff_Event - Profile Directory: %s", profileDir);
!             if (!IsPathInAfs(profileDir)) {
!                 if (code = ktc_ForgetAllTokens())
!                     DebugEvent("AFS_Logoff_Event - ForgetAllTokens failed [%lX]",code);
!                 else
!                     DebugEvent0("AFS_Logoff_Event - ForgetAllTokens succeeded");
!             } else {
!                 DebugEvent0("AFS_Logoff_Event - Tokens left in place; profile in AFS");
!             }
!         } else {
!             DebugEvent0("AFS_Logoff_Event - Unable to load profile");
!         }
! 
!         if ( tokenUser )
!             LocalFree(tokenUser);
      }
  
      DebugEvent0("AFS_Logoff_Event - End");
--- 1050,1124 ----
                       &LSPtype, (LPBYTE)&LogoffPreserveTokens, &LSPsize);
      RegCloseKey (NPKey);
  
!     if (!LogoffPreserveTokens) {
! 	memset(&opt, 0, sizeof(LogonOptions_t));
  
! 	if (pInfo->UserName && pInfo->Domain) {
! 	    char username[MAX_USERNAME_LENGTH] = "";
! 	    char domain[MAX_DOMAIN_LENGTH] = "";
! 	    size_t szlen = 0;
! 
! 	    StringCchLengthW(pInfo->UserName, MAX_USERNAME_LENGTH, &szlen);
! 	    WideCharToMultiByte(CP_UTF8, 0, pInfo->UserName, szlen,
! 				 username, sizeof(username), NULL, NULL);
! 
! 	    StringCchLengthW(pInfo->Domain, MAX_DOMAIN_LENGTH, &szlen);
! 	    WideCharToMultiByte(CP_UTF8, 0, pInfo->Domain, szlen,
! 				 domain, sizeof(domain), NULL, NULL);
  
! 	    GetDomainLogonOptions(NULL, username, domain, &opt);
! 	}
  
!         if (ISREMOTE(opt.flags)) {
! 	    if (!GetTokenInformation(pInfo->hToken, TokenUser, NULL, 0, &retLen))
! 	    {
! 		if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER ) {
! 		    tokenUser = (PTOKEN_USER) LocalAlloc(LPTR, retLen);
! 
! 		    if (!GetTokenInformation(pInfo->hToken, TokenUser, tokenUser, retLen, &retLen))
! 		    {
! 			DebugEvent("AFS_Logoff_Event - GetTokenInformation failed: GLE = %lX", GetLastError());
! 		    }
! 		}
! 	    }
! 
! 	    /* We can't use pInfo->Domain for the domain since in the cross realm case 
! 	     * this is source domain and not the destination domain.
! 	     */
! 	    if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, pInfo->Domain)) {
! 		WCHAR Domain[64]=L"";
! 		GetLocalShortDomain(Domain, sizeof(Domain));
! 		if (QueryAdHomePathFromSid( profileDir, sizeof(profileDir), tokenUser->User.Sid, Domain)) {
! 		    if (NetUserGetProfilePath(pInfo->Domain, pInfo->UserName, profileDir, len))
! 			GetUserProfileDirectory(pInfo->hToken, profileDir, &len);
! 		}
! 	    }
! 
! 	    if (strlen(profileDir)) {
! 		DebugEvent("AFS_Logoff_Event - Profile Directory: %s", profileDir);
! 		if (!IsPathInAfs(profileDir)) {
! 		    if (code = ktc_ForgetAllTokens())
! 			DebugEvent("AFS_Logoff_Event - ForgetAllTokens failed [%lX]",code);
! 		    else
! 			DebugEvent0("AFS_Logoff_Event - ForgetAllTokens succeeded");
! 		} else {
! 		    DebugEvent0("AFS_Logoff_Event - Tokens left in place; profile in AFS");
! 		}
! 	    } else {
! 		DebugEvent0("AFS_Logoff_Event - Unable to load profile");
! 	    }
! 
! 	    if ( tokenUser )
! 		LocalFree(tokenUser);
! 	} else {
! 	    DebugEvent0("AFS_Logoff_Event - Local Logon");
! 	    if (code = ktc_ForgetAllTokens())
! 		DebugEvent("AFS_Logoff_Event - ForgetAllTokens failed [%lX]",code);
! 	    else
! 		DebugEvent0("AFS_Logoff_Event - ForgetAllTokens succeeded");
! 	}
!     } else {
! 	DebugEvent0("AFS_Logoff_Event - Preserving Tokens");
      }
  
      DebugEvent0("AFS_Logoff_Event - End");
***************
*** 1082,1087 ****
--- 1137,1143 ----
      NETRESOURCE nr;
      DWORD res;
      DWORD dwSize;
+     LogonOptions_t opt;
  
      /* Make sure the AFS Libraries are initialized */
      AfsLogonInit();
***************
*** 1090,1095 ****
--- 1146,1187 ----
  
      DebugEvent("AFS_Logon_Event Process ID: %d",GetCurrentProcessId());
  
+     memset(&opt, 0, sizeof(LogonOptions_t));
+ 
+     if (pInfo->UserName && pInfo->Domain) {
+         char username[MAX_USERNAME_LENGTH] = "";
+         char domain[MAX_DOMAIN_LENGTH] = "";
+         size_t szlen = 0;
+ 
+ 	DebugEvent0("AFS_Logon_Event - pInfo UserName and Domain");
+ 
+         StringCchLengthW(pInfo->UserName, MAX_USERNAME_LENGTH, &szlen);
+         WideCharToMultiByte(CP_UTF8, 0, pInfo->UserName, szlen,
+                             username, sizeof(username), NULL, NULL);
+         
+         StringCchLengthW(pInfo->Domain, MAX_DOMAIN_LENGTH, &szlen);
+         WideCharToMultiByte(CP_UTF8, 0, pInfo->Domain, szlen,
+                             domain, sizeof(domain), NULL, NULL);
+ 
+ 	DebugEvent0("AFS_Logon_Event - Calling GetDomainLogonOptions");
+         GetDomainLogonOptions(NULL, username, domain, &opt);
+     } else {
+ 	if (!pInfo->UserName)
+ 	    DebugEvent0("AFS_Logon_Event - No pInfo->UserName");
+ 	if (!pInfo->Domain)
+ 	    DebugEvent0("AFS_Logon_Event - No pInfo->Domain");
+     }
+ 
+     DebugEvent("AFS_Logon_Event - opt.LogonOption = %lX opt.flags = %lX", 
+ 		opt.LogonOption, opt.flags);
+ 
+     if (!ISLOGONINTEGRATED(opt.LogonOption) || !ISREMOTE(opt.flags)) {
+         DebugEvent0("AFS_Logon_Event - Logon is not integrated or not remote");
+         goto done_logon_event;
+     }
+ 
+     DebugEvent0("AFS_Logon_Event - Calling GetTokenInformation");
+ 
      if (!GetTokenInformation(pInfo->hToken, TokenUser, NULL, 0, &retLen))
      {
          if ( GetLastError() == ERROR_INSUFFICIENT_BUFFER ) {
***************
*** 1120,1125 ****
--- 1212,1218 ----
          DebugEvent0("AFS_Logon_Event - Unable to load profile");
      }
  
+   done_logon_event:
      dwSize = sizeof(szUserA);
      if (!KFW_AFS_get_lsa_principal(szUserA, &dwSize)) {
          StringCbPrintfW(szUserW, sizeof(szUserW), L"%s\\%s", pInfo->Domain, pInfo->UserName);
***************
*** 1156,1162 ****
  GetSecurityLogonSessionData(HANDLE hToken, PSECURITY_LOGON_SESSION_DATA * ppSessionData)
  {
      NTSTATUS Status = 0;
-     HANDLE  TokenHandle;
      TOKEN_STATISTICS Stats;
      DWORD   ReqLen;
      BOOL    Success;
--- 1249,1254 ----
***************
*** 1165,1180 ****
          return FALSE;
      *ppSessionData = NULL;
  
- #if 0
-     Success = OpenProcessToken( HANDLE GetCurrentProcess(), TOKEN_QUERY, &TokenHandle );
-     if ( !Success )
-         return FALSE;
- #endif
- 
      Success = GetTokenInformation( hToken, TokenStatistics, &Stats, sizeof(TOKEN_STATISTICS), &ReqLen );
- #if 0
-     CloseHandle( TokenHandle );
- #endif
      if ( !Success )
          return FALSE;
  
--- 1257,1263 ----
***************
*** 1187,1207 ****
  
  VOID KFW_Logon_Event( PWLX_NOTIFICATION_INFO pInfo )
  {
-     DWORD code;
- 
      WCHAR szUserW[128] = L"";
      char  szUserA[128] = "";
-     char  szClient[MAX_PATH];
      char szPath[MAX_PATH] = "";
      char szLogonId[128] = "";
-     NETRESOURCE nr;
-     DWORD res;
-     DWORD gle;
-     DWORD dwSize;
-     DWORD dwDisp;
-     DWORD dwType;
      DWORD count;
-     VOID * ticketData;
      char filename[256];
      char commandline[512];
      STARTUPINFO startupinfo;
--- 1270,1280 ----
Index: openafs/src/WINNT/afsd/cm.h
diff -c openafs/src/WINNT/afsd/cm.h:1.9.2.2.4.1 openafs/src/WINNT/afsd/cm.h:1.9.2.5
*** openafs/src/WINNT/afsd/cm.h:1.9.2.2.4.1	Thu Oct  6 22:25:09 2005
--- openafs/src/WINNT/afsd/cm.h	Sat Oct 15 17:48:22 2005
***************
*** 251,256 ****
  #define CM_ERROR_TIDIPC                 (CM_ERROR_BASE+44)
  #define CM_ERROR_TOO_MANY_SYMLINKS      (CM_ERROR_BASE+45)
  #define CM_ERROR_PATH_NOT_COVERED       (CM_ERROR_BASE+46)
! /* 47 and 48 are reserved for the byte range lock support */
  #define CM_ERROR_ALLDOWN                (CM_ERROR_BASE+49)
  #endif /*  __CM_H_ENV__ */
--- 251,259 ----
  #define CM_ERROR_TIDIPC                 (CM_ERROR_BASE+44)
  #define CM_ERROR_TOO_MANY_SYMLINKS      (CM_ERROR_BASE+45)
  #define CM_ERROR_PATH_NOT_COVERED       (CM_ERROR_BASE+46)
! #define CM_ERROR_LOCK_CONFLICT          (CM_ERROR_BASE+47)
! #define CM_ERROR_SHARING_VIOLATION      (CM_ERROR_BASE+48)
  #define CM_ERROR_ALLDOWN                (CM_ERROR_BASE+49)
+ #define CM_ERROR_TOOFEWBUFS		(CM_ERROR_BASE+50)
+ #define CM_ERROR_TOOMANYBUFS		(CM_ERROR_BASE+51)
  #endif /*  __CM_H_ENV__ */
Index: openafs/src/WINNT/afsd/cm_aclent.c
diff -c openafs/src/WINNT/afsd/cm_aclent.c:1.4.2.8 openafs/src/WINNT/afsd/cm_aclent.c:1.4.2.9
*** openafs/src/WINNT/afsd/cm_aclent.c:1.4.2.8	Fri Aug  5 20:36:11 2005
--- openafs/src/WINNT/afsd/cm_aclent.c	Mon Feb 13 11:33:06 2006
***************
*** 91,104 ****
                             &aclp->q);
              } else {
                  *rightsp = aclp->randomAccess;
!                 if (cm_data.aclLRUEndp == aclp)
!                     cm_data.aclLRUEndp = (cm_aclent_t *) osi_QPrev(&aclp->q);
! 
!                 /* move to the head of the LRU queue */
!                 osi_QRemove((osi_queue_t **) &cm_data.aclLRUp, &aclp->q);
!                 osi_QAddH((osi_queue_t **) &cm_data.aclLRUp,
!                            (osi_queue_t **) &cm_data.aclLRUEndp,
!                            &aclp->q);
                  retval = 0;     /* success */
              }               
              break;
--- 91,106 ----
                             &aclp->q);
              } else {
                  *rightsp = aclp->randomAccess;
! 		if (cm_data.aclLRUp != aclp) {
! 		    if (cm_data.aclLRUEndp == aclp)
! 			cm_data.aclLRUEndp = (cm_aclent_t *) osi_QPrev(&aclp->q);
! 
! 		    /* move to the head of the LRU queue */
! 		    osi_QRemove((osi_queue_t **) &cm_data.aclLRUp, &aclp->q);
! 		    osi_QAddH((osi_queue_t **) &cm_data.aclLRUp,
! 			       (osi_queue_t **) &cm_data.aclLRUEndp,
! 			       &aclp->q);
! 		}
                  retval = 0;     /* success */
              }               
              break;
Index: openafs/src/WINNT/afsd/cm_buf.h
diff -c openafs/src/WINNT/afsd/cm_buf.h:1.4.2.6 openafs/src/WINNT/afsd/cm_buf.h:1.4.2.7
*** openafs/src/WINNT/afsd/cm_buf.h:1.4.2.6	Sun Jun  5 02:45:31 2005
--- openafs/src/WINNT/afsd/cm_buf.h	Sat Oct 15 17:48:22 2005
***************
*** 201,207 ****
  
  /* error codes */
  #define CM_BUF_EXISTS	1	/* buffer exists, and shouldn't */
- #define CM_ERROR_BASEBUF	0x33333333
- #define CM_ERROR_TOOFEWBUFS	(CM_ERROR_BASEBUF+0)
- #define CM_ERROR_TOOMANYBUFS	(CM_ERROR_BASEBUF+1)
  #endif /*  _BUF_H__ENV_ */
--- 201,204 ----
Index: openafs/src/WINNT/afsd/cm_callback.c
diff -c openafs/src/WINNT/afsd/cm_callback.c:1.20.2.12 openafs/src/WINNT/afsd/cm_callback.c:1.20.2.13
*** openafs/src/WINNT/afsd/cm_callback.c:1.20.2.12	Sun Jun  5 02:45:31 2005
--- openafs/src/WINNT/afsd/cm_callback.c	Sun Jan 15 21:06:59 2006
***************
*** 1668,1675 ****
          lock_ReleaseMutex(&scp->mx);
  		
          /* now make the RPC */
!         osi_Log4(afsd_logp, "CALL FetchStatus scp 0x%x cell %d vol %d uniq %d", 
!                  (long) scp, scp->fid.cell, scp->fid.volume, scp->fid.unique);
          do {
              code = cm_Conn(&sfid, userp, reqp, &connp);
              if (code) 
--- 1668,1675 ----
          lock_ReleaseMutex(&scp->mx);
  		
          /* now make the RPC */
!         osi_Log4(afsd_logp, "CALL FetchStatus scp 0x%x vol %u vn %u uniq %u", 
!                  (long) scp, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
          do {
              code = cm_Conn(&sfid, userp, reqp, &connp);
              if (code) 
***************
*** 1684,1694 ****
                              &cbr, code));
          code = cm_MapRPCError(code, reqp);
          if (code)
!             osi_Log4(afsd_logp, "CALL FetchStatus FAILURE code 0x%x scp 0x%x cell %d vol %d", 
!                      code, (long) scp, scp->fid.cell, scp->fid.volume);
          else
!             osi_Log4(afsd_logp, "CALL FetchStatus SUCCESS scp 0x%x cell %d vol %d uniq %d", 
!                      (long) scp, scp->fid.cell, scp->fid.volume, scp->fid.unique);
  
          lock_ObtainMutex(&scp->mx);
          if (code == 0) {
--- 1684,1694 ----
                              &cbr, code));
          code = cm_MapRPCError(code, reqp);
          if (code)
!             osi_Log4(afsd_logp, "CALL FetchStatus FAILURE code 0x%x scp 0x%x vol %u vn %u", 
!                      code, (long) scp, scp->fid.volume, scp->fid.vnode);
          else
!             osi_Log4(afsd_logp, "CALL FetchStatus SUCCESS scp 0x%x vol %u vn %u uniq %u", 
!                      (long) scp, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
  
          lock_ObtainMutex(&scp->mx);
          if (code == 0) {
***************
*** 1702,1708 ****
          /* now check to see if we got an error */
          if (code) {
              osi_Log2(afsd_logp, "GetCallback Failed code 0x%x scp 0x%x -->",code, scp);
!             osi_Log4(afsd_logp, "            cell %d vol %d vn %d uniq %d",
                       scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
              return code;
          }
--- 1702,1708 ----
          /* now check to see if we got an error */
          if (code) {
              osi_Log2(afsd_logp, "GetCallback Failed code 0x%x scp 0x%x -->",code, scp);
!             osi_Log4(afsd_logp, "            cell %u vol %u vn %u uniq %u",
                       scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
              return code;
          }
Index: openafs/src/WINNT/afsd/cm_cell.c
diff -c openafs/src/WINNT/afsd/cm_cell.c:1.14.2.5 openafs/src/WINNT/afsd/cm_cell.c:1.14.2.9
*** openafs/src/WINNT/afsd/cm_cell.c:1.14.2.5	Wed Aug 31 20:07:41 2005
--- openafs/src/WINNT/afsd/cm_cell.c	Sun Feb 12 01:24:27 2006
***************
*** 61,71 ****
   */
  cm_cell_t *cm_UpdateCell(cm_cell_t * cp)
  {
!     long code;
  
      if (cp == NULL)
          return NULL;
  
      if ((cp->vlServersp == NULL 
  #ifdef AFS_FREELANCE_CLIENT
            && !(cp->flags & CM_CELLFLAG_FREELANCE)
--- 61,72 ----
   */
  cm_cell_t *cm_UpdateCell(cm_cell_t * cp)
  {
!     long code = 0;
  
      if (cp == NULL)
          return NULL;
  
+     lock_ObtainMutex(&cp->mx);
      if ((cp->vlServersp == NULL 
  #ifdef AFS_FREELANCE_CLIENT
            && !(cp->flags & CM_CELLFLAG_FREELANCE)
***************
*** 83,90 ****
          }
  
          code = cm_SearchCellFile(cp->name, NULL, cm_AddCellProc, cp);
-         if (code) {
  #ifdef AFS_AFSDB_ENV
              if (cm_dnsEnabled) {
                  int ttl;
  
--- 84,91 ----
          }
  
          code = cm_SearchCellFile(cp->name, NULL, cm_AddCellProc, cp);
  #ifdef AFS_AFSDB_ENV
+         if (code) {
              if (cm_dnsEnabled) {
                  int ttl;
  
***************
*** 101,118 ****
                      * current entry alone 
                      */
                      cp->flags |= CM_CELLFLAG_VLSERVER_INVALID;
-                     cp = NULL;      /* return NULL to indicate failure */
                  }
!             } else 
  #endif /* AFS_AFSDB_ENV */
!             {
!                 cp = NULL;          /* return NULL to indicate failure */
!             }
!         } else {
  	    cp->timeout = time(0) + 7200;
  	}	
      }
!     return cp;
  }
  
  /* load up a cell structure from the cell database, afsdcell.ini */
--- 102,117 ----
                      * current entry alone 
                      */
                      cp->flags |= CM_CELLFLAG_VLSERVER_INVALID;
                  }
! 	    }
! 	} else 
  #endif /* AFS_AFSDB_ENV */
!         {
  	    cp->timeout = time(0) + 7200;
  	}	
      }
!     lock_ReleaseMutex(&cp->mx);
!     return code ? NULL : cp;
  }
  
  /* load up a cell structure from the cell database, afsdcell.ini */
***************
*** 132,138 ****
  
      lock_ObtainWrite(&cm_cellLock);
      for (cp = cm_data.allCellsp; cp; cp=cp->nextp) {
!         if (strcmp(namep, cp->name) == 0) {
              strcpy(fullname, cp->name);
              break;
          }
--- 131,137 ----
  
      lock_ObtainWrite(&cm_cellLock);
      for (cp = cm_data.allCellsp; cp; cp=cp->nextp) {
!         if (stricmp(namep, cp->name) == 0) {
              strcpy(fullname, cp->name);
              break;
          }
***************
*** 321,334 ****
      int code;
  
      cp = tsp->cellp;	/* cell that this vlserver belongs to */
!     osi_assert(cp);
  
!     lock_ObtainMutex(&cp->mx);
!     code = cm_ChangeRankServer(&cp->vlServersp, tsp);
  
!     if ( !code ) 		/* if the server list was rearranged */
!         cm_RandomizeServer(&cp->vlServersp);
! 
!     lock_ReleaseMutex(&cp->mx);
  }       
  
--- 320,333 ----
      int code;
  
      cp = tsp->cellp;	/* cell that this vlserver belongs to */
!     if (cp) {
! 	lock_ObtainMutex(&cp->mx);
! 	code = cm_ChangeRankServer(&cp->vlServersp, tsp);
  
! 	if ( !code ) 		/* if the server list was rearranged */
! 	    cm_RandomizeServer(&cp->vlServersp);
  
! 	lock_ReleaseMutex(&cp->mx);
!     }
  }       
  
Index: openafs/src/WINNT/afsd/cm_conn.c
diff -c openafs/src/WINNT/afsd/cm_conn.c:1.25.2.14.2.1 openafs/src/WINNT/afsd/cm_conn.c:1.25.2.20
*** openafs/src/WINNT/afsd/cm_conn.c:1.25.2.14.2.1	Thu Oct  6 22:25:09 2005
--- openafs/src/WINNT/afsd/cm_conn.c	Wed Feb  1 13:03:18 2006
***************
*** 90,96 ****
  {
  	memset((char *)reqp, 0, sizeof(cm_req_t));
  #ifndef DJGPP
! 	reqp->startTime = GetCurrentTime();
  #else
          gettimeofday(&reqp->startTime, NULL);
  #endif
--- 90,96 ----
  {
  	memset((char *)reqp, 0, sizeof(cm_req_t));
  #ifndef DJGPP
! 	reqp->startTime = GetTickCount();
  #else
          gettimeofday(&reqp->startTime, NULL);
  #endif
***************
*** 189,195 ****
      
      /* timeleft - get if from reqp the same way as cmXonnByMServers does */
  #ifndef DJGPP
!     timeUsed = (GetCurrentTime() - reqp->startTime) / 1000;
  #else
      gettimeofday(&now, NULL);
      timeUsed = sub_time(now, reqp->startTime) / 1000;
--- 189,195 ----
      
      /* timeleft - get if from reqp the same way as cmXonnByMServers does */
  #ifndef DJGPP
!     timeUsed = (GetTickCount() - reqp->startTime) / 1000;
  #else
      gettimeofday(&now, NULL);
      timeUsed = sub_time(now, reqp->startTime) / 1000;
***************
*** 401,406 ****
--- 401,428 ----
          }
          if ( timeLeft > 2 )
              retry = 1;
+     } else if ( errorCode == VNOVNODE ) {
+ 	if ( fidp ) {
+ 	    cm_scache_t * scp;
+ 	    osi_Log4(afsd_logp, "cm_Analyze passed VNOVNODE cell %u vol %u vn %u uniq %u.",
+ 		      fidp->cell, fidp->volume, fidp->vnode, fidp->unique);
+ 	    scp = cm_FindSCache(fidp);
+ 	    if (scp) {
+ 		cm_scache_t *pscp = cm_FindSCacheParent(scp);
+ 		cm_CleanFile(scp, userp, reqp);
+ 		cm_ReleaseSCache(scp);
+ 		if (pscp) {
+ 		    if (pscp->cbExpires > 0 && pscp->cbServerp != NULL) {
+ 			lock_ObtainMutex(&pscp->mx);
+ 			cm_DiscardSCache(pscp);
+ 			lock_ReleaseMutex(&pscp->mx);
+ 		    }
+ 		    cm_ReleaseSCache(pscp);
+ 		}
+ 	    }
+ 	} else {
+ 	    osi_Log0(afsd_logp, "cm_Analyze passed VNOVNODE unknown fid.");
+ 	}
      }
  
      /* RX codes */
***************
*** 430,435 ****
--- 452,458 ----
          lock_ObtainMutex(&serverp->mx);
          serverp->flags |= CM_SERVERFLAG_DOWN;
          lock_ReleaseMutex(&serverp->mx);
+ 	cm_ForceNewConnections(serverp);
          if ( timeLeft > 2 )
              retry = 1;
      }
***************
*** 480,485 ****
--- 503,510 ----
              case VRESTRICTED       : s = "VRESTRICTED";        break;
              case VRESTARTING       : s = "VRESTARTING";        break;
              case VREADONLY         : s = "VREADONLY";          break;
+             case EAGAIN            : s = "EAGAIN";             break;
+             case EACCES            : s = "EACCES";             break;
              }
              osi_Log2(afsd_logp, "cm_Analyze: ignoring error code 0x%x (%s)", 
                       errorCode, s);
***************
*** 520,526 ****
      *connpp = NULL;
  
  #ifndef DJGPP
!     timeUsed = (GetCurrentTime() - reqp->startTime) / 1000;
  #else
      gettimeofday(&now, NULL);
      timeUsed = sub_time(now, reqp->startTime) / 1000;
--- 545,551 ----
      *connpp = NULL;
  
  #ifndef DJGPP
!     timeUsed = (GetTickCount() - reqp->startTime) / 1000;
  #else
      gettimeofday(&now, NULL);
      timeUsed = sub_time(now, reqp->startTime) / 1000;
***************
*** 694,700 ****
          tcp->refCount = 1;
          lock_ReleaseMutex(&tcp->mx);
      } else {
!         if ((tcp->ucgen < ucellp->gen) ||
              (tcp->cryptlevel != (cryptall ? (ucellp->flags & CM_UCELLFLAG_RXKAD ? rxkad_crypt : rxkad_clear) : rxkad_clear)))
          {
              if (tcp->ucgen < ucellp->gen)
--- 719,726 ----
          tcp->refCount = 1;
          lock_ReleaseMutex(&tcp->mx);
      } else {
!         if ((tcp->flags & CM_CONN_FLAG_FORCE_NEW) ||
!             (tcp->ucgen < ucellp->gen) ||
              (tcp->cryptlevel != (cryptall ? (ucellp->flags & CM_UCELLFLAG_RXKAD ? rxkad_crypt : rxkad_clear) : rxkad_clear)))
          {
              if (tcp->ucgen < ucellp->gen)
***************
*** 702,707 ****
--- 728,734 ----
              else
                  osi_Log0(afsd_logp, "cm_ConnByServer replace connection due to crypt change");
              lock_ObtainMutex(&tcp->mx);
+ 	    tcp->flags &= ~CM_CONN_FLAG_FORCE_NEW;
              rx_DestroyConnection(tcp->callp);
              cm_NewRXConnection(tcp, ucellp, serverp);
              lock_ReleaseMutex(&tcp->mx);
***************
*** 747,749 ****
--- 774,788 ----
      return rxconn;
  }
  
+ void cm_ForceNewConnections(cm_server_t *serverp)
+ {
+     cm_conn_t *tcp;
+ 
+     lock_ObtainWrite(&cm_connLock);
+     for (tcp = serverp->connsp; tcp; tcp=tcp->nextp) {
+ 	lock_ObtainMutex(&tcp->mx);
+ 	tcp->flags |= CM_CONN_FLAG_FORCE_NEW;
+ 	lock_ReleaseMutex(&tcp->mx);
+     }
+     lock_ReleaseWrite(&cm_connLock);
+ }
Index: openafs/src/WINNT/afsd/cm_conn.h
diff -c openafs/src/WINNT/afsd/cm_conn.h:1.8.2.2 openafs/src/WINNT/afsd/cm_conn.h:1.8.2.3
*** openafs/src/WINNT/afsd/cm_conn.h:1.8.2.2	Sun Jun  5 02:45:31 2005
--- openafs/src/WINNT/afsd/cm_conn.h	Mon Nov 21 19:30:01 2005
***************
*** 29,34 ****
--- 29,36 ----
  	int cryptlevel;			/* encrytion status */
  } cm_conn_t;
  
+ #define CM_CONN_FLAG_FORCE_NEW	1
+ 
  /* structure used for tracking RPC progress */
  typedef struct cm_req {
  	DWORD startTime;		/* Quit before RDR times us out */
***************
*** 115,118 ****
--- 117,122 ----
  
  extern struct rx_connection * cm_GetRxConn(cm_conn_t *connp);
  
+ extern void cm_ForceNewConnections(cm_server_t *serverp);
+ 
  #endif /*  __CM_CONN_H_ENV__ */
Index: openafs/src/WINNT/afsd/cm_daemon.c
diff -c openafs/src/WINNT/afsd/cm_daemon.c:1.4.2.5.4.3 openafs/src/WINNT/afsd/cm_daemon.c:1.4.2.10
*** openafs/src/WINNT/afsd/cm_daemon.c:1.4.2.5.4.3	Tue Oct 18 16:55:29 2005
--- openafs/src/WINNT/afsd/cm_daemon.c	Sat Jan 21 15:58:39 2006
***************
*** 27,33 ****
  #include "afsd.h"
  #include "afsicf.h"
  
! long cm_daemonCheckInterval = 30;
  long cm_daemonTokenCheckInterval = 180;
  
  osi_rwlock_t cm_daemonLock;
--- 27,38 ----
  #include "afsd.h"
  #include "afsicf.h"
  
! /* in seconds */
! long cm_daemonCheckDownInterval = 180;
! long cm_daemonCheckUpInterval = 600;
! long cm_daemonCheckVolInterval = 3600;
! long cm_daemonCheckCBInterval = 60;
! long cm_daemonCheckLockInterval = 60;
  long cm_daemonTokenCheckInterval = 180;
  
  osi_rwlock_t cm_daemonLock;
***************
*** 44,49 ****
--- 49,56 ----
  #ifndef DJGPP
  void cm_IpAddrDaemon(long parm)
  {
+     extern void smb_CheckVCs(void);
+ 
      rx_StartClientThread();
  
      while (daemon_ShutdownFlag == 0) {
***************
*** 52,58 ****
  	    osi_Log0(afsd_logp, "cm_IpAddrDaemon CheckDownServers");
  	    Sleep(2500);
              cm_CheckServers(CM_FLAG_CHECKDOWNSERVERS, NULL);
! 	}
      }
  }
  #endif
--- 59,66 ----
  	    osi_Log0(afsd_logp, "cm_IpAddrDaemon CheckDownServers");
  	    Sleep(2500);
              cm_CheckServers(CM_FLAG_CHECKDOWNSERVERS, NULL);
! 	    smb_CheckVCs();
! 	}	
      }
  }
  #endif
***************
*** 204,214 ****
      srand(ntohl(code));
  
      now = osi_Time();
!     lastVolCheck = now - 1800 + (rand() % 3600);
!     lastCBExpirationCheck = now - 60 + (rand() % 60);
!     lastLockCheck = now - 60 + (rand() % 60);
!     lastDownServerCheck = now - cm_daemonCheckInterval/2 + (rand() % cm_daemonCheckInterval);
!     lastUpServerCheck = now - 1800 + (rand() % 3600);
      lastTokenCacheCheck = now - cm_daemonTokenCheckInterval/2 + (rand() % cm_daemonTokenCheckInterval);
  
      while (daemon_ShutdownFlag == 0) {
--- 212,222 ----
      srand(ntohl(code));
  
      now = osi_Time();
!     lastVolCheck = now - cm_daemonCheckVolInterval/2 + (rand() % cm_daemonCheckVolInterval);
!     lastCBExpirationCheck = now - cm_daemonCheckCBInterval/2 + (rand() % cm_daemonCheckCBInterval);
!     lastLockCheck = now - cm_daemonCheckLockInterval/2 + (rand() % cm_daemonCheckLockInterval);
!     lastDownServerCheck = now - cm_daemonCheckDownInterval/2 + (rand() % cm_daemonCheckDownInterval);
!     lastUpServerCheck = now - cm_daemonCheckUpInterval/2 + (rand() % cm_daemonCheckUpInterval);
      lastTokenCacheCheck = now - cm_daemonTokenCheckInterval/2 + (rand() % cm_daemonTokenCheckInterval);
  
      while (daemon_ShutdownFlag == 0) {
***************
*** 241,247 ****
          now = osi_Time();
  
          /* check down servers */
!         if (now > lastDownServerCheck + cm_daemonCheckInterval) {
              lastDownServerCheck = now;
  	    osi_Log0(afsd_logp, "cm_Daemon CheckDownServers");
              cm_CheckServers(CM_FLAG_CHECKDOWNSERVERS, NULL);
--- 249,255 ----
          now = osi_Time();
  
          /* check down servers */
!         if (now > lastDownServerCheck + cm_daemonCheckDownInterval) {
              lastDownServerCheck = now;
  	    osi_Log0(afsd_logp, "cm_Daemon CheckDownServers");
              cm_CheckServers(CM_FLAG_CHECKDOWNSERVERS, NULL);
***************
*** 249,274 ****
          }
  
          /* check up servers */
!         if (now > lastUpServerCheck + 3600) {
              lastUpServerCheck = now;
  	    osi_Log0(afsd_logp, "cm_Daemon CheckUpServers");
              cm_CheckServers(CM_FLAG_CHECKUPSERVERS, NULL);
  	    now = osi_Time();
          }
  
!         if (now > lastVolCheck + 3600) {
              lastVolCheck = now;
              cm_CheckVolumes();
  	    now = osi_Time();
          }
  
!         if (now > lastCBExpirationCheck + 60) {
              lastCBExpirationCheck = now;
              cm_CheckCBExpiration();
  	    now = osi_Time();
          }
  
!         if (now > lastLockCheck + 60) {
              lastLockCheck = now;
              cm_CheckLocks();
  	    now = osi_Time();
--- 257,282 ----
          }
  
          /* check up servers */
!         if (now > lastUpServerCheck + cm_daemonCheckUpInterval) {
              lastUpServerCheck = now;
  	    osi_Log0(afsd_logp, "cm_Daemon CheckUpServers");
              cm_CheckServers(CM_FLAG_CHECKUPSERVERS, NULL);
  	    now = osi_Time();
          }
  
!         if (now > lastVolCheck + cm_daemonCheckVolInterval) {
              lastVolCheck = now;
              cm_CheckVolumes();
  	    now = osi_Time();
          }
  
!         if (now > lastCBExpirationCheck + cm_daemonCheckCBInterval) {
              lastCBExpirationCheck = now;
              cm_CheckCBExpiration();
  	    now = osi_Time();
          }
  
!         if (now > lastLockCheck + cm_daemonCheckLockInterval) {
              lastLockCheck = now;
              cm_CheckLocks();
  	    now = osi_Time();
Index: openafs/src/WINNT/afsd/cm_daemon.h
diff -c openafs/src/WINNT/afsd/cm_daemon.h:1.2.20.1 openafs/src/WINNT/afsd/cm_daemon.h:1.2.20.2
*** openafs/src/WINNT/afsd/cm_daemon.h:1.2.20.1	Fri Mar 11 01:58:41 2005
--- openafs/src/WINNT/afsd/cm_daemon.h	Sat Oct 29 16:15:07 2005
***************
*** 11,17 ****
  #define __CM_DAEMON_H_ENV_ 1
  
  /* externs */
! extern long cm_daemonCheckInterval;
  
  extern osi_rwlock_t cm_daemonLock;
  
--- 11,22 ----
  #define __CM_DAEMON_H_ENV_ 1
  
  /* externs */
! extern long cm_daemonCheckDownInterval;
! extern long cm_daemonCheckUpInterval;
! extern long cm_daemonCheckVolInterval;
! extern long cm_daemonCheckCBInterval;
! extern long cm_daemonCheckLockInterval;
! extern long cm_daemonTokenCheckInterval;
  
  extern osi_rwlock_t cm_daemonLock;
  
Index: openafs/src/WINNT/afsd/cm_dcache.c
diff -c openafs/src/WINNT/afsd/cm_dcache.c:1.11.2.14 openafs/src/WINNT/afsd/cm_dcache.c:1.11.2.17
*** openafs/src/WINNT/afsd/cm_dcache.c:1.11.2.14	Sat Aug 27 23:30:58 2005
--- openafs/src/WINNT/afsd/cm_dcache.c	Wed Feb  1 13:03:18 2006
***************
*** 501,506 ****
--- 501,507 ----
      lock_ReleaseMutex(&scp->mx);
  }
  
+ /* Called with scp locked */
  void cm_ClearPrefetchFlag(long code, cm_scache_t *scp, osi_hyper_t *base)
  {
      osi_hyper_t thyper;
***************
*** 1263,1269 ****
          callp = rx_NewCall(rxconnp);
          rx_PutConnection(rxconnp);
  
!         osi_Log3(afsd_logp, "CALL FetchData vp %x, off 0x%x, size 0x%x",
                    (long) scp, biod.offset.LowPart, biod.length);
  
          code = StartRXAFS_FetchData(callp, &tfid, biod.offset.LowPart,
--- 1264,1270 ----
          callp = rx_NewCall(rxconnp);
          rx_PutConnection(rxconnp);
  
!         osi_Log3(afsd_logp, "CALL FetchData scp 0x%x, off 0x%x, size 0x%x",
                    (long) scp, biod.offset.LowPart, biod.length);
  
          code = StartRXAFS_FetchData(callp, &tfid, biod.offset.LowPart,
***************
*** 1368,1374 ****
          if (code == 0)
              code = EndRXAFS_FetchData(callp, &afsStatus, &callback, &volSync);
          else
!             osi_Log0(afsd_logp, "CALL EndRXAFS_FetchData skipped due to error");
          code = rx_EndCall(callp, code);
          if (code == RXKADUNKNOWNKEY)
              osi_Log0(afsd_logp, "CALL EndCall returns RXKADUNKNOWNKEY");
--- 1369,1375 ----
          if (code == 0)
              code = EndRXAFS_FetchData(callp, &afsStatus, &callback, &volSync);
          else
!             osi_Log1(afsd_logp, "CALL EndRXAFS_FetchData skipped due to error %d", code);
          code = rx_EndCall(callp, code);
          if (code == RXKADUNKNOWNKEY)
              osi_Log0(afsd_logp, "CALL EndCall returns RXKADUNKNOWNKEY");
Index: openafs/src/WINNT/afsd/cm_freelance.c
diff -c openafs/src/WINNT/afsd/cm_freelance.c:1.15.2.12 openafs/src/WINNT/afsd/cm_freelance.c:1.15.2.14
*** openafs/src/WINNT/afsd/cm_freelance.c:1.15.2.12	Fri Mar 11 01:58:41 2005
--- openafs/src/WINNT/afsd/cm_freelance.c	Mon Feb  6 02:07:08 2006
***************
*** 217,223 ****
      /* Reserve 2 directory chunks for "." and ".." */
      curChunk += 2;
  
!     while (curDirEntry!=cm_noLocalMountPoints) {
          sizeOfCurEntry = cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0);
          if ((curChunk + sizeOfCurEntry >= CPP) ||
               (curDirEntryInPage + 1 >= CM_DIR_EPP)) {
--- 217,223 ----
      /* Reserve 2 directory chunks for "." and ".." */
      curChunk += 2;
  
!     while (curDirEntry<cm_noLocalMountPoints) {
          sizeOfCurEntry = cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0);
          if ((curChunk + sizeOfCurEntry >= CPP) ||
               (curDirEntryInPage + 1 >= CM_DIR_EPP)) {
***************
*** 282,288 ****
      // 2. we have less than CM_DIR_EPP entries in page 0
      // 3. we're not out of chunks in page 0
  
!     while( (curDirEntry!=cm_noLocalMountPoints) && 
             (curDirEntryInPage < CM_DIR_EPP) &&
             (curChunk + cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0) <= CPP)) 
      {       
--- 282,288 ----
      // 2. we have less than CM_DIR_EPP entries in page 0
      // 3. we're not out of chunks in page 0
  
!     while( (curDirEntry<cm_noLocalMountPoints) && 
             (curDirEntryInPage < CM_DIR_EPP) &&
             (curChunk + cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0) <= CPP)) 
      {       
***************
*** 311,317 ****
      curPage++;
  
      // ok, page 0's done. Move on to the next page.
!     while (curDirEntry!=cm_noLocalMountPoints) {
          // setup a new page
          curChunk = 1;			// the zeroth chunk is reserved for page header
          curDirEntryInPage = 0; 
--- 311,317 ----
      curPage++;
  
      // ok, page 0's done. Move on to the next page.
!     while (curDirEntry<cm_noLocalMountPoints) {
          // setup a new page
          curChunk = 1;			// the zeroth chunk is reserved for page header
          curDirEntryInPage = 0; 
***************
*** 323,329 ****
          fakePageHeader.tag = htons(1234);
  
          // while we're on the same page...
!         while ( (curDirEntry!=cm_noLocalMountPoints) &&
                  (curDirEntryInPage < CM_DIR_EPP) &&
                  (curChunk + cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0) <= CPP))
          {
--- 323,329 ----
          fakePageHeader.tag = htons(1234);
  
          // while we're on the same page...
!         while ( (curDirEntry<cm_noLocalMountPoints) &&
                  (curDirEntryInPage < CM_DIR_EPP) &&
                  (curChunk + cm_NameEntries((cm_localMountPoints+curDirEntry)->namep, 0) <= CPP))
          {
***************
*** 426,432 ****
--- 426,434 ----
                       lscpp = &tscp->nextp, tscp = tscp->nextp) {
                      if (tscp == scp) {
                          *lscpp = scp->nextp;
+ 			lock_ObtainMutex(&scp->mx);
                          scp->flags &= ~CM_SCACHEFLAG_INHASH;
+ 			lock_ReleaseMutex(&scp->mx);
                          break;
                      }
                  }
Index: openafs/src/WINNT/afsd/cm_ioctl.c
diff -c openafs/src/WINNT/afsd/cm_ioctl.c:1.33.2.19 openafs/src/WINNT/afsd/cm_ioctl.c:1.33.2.27
*** openafs/src/WINNT/afsd/cm_ioctl.c:1.33.2.19	Mon Oct  3 23:17:28 2005
--- openafs/src/WINNT/afsd/cm_ioctl.c	Sun Apr  9 03:29:37 2006
***************
*** 62,67 ****
--- 62,84 ----
      lock_InitializeMutex(&cm_Afsdsbmt_Lock, "AFSDSBMT.INI Access Lock");
  }
  
+ 
+ long cm_CleanFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp)
+ {
+     long code;
+ 
+     lock_ObtainWrite(&scp->bufCreateLock);
+     code = buf_CleanVnode(scp, userp, reqp);
+         
+     lock_ObtainMutex(&scp->mx);
+     cm_DiscardSCache(scp);
+     lock_ReleaseMutex(&scp->mx);
+ 
+     lock_ReleaseWrite(&scp->bufCreateLock);
+     osi_Log2(afsd_logp,"cm_CleanFile scp 0x%x returns error: [%x]",scp, code);
+     return code;
+ }
+ 
  long cm_FlushFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp)
  {
      long code;
***************
*** 70,84 ****
      code = buf_FlushCleanPages(scp, userp, reqp);
          
      lock_ObtainMutex(&scp->mx);
!     scp->cbServerp = NULL;
!     scp->cbExpires = 0;
!     cm_dnlcPurgedp(scp);
!     cm_dnlcPurgevp(scp);
!     cm_FreeAllACLEnts(scp);
      lock_ReleaseMutex(&scp->mx);
  
      lock_ReleaseWrite(&scp->bufCreateLock);
!     afsi_log("cm_FlushFile scp 0x%x returns error: [%x]",scp, code);
      return code;
  }
  
--- 87,138 ----
      code = buf_FlushCleanPages(scp, userp, reqp);
          
      lock_ObtainMutex(&scp->mx);
!     cm_DiscardSCache(scp);
! 
      lock_ReleaseMutex(&scp->mx);
  
      lock_ReleaseWrite(&scp->bufCreateLock);
!     osi_Log2(afsd_logp,"cm_FlushFile scp 0x%x returns error: [%x]",scp, code);
!     return code;
! }
! 
! long cm_FlushParent(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp)
! {
!     long code = 0;
!     cm_scache_t * pscp;
! 
!     pscp = cm_FindSCacheParent(scp);
! 
!     /* now flush the file */
!     code = cm_FlushFile(pscp, userp, reqp);
!     cm_ReleaseSCache(scp);
! 
!     return code;
! }
! 
! 
! long cm_FlushVolume(cm_user_t *userp, cm_req_t *reqp, afs_uint32 cell, afs_uint32 volume)
! {
!     long code = 0;
!     cm_scache_t *scp;
!     int i;
! 
!     lock_ObtainWrite(&cm_scacheLock);
!     for (i=0; i<cm_data.hashTableSize; i++) {
!         for (scp = cm_data.hashTablep[i]; scp; scp = scp->nextp) {
!             if (scp->fid.volume == volume && scp->fid.cell == cell) {
!                 cm_HoldSCacheNoLock(scp);
!                 lock_ReleaseWrite(&cm_scacheLock);
! 
!                 /* now flush the file */
!                 code = cm_FlushFile(scp, userp, reqp);
!                 lock_ObtainWrite(&cm_scacheLock);
!                 cm_ReleaseSCacheNoLock(scp);
!             }
!         }
!     }
!     lock_ReleaseWrite(&cm_scacheLock);
! 
      return code;
  }
  
***************
*** 393,399 ****
                          userp, ioctlp->tidPathp, reqp, &substRootp);
          if (code) return code;
  
!         code = cm_NameI(substRootp, tbuffer, CM_FLAG_FOLLOW,
                          userp, NULL, reqp, scpp);
          if (code) return code;
      }
--- 447,453 ----
                          userp, ioctlp->tidPathp, reqp, &substRootp);
          if (code) return code;
  
!         code = cm_NameI(substRootp, tbuffer, CM_FLAG_CASEFOLD | CM_FLAG_FOLLOW,
                          userp, NULL, reqp, scpp);
          if (code) return code;
      }
***************
*** 533,538 ****
--- 587,594 ----
      return code;
  }
  
+ 
+ 
  long cm_IoctlFlushAllVolumes(struct smb_ioctl *ioctlp, struct cm_user *userp)
  {
      long code;
***************
*** 564,570 ****
      long code;
      cm_scache_t *scp;
      unsigned long volume;
!     int i;
      cm_req_t req;
  
      cm_InitReq(&req);
--- 620,626 ----
      long code;
      cm_scache_t *scp;
      unsigned long volume;
!     unsigned long cell;
      cm_req_t req;
  
      cm_InitReq(&req);
***************
*** 573,595 ****
      if (code) return code;
          
      volume = scp->fid.volume;
      cm_ReleaseSCache(scp);
  
!     lock_ObtainWrite(&cm_scacheLock);
!     for (i=0; i<cm_data.hashTableSize; i++) {
!         for (scp = cm_data.hashTablep[i]; scp; scp = scp->nextp) {
!             if (scp->fid.volume == volume) {
!                 cm_HoldSCacheNoLock(scp);
!                 lock_ReleaseWrite(&cm_scacheLock);
! 
!                 /* now flush the file */
!                 code = cm_FlushFile(scp, userp, &req);
!                 lock_ObtainWrite(&cm_scacheLock);
!                 cm_ReleaseSCacheNoLock(scp);
!             }
!         }
!     }
!     lock_ReleaseWrite(&cm_scacheLock);
  
      return code;
  }
--- 629,638 ----
      if (code) return code;
          
      volume = scp->fid.volume;
+     cell = scp->fid.cell;
      cm_ReleaseSCache(scp);
  
!     code = cm_FlushVolume(userp, &req, cell, volume);
  
      return code;
  }
***************
*** 983,994 ****
          memcpy(&csi, tp, sizeof(csi));
          if (csi.tinterval >= 0) {
              cp = ioctlp->outDatap;
!             memcpy(cp, (char *)&cm_daemonCheckInterval, sizeof(long));
              ioctlp->outDatap += sizeof(long);
              if (csi.tinterval > 0) {
                  if (!smb_SUser(userp))
                      return CM_ERROR_NOACCESS;
!                 cm_daemonCheckInterval = csi.tinterval;
              }
              return 0;
          }
--- 1026,1037 ----
          memcpy(&csi, tp, sizeof(csi));
          if (csi.tinterval >= 0) {
              cp = ioctlp->outDatap;
!             memcpy(cp, (char *)&cm_daemonCheckDownInterval, sizeof(long));
              ioctlp->outDatap += sizeof(long);
              if (csi.tinterval > 0) {
                  if (!smb_SUser(userp))
                      return CM_ERROR_NOACCESS;
!                 cm_daemonCheckDownInterval = csi.tinterval;
              }
              return 0;
          }
***************
*** 1216,1221 ****
--- 1259,1265 ----
      for (cp = cm_data.allCellsp; cp; cp=cp->nextp) 
      {
          long code;
+ 	lock_ObtainMutex(&cp->mx);
          /* delete all previous server lists - cm_FreeServerList will ask for write on cm_ServerLock*/
          cm_FreeServerList(&cp->vlServersp);
          cp->vlServersp = NULL;
***************
*** 1243,1248 ****
--- 1287,1293 ----
              cp->flags &= ~CM_CELLFLAG_VLSERVER_INVALID;
              cm_RandomizeServer(&cp->vlServersp);
          }
+ 	lock_ReleaseMutex(&cp->mx);
      }
      
      lock_ReleaseWrite(&cm_cellLock);
***************
*** 1453,1465 ****
                  /* set preferences for an existing vlserver */
                  cm_ChangeRankCellVLServer(tsp);
              }
-             cm_PutServer(tsp);  /* decrease refcount */
          }
          else	/* add a new server without a cell */
          {
              tsp = cm_NewServer(&tmp, type, NULL); /* refcount = 1 */
              tsp->ipRank = rank;
          }
      }
      return 0;
  }
--- 1498,1513 ----
                  /* set preferences for an existing vlserver */
                  cm_ChangeRankCellVLServer(tsp);
              }
          }
          else	/* add a new server without a cell */
          {
              tsp = cm_NewServer(&tmp, type, NULL); /* refcount = 1 */
              tsp->ipRank = rank;
          }
+ 	lock_ObtainMutex(&tsp->mx);
+ 	tsp->flags |= CM_SERVERFLAG_PREF_SET;
+ 	lock_ReleaseMutex(&tsp->mx);
+ 	cm_PutServer(tsp);  /* decrease refcount */
      }
      return 0;
  }
***************
*** 1829,1834 ****
--- 1877,1883 ----
      int flags;
      char sessionKey[8];
      char *smbname;
+     int release_userp = 0;
  
      saveDataPtr = ioctlp->inDatap;
  
***************
*** 1897,1903 ****
      }
  
      if (flags & PIOCTL_LOGON) {
!         userp = smb_FindCMUserByName(smbname, ioctlp->fidp->vcp->rname);
      }
  
      /* store the token */
--- 1946,1954 ----
      }
  
      if (flags & PIOCTL_LOGON) {
!         userp = smb_FindCMUserByName(smbname, ioctlp->fidp->vcp->rname,
! 				     SMB_FLAG_CREATE|SMB_FLAG_AFSLOGON);
! 	release_userp = 1;
      }
  
      /* store the token */
***************
*** 1935,1940 ****
--- 1986,1994 ----
  
      cm_ResetACLCache(userp);
  
+     if (release_userp)
+ 	cm_ReleaseUser(userp);
+ 
      return 0;
  }
  
***************
*** 2146,2151 ****
--- 2200,2210 ----
          free(ucellp->ticketp);
          ucellp->ticketp = NULL;
      }
+     ucellp->ticketLen = 0;
+     memset(ucellp->sessionKey.data, 0, 8);
+     ucellp->kvno = 0;
+     ucellp->expirationTime = 0;
+     ucellp->userName[0] = '\0';
      ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
      ucellp->gen++;
  
***************
*** 2164,2169 ****
--- 2223,2238 ----
  
      for (ucellp = userp->cellInfop; ucellp; ucellp = ucellp->nextp) {
          osi_Log1(smb_logp,"cm_IoctlDelAllToken ucellp %lx", ucellp);
+ 
+ 	if (ucellp->ticketp) {
+ 	    free(ucellp->ticketp);
+ 	    ucellp->ticketp = NULL;
+ 	}
+ 	ucellp->ticketLen = 0;
+ 	memset(ucellp->sessionKey.data, 0, 8);
+ 	ucellp->kvno = 0;
+ 	ucellp->expirationTime = 0;
+ 	ucellp->userName[0] = '\0';
          ucellp->flags &= ~CM_UCELLFLAG_RXKAD;
          ucellp->gen++;
      }
Index: openafs/src/WINNT/afsd/cm_ioctl.h
diff -c openafs/src/WINNT/afsd/cm_ioctl.h:1.8.2.4 openafs/src/WINNT/afsd/cm_ioctl.h:1.8.2.6
*** openafs/src/WINNT/afsd/cm_ioctl.h:1.8.2.4	Sun Oct  2 02:08:55 2005
--- openafs/src/WINNT/afsd/cm_ioctl.h	Wed Feb  1 13:03:18 2006
***************
*** 116,123 ****
--- 116,129 ----
  
  extern long cm_IoctlCreateMountPoint(smb_ioctl_t *ioctlp, cm_user_t *userp);
  
+ extern long cm_CleanFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp);
+ 
  extern long cm_FlushFile(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp);
  
+ extern long cm_FlushVolume(cm_user_t *, cm_req_t *reqp, afs_uint32 cell, afs_uint32 volume);
+ 
+ extern long cm_FlushParent(cm_scache_t *scp, cm_user_t *userp, cm_req_t *reqp);
+ 
  extern long cm_IoctlTraceControl(smb_ioctl_t *ioctlp, cm_user_t *userp);
  
  extern long cm_IoctlSetToken(smb_ioctl_t *ioctlp, cm_user_t *userp);
Index: openafs/src/WINNT/afsd/cm_memmap.c
diff -c openafs/src/WINNT/afsd/cm_memmap.c:1.1.2.4 openafs/src/WINNT/afsd/cm_memmap.c:1.1.2.5
*** openafs/src/WINNT/afsd/cm_memmap.c:1.1.2.4	Fri Sep  9 15:49:30 2005
--- openafs/src/WINNT/afsd/cm_memmap.c	Mon Feb  6 02:07:08 2006
***************
*** 474,480 ****
      // Check input buffer length.
      // If too small, indicate the proper size and set the last error.
  
!     if (*lpdwBufferLen < dwSidSize)
      {
          *lpdwBufferLen = dwSidSize;
          SetLastError(ERROR_INSUFFICIENT_BUFFER);
--- 474,480 ----
      // Check input buffer length.
      // If too small, indicate the proper size and set the last error.
  
!     if (TextualSid == NULL || *lpdwBufferLen < dwSidSize)
      {
          *lpdwBufferLen = dwSidSize;
          SetLastError(ERROR_INSUFFICIENT_BUFFER);
Index: openafs/src/WINNT/afsd/cm_scache.c
diff -c openafs/src/WINNT/afsd/cm_scache.c:1.14.2.13 openafs/src/WINNT/afsd/cm_scache.c:1.14.2.15
*** openafs/src/WINNT/afsd/cm_scache.c:1.14.2.13	Fri Aug  5 20:36:11 2005
--- openafs/src/WINNT/afsd/cm_scache.c	Wed Feb  1 13:03:18 2006
***************
*** 28,33 ****
--- 28,35 ----
  
  /* File locks */
  osi_queue_t *cm_allFileLocks;
+ osi_queue_t *cm_freeFileLocks;
+ unsigned long cm_lockRefreshCycle;
  
  /* lock for globals */
  osi_rwlock_t cm_scacheLock;
***************
*** 133,138 ****
--- 135,147 ----
              memset(&scp->mountRootFid, 0, sizeof(cm_fid_t));
              memset(&scp->dotdotFid, 0, sizeof(cm_fid_t));
  
+             /* reset locking info */
+             scp->fileLocksH = NULL;
+             scp->fileLocksT = NULL;
+             scp->serverLock = (-1);
+             scp->exclusiveLocks = 0;
+             scp->sharedLocks = 0;
+ 
              /* not locked, but there can be no references to this guy
               * while we hold the global refcount lock.
               */
***************
*** 157,162 ****
--- 166,172 ----
      scp->magic = CM_SCACHE_MAGIC;
      lock_InitializeMutex(&scp->mx, "cm_scache_t mutex");
      lock_InitializeRWLock(&scp->bufCreateLock, "cm_scache_t bufCreateLock");
+     scp->serverLock = -1;
  
      /* and put it in the LRU queue */
      osi_QAdd((osi_queue_t **) &cm_data.scacheLRUFirstp, &scp->q);
***************
*** 195,201 ****
          cm_data.fakeSCache.refCount = 1;
      }
      lock_InitializeMutex(&cm_data.fakeSCache.mx, "cm_scache_t mutex");
! }       
  
  long
  cm_ValidateSCache(void)
--- 205,211 ----
          cm_data.fakeSCache.refCount = 1;
      }
      lock_InitializeMutex(&cm_data.fakeSCache.mx, "cm_scache_t mutex");
! }
  
  long
  cm_ValidateSCache(void)
***************
*** 347,353 ****
  
                  scp->cbServerp = NULL;
                  scp->cbExpires = 0;
!                 scp->fileLocks = NULL;
                  scp->openReads = 0;
                  scp->openWrites = 0;
                  scp->openShares = 0;
--- 357,368 ----
  
                  scp->cbServerp = NULL;
                  scp->cbExpires = 0;
!                 scp->fileLocksH = NULL;
!                 scp->fileLocksT = NULL;
!                 scp->serverLock = (-1);
!                 scp->lastRefreshCycle = 0;
!                 scp->exclusiveLocks = 0;
!                 scp->sharedLocks = 0;
                  scp->openReads = 0;
                  scp->openWrites = 0;
                  scp->openShares = 0;
***************
*** 357,362 ****
--- 372,379 ----
              }
          }
          cm_allFileLocks = NULL;
+         cm_freeFileLocks = NULL;
+         cm_lockRefreshCycle = 0;
          cm_fakeSCacheInit(newFile);
          cm_dnlcInit(newFile);
          osi_EndOnce(&once);
***************
*** 456,462 ****
              mp = "";
          }
          scp = cm_GetNewSCache();
! 		
          scp->fid = *fidp;
          scp->volp = cm_data.rootSCachep->volp;
          scp->dotdotFid.cell=AFS_FAKE_ROOT_CELL_ID;
--- 473,480 ----
              mp = "";
          }
          scp = cm_GetNewSCache();
! 	  
! 	lock_ObtainMutex(&scp->mx);
          scp->fid = *fidp;
          scp->volp = cm_data.rootSCachep->volp;
          scp->dotdotFid.cell=AFS_FAKE_ROOT_CELL_ID;
***************
*** 487,492 ****
--- 505,511 ----
          scp->parentVnode=0x1;
          scp->group=0;
          scp->dataVersion=cm_data.fakeDirVersion;
+ 	lock_ReleaseMutex(&scp->mx);
          *outScpp = scp;
          lock_ReleaseWrite(&cm_scacheLock);
          /*afsi_log("   getscache done");*/
***************
*** 527,532 ****
--- 546,552 ----
      /* now, if we don't have the fid, recycle something */
      scp = cm_GetNewSCache();
      osi_assert(!(scp->flags & CM_SCACHEFLAG_INHASH));
+     lock_ObtainMutex(&scp->mx);
      scp->fid = *fidp;
      scp->volp = volp;	/* a held reference */
  
***************
*** 548,553 ****
--- 568,574 ----
      cm_data.hashTablep[hash] = scp;
      scp->flags |= CM_SCACHEFLAG_INHASH;
      scp->refCount = 1;
+     lock_ReleaseMutex(&scp->mx);
  
      /* XXX - The following fields in the cm_scache are 
       * uninitialized:
***************
*** 562,567 ****
--- 583,618 ----
      return 0;
  }
  
+ 
+ /* Returns a held reference to the scache's parent 
+  * if it exists */
+ cm_scache_t * cm_FindSCacheParent(cm_scache_t * scp)
+ {
+     long code = 0;
+     int i;
+     cm_fid_t    parent_fid;
+     cm_scache_t * pscp = NULL;
+ 
+     lock_ObtainWrite(&cm_scacheLock);
+     parent_fid = scp->fid;
+     parent_fid.vnode = scp->parentVnode;
+     parent_fid.unique = scp->parentUnique;
+ 
+     if (cm_FidCmp(&scp->fid, &parent_fid)) {
+ 	for (i=0; i<cm_data.hashTableSize; i++) {
+ 	    for (pscp = cm_data.hashTablep[i]; pscp; pscp = pscp->nextp) {
+ 		if (!cm_FidCmp(&pscp->fid, &parent_fid)) {
+ 		    cm_HoldSCacheNoLock(pscp);
+ 		    break;
+ 		}
+ 	    }
+ 	}
+     }
+     lock_ReleaseWrite(&cm_scacheLock);
+ 
+     return pscp;
+ }
+ 
  /* synchronize a fetch, store, read, write, fetch status or store status.
   * Called with scache mutex held, and returns with it held, but temporarily
   * drops it during the fetch.
***************
*** 1163,1171 ****
--- 1214,1226 ----
  	scp->cbServerp = NULL;
      }
      scp->cbExpires = 0;
+     scp->flags &= ~CM_SCACHEFLAG_CALLBACK;
      cm_dnlcPurgedp(scp);
      cm_dnlcPurgevp(scp);
      cm_FreeAllACLEnts(scp);
+ 
+     /* Force mount points and symlinks to be re-evaluated */
+     scp->mountPointStringp[0] = '\0';
  }
  
  void cm_AFSFidFromFid(AFSFid *afsFidp, cm_fid_t *fidp)
Index: openafs/src/WINNT/afsd/cm_scache.h
diff -c openafs/src/WINNT/afsd/cm_scache.h:1.4.2.7 openafs/src/WINNT/afsd/cm_scache.h:1.4.2.12
*** openafs/src/WINNT/afsd/cm_scache.h:1.4.2.7	Sun Jun  5 02:45:31 2005
--- openafs/src/WINNT/afsd/cm_scache.h	Wed Feb  1 13:03:18 2006
***************
*** 31,60 ****
  } cm_accessCache_t;
  #endif
  
  typedef struct cm_file_lock {
! 	osi_queue_t q;			/* list of all locks */
! 	osi_queue_t fileq;		/* per-file list of locks */
! 	cm_user_t *userp;
! 	LARGE_INTEGER LOffset;
! 	LARGE_INTEGER LLength;
! 	cm_fid_t fid;
! 	unsigned char LockType;
! 	unsigned char flags;
  } cm_file_lock_t;
  
! #define CM_FILELOCK_FLAG_INVALID	0x1
! #define CM_FILELOCK_FLAG_WAITING	0x2
  
  typedef struct cm_prefetch {		/* last region scanned for prefetching */
  	osi_hyper_t base;		/* start of region */
          osi_hyper_t end;		/* first char past region */
  } cm_prefetch_t;
  
- 
  #define CM_SCACHE_MAGIC ('S' | 'C'<<8 | 'A'<<16 | 'C'<<24)
  
  typedef struct cm_scache {
! 	osi_queue_t q;			/* lru queue; cm_scacheLock */
          afs_uint32      magic;
          struct cm_scache *nextp;	/* next in hash; cm_scacheLock */
  	cm_fid_t fid;
--- 31,100 ----
  } cm_accessCache_t;
  #endif
  
+ /* Key used for byte range locking.  Each unique key identifies a
+    unique client per cm_scache_t for the purpose of locking. */
+ typedef afs_uint64 cm_key_t;
+ 
+ typedef struct cm_range {
+     afs_int64 offset;
+     afs_int64 length;
+ } cm_range_t;
+ 
+ /* forward dcls */
+ struct cm_scache;
+ typedef struct cm_scache cm_scache_t;
+ 
  typedef struct cm_file_lock {
!     osi_queue_t q;              /* list of all locks [protected by
!                                    cm_scacheLock] */
!     osi_queue_t fileq;		/* per-file list of locks [protected
!                                    by scp->mx]*/
!     
!     cm_user_t *userp;           /* The user to which this lock belongs
!                                    to [immutable; held] */
!     cm_scache_t *scp;           /* The scache to which this lock
!                                    applies to [immutable; held] */
! #ifdef DEBUG
!     cm_fid_t   fid;
! #endif
! 
!     cm_range_t range;           /* Range for the lock [immutable] */
!     cm_key_t key;               /* Key for the lock [immutable] */
!     unsigned char lockType;     /* LockRead or LockWrite [immutable] */
!     unsigned char flags;        /* combination of CM_FILELOCK_FLAG__*
!                                  * [protected by cm_scacheLock] */
!     time_t lastUpdate;          /* time of last assertion with
!                                  * server. [protected by
!                                  * cm_scacheLock] */
  } cm_file_lock_t;
  
! #define CM_FILELOCK_FLAG_DELETED         0x01
! #define CM_FILELOCK_FLAG_LOST            0x02
! 
! /* the following are mutually exclusive */
! #define CM_FILELOCK_FLAG_WAITLOCK        0x04
! #define CM_FILELOCK_FLAG_WAITUNLOCK      0x0C
! 
! /* the following is used to indicate that there are no server side
!    locks associated with this lock.  This is true for locks obtained
!    against files in RO volumes as well as files residing on servers
!    that disable client side byte range locking. */
! #define CM_FILELOCK_FLAG_CLIENTONLY      0x10
! 
! #define CM_FLSHARE_OFFSET_HIGH           0x01000000
! #define CM_FLSHARE_OFFSET_LOW            0x00000000
! #define CM_FLSHARE_LENGTH_HIGH           0x00000000
! #define CM_FLSHARE_LENGTH_LOW            0x00000001
  
  typedef struct cm_prefetch {		/* last region scanned for prefetching */
  	osi_hyper_t base;		/* start of region */
          osi_hyper_t end;		/* first char past region */
  } cm_prefetch_t;
  
  #define CM_SCACHE_MAGIC ('S' | 'C'<<8 | 'A'<<16 | 'C'<<24)
  
  typedef struct cm_scache {
!     osi_queue_t q;              /* lru queue; cm_scacheLock */
          afs_uint32      magic;
          struct cm_scache *nextp;	/* next in hash; cm_scacheLock */
  	cm_fid_t fid;
***************
*** 116,123 ****
          long anyAccess;			/* anonymous user's access */
          struct cm_aclent *randomACLp;	/* access cache entries */
  
! 	/* file locks */
! 	osi_queue_t *fileLocks;
  	
  	/* volume info */
          struct cm_volume *volp;		/* volume info; held reference */
--- 156,176 ----
          long anyAccess;			/* anonymous user's access */
          struct cm_aclent *randomACLp;	/* access cache entries */
  
!     /* file locks */
!     afs_int32    serverLock;    /* current lock we have acquired on
!                                  * this file.  One of (-1), LockRead
!                                  * or LockWrite. [protected by
!                                  * scp->mx]
!                                  */
!     unsigned long lastRefreshCycle; /* protected with cm_scacheLock
!                                      * for all scaches. */
!     osi_queue_t *fileLocksH;    /* queue of locks (head) */
!     osi_queue_t *fileLocksT;    /* queue of locks (tail) */
!     afs_uint32   sharedLocks;   /* number of shared locks on
!                                  * ::fileLocks */
!     afs_uint32   exclusiveLocks; /* number of exclusive locks on
!                                   * ::fileLocks
!                                   */
  	
  	/* volume info */
          struct cm_volume *volp;		/* volume info; held reference */
***************
*** 262,271 ****
--- 315,330 ----
  
  extern cm_scache_t *cm_FindSCache(cm_fid_t *fidp);
  
+ extern cm_scache_t *cm_FindSCacheParent(cm_scache_t *);
+ 
  extern osi_rwlock_t cm_scacheLock;
  
  extern osi_queue_t *cm_allFileLocks;
  
+ extern osi_queue_t *cm_freeFileLocks;
+ 
+ extern unsigned long cm_lockRefreshCycle;
+ 
  extern void cm_DiscardSCache(cm_scache_t *scp);
  
  extern int cm_FindFileType(cm_fid_t *fidp);
Index: openafs/src/WINNT/afsd/cm_server.c
diff -c openafs/src/WINNT/afsd/cm_server.c:1.13.2.5 openafs/src/WINNT/afsd/cm_server.c:1.13.2.9
*** openafs/src/WINNT/afsd/cm_server.c:1.13.2.5	Fri Mar 11 01:58:42 2005
--- openafs/src/WINNT/afsd/cm_server.c	Fri Feb 17 16:44:39 2006
***************
*** 100,112 ****
              }	/* got an unauthenticated connection to this server */
  
              lock_ObtainMutex(&tsp->mx);
!             if (code == 0) {
                  /* mark server as up */
                  tsp->flags &= ~CM_SERVERFLAG_DOWN;
              }
              else {
                  /* mark server as down */
                  tsp->flags |= CM_SERVERFLAG_DOWN;
              }
              lock_ReleaseMutex(&tsp->mx);
          }
--- 100,114 ----
              }	/* got an unauthenticated connection to this server */
  
              lock_ObtainMutex(&tsp->mx);
!             if (code >= 0) {
                  /* mark server as up */
                  tsp->flags &= ~CM_SERVERFLAG_DOWN;
              }
              else {
                  /* mark server as down */
                  tsp->flags |= CM_SERVERFLAG_DOWN;
+ 		if (code != VRESTARTING)
+ 		    cm_ForceNewConnections(tsp);
              }
              lock_ReleaseMutex(&tsp->mx);
          }
***************
*** 233,238 ****
--- 235,241 ----
      tsp->refCount = 1;
      lock_InitializeMutex(&tsp->mx, "cm_server_t mutex");
      tsp->addr = *socketp;
+     tsp->flags = 0;	/* assume up until we attempt to contact it */
  
      cm_SetServerPrefs(tsp); 
  
***************
*** 438,458 ****
           */
          cm_GCConnections(serverp);  /* connsp */
  
!         lock_FinalizeMutex(&serverp->mx);
!         if ( cm_allServersp == serverp )
!             cm_allServersp = serverp->allNextp;
!         else {
!             cm_server_t *tsp;
! 
!             for(tsp = cm_allServersp; tsp->allNextp; tsp=tsp->allNextp) {
!                 if ( tsp->allNextp == serverp ) {
!                     tsp->allNextp = serverp->allNextp;
!                     break;
!                 }
              }
          }
      }
!  }
  
  void cm_FreeServerList(cm_serverRef_t** list)
  {
--- 441,464 ----
           */
          cm_GCConnections(serverp);  /* connsp */
  
! 	if (!(serverp->flags & CM_SERVERFLAG_PREF_SET)) {
! 	    lock_FinalizeMutex(&serverp->mx);
! 	    if ( cm_allServersp == serverp )
! 		cm_allServersp = serverp->allNextp;
! 	    else {
! 		cm_server_t *tsp;
! 
! 		for(tsp = cm_allServersp; tsp->allNextp; tsp=tsp->allNextp) {
! 		    if ( tsp->allNextp == serverp ) {
! 			tsp->allNextp = serverp->allNextp;
! 			break;
! 		    }
! 		}
              }
+ 	    free(serverp);
          }
      }
! }
  
  void cm_FreeServerList(cm_serverRef_t** list)
  {
Index: openafs/src/WINNT/afsd/cm_server.h
diff -c openafs/src/WINNT/afsd/cm_server.h:1.5.2.4 openafs/src/WINNT/afsd/cm_server.h:1.5.2.6
*** openafs/src/WINNT/afsd/cm_server.h:1.5.2.4	Fri Mar 11 01:58:42 2005
--- openafs/src/WINNT/afsd/cm_server.h	Sun Jan 15 21:06:59 2006
***************
*** 24,35 ****
      struct cm_server *allNextp;		/* locked by cm_serverLock */
      struct sockaddr_in addr;		/* by mx */
      int type;				/* by mx */
!     struct cm_conn *connsp;			/* locked by cm_connLock */
!     long flags;				/* by mx */
!     struct cm_cell *cellp;			/* cell containing this server */
!     unsigned long refCount;				/* locked by cm_serverLock */
      osi_mutex_t mx;
!     unsigned short ipRank;			/* server priority */
  } cm_server_t;
  
  enum repstate {not_busy, busy, offline};
--- 24,35 ----
      struct cm_server *allNextp;		/* locked by cm_serverLock */
      struct sockaddr_in addr;		/* by mx */
      int type;				/* by mx */
!     struct cm_conn *connsp;		/* locked by cm_connLock */
!     long flags; 			/* by mx */
!     struct cm_cell *cellp;		/* cell containing this server */
!     unsigned long refCount;		/* locked by cm_serverLock */
      osi_mutex_t mx;
!     unsigned short ipRank;		/* server priority */
  } cm_server_t;
  
  enum repstate {not_busy, busy, offline};
***************
*** 47,52 ****
--- 47,53 ----
  
  /* flags */
  #define CM_SERVERFLAG_DOWN	1	/* server is down */
+ #define CM_SERVERFLAG_PREF_SET	2       /* server preference set by user */
  
  /* flags for procedures */
  #define CM_FLAG_CHECKUPSERVERS		1	/* check working servers */
Index: openafs/src/WINNT/afsd/cm_user.c
diff -c openafs/src/WINNT/afsd/cm_user.c:1.5.2.1 openafs/src/WINNT/afsd/cm_user.c:1.5.2.2
*** openafs/src/WINNT/afsd/cm_user.c:1.5.2.1	Tue Dec  7 00:58:20 2004
--- openafs/src/WINNT/afsd/cm_user.c	Thu Jan 19 18:08:44 2006
***************
*** 39,52 ****
  
  cm_user_t *cm_NewUser(void)
  {
!     cm_user_t *up;
          
!     up = malloc(sizeof(*up));
!     memset(up, 0, sizeof(*up));
!     up->refCount = 1;
!     up->vcRefs = 1;		/* from caller */
!     lock_InitializeMutex(&up->mx, "cm_user_t");
!     return up;
  }
  
  /* must be called with locked userp */
--- 39,51 ----
  
  cm_user_t *cm_NewUser(void)
  {
!     cm_user_t *userp;
          
!     userp = malloc(sizeof(*userp));
!     memset(userp, 0, sizeof(*userp));
!     userp->refCount = 1;
!     lock_InitializeMutex(&userp->mx, "cm_user_t");
!     return userp;
  }
  
  /* must be called with locked userp */
***************
*** 98,128 ****
      lock_ReleaseWrite(&cm_userLock);
  }
  
! void cm_ReleaseUser(cm_user_t *up)
  {
      cm_ucell_t *ucp;
      cm_ucell_t *ncp;
  
!     if (up == NULL) 
          return;
  
      lock_ObtainWrite(&cm_userLock);
!     osi_assert(up->refCount-- > 0);
!     if (up->refCount == 0) {
!         lock_FinalizeMutex(&up->mx);
!         for (ucp = up->cellInfop; ucp; ucp = ncp) {
              ncp = ucp->nextp;
              if (ucp->ticketp) 
                  free(ucp->ticketp);
              free(ucp);
          }
!         free(up);
      }
      lock_ReleaseWrite(&cm_userLock);
  }
  
  /* release the count of the # of connections that use this user structure.
!  * When this hits zero, we know we won't be getting an new requests from
   * this user, and thus we can start GC'ing connections.  Ref count on user
   * won't hit zero until all cm_conn_t's have been GC'd, since they hold
   * refCount references to userp.
--- 97,135 ----
      lock_ReleaseWrite(&cm_userLock);
  }
  
! void cm_ReleaseUser(cm_user_t *userp)
  {
      cm_ucell_t *ucp;
      cm_ucell_t *ncp;
  
!     if (userp == NULL) 
          return;
  
      lock_ObtainWrite(&cm_userLock);
!     osi_assert(userp->refCount-- > 0);
!     if (userp->refCount == 0) {
!         lock_FinalizeMutex(&userp->mx);
!         for (ucp = userp->cellInfop; ucp; ucp = ncp) {
              ncp = ucp->nextp;
              if (ucp->ticketp) 
                  free(ucp->ticketp);
              free(ucp);
          }
!         free(userp);
      }
      lock_ReleaseWrite(&cm_userLock);
  }
  
+ 
+ void cm_HoldUserVCRef(cm_user_t *userp)
+ {
+     lock_ObtainMutex(&userp->mx);
+     userp->vcRefs++;
+     lock_ReleaseMutex(&userp->mx);
+ }       
+ 
  /* release the count of the # of connections that use this user structure.
!  * When this hits zero, we know we won't be getting any new requests from
   * this user, and thus we can start GC'ing connections.  Ref count on user
   * won't hit zero until all cm_conn_t's have been GC'd, since they hold
   * refCount references to userp.
Index: openafs/src/WINNT/afsd/cm_user.h
diff -c openafs/src/WINNT/afsd/cm_user.h:1.2.20.2 openafs/src/WINNT/afsd/cm_user.h:1.2.20.3
*** openafs/src/WINNT/afsd/cm_user.h:1.2.20.2	Tue Dec  7 00:58:20 2004
--- openafs/src/WINNT/afsd/cm_user.h	Thu Jan 19 18:08:44 2006
***************
*** 48,54 ****
  } cm_user_t;
  
  #define CM_USERFLAG_DELETE	1	/* delete on last reference */
- #define CM_USERFLAG_WASLOGON	2	/* was logon DLL user */
  
  extern void cm_InitUser(void);
  
--- 48,53 ----
***************
*** 60,65 ****
--- 59,66 ----
  
  extern void cm_HoldUser(cm_user_t *up);
  
+ extern void cm_HoldUserVCRef(cm_user_t *up);
+ 
  extern void cm_ReleaseUser(cm_user_t *up);
  
  extern void cm_ReleaseUserVCRef(cm_user_t *up);
Index: openafs/src/WINNT/afsd/cm_utils.c
diff -c openafs/src/WINNT/afsd/cm_utils.c:1.5.14.3 openafs/src/WINNT/afsd/cm_utils.c:1.5.14.6
*** openafs/src/WINNT/afsd/cm_utils.c:1.5.14.3	Wed Mar 30 15:50:16 2005
--- openafs/src/WINNT/afsd/cm_utils.c	Mon Nov 21 19:37:48 2005
***************
*** 10,22 ****
  #include <afs/param.h>
  #include <afs/stds.h>
  
  #ifndef DJGPP
  #include <windows.h>
  #include <winsock2.h>
  #endif /* !DJGPP */
  #include <string.h>
  #include <malloc.h>
- 
  #include <osi.h>
  #include <rx/rx.h>
  
--- 10,69 ----
  #include <afs/param.h>
  #include <afs/stds.h>
  
+ #include <errno.h>
  #ifndef DJGPP
  #include <windows.h>
  #include <winsock2.h>
+ #ifndef EWOULDBLOCK
+ #define EWOULDBLOCK             WSAEWOULDBLOCK
+ #define EINPROGRESS             WSAEINPROGRESS
+ #define EALREADY                WSAEALREADY
+ #define ENOTSOCK                WSAENOTSOCK
+ #define EDESTADDRREQ            WSAEDESTADDRREQ
+ #define EMSGSIZE                WSAEMSGSIZE
+ #define EPROTOTYPE              WSAEPROTOTYPE
+ #define ENOPROTOOPT             WSAENOPROTOOPT
+ #define EPROTONOSUPPORT         WSAEPROTONOSUPPORT
+ #define ESOCKTNOSUPPORT         WSAESOCKTNOSUPPORT
+ #define EOPNOTSUPP              WSAEOPNOTSUPP
+ #define EPFNOSUPPORT            WSAEPFNOSUPPORT
+ #define EAFNOSUPPORT            WSAEAFNOSUPPORT
+ #define EADDRINUSE              WSAEADDRINUSE
+ #define EADDRNOTAVAIL           WSAEADDRNOTAVAIL
+ #define ENETDOWN                WSAENETDOWN
+ #define ENETUNREACH             WSAENETUNREACH
+ #define ENETRESET               WSAENETRESET
+ #define ECONNABORTED            WSAECONNABORTED
+ #define ECONNRESET              WSAECONNRESET
+ #define ENOBUFS                 WSAENOBUFS
+ #define EISCONN                 WSAEISCONN
+ #define ENOTCONN                WSAENOTCONN
+ #define ESHUTDOWN               WSAESHUTDOWN
+ #define ETOOMANYREFS            WSAETOOMANYREFS
+ #define ETIMEDOUT               WSAETIMEDOUT
+ #define ECONNREFUSED            WSAECONNREFUSED
+ #define ELOOP                   WSAELOOP
+ #ifdef ENAMETOOLONG
+ #undef ENAMETOOLONG
+ #endif
+ #define ENAMETOOLONG            WSAENAMETOOLONG
+ #define EHOSTDOWN               WSAEHOSTDOWN
+ #define EHOSTUNREACH            WSAEHOSTUNREACH
+ #ifdef ENOTEMPTY
+ #undef ENOTEMPTY
+ #endif 
+ #define ENOTEMPTY               WSAENOTEMPTY
+ #define EPROCLIM                WSAEPROCLIM
+ #define EUSERS                  WSAEUSERS
+ #define EDQUOT                  WSAEDQUOT
+ #define ESTALE                  WSAESTALE
+ #define EREMOTE                 WSAEREMOTE
+ #endif /* EWOULDBLOCK */
  #endif /* !DJGPP */
+ #include <afs/unified_afs.h>
+ 
  #include <string.h>
  #include <malloc.h>
  #include <osi.h>
  #include <rx/rx.h>
  
***************
*** 28,33 ****
--- 75,221 ----
  
  cm_space_t *cm_spaceListp;
  
+ static int et2sys[512];
+ 
+ void
+ init_et_to_sys_error(void)
+ {
+     memset(&et2sys, 0, sizeof(et2sys));
+     et2sys[(UAEPERM - ERROR_TABLE_BASE_uae)] = EPERM;
+     et2sys[(UAENOENT - ERROR_TABLE_BASE_uae)] = ENOENT;
+     et2sys[(UAESRCH - ERROR_TABLE_BASE_uae)] = ESRCH;
+     et2sys[(UAEINTR - ERROR_TABLE_BASE_uae)] = EINTR;
+     et2sys[(UAEIO - ERROR_TABLE_BASE_uae)] = EIO;
+     et2sys[(UAENXIO - ERROR_TABLE_BASE_uae)] = ENXIO;
+     et2sys[(UAE2BIG - ERROR_TABLE_BASE_uae)] = E2BIG;
+     et2sys[(UAENOEXEC - ERROR_TABLE_BASE_uae)] = ENOEXEC;
+     et2sys[(UAEBADF - ERROR_TABLE_BASE_uae)] = EBADF;
+     et2sys[(UAECHILD - ERROR_TABLE_BASE_uae)] = ECHILD;
+     et2sys[(UAEAGAIN - ERROR_TABLE_BASE_uae)] = EAGAIN;
+     et2sys[(UAENOMEM - ERROR_TABLE_BASE_uae)] = ENOMEM;
+     et2sys[(UAEACCES - ERROR_TABLE_BASE_uae)] = EACCES;
+     et2sys[(UAEFAULT - ERROR_TABLE_BASE_uae)] = EFAULT;
+     et2sys[(UAENOTBLK - ERROR_TABLE_BASE_uae)] = ENOTBLK;
+     et2sys[(UAEBUSY - ERROR_TABLE_BASE_uae)] = EBUSY;
+     et2sys[(UAEEXIST - ERROR_TABLE_BASE_uae)] = EEXIST;
+     et2sys[(UAEXDEV - ERROR_TABLE_BASE_uae)] = EXDEV;
+     et2sys[(UAENODEV - ERROR_TABLE_BASE_uae)] = ENODEV;
+     et2sys[(UAENOTDIR - ERROR_TABLE_BASE_uae)] = ENOTDIR;
+     et2sys[(UAEISDIR - ERROR_TABLE_BASE_uae)] = EISDIR;
+     et2sys[(UAEINVAL - ERROR_TABLE_BASE_uae)] = EINVAL;
+     et2sys[(UAENFILE - ERROR_TABLE_BASE_uae)] = ENFILE;
+     et2sys[(UAEMFILE - ERROR_TABLE_BASE_uae)] = EMFILE;
+     et2sys[(UAENOTTY - ERROR_TABLE_BASE_uae)] = ENOTTY;
+     et2sys[(UAETXTBSY - ERROR_TABLE_BASE_uae)] = ETXTBSY;
+     et2sys[(UAEFBIG - ERROR_TABLE_BASE_uae)] = EFBIG;
+     et2sys[(UAENOSPC - ERROR_TABLE_BASE_uae)] = ENOSPC;
+     et2sys[(UAESPIPE - ERROR_TABLE_BASE_uae)] = ESPIPE;
+     et2sys[(UAEROFS - ERROR_TABLE_BASE_uae)] = EROFS;
+     et2sys[(UAEMLINK - ERROR_TABLE_BASE_uae)] = EMLINK;
+     et2sys[(UAEPIPE - ERROR_TABLE_BASE_uae)] = EPIPE;
+     et2sys[(UAEDOM - ERROR_TABLE_BASE_uae)] = EDOM;
+     et2sys[(UAERANGE - ERROR_TABLE_BASE_uae)] = ERANGE;
+     et2sys[(UAEDEADLK - ERROR_TABLE_BASE_uae)] = EDEADLK;
+     et2sys[(UAENAMETOOLONG - ERROR_TABLE_BASE_uae)] = ENAMETOOLONG;
+     et2sys[(UAENOLCK - ERROR_TABLE_BASE_uae)] = ENOLCK;
+     et2sys[(UAENOSYS - ERROR_TABLE_BASE_uae)] = ENOSYS;
+     et2sys[(UAENOTEMPTY - ERROR_TABLE_BASE_uae)] = ENOTEMPTY;
+     et2sys[(UAELOOP - ERROR_TABLE_BASE_uae)] = ELOOP;
+     et2sys[(UAEWOULDBLOCK - ERROR_TABLE_BASE_uae)] = EWOULDBLOCK;
+     et2sys[(UAENOMSG - ERROR_TABLE_BASE_uae)] = ENOMSG;
+     et2sys[(UAEIDRM - ERROR_TABLE_BASE_uae)] = EIDRM;
+     et2sys[(UAECHRNG - ERROR_TABLE_BASE_uae)] = ECHRNG;
+     et2sys[(UAEL2NSYNC - ERROR_TABLE_BASE_uae)] = EL2NSYNC;
+     et2sys[(UAEL3HLT - ERROR_TABLE_BASE_uae)] = EL3HLT;
+     et2sys[(UAEL3RST - ERROR_TABLE_BASE_uae)] = EL3RST;
+     et2sys[(UAELNRNG - ERROR_TABLE_BASE_uae)] = ELNRNG;
+     et2sys[(UAEUNATCH - ERROR_TABLE_BASE_uae)] = EUNATCH;
+     et2sys[(UAENOCSI - ERROR_TABLE_BASE_uae)] = ENOCSI;
+     et2sys[(UAEL2HLT - ERROR_TABLE_BASE_uae)] = EL2HLT;
+     et2sys[(UAEBADE - ERROR_TABLE_BASE_uae)] = EBADE;
+     et2sys[(UAEBADR - ERROR_TABLE_BASE_uae)] = EBADR;
+     et2sys[(UAEXFULL - ERROR_TABLE_BASE_uae)] = EXFULL;
+     et2sys[(UAENOANO - ERROR_TABLE_BASE_uae)] = ENOANO;
+     et2sys[(UAEBADRQC - ERROR_TABLE_BASE_uae)] = EBADRQC;
+     et2sys[(UAEBADSLT - ERROR_TABLE_BASE_uae)] = EBADSLT;
+     et2sys[(UAEBFONT - ERROR_TABLE_BASE_uae)] = EBFONT;
+     et2sys[(UAENOSTR - ERROR_TABLE_BASE_uae)] = ENOSTR;
+     et2sys[(UAENODATA - ERROR_TABLE_BASE_uae)] = ENODATA;
+     et2sys[(UAETIME - ERROR_TABLE_BASE_uae)] = ETIME;
+     et2sys[(UAENOSR - ERROR_TABLE_BASE_uae)] = ENOSR;
+     et2sys[(UAENONET - ERROR_TABLE_BASE_uae)] = ENONET;
+     et2sys[(UAENOPKG - ERROR_TABLE_BASE_uae)] = ENOPKG;
+     et2sys[(UAEREMOTE - ERROR_TABLE_BASE_uae)] = EREMOTE;
+     et2sys[(UAENOLINK - ERROR_TABLE_BASE_uae)] = ENOLINK;
+     et2sys[(UAEADV - ERROR_TABLE_BASE_uae)] = EADV;
+     et2sys[(UAESRMNT - ERROR_TABLE_BASE_uae)] = ESRMNT;
+     et2sys[(UAECOMM - ERROR_TABLE_BASE_uae)] = ECOMM;
+     et2sys[(UAEPROTO - ERROR_TABLE_BASE_uae)] = EPROTO;
+     et2sys[(UAEMULTIHOP - ERROR_TABLE_BASE_uae)] = EMULTIHOP;
+     et2sys[(UAEDOTDOT - ERROR_TABLE_BASE_uae)] = EDOTDOT;
+     et2sys[(UAEBADMSG - ERROR_TABLE_BASE_uae)] = EBADMSG;
+     et2sys[(UAEOVERFLOW - ERROR_TABLE_BASE_uae)] = EOVERFLOW;
+     et2sys[(UAENOTUNIQ - ERROR_TABLE_BASE_uae)] = ENOTUNIQ;
+     et2sys[(UAEBADFD - ERROR_TABLE_BASE_uae)] = EBADFD;
+     et2sys[(UAEREMCHG - ERROR_TABLE_BASE_uae)] = EREMCHG;
+     et2sys[(UAELIBACC - ERROR_TABLE_BASE_uae)] = ELIBACC;
+     et2sys[(UAELIBBAD - ERROR_TABLE_BASE_uae)] = ELIBBAD;
+     et2sys[(UAELIBSCN - ERROR_TABLE_BASE_uae)] = ELIBSCN;
+     et2sys[(UAELIBMAX - ERROR_TABLE_BASE_uae)] = ELIBMAX;
+     et2sys[(UAELIBEXEC - ERROR_TABLE_BASE_uae)] = ELIBEXEC;
+     et2sys[(UAEILSEQ - ERROR_TABLE_BASE_uae)] = EILSEQ;
+     et2sys[(UAERESTART - ERROR_TABLE_BASE_uae)] = ERESTART;
+     et2sys[(UAESTRPIPE - ERROR_TABLE_BASE_uae)] = ESTRPIPE;
+     et2sys[(UAEUSERS - ERROR_TABLE_BASE_uae)] = EUSERS;
+     et2sys[(UAENOTSOCK - ERROR_TABLE_BASE_uae)] = ENOTSOCK;
+     et2sys[(UAEDESTADDRREQ - ERROR_TABLE_BASE_uae)] = EDESTADDRREQ;
+     et2sys[(UAEMSGSIZE - ERROR_TABLE_BASE_uae)] = EMSGSIZE;
+     et2sys[(UAEPROTOTYPE - ERROR_TABLE_BASE_uae)] = EPROTOTYPE;
+     et2sys[(UAENOPROTOOPT - ERROR_TABLE_BASE_uae)] = ENOPROTOOPT;
+     et2sys[(UAEPROTONOSUPPORT - ERROR_TABLE_BASE_uae)] = EPROTONOSUPPORT;
+     et2sys[(UAESOCKTNOSUPPORT - ERROR_TABLE_BASE_uae)] = ESOCKTNOSUPPORT;
+     et2sys[(UAEOPNOTSUPP - ERROR_TABLE_BASE_uae)] = EOPNOTSUPP;
+     et2sys[(UAEPFNOSUPPORT - ERROR_TABLE_BASE_uae)] = EPFNOSUPPORT;
+     et2sys[(UAEAFNOSUPPORT - ERROR_TABLE_BASE_uae)] = EAFNOSUPPORT;
+     et2sys[(UAEADDRINUSE - ERROR_TABLE_BASE_uae)] = EADDRINUSE;
+     et2sys[(UAEADDRNOTAVAIL - ERROR_TABLE_BASE_uae)] = EADDRNOTAVAIL;
+     et2sys[(UAENETDOWN - ERROR_TABLE_BASE_uae)] = ENETDOWN;
+     et2sys[(UAENETUNREACH - ERROR_TABLE_BASE_uae)] = ENETUNREACH;
+     et2sys[(UAENETRESET - ERROR_TABLE_BASE_uae)] = ENETRESET;
+     et2sys[(UAECONNABORTED - ERROR_TABLE_BASE_uae)] = ECONNABORTED;
+     et2sys[(UAECONNRESET - ERROR_TABLE_BASE_uae)] = ECONNRESET;
+     et2sys[(UAENOBUFS - ERROR_TABLE_BASE_uae)] = ENOBUFS;
+     et2sys[(UAEISCONN - ERROR_TABLE_BASE_uae)] = EISCONN;
+     et2sys[(UAENOTCONN - ERROR_TABLE_BASE_uae)] = ENOTCONN;
+     et2sys[(UAESHUTDOWN - ERROR_TABLE_BASE_uae)] = ESHUTDOWN;
+     et2sys[(UAETOOMANYREFS - ERROR_TABLE_BASE_uae)] = ETOOMANYREFS;
+     et2sys[(UAETIMEDOUT - ERROR_TABLE_BASE_uae)] = ETIMEDOUT;
+     et2sys[(UAECONNREFUSED - ERROR_TABLE_BASE_uae)] = ECONNREFUSED;
+     et2sys[(UAEHOSTDOWN - ERROR_TABLE_BASE_uae)] = EHOSTDOWN;
+     et2sys[(UAEHOSTUNREACH - ERROR_TABLE_BASE_uae)] = EHOSTUNREACH;
+     et2sys[(UAEALREADY - ERROR_TABLE_BASE_uae)] = EALREADY;
+     et2sys[(UAEINPROGRESS - ERROR_TABLE_BASE_uae)] = EINPROGRESS;
+     et2sys[(UAESTALE - ERROR_TABLE_BASE_uae)] = ESTALE;
+     et2sys[(UAEUCLEAN - ERROR_TABLE_BASE_uae)] = EUCLEAN;
+     et2sys[(UAENOTNAM - ERROR_TABLE_BASE_uae)] = ENOTNAM;
+     et2sys[(UAENAVAIL - ERROR_TABLE_BASE_uae)] = ENAVAIL;
+     et2sys[(UAEISNAM - ERROR_TABLE_BASE_uae)] = EISNAM;
+     et2sys[(UAEREMOTEIO - ERROR_TABLE_BASE_uae)] = EREMOTEIO;
+     et2sys[(UAEDQUOT - ERROR_TABLE_BASE_uae)] = EDQUOT;
+     et2sys[(UAENOMEDIUM - ERROR_TABLE_BASE_uae)] = ENOMEDIUM;
+     et2sys[(UAEMEDIUMTYPE - ERROR_TABLE_BASE_uae)] = EMEDIUMTYPE;
+ }
+ 
+ static afs_int32
+ et_to_sys_error(afs_int32 in)
+ {
+     if (in < ERROR_TABLE_BASE_uae || in >= ERROR_TABLE_BASE_uae + 512)
+ 	return in;
+     if (et2sys[in - ERROR_TABLE_BASE_uae] != 0)
+ 	return et2sys[in - ERROR_TABLE_BASE_uae];
+     return in;
+ }
+ 
  long cm_MapRPCError(long error, cm_req_t *reqp)
  {
      if (error == 0) 
***************
*** 44,49 ****
--- 232,239 ----
          return error;
      }
  
+     error = et_to_sys_error(error);
+ 
      if (error < 0) 
          error = CM_ERROR_TIMEDOUT;
      else if (error == 30) 
***************
*** 58,79 ****
          error = CM_ERROR_NOTDIR;
      else if (error == 2) 
          error = CM_ERROR_NOSUCHFILE;
!     else if (error == 11		/* EAGAIN, most servers */
               || error == 35)	/* EAGAIN, Digital UNIX */
          error = CM_ERROR_WOULDBLOCK;
      else if (error == VDISKFULL
!               || error == 28)        /* ENOSPC */ 
          error = CM_ERROR_SPACE;
      else if (error == VOVERQUOTA
!               || error == 49         /* EDQUOT on Solaris */
!               || error == 88		/* EDQUOT on AIX */
!               || error == 69	        /* EDQUOT on Digital UNIX and HPUX */
!               || error == 122        /* EDQUOT on Linux */
!               || error == 1133)      /* EDQUOT on Irix  */
          error = CM_ERROR_QUOTA;
!     else if (error == VNOVNODE) 
          error = CM_ERROR_BADFD;
!     else if (error == 21)
          return CM_ERROR_ISDIR;
      return error;
  }
--- 248,273 ----
          error = CM_ERROR_NOTDIR;
      else if (error == 2) 
          error = CM_ERROR_NOSUCHFILE;
!     else if (error == 11        /* EAGAIN, most servers */
               || error == 35)	/* EAGAIN, Digital UNIX */
          error = CM_ERROR_WOULDBLOCK;
      else if (error == VDISKFULL
!               || error == 28)   /* ENOSPC */ 
          error = CM_ERROR_SPACE;
      else if (error == VOVERQUOTA
!               || error == 49    /* EDQUOT on Solaris */
!               || error == 88    /* EDQUOT on AIX */
!               || error == 69    /* EDQUOT on Digital UNIX and HPUX */
!               || error == 122   /* EDQUOT on Linux */
!               || error == 1133) /* EDQUOT on Irix  */
          error = CM_ERROR_QUOTA;
!     else if (error == VNOVNODE) {
! #ifdef COMMENT
          error = CM_ERROR_BADFD;
! #else
!         error = CM_ERROR_RETRY;
! #endif
!     } else if (error == 21)
          return CM_ERROR_ISDIR;
      return error;
  }
Index: openafs/src/WINNT/afsd/cm_vnodeops.c
diff -c openafs/src/WINNT/afsd/cm_vnodeops.c:1.19.2.20 openafs/src/WINNT/afsd/cm_vnodeops.c:1.19.2.36
*** openafs/src/WINNT/afsd/cm_vnodeops.c:1.19.2.20	Fri Jul 22 21:17:42 2005
--- openafs/src/WINNT/afsd/cm_vnodeops.c	Wed Feb 22 09:29:22 2006
***************
*** 18,23 ****
--- 18,24 ----
  #include <malloc.h>
  #include <string.h>
  #include <stdlib.h>
+ #include <errno.h>
  
  #include <osi.h>
  
***************
*** 32,37 ****
--- 33,40 ----
  extern void afsi_log(char *pattern, ...);
  #endif
  
+ int cm_enableServerLocks = 0;
+ 
  /*
   * Case-folding array.  This was constructed by inspecting of SMBtrace output.
   * I do not know anything more about it.
***************
*** 263,268 ****
--- 266,322 ----
      code = cm_SyncOp(scp, NULL, userp, reqp, rights,
                        CM_SCACHESYNC_GETSTATUS
                        | CM_SCACHESYNC_NEEDCALLBACK);
+ 
+     if (code == 0 && 
+         ((rights & PRSFS_WRITE) || (rights & PRSFS_READ)) &&
+         scp->fileType == CM_SCACHETYPE_FILE) {
+ 
+         cm_key_t key;
+         unsigned int sLockType;
+         LARGE_INTEGER LOffset, LLength;
+ 
+         /* Check if there's some sort of lock on the file at the
+            moment. */
+ 
+         key = cm_GenerateKey(CM_SESSION_CMINT,0,0);
+ 
+         if (rights & PRSFS_WRITE)
+             sLockType = 0;
+         else
+             sLockType = LOCKING_ANDX_SHARED_LOCK;
+ 
+         LOffset.HighPart = CM_FLSHARE_OFFSET_HIGH;
+         LOffset.LowPart  = CM_FLSHARE_OFFSET_LOW;
+         LLength.HighPart = CM_FLSHARE_LENGTH_HIGH;
+         LLength.LowPart  = CM_FLSHARE_LENGTH_LOW;
+ 
+         code = cm_Lock(scp, sLockType, LOffset, LLength, key, 0, userp, reqp, NULL);
+ 
+         if (code == 0) {
+             cm_Unlock(scp, sLockType, LOffset, LLength, key, userp, reqp);
+         } else {
+             /* In this case, we allow the file open to go through even
+                though we can't enforce mandatory locking on the
+                file. */
+             if (code == CM_ERROR_NOACCESS &&
+                 !(rights & PRSFS_WRITE))
+                 code = 0;
+             else {
+ 		switch (code) {
+ 		case CM_ERROR_ALLOFFLINE:
+ 		case CM_ERROR_ALLDOWN:
+ 		case CM_ERROR_ALLBUSY:
+ 		case CM_ERROR_TIMEDOUT:
+ 		case CM_ERROR_RETRY:
+ 		case CM_ERROR_WOULDBLOCK:
+ 		    break;
+ 		default:
+ 		    code = CM_ERROR_SHARING_VIOLATION;
+ 		}
+ 	    }
+         }
+     }
+ 
      lock_ReleaseMutex(&scp->mx);
  
      return code;
***************
*** 293,299 ****
      code = cm_SyncOp(scp, NULL, userp, reqp, rights,
                        CM_SCACHESYNC_GETSTATUS
                        | CM_SCACHESYNC_NEEDCALLBACK);
-     lock_ReleaseMutex(&scp->mx);
  
      /*
       * If the open will fail because the volume is readonly, then we will
--- 347,352 ----
***************
*** 303,308 ****
--- 356,411 ----
       */
      if (code == CM_ERROR_READONLY)
          code = CM_ERROR_NOACCESS;
+     else if (code == 0 &&
+              ((rights & PRSFS_WRITE) || (rights & PRSFS_READ)) &&
+              scp->fileType == CM_SCACHETYPE_FILE) {
+         cm_key_t key;
+         unsigned int sLockType;
+         LARGE_INTEGER LOffset, LLength;
+ 
+         /* Check if there's some sort of lock on the file at the
+            moment. */
+ 
+         key = cm_GenerateKey(CM_SESSION_CMINT,0,0);
+         if (rights & PRSFS_WRITE)
+             sLockType = 0;
+         else
+             sLockType = LOCKING_ANDX_SHARED_LOCK;
+ 
+         /* single byte lock at offset 0x0100 0000 0000 0000 */
+         LOffset.HighPart = CM_FLSHARE_OFFSET_HIGH;
+         LOffset.LowPart  = CM_FLSHARE_OFFSET_LOW;
+         LLength.HighPart = CM_FLSHARE_LENGTH_HIGH;
+         LLength.LowPart  = CM_FLSHARE_LENGTH_LOW;
+ 
+         code = cm_Lock(scp, sLockType, LOffset, LLength, key, 0, userp, reqp, NULL);
+ 
+         if (code == 0) {
+             cm_Unlock(scp, sLockType, LOffset, LLength, key, userp, reqp);
+         } else {
+             /* In this case, we allow the file open to go through even
+                though we can't enforce mandatory locking on the
+                file. */
+             if (code == CM_ERROR_NOACCESS &&
+                 !(rights & PRSFS_WRITE))
+                 code = 0;
+             else {
+ 		switch (code) {
+ 		case CM_ERROR_ALLOFFLINE:
+ 		case CM_ERROR_ALLDOWN:
+ 		case CM_ERROR_ALLBUSY:
+ 		case CM_ERROR_TIMEDOUT:
+ 		case CM_ERROR_RETRY:
+ 		case CM_ERROR_WOULDBLOCK:
+ 		    break;
+ 		default:
+ 		    code = CM_ERROR_SHARING_VIOLATION;
+ 		}
+ 	    }
+         }
+     }
+ 
+     lock_ReleaseMutex(&scp->mx);
  
      return code;
  }
***************
*** 689,695 ****
              match = cm_stricmp(matchName, sp->searchNamep);
          else
              match = strcmp(matchName, sp->searchNamep);
!     }       
  
      if (match != 0)
          return 0;
--- 792,798 ----
              match = cm_stricmp(matchName, sp->searchNamep);
          else
              match = strcmp(matchName, sp->searchNamep);
!     }
  
      if (match != 0)
          return 0;
***************
*** 849,855 ****
  
      /* parse the volume name */
      mpNamep = scp->mountPointStringp;
!     osi_assert(mpNamep[0]);
      tlen = strlen(scp->mountPointStringp);
      mtType = *scp->mountPointStringp;
      cellNamep = malloc(tlen);
--- 952,959 ----
  
      /* parse the volume name */
      mpNamep = scp->mountPointStringp;
!     if (!mpNamep[0])
! 	return CM_ERROR_NOSUCHPATH;
      tlen = strlen(scp->mountPointStringp);
      mtType = *scp->mountPointStringp;
      cellNamep = malloc(tlen);
***************
*** 1077,1083 ****
      if ( !dnlcHit && !(flags & CM_FLAG_NOMOUNTCHASE) && rock.ExactFound ) {
          /* lock the directory entry to prevent racing callback revokes */
          lock_ObtainMutex(&dscp->mx);
!         if ( dscp->cbServerp && dscp->cbExpires )
              cm_dnlcEnter(dscp, namep, tscp);
          lock_ReleaseMutex(&dscp->mx);
      }
--- 1181,1187 ----
      if ( !dnlcHit && !(flags & CM_FLAG_NOMOUNTCHASE) && rock.ExactFound ) {
          /* lock the directory entry to prevent racing callback revokes */
          lock_ObtainMutex(&dscp->mx);
!         if ( dscp->cbServerp != NULL && dscp->cbExpires > 0 )
              cm_dnlcEnter(dscp, namep, tscp);
          lock_ReleaseMutex(&dscp->mx);
      }
***************
*** 2677,3006 ****
      return code;
  }
  
! long cm_Lock(cm_scache_t *scp, unsigned char LockType,
!               LARGE_INTEGER LOffset, LARGE_INTEGER LLength,
!               u_long Timeout, cm_user_t *userp, cm_req_t *reqp,
!               void **lockpp)
! {
!     long code;
!     int Which = ((LockType & LOCKING_ANDX_SHARED_LOCK) ? LockRead : LockWrite);
!     AFSFid tfid;
!     AFSVolSync volSync;
!     cm_conn_t *connp;
!     cm_file_lock_t *fileLock;
!     osi_queue_t *q;
!     int found = 0;
!     struct rx_connection * callp;
  
!     osi_Log1(afsd_logp, "cm_Lock scp 0x%x ...", (long) scp);
!     osi_Log4(afsd_logp, "cm_Lock type 0x%x offset %d length %d timeout %d",
!              LockType, (unsigned long)LOffset.QuadPart, (unsigned long)LLength.QuadPart, Timeout);
  
!     /* Look for a conflict.  Also, if we are asking for a shared lock,
!      * look for another shared lock, so we don't have to do an RPC.
!      */
!     q = scp->fileLocks;
!     while (q) {
!         fileLock = (cm_file_lock_t *)((char *) q - offsetof(cm_file_lock_t, fileq));
!         if ((fileLock->flags & (CM_FILELOCK_FLAG_INVALID | CM_FILELOCK_FLAG_WAITING)) == 0) {
!             if ((LockType & LOCKING_ANDX_SHARED_LOCK) == 0 ||
!                 (fileLock->LockType & LOCKING_ANDX_SHARED_LOCK) == 0)
!                 return CM_ERROR_WOULDBLOCK;
!             found = 1;
!         }
!         q = osi_QNext(q);
!     }
  
!     osi_Log1(afsd_logp, "cm_Lock found = %d", found);
  
!     if (found)
!         code = 0;
!     else {
!         tfid.Volume = scp->fid.volume;
!         tfid.Vnode = scp->fid.vnode;
!         tfid.Unique = scp->fid.unique;
!         lock_ReleaseMutex(&scp->mx);
!         do {
!             osi_Log1(afsd_logp, "CALL SetLock scp 0x%x", (long) scp);
!             code = cm_Conn(&scp->fid, userp, reqp, &connp);
!             if (code) 
!                 break;
  
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_SetLock(callp, &tfid, Which,
!                                   &volSync);
!             rx_PutConnection(callp);
  
!         } while (cm_Analyze(connp, userp, reqp, &scp->fid, &volSync,
!                              NULL, NULL, code));
!         if (code)
!             osi_Log1(afsd_logp, "CALL SetLock FAILURE, code 0x%x", code);
!         else
!             osi_Log0(afsd_logp, "CALL SetLock SUCCESS");
!         lock_ObtainMutex(&scp->mx);
!         code = cm_MapRPCError(code, reqp);
!     }
  
!     if (code == 0 || Timeout != 0) {
!         fileLock = malloc(sizeof(cm_file_lock_t));
!         fileLock->LockType = LockType;
!         cm_HoldUser(userp);
!         fileLock->userp = userp;
!         fileLock->fid = scp->fid;
!         fileLock->LOffset = LOffset;
!         fileLock->LLength = LLength;
!         fileLock->flags = (code == 0 ? 0 : CM_FILELOCK_FLAG_WAITING);
!         osi_QAdd(&scp->fileLocks, &fileLock->fileq);
!         lock_ObtainWrite(&cm_scacheLock);
!         osi_QAdd(&cm_allFileLocks, &fileLock->q);
!         lock_ReleaseWrite(&cm_scacheLock);
!         if (code != 0) 
!             *lockpp = fileLock;
!         osi_Log1(afsd_logp, "cm_Lock Lock added 0x%x", (long) fileLock);
!     }
!     return code;
! }
  
! long cm_Unlock(cm_scache_t *scp, unsigned char LockType,
!                 LARGE_INTEGER LOffset, LARGE_INTEGER LLength,
!                 cm_user_t *userp, cm_req_t *reqp)
! {
!     long code = 0;
!     int Which = ((LockType & LOCKING_ANDX_SHARED_LOCK) ? LockRead : LockWrite);
!     AFSFid tfid;
!     AFSVolSync volSync;
!     cm_conn_t *connp;
!     cm_file_lock_t *fileLock, *ourLock;
!     osi_queue_t *q, *qq;
!     int anotherReader = 0;
!     int smallLock = 0;
!     int found = 0;
!     struct rx_connection * callp;
  
!     osi_Log4(afsd_logp, "cm_Unlock scp 0x%x type 0x%x offset %d length %d",
!              (long) scp, LockType, (unsigned long)LOffset.QuadPart, (unsigned long)LLength.QuadPart);
  
!     if (LargeIntegerLessThan(LLength, scp->length))
!         smallLock = 1;
  
!     /* Look for our own lock on the list, so as to remove it.
!      * Also, determine if we're the last reader; if not, avoid an RPC.
!      */
!     q = scp->fileLocks;
!     while (q) {
!         fileLock = (cm_file_lock_t *)
!             ((char *) q - offsetof(cm_file_lock_t, fileq));
!         if (!found
!              && fileLock->userp == userp
!              && LargeIntegerEqualTo(fileLock->LOffset, LOffset)
!              && LargeIntegerEqualTo(fileLock->LLength, LLength)) {
!             found = 1;
!             ourLock = fileLock;
!             qq = q;
!         }
!         else if (fileLock->LockType & LOCKING_ANDX_SHARED_LOCK)
!             anotherReader = 1;
!         q = osi_QNext(q);
!     }
! 
!     /* ignore byte ranges */
!     if (smallLock && !found) {
!         osi_Log0(afsd_logp, "cm_Unlock lock not found and ignored");
!         return 0;
!     }
  
!     /* don't try to unlock other people's locks */
!     if (!found) {
!         osi_Log0(afsd_logp, "cm_Unlock lock not found; failure");
!         return CM_ERROR_WOULDBLOCK;
!     }
  
!     /* discard lock record */
!     osi_QRemove(&scp->fileLocks, qq);
!     /*
!      * Don't delete it here; let the daemon delete it, to simplify
!      * the daemon's traversal of the list.
!      */
!     lock_ObtainWrite(&cm_scacheLock);
!     ourLock->flags |= CM_FILELOCK_FLAG_INVALID;
!     cm_ReleaseUser(ourLock->userp);
!     lock_ReleaseWrite(&cm_scacheLock);
  
!     if (!anotherReader) {
!         tfid.Volume = scp->fid.volume;
!         tfid.Vnode = scp->fid.vnode;
!         tfid.Unique = scp->fid.unique;
!         lock_ReleaseMutex(&scp->mx);
!         osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
!         do {
!             code = cm_Conn(&scp->fid, userp, reqp, &connp);
!             if (code) 
!                 break;
  
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_ReleaseLock(callp, &tfid, &volSync);
!             rx_PutConnection(callp);
  
!         } while (cm_Analyze(connp, userp, reqp, &scp->fid, &volSync,
!                              NULL, NULL, code));
!         code = cm_MapRPCError(code, reqp);
  
!         if (code)
!             osi_Log1(afsd_logp, "CALL ReleaseLock FAILURE, code 0x%x", code);
!         else
!             osi_Log0(afsd_logp, "CALL ReleaseLock SUCCESS");
  
!         lock_ObtainMutex(&scp->mx);
!     }
  
!     osi_Log1(afsd_logp, "cm_Unlock code 0x%x", code);
!     return code;
! }
  
! void cm_CheckLocks()
! {
!     osi_queue_t *q, *nq;
!     cm_file_lock_t *fileLock;
!     cm_req_t req;
!     AFSFid tfid;
!     AFSVolSync volSync;
!     cm_conn_t *connp;
!     long code;
!     struct rx_connection * callp;
  
!     cm_InitReq(&req);
  
!     lock_ObtainWrite(&cm_scacheLock);
!     q = cm_allFileLocks;
!     while (q) {
!         fileLock = (cm_file_lock_t *) q;
!         nq = osi_QNext(q);
!         if (fileLock->flags & CM_FILELOCK_FLAG_INVALID) {
!             osi_QRemove(&cm_allFileLocks, q);
!             free(fileLock);
!         }
!         else if (!(fileLock->flags & CM_FILELOCK_FLAG_WAITING)) {
!             tfid.Volume = fileLock->fid.volume;
!             tfid.Vnode = fileLock->fid.vnode;
!             tfid.Unique = fileLock->fid.unique;
!             lock_ReleaseWrite(&cm_scacheLock);
!             osi_Log1(afsd_logp, "CALL ExtendLock lock 0x%x", (long) fileLock);
!             do {
!                 code = cm_Conn(&fileLock->fid, fileLock->userp,
!                                 &req, &connp);
!                 if (code) 
!                     break;
  
!                 callp = cm_GetRxConn(connp);
!                 code = RXAFS_ExtendLock(callp, &tfid,
!                                          &volSync);
!                 rx_PutConnection(callp);
  
!             } while (cm_Analyze(connp, fileLock->userp, &req,
!                                  &fileLock->fid, &volSync, NULL, NULL,
!                                  code));
!             code = cm_MapRPCError(code, &req);
!             if (code)
!                 osi_Log1(afsd_logp, "CALL ExtendLock FAILURE, code 0x%x", code);
!             else
!                 osi_Log0(afsd_logp, "CALL ExtendLock SUCCESS");
  
!             lock_ObtainWrite(&cm_scacheLock);
          }
!         q = nq;
      }
!     lock_ReleaseWrite(&cm_scacheLock);
! }       
  
! long cm_RetryLock(cm_file_lock_t *oldFileLock, int vcp_is_dead)
  {
!     long code;
!     int Which = ((oldFileLock->LockType & LOCKING_ANDX_SHARED_LOCK) ? LockRead : LockWrite);
!     cm_scache_t *scp;
!     AFSFid tfid;
!     AFSVolSync volSync;
!     cm_conn_t *connp;
      cm_file_lock_t *fileLock;
      osi_queue_t *q;
!     cm_req_t req;
!     int found = 0;
!     struct rx_connection * callp;
  
!     if (vcp_is_dead) {
!         code = CM_ERROR_TIMEDOUT;
!         goto handleCode;
!     }
  
!     cm_InitReq(&req);
  
!     /* Look for a conflict.  Also, if we are asking for a shared lock,
!      * look for another shared lock, so we don't have to do an RPC.
!      */
!     code = cm_GetSCache(&oldFileLock->fid, &scp, oldFileLock->userp, &req);
!     if (code)
!         return code;
  
!     q = scp->fileLocks;
!     while (q) {
!         fileLock = (cm_file_lock_t *)
!             ((char *) q - offsetof(cm_file_lock_t, fileq));
!         if ((fileLock->flags &
!               (CM_FILELOCK_FLAG_INVALID | CM_FILELOCK_FLAG_WAITING))
!              == 0) {
!             if ((oldFileLock->LockType & LOCKING_ANDX_SHARED_LOCK) == 0
!                  || (fileLock->LockType & LOCKING_ANDX_SHARED_LOCK) == 0) {
!                 cm_ReleaseSCache(scp);
!                 return CM_ERROR_WOULDBLOCK;
              }
-             found = 1;
          }
-         q = osi_QNext(q);
      }
  
!     if (found)
!         code = 0;
!     else {
!         tfid.Volume = oldFileLock->fid.volume;
!         tfid.Vnode = oldFileLock->fid.vnode;
!         tfid.Unique = oldFileLock->fid.unique;
!         osi_Log1(afsd_logp, "CALL SetLock lock 0x%x", (long) oldFileLock);
!         do {
!             code = cm_Conn(&oldFileLock->fid, oldFileLock->userp,
!                             &req, &connp);
!             if (code) 
!                 break;
  
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_SetLock(callp, &tfid, Which,
!                                   &volSync);
!             rx_PutConnection(callp);
  
!         } while (cm_Analyze(connp, oldFileLock->userp, &req,
!                              &oldFileLock->fid, &volSync,
!                              NULL, NULL, code));
!         code = cm_MapRPCError(code, &req);
  
!         if (code)
!             osi_Log1(afsd_logp, "CALL SetLock FAILURE, code 0x%x", code);
!         else
!             osi_Log0(afsd_logp, "CALL SetLock SUCCESS");
      }
  
    handleCode:
      if (code != 0 && code != CM_ERROR_WOULDBLOCK) {
!         lock_ObtainMutex(&scp->mx);
!         osi_QRemove(&scp->fileLocks, &oldFileLock->fileq);
!         lock_ReleaseMutex(&scp->mx);
      }
      lock_ObtainWrite(&cm_scacheLock);
!     if (code == 0)
!         oldFileLock->flags = 0;
!     else if (code != CM_ERROR_WOULDBLOCK) {
!         oldFileLock->flags |= CM_FILELOCK_FLAG_INVALID;
          cm_ReleaseUser(oldFileLock->userp);
          oldFileLock->userp = NULL;
      }
      lock_ReleaseWrite(&cm_scacheLock);
  
      return code;
  }
--- 2781,4597 ----
      return code;
  }
  
! /* Byte range locks:
  
!    The OpenAFS Windows client has to fake byte range locks given no
!    server side support for such locks.  This is implemented as keyed
!    byte range locks on the cache manager.
  
!    Keyed byte range locks:
  
!    Each cm_scache_t structure keeps track of a list of keyed locks.
!    The key for a lock identifies an owner of a set of locks (referred
!    to as a client).  Each key is represented by a value.  The set of
!    key values used within a specific cm_scache_t structure form a
!    namespace that has a scope of just that cm_scache_t structure.  The
!    same key value can be used with another cm_scache_t structure and
!    correspond to a completely different client.  However it is
!    advantageous for the SMB or IFS layer to make sure that there is a
!    1-1 mapping between client and keys over all cm_scache_t objects.
  
!    Assume a client C has key Key(C) (although, since the scope of the
!    key is a cm_scache_t, the key can be Key(C,S), where S is the
!    cm_scache_t.  But assume a 1-1 relation between keys and clients).
!    A byte range (O,+L) denotes byte addresses (O) through (O+L-1)
!    inclusive (a.k.a. [O,O+L-1]).  The function Key(x) is implemented
!    through cm_generateKey() function for both SMB and IFS.
  
!    The list of locks for a cm_scache_t object S is maintained in
!    S->fileLocks.  The cache manager will set a lock on the AFS file
!    server in order to assert the locks in S->fileLocks.  If only
!    shared locks are in place for S, then the cache manager will obtain
!    a LockRead lock, while if there are any exclusive locks, it will
!    obtain a LockWrite lock.  If the exclusive locks are all released
!    while the shared locks remain, then the cache manager will
!    downgrade the lock from LockWrite to LockRead.  Similarly, if an
!    exclusive lock is obtained when only shared locks exist, then the
!    cache manager will try to upgrade the lock from LockRead to
!    LockWrite.
  
!    Each lock L owned by client C maintains a key L->key such that
!    L->key == Key(C), the effective range defined by L->LOffset and
!    L->LLength such that the range of bytes affected by the lock is
!    (L->LOffset, +L->LLength), a type maintained in L->LockType which
!    is either exclusive or shared.
  
!    Lock states:
  
!    A lock exists iff it is in S->fileLocks for some cm_scache_t
!    S. Existing locks are in one of the following states: ACTIVE,
!    WAITLOCK, WAITUNLOCK, LOST, DELETED.
  
!    The following sections describe each lock and the associated
!    transitions.
  
!    1. ACTIVE: A lock L is ACTIVE iff the cache manager has asserted
!       the lock with the AFS file server.  This type of lock can be
!       exercised by a client to read or write to the locked region (as
!       the lock allows).
  
!       1.1 ACTIVE->LOST: When the AFS file server fails to extend a
!         server lock that was required to assert the lock.  Before
!         marking the lock as lost, the cache manager checks if the file
!         has changed on the server.  If the file has not changed, then
!         the cache manager will attempt to obtain a new server lock
!         that is sufficient to assert the client side locks for the
!         file.  If any of these fail, the lock is marked as LOST.
!         Otherwise, it is left as ACTIVE.
  
!       1.2 ACTIVE->DELETED: Lock is released.
  
!    2. WAITLOCK: A lock is in a WAITLOCK state if the cache manager
!       grants the lock but the lock is yet to be asserted with the AFS
!       file server.  Once the file server grants the lock, the state
!       will transition to an ACTIVE lock.
  
!       2.1 WAITLOCK->ACTIVE: The server granted the lock.
  
!       2.2 WAITLOCK->DELETED: Lock is abandoned, or timed out during
!         waiting.
  
!       2.3 WAITLOCK->LOST: One or more locks from this client were
!         marked as LOST.  No further locks will be granted to this
!         client until all lost locks are removed.
  
!    3. WAITUNLOCK: A lock is in a WAITUNLOCK state if the cache manager
!       receives a request for a lock that conflicts with an existing
!       ACTIVE or WAITLOCK lock.  The lock will be placed in the queue
!       and will be granted at such time the conflicting locks are
!       removed, at which point the state will transition to either
!       WAITLOCK or ACTIVE.
  
!       3.1 WAITUNLOCK->ACTIVE: The conflicting lock was removed.  The
!         current serverLock is sufficient to assert this lock, or a
!         sufficient serverLock is obtained.
  
!       3.2 WAITUNLOCK->WAITLOCK: The conflicting lock was removed,
!         however the required serverLock is yet to be asserted with the
!         server.
  
!       3.3 WAITUNLOCK->DELETED: The lock is abandoned, timed out or
!         released.
  
!       3.5 WAITUNLOCK->LOST: One or more locks from this client were
!         marked as LOST.  No further locks will be granted to this
!         client until all lost locks are removed.
  
!    4. LOST: A lock L is LOST if the server lock that was required to
!       assert the lock could not be obtained or if it could not be
!       extended, or if other locks by the same client were LOST.
!       Essentially, once a lock is LOST, the contract between the cache
!       manager and that specific client is no longer valid.
  
!       The cache manager rechecks the server lock once every minute and
!       extends it as appropriate.  If this is not done for 5 minutes,
!       the AFS file server will release the lock (the 5 minute timeout
!       is based on current file server code and is fairly arbitrary).
!       Once released, the lock cannot be re-obtained without verifying
!       that the contents of the file hasn't been modified since the
!       time the lock was released.  Re-obtaining the lock without
!       verifying this may lead to data corruption.  If the lock can not
!       be obtained safely, then all active locks for the cm_scache_t
!       are marked as LOST.
  
!       4.1 LOST->DELETED: The lock is released.
! 
!    5. DELETED: The lock is no longer relevant.  Eventually, it will
!       get removed from the cm_scache_t. In the meantime, it will be
!       treated as if it does not exist.
! 
!       5.1 DELETED->not exist: The lock is removed from the
!         cm_scache_t.
! 
!    The following are classifications of locks based on their state.
! 
!    6* A lock L is ACCEPTED if it is ACTIVE or WAITLOCK.  These locks
!       have been accepted by the cache manager, but may or may not have
!       been granted back to the client.
! 
!    7* A lock L is QUEUED if it is ACTIVE, WAITLOCK or WAITUNLOCK.
! 
!    8* A lock L is WAITING if it is WAITLOCK or WAITUNLOCK.
! 
!    Lock operation:
! 
!    A client C can READ range (Offset,+Length) of a file represented by
!    cm_scache_t S iff (1):
! 
!    1. for all _a_ in (Offset,+Length), all of the following is true:
! 
!        1.1 For each ACTIVE lock L in S->fileLocks such that _a_ in
!          (L->LOffset,+L->LLength); L->key == Key(C) OR L->LockType is
!          shared.
! 
!        1.2 For each LOST lock L in S->fileLocks such that _a_ in
!          (L->LOffset,+L->LLength); L->LockType is shared AND L->key !=
!          Key(C)
! 
!        (When locks are lost on an cm_scache_t, all locks are lost.  By
!        4.2 (below), if there is an exclusive LOST lock, then there
!        can't be any overlapping ACTIVE locks.)
! 
!    A client C can WRITE range (Offset,+Length) of cm_scache_t S iff (2):
! 
!    2. for all _a_ in (Offset,+Length), one of the following is true:
! 
!        2.1 Byte _a_ of S is unowned (as specified in 1.1) AND there
!          does not exist a LOST lock L such that _a_ in
!          (L->LOffset,+L->LLength).
! 
!        2.2 Byte _a_ of S is owned by C under lock L (as specified in
!          1.2) AND L->LockType is exclusive.
! 
!    A client C can OBTAIN a lock L on cm_scache_t S iff (both 3 and 4):
! 
!    3. for all _a_ in (L->LOffset,+L->LLength), ALL of the following is
!       true:
! 
!        3.1 If L->LockType is exclusive then there does NOT exist a
!          ACCEPTED lock M in S->fileLocks such that _a_ in
!          (M->LOffset,+M->LLength).
! 
!          (If we count all QUEUED locks then we hit cases such as
!          cascading waiting locks where the locks later on in the queue
!          can be granted without compromising file integrity.  On the
!          other hand if only ACCEPTED locks are considered, then locks
!          that were received earlier may end up waiting for locks that
!          were received later to be unlocked. The choice of ACCEPTED
!          locks was made to mimic the Windows byte range lock
!          semantics.)
! 
!        3.2 If L->LockType is shared then for each ACCEPTED lock M in
!          S->fileLocks, if _a_ in (M->LOffset,+M->LLength) then
!          M->LockType is shared.
! 
!    4. For all LOST locks M in S->fileLocks, ALL of the following are true:
! 
!        4.1 M->key != Key(C)
! 
!        4.2 If M->LockType is exclusive, then (L->LOffset,+L->LLength)
!          and (M->LOffset,+M->LLength) do not intersect.
! 
!          (Note: If a client loses a lock, it loses all locks.
!          Subsequently, it will not be allowed to obtain any more locks
!          until all existing LOST locks that belong to the client are
!          released.  Once all locks are released by a single client,
!          there exists no further contract between the client and AFS
!          about the contents of the file, hence the client can then
!          proceed to obtain new locks and establish a new contract.
! 
!          This doesn't quite work as you think it should, because most
!          applications aren't built to deal with losing locks they
!          thought they once had.  For now, we don't have a good
!          solution to lost locks.
! 
!          Also, for consistency reasons, we have to hold off on
!          granting locks that overlap exclusive LOST locks.)
! 
!    A client C can only unlock locks L in S->fileLocks which have
!    L->key == Key(C).
! 
!    The representation and invariants are as follows:
! 
!    - Each cm_scache_t structure keeps:
! 
!        - A queue of byte-range locks (cm_scache_t::fileLocks) which
!          are of type cm_file_lock_t.
! 
!        - A record of the highest server-side lock that has been
!          obtained for this object (cm_scache_t::serverLock), which is
!          one of (-1), LockRead, LockWrite.
! 
!        - A count of ACCEPTED exclusive and shared locks that are in the
!          queue (cm_scache_t::sharedLocks and
!          cm_scache_t::exclusiveLocks)
! 
!    - Each cm_file_lock_t structure keeps:
! 
!        - The type of lock (cm_file_lock_t::LockType)
! 
!        - The key associated with the lock (cm_file_lock_t::key)
! 
!        - The offset and length of the lock (cm_file_lock_t::LOffset
!          and cm_file_lock_t::LLength)
! 
!        - The state of the lock.
! 
!        - Time of issuance or last successful extension
! 
!    Semantic invariants:
! 
!        I1. The number of ACCEPTED locks in S->fileLocks are
!            (S->sharedLocks + S->exclusiveLocks)
! 
!    External invariants:
! 
!        I3. S->serverLock is the lock that we have asserted with the
!            AFS file server for this cm_scache_t.
! 
!        I4. S->serverLock == LockRead iff there is at least one ACTIVE
!            shared lock, but no ACTIVE exclusive locks.
! 
!        I5. S->serverLock == LockWrite iff there is at least one ACTIVE
!            exclusive lock.
! 
!        I6. If L is a LOST lock, then for each lock M in S->fileLocks,
!            M->key == L->key IMPLIES M is LOST or DELETED.
! 
!    --asanka
!  */
! 
! #define IS_LOCK_ACTIVE(lockp)     (((lockp)->flags & (CM_FILELOCK_FLAG_DELETED|CM_FILELOCK_FLAG_WAITLOCK|CM_FILELOCK_FLAG_WAITUNLOCK|CM_FILELOCK_FLAG_LOST)) == 0)
! 
! #define IS_LOCK_WAITLOCK(lockp)   (((lockp)->flags & (CM_FILELOCK_FLAG_DELETED|CM_FILELOCK_FLAG_WAITLOCK|CM_FILELOCK_FLAG_WAITUNLOCK|CM_FILELOCK_FLAG_LOST)) == CM_FILELOCK_FLAG_WAITLOCK)
! 
! #define IS_LOCK_WAITUNLOCK(lockp) (((lockp)->flags & (CM_FILELOCK_FLAG_DELETED|CM_FILELOCK_FLAG_WAITLOCK|CM_FILELOCK_FLAG_WAITUNLOCK|CM_FILELOCK_FLAG_LOST)) == CM_FILELOCK_FLAG_WAITUNLOCK)
! 
! #define IS_LOCK_LOST(lockp)       (((lockp)->flags & (CM_FILELOCK_FLAG_DELETED|CM_FILELOCK_FLAG_LOST)) == CM_FILELOCK_FLAG_LOST)
! 
! #define IS_LOCK_DELETED(lockp)    (((lockp)->flags & CM_FILELOCK_FLAG_DELETED) == CM_FILELOCK_FLAG_DELETED)
  
! /* unsafe */
! #define IS_LOCK_ACCEPTED(lockp)   (IS_LOCK_ACTIVE(lockp) || IS_LOCK_WAITLOCK(lockp))
! 
! /* unsafe */
! #define IS_LOCK_CLIENTONLY(lockp) ((((lockp)->scp->flags & CM_SCACHEFLAG_RO) == CM_SCACHEFLAG_RO) || (((lockp)->flags & CM_FILELOCK_FLAG_CLIENTONLY) == CM_FILELOCK_FLAG_CLIENTONLY))
! 
! /* unsafe */
! #define INTERSECT_RANGE(r1,r2) (((r2).offset+(r2).length) > (r1).offset && ((r1).offset +(r1).length) > (r2).offset)
! 
! /* unsafe */
! #define CONTAINS_RANGE(r1,r2) (((r2).offset+(r2).length) <= ((r1).offset+(r1).length) && (r1).offset <= (r2).offset)
! 
! #if defined(VICED_CAPABILITY_USE_BYTE_RANGE_LOCKS) && !defined(LOCK_TESTING)
! #define SCP_SUPPORTS_BRLOCKS(scp) ((scp)->cbServerp && ((scp)->cbServerp->capabilities & VICED_CAPABILITY_USE_BYTE_RANGE_LOCKS))
! #else
! #define SCP_SUPPORTS_BRLOCKS(scp) (1)
! #endif
! 
! #define SERVERLOCKS_ENABLED(scp) (!((scp)->flags & CM_SCACHEFLAG_RO) && cm_enableServerLocks && SCP_SUPPORTS_BRLOCKS(scp))
! 
! static void cm_LockRangeSubtract(cm_range_t * pos, const cm_range_t * neg)
! {
!     afs_int64 int_begin;
!     afs_int64 int_end;
! 
!     int_begin = MAX(pos->offset, neg->offset);
!     int_end = MIN(pos->offset+pos->length, neg->offset+neg->length);
! 
!     if(int_begin < int_end) {
!         if(int_begin == pos->offset) {
!             pos->length = pos->offset + pos->length - int_end;
!             pos->offset = int_end;
!         } else if(int_end == pos->offset + pos->length) {
!             pos->length = int_begin - pos->offset;
          }
! 
!         /* We only subtract ranges if the resulting range is
!            contiguous.  If we try to support non-contigous ranges, we
!            aren't actually improving performance. */
      }
! }
  
! /* Called with scp->mx held.  Returns 0 if all is clear to read the
!    specified range by the client identified by key.
!  */
! long cm_LockCheckRead(cm_scache_t *scp, 
!                       LARGE_INTEGER LOffset, 
!                       LARGE_INTEGER LLength, 
!                       cm_key_t key)
  {
! #ifndef ADVISORY_LOCKS
! 
      cm_file_lock_t *fileLock;
      osi_queue_t *q;
!     long code = 0;
!     cm_range_t range;
!     int substract_ranges = FALSE;
  
!     range.offset = LOffset.QuadPart;
!     range.length = LLength.QuadPart;
  
!     /*
  
!      1. for all _a_ in (Offset,+Length), all of the following is true:
  
!        1.1 For each ACTIVE lock L in S->fileLocks such that _a_ in
!          (L->LOffset,+L->LLength); L->key == Key(C) OR L->LockType is
!          shared.
! 
!        1.2 For each LOST lock L in S->fileLocks such that _a_ in
!          (L->LOffset,+L->LLength); L->LockType is shared AND L->key !=
!          Key(C)
! 
!     */
! 
!     lock_ObtainRead(&cm_scacheLock);
! 
!     for(q = scp->fileLocksH; q && range.length > 0; q = osi_QNext(q)) {
!         fileLock = 
!             (cm_file_lock_t *)((char *) q - offsetof(cm_file_lock_t, fileq));
! 
!         if (INTERSECT_RANGE(range, fileLock->range)) {
!             if(IS_LOCK_ACTIVE(fileLock)) {
!                 if(fileLock->key == key) {
! 
!                     /* If there is an active lock for this client, it
!                        is safe to substract ranges.*/
!                     cm_LockRangeSubtract(&range, &fileLock->range);
!                     substract_ranges = TRUE;
!                 } else {
!                     if(fileLock->lockType != LockRead) {
!                         code = CM_ERROR_LOCK_CONFLICT;
!                         break;
!                     }
! 
!                     /* even if the entire range is locked for reading,
!                        we still can't grant the lock at this point
!                        because the client may have lost locks. That
!                        is, unless we have already seen an active lock
!                        belonging to the client, in which case there
!                        can't be any lost locks for this client. */
!                     if(substract_ranges)
!                         cm_LockRangeSubtract(&range, &fileLock->range);
!                 }
!             } else if(IS_LOCK_LOST(fileLock) &&
!                       (fileLock->key == key || fileLock->lockType == LockWrite)) {
!                 code = CM_ERROR_BADFD;
!                 break;
              }
          }
      }
  
!     lock_ReleaseRead(&cm_scacheLock);
  
!     osi_Log4(afsd_logp, "cm_LockCheckRead scp 0x%x offset %d length %d code 0x%x",
! 	      scp, (unsigned long)LOffset.QuadPart, (unsigned long)LLength.QuadPart, code);
  
!     return code;
  
! #else
! 
!     return 0;
! 
! #endif
! }
! 
! /* Called with scp->mx held.  Returns 0 if all is clear to write the
!    specified range by the client identified by key.
!  */
! long cm_LockCheckWrite(cm_scache_t *scp,
!                        LARGE_INTEGER LOffset,
!                        LARGE_INTEGER LLength,
!                        cm_key_t key)
! {
! #ifndef ADVISORY_LOCKS
! 
!     cm_file_lock_t *fileLock;
!     osi_queue_t *q;
!     long code = 0;
!     cm_range_t range;
! 
!     range.offset = LOffset.QuadPart;
!     range.length = LLength.QuadPart;
! 
!     /*
!    A client C can WRITE range (Offset,+Length) of cm_scache_t S iff (2):
! 
!    2. for all _a_ in (Offset,+Length), one of the following is true:
! 
!        2.1 Byte _a_ of S is unowned AND there does not exist a LOST
!          lock L such that _a_ in (L->LOffset,+L->LLength).
! 
!        2.2 Byte _a_ of S is owned by C under lock L AND L->LockType is
!          exclusive.
!     */
! 
!     lock_ObtainRead(&cm_scacheLock);
! 
!     for(q = scp->fileLocksH; q && range.length > 0; q = osi_QNext(q)) {
!         fileLock = 
!             (cm_file_lock_t *)((char *) q - offsetof(cm_file_lock_t, fileq));
! 
!         if(INTERSECT_RANGE(range, fileLock->range)) {
!             if(IS_LOCK_ACTIVE(fileLock)) {
!                 if(fileLock->key == key) {
!                     if(fileLock->lockType == LockWrite) {
! 
!                         /* if there is an active lock for this client, it
!                            is safe to substract ranges */
!                         cm_LockRangeSubtract(&range, &fileLock->range);
!                     } else {
!                         code = CM_ERROR_LOCK_CONFLICT;
!                         break;
!                     }
!                 } else {
!                     code = CM_ERROR_LOCK_CONFLICT;
!                     break;
!                 }
!             } else if(IS_LOCK_LOST(fileLock)) {
!                 code = CM_ERROR_BADFD;
!                 break;
!             }
!         }
!     }
! 
!     lock_ReleaseRead(&cm_scacheLock);
! 
!     osi_Log4(afsd_logp, "cm_LockCheckWrite scp 0x%x offset %d length %d code 0x%x",
! 	      scp, (unsigned long)LOffset.QuadPart, (unsigned long)LLength.QuadPart, code);
! 
!     return code;
! 
! #else
! 
!     return 0;
! 
! #endif
! }
! 
! /* Forward dcl. */
! static void cm_LockMarkSCacheLost(cm_scache_t * scp);
! 
! /* Called with cm_scacheLock write locked */
! static cm_file_lock_t * cm_GetFileLock(void) {
!     cm_file_lock_t * l;
! 
!     l = (cm_file_lock_t *) cm_freeFileLocks;
!     if(l) {
!         osi_QRemove(&cm_freeFileLocks, &l->q);
!     } else {
!         l = malloc(sizeof(cm_file_lock_t));
!         osi_assert(l);
!     }
! 
!     memset(l, 0, sizeof(cm_file_lock_t));
! 
!     return l;
! }
! 
! /* Called with cm_scacheLock write locked */
! static void cm_PutFileLock(cm_file_lock_t *l) {
!     osi_QAdd(&cm_freeFileLocks, &l->q);
! }
! 
! /* called with scp->mx held */
! long cm_Lock(cm_scache_t *scp, unsigned char sLockType,
!              LARGE_INTEGER LOffset, LARGE_INTEGER LLength,
!              cm_key_t key,
!              int allowWait, cm_user_t *userp, cm_req_t *reqp,
!              cm_file_lock_t **lockpp)
! {
!     long code = 0;
!     int Which = ((sLockType & LOCKING_ANDX_SHARED_LOCK) ? LockRead : LockWrite);
!     AFSFid tfid;
!     AFSVolSync volSync;
!     cm_conn_t *connp;
!     cm_file_lock_t *fileLock;
!     osi_queue_t *q;
!     struct rx_connection * callp;
!     cm_range_t range;
!     int wait_unlock = FALSE;
! 
!     osi_Log4(afsd_logp, "cm_Lock scp 0x%x type 0x%x offset %d length %d",
!              scp, sLockType, (unsigned long)LOffset.QuadPart, (unsigned long)LLength.QuadPart);
!     osi_Log3(afsd_logp, "... allowWait %d key 0x%x:%x", allowWait, 
!              (unsigned long)(key >> 32), (unsigned long)(key & 0xffffffff));
! 
!     /*
!    A client C can OBTAIN a lock L on cm_scache_t S iff (both 3 and 4):
! 
!    3. for all _a_ in (L->LOffset,+L->LLength), ALL of the following is
!       true:
! 
!        3.1 If L->LockType is exclusive then there does NOT exist a
!          ACCEPTED lock M in S->fileLocks such that _a_ in
!          (M->LOffset,+M->LLength).
! 
!        3.2 If L->LockType is shared then for each ACCEPTED lock M in
!          S->fileLocks, if _a_ in (M->LOffset,+M->LLength) then
!          M->LockType is shared.
! 
!    4. For all LOST locks M in S->fileLocks, ALL of the following are true:
! 
!        4.1 M->key != Key(C)
! 
!        4.2 If M->LockType is exclusive, then (L->LOffset,+L->LLength)
!          and (M->LOffset,+M->LLength) do not intersect.
!     */
! 
!     range.offset = LOffset.QuadPart;
!     range.length = LLength.QuadPart;
! 
!     lock_ObtainRead(&cm_scacheLock);
! 
!     for(q = scp->fileLocksH; q; q = osi_QNext(q)) {
!         fileLock =
!             (cm_file_lock_t *)((char *) q - offsetof(cm_file_lock_t, fileq));
! 
!         if(IS_LOCK_LOST(fileLock)) {
!             if (fileLock->key == key) {
!                 code = CM_ERROR_BADFD;
!                 break;
!             } else if (fileLock->lockType == LockWrite && INTERSECT_RANGE(range, fileLock->range)) {
!                 code = CM_ERROR_WOULDBLOCK;
!                 wait_unlock = TRUE;
!                 break;
!             }
!         }
! 
!         /* we don't need to check for deleted locks here since deleted
!            locks are dequeued from scp->fileLocks */
!         if(IS_LOCK_ACCEPTED(fileLock) &&
!            INTERSECT_RANGE(range, fileLock->range)) {
! 
!             if((sLockType & LOCKING_ANDX_SHARED_LOCK) == 0 ||
!                 fileLock->lockType != LockRead) {
!                 wait_unlock = TRUE;
!                 code = CM_ERROR_WOULDBLOCK;
!                 break;
!             }
!         }
!     }
! 
!     lock_ReleaseRead(&cm_scacheLock);
! 
!     if(code == 0 && SERVERLOCKS_ENABLED(scp)) {
!         if(Which == scp->serverLock ||
!            (Which == LockRead && scp->serverLock == LockWrite)) {
! 
!             /* we already have the lock we need */
!             osi_Log3(afsd_logp, "   we already have the correct lock. exclusives[%d], shared[%d], serverLock[%d]", 
!                      scp->exclusiveLocks, scp->sharedLocks, (int)(signed char) scp->serverLock);
!             code = 0; /* redundant */
! 
!         } else if((scp->exclusiveLocks > 0) ||
!                 (scp->sharedLocks > 0 && scp->serverLock != LockRead)) {
! 
!             /* We are already waiting for some other lock.  We should
!                wait for the daemon to catch up instead of generating a
!                flood of SetLock calls. */
!             osi_Log3(afsd_logp, "   already waiting for other lock. exclusives[%d], shared[%d], serverLock[%d]",
!                      scp->exclusiveLocks, scp->sharedLocks, (int)(signed char) scp->serverLock);
!             code = CM_ERROR_WOULDBLOCK;
! 
!         } else {
!             cm_fid_t cfid;
!             int newLock;
! 
! #ifndef AGGRESSIVE_LOCKS
!             newLock = Which;
! #else
!             newLock = LockWrite;
! #endif
!             if (scp->serverLock == LockRead && newLock == LockWrite) {
!             
!                 /* We want to escalate the lock to a LockWrite.
!                    Unfortunately that's not really possible without
!                    letting go of the current lock.  But for now we do
!                    it anyway. */
! 
!                 osi_Log0(afsd_logp, "   attempting to UPGRADE from LockRead to LockWrite.");
! 
!                 tfid.Volume = scp->fid.volume;
!                 tfid.Vnode = scp->fid.vnode;
!                 tfid.Unique = scp->fid.unique;
!                 cfid = scp->fid;
! 
!                 lock_ReleaseMutex(&scp->mx);
! 
!                 osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
! 
!                 do {
!                     code = cm_Conn(&cfid, userp, reqp, &connp);
!                     if (code) 
!                         break;
! 
!                     callp = cm_GetRxConn(connp);
!                     code = RXAFS_ReleaseLock(callp, &tfid, &volSync);
!                     rx_PutConnection(callp);
! 
!                 } while (cm_Analyze(connp, userp, reqp, &cfid, &volSync,
!                                     NULL, NULL, code));
!                 code = cm_MapRPCError(code, reqp);
! 
!                 if (code)
!                     osi_Log1(afsd_logp, "CALL ReleaseLock FAILURE, code 0x%x", code);
!                 else
!                     osi_Log0(afsd_logp, "CALL ReleaseLock SUCCESS");
!         
!                 lock_ObtainMutex(&scp->mx);
! 
!                 if (code) {
!                     /* We couldn't release the lock */
!                     goto check_code;
!                 } else {
!                     scp->serverLock = -1;
!                 }
!             }
! 
!             /* We need to obtain a server lock of type newLock in order
!                to assert this file lock */
!             tfid.Volume = scp->fid.volume;
!             tfid.Vnode = scp->fid.vnode;
!             tfid.Unique = scp->fid.unique;
!             cfid = scp->fid;
! 
!             osi_Log3(afsd_logp, "CALL SetLock scp 0x%x from %d to %d", (long) scp, (int) scp->serverLock, newLock);
! 
!             lock_ReleaseMutex(&scp->mx);
! 
!             do {
!                 code = cm_Conn(&cfid, userp, reqp, &connp);
!                 if (code) 
!                     break;
! 
!                 callp = cm_GetRxConn(connp);
!                 code = RXAFS_SetLock(callp, &tfid, newLock,
!                                      &volSync);
!                 rx_PutConnection(callp);
! 
!             } while (cm_Analyze(connp, userp, reqp, &cfid, &volSync,
!                                 NULL, NULL, code));
! 
!             code = cm_MapRPCError(code, reqp);
!             
!             if (code) {
!                 osi_Log1(afsd_logp, "CALL SetLock FAILURE, code 0x%x", code);
!             } else {
!                 osi_Log0(afsd_logp, "CALL SetLock SUCCESS");
!             }
! 
!             if (code == CM_ERROR_WOULDBLOCK && newLock != Which) {
!                 /* we wanted LockRead.  We tried LockWrite. Now try LockRead again */
!                 newLock = Which;
! 
!                 /* am I sane? */
!                 osi_assert(newLock == LockRead);
!                 
!                 osi_Log3(afsd_logp, "CALL SetLock AGAIN scp 0x%x from %d to %d", 
!                          (long) scp, (int) scp->serverLock, newLock);
! 
!                 do {
!                     code = cm_Conn(&cfid, userp, reqp, &connp);
!                     if (code) 
!                         break;
! 
!                     callp = cm_GetRxConn(connp);
!                     code = RXAFS_SetLock(callp, &tfid, newLock,
!                                          &volSync);
!                     rx_PutConnection(callp);
! 
!                 } while (cm_Analyze(connp, userp, reqp, &cfid, &volSync,
!                                     NULL, NULL, code));
! 
!                 code = cm_MapRPCError(code, reqp);                
! 
!                 if (code) {
!                     osi_Log1(afsd_logp, "CALL SetLock FAILURE AGAIN, code 0x%x", code);
!                 } else {
!                     osi_Log0(afsd_logp, "CALL SetLock SUCCESS");
!                 }
!             }
! 
!             lock_ObtainMutex(&scp->mx);
! 
!             if(code == 0)
!                 scp->serverLock = newLock;
!             else {
!                 if ((scp->sharedLocks > 0 || scp->exclusiveLocks > 0) &&
!                     scp->serverLock == -1) {
!                     /* Oops. We lost the lock. */
!                     cm_LockMarkSCacheLost(scp);
!                 }
!             }
!         }
!     } else if (code == 0) {     /* server locks not enabled */
!         osi_Log0(afsd_logp,
!                  "  Skipping server lock for scp");
!     }
! 
!  check_code:
! 
!     if (code != 0) {
!         /* Special case error translations
! 
!            Applications don't expect certain errors from a
!            LockFile/UnlockFile call.  We need to translate some error
!            code to codes that apps expect and handle. */
! 
!         /* We shouldn't actually need to handle this case since we
!            simulate locks for RO scps anyway. */
!         if (code == CM_ERROR_READONLY) {
!             osi_Log0(afsd_logp, "   Reinterpreting CM_ERROR_READONLY as CM_ERROR_NOACCESS");
!             code = CM_ERROR_NOACCESS;
!         }
!     }
! 
!     if (code == 0 || (code == CM_ERROR_WOULDBLOCK && allowWait)) {
! 
!         lock_ObtainWrite(&cm_scacheLock);
!         fileLock = cm_GetFileLock();
!         lock_ReleaseWrite(&cm_scacheLock);
! #ifdef DEBUG
!         fileLock->fid = scp->fid;
! #endif
!         fileLock->key = key;
!         fileLock->lockType = Which;
!         cm_HoldUser(userp);
!         fileLock->userp = userp;
!         fileLock->range = range;
!         fileLock->flags = (code == 0 ? 0 : 
!                            ((wait_unlock)?
!                             CM_FILELOCK_FLAG_WAITUNLOCK :
!                             CM_FILELOCK_FLAG_WAITLOCK));
! 
!         if (!SERVERLOCKS_ENABLED(scp))
!             fileLock->flags |= CM_FILELOCK_FLAG_CLIENTONLY;
! 
!         fileLock->lastUpdate = (code == 0) ? time(NULL) : 0;
! 
!         lock_ObtainWrite(&cm_scacheLock);
!         osi_QAddT(&scp->fileLocksH, &scp->fileLocksT, &fileLock->fileq);
!         cm_HoldSCacheNoLock(scp);
!         fileLock->scp = scp;
!         osi_QAdd(&cm_allFileLocks, &fileLock->q);
!         lock_ReleaseWrite(&cm_scacheLock);
! 
!         if (code != 0) {
!             *lockpp = fileLock;
!         }
! 
!         if (IS_LOCK_ACCEPTED(fileLock)) {
!             if(Which == LockRead)
!                 scp->sharedLocks++;
!             else
!                 scp->exclusiveLocks++;
!         }
! 
!         osi_Log2(afsd_logp, "cm_Lock Lock added 0x%x flags 0x%x", (long) fileLock, fileLock->flags);
!         osi_Log4(afsd_logp, "   scp[0x%x] exclusives[%d] shared[%d] serverLock[%d]",
!                  scp, scp->exclusiveLocks, scp->sharedLocks, (int)(signed char) scp->serverLock);
!     }
! 
!     return code;
! }
! 
! static int cm_KeyEquals(cm_key_t k1, cm_key_t k2, int flags);
! 
! /* Called with scp->mx held */
! long cm_UnlockByKey(cm_scache_t * scp,
! 		    cm_key_t key,
! 		    int flags,
! 		    cm_user_t * userp,
! 		     cm_req_t * reqp)
! {
!     long code = 0;
!     AFSFid tfid;
!     AFSVolSync volSync;
!     cm_conn_t *connp;
!     cm_file_lock_t *fileLock;
!     osi_queue_t *q, *qn;
!     struct rx_connection * callp;
!     int n_unlocks = 0;
! 
!     osi_Log4(afsd_logp, "cm_UnlockByKey scp 0x%x key 0x%x:%x flags=0x%x",
!              (long) scp, 
! 	     (unsigned long)(key >> 32), 
! 	     (unsigned long)(key & 0xffffffff),
! 	     flags);
! 
!     lock_ObtainWrite(&cm_scacheLock);
! 
!     for(q = scp->fileLocksH; q; q = qn) {
!         qn = osi_QNext(q);
! 
!         fileLock = (cm_file_lock_t *)
!             ((char *) q - offsetof(cm_file_lock_t, fileq));
! 
! #ifdef DEBUG
!         osi_Log4(afsd_logp, "   Checking lock[0x%x] range[%d,+%d] type[%d]",
!                  fileLock,
!                  (unsigned long) fileLock->range.offset,
!                  (unsigned long) fileLock->range.length,
!                 fileLock->lockType);
!         osi_Log3(afsd_logp, "     key[0x%x:%x] flags[0x%x]",
!                  (unsigned long)(fileLock->key >> 32),
!                  (unsigned long)(fileLock->key & 0xffffffff),
!                  fileLock->flags);
! 
!         if(cm_FidCmp(&fileLock->fid, &fileLock->scp->fid)) {
!             osi_Log0(afsd_logp, "!!fileLock->fid != scp->fid");
!             osi_Log4(afsd_logp, "  fileLock->fid(cell=[%d], volume=[%d], vnode=[%d], unique=[%d]",
!                      fileLock->fid.cell,
!                      fileLock->fid.volume,
!                      fileLock->fid.vnode,
!                      fileLock->fid.unique);
!             osi_Log4(afsd_logp, "  scp->fid(cell=[%d], volume=[%d], vnode=[%d], unique=[%d]",
!                      fileLock->scp->fid.cell,
!                      fileLock->scp->fid.volume,
!                      fileLock->scp->fid.vnode,
!                      fileLock->scp->fid.unique);
!             osi_assert(FALSE);
!         }
! #endif
! 
!         if (!IS_LOCK_DELETED(fileLock) &&
!             cm_KeyEquals(fileLock->key, key, flags)) {
!             osi_Log3(afsd_logp, "...Unlock range [%d,+%d] type %d",
!                     fileLock->range.offset,
!                     fileLock->range.length,
!                     fileLock->lockType);
! 
!             if (scp->fileLocksT == q)
!                 scp->fileLocksT = osi_QPrev(q);
!             osi_QRemove(&scp->fileLocksH,q);
! 
!             if(IS_LOCK_ACCEPTED(fileLock)) {
!                 if(fileLock->lockType == LockRead)
!                     scp->sharedLocks--;
!                 else
!                     scp->exclusiveLocks--;
!             }
! 
!             fileLock->flags |= CM_FILELOCK_FLAG_DELETED;
! 
!             cm_ReleaseUser(fileLock->userp);
!             cm_ReleaseSCacheNoLock(scp);
! 
!             fileLock->userp = NULL;
!             fileLock->scp = NULL;
! 
!             n_unlocks++;
!         }
!     }
! 
!     lock_ReleaseWrite(&cm_scacheLock);
! 
!     if(n_unlocks == 0) {
!         osi_Log0(afsd_logp, "cm_UnlockByKey no locks found");
!         osi_Log3(afsd_logp, "   Leaving scp with exclusives[%d], shared[%d], serverLock[%d]",
!                  scp->exclusiveLocks, scp->sharedLocks, (int)(signed char) scp->serverLock);
!         
!         return 0;
!     }
! 
!     osi_Log1(afsd_logp, "cm_UnlockByKey done with %d locks", n_unlocks);
! 
!     osi_assertx(scp->sharedLocks >= 0, "scp->sharedLocks < 0");
!     osi_assertx(scp->exclusiveLocks >= 0, "scp->exclusiveLocks < 0");
! 
!     if (!SERVERLOCKS_ENABLED(scp)) {
!         osi_Log0(afsd_logp, "  Skipping server lock for scp");
!         goto done;
!     }
! 
!     /* Ideally we would go through the rest of the locks to determine
!      * if one or more locks that were formerly in WAITUNLOCK can now
!      * be put to ACTIVE or WAITLOCK and update scp->exclusiveLocks and
!      * scp->sharedLocks accordingly.  However, the retrying of locks
!      * in that manner is done cm_RetryLock() manually.
!      */
! 
!     if (scp->serverLock == LockWrite && scp->exclusiveLocks == 0 && scp->sharedLocks > 0) {
! 
!         cm_fid_t cfid;
! 
!         /* The serverLock should be downgraded to LockRead */
!         osi_Log0(afsd_logp, "  DOWNGRADE lock from LockWrite to LockRead");
! 
!         tfid.Volume = scp->fid.volume;
!         tfid.Vnode = scp->fid.vnode;
!         tfid.Unique = scp->fid.unique;
!         cfid = scp->fid;
! 
!         lock_ReleaseMutex(&scp->mx);
! 
!         osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
! 
!         do {
!             code = cm_Conn(&cfid, userp, reqp, &connp);
!             if (code) 
!                 break;
! 
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_ReleaseLock(callp, &tfid, &volSync);
!             rx_PutConnection(callp);
!             
!         } while (cm_Analyze(connp, userp, reqp, &cfid, &volSync,
!                             NULL, NULL, code));
!         code = cm_MapRPCError(code, reqp);
! 
!         if (code)
!             osi_Log1(afsd_logp, "CALL ReleaseLock FAILURE, code 0x%x", code);
!         else
!             osi_Log0(afsd_logp, "CALL ReleaseLock SUCCESS");
!         
!         lock_ObtainMutex(&scp->mx);
! 
!         if (code) {
!             /* so we couldn't release it.  Just let the lock be for now */
!             code = 0;
!             goto done;
!         } else {
!             scp->serverLock = -1;
!         }
! 
!         tfid.Volume = scp->fid.volume;
!         tfid.Vnode = scp->fid.vnode;
!         tfid.Unique = scp->fid.unique;
!         cfid = scp->fid;
! 
!         osi_Log3(afsd_logp, "CALL SetLock scp 0x%x from %d to %d", (long) scp, (int) scp->serverLock, LockRead);
! 
!         lock_ReleaseMutex(&scp->mx);
! 
!         do {
! 
!             code = cm_Conn(&cfid, userp, reqp, &connp);
!             if (code) 
!                 break;
! 
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_SetLock(callp, &tfid, LockRead,
!                                  &volSync);
! 
!             rx_PutConnection(callp);
!             
!         } while (cm_Analyze(connp, userp, reqp, &cfid, &volSync,
!                             NULL, NULL, code));
! 
!         if (code)
!             osi_Log1(afsd_logp, "CALL SetLock FAILURE, code 0x%x", code);
!         else {
!             osi_Log0(afsd_logp, "CALL SetLock SUCCESS");
!         }
! 
!         lock_ObtainMutex(&scp->mx);
!         
!         if(code == 0)
!             scp->serverLock = LockRead;
!         else {
!             if ((scp->sharedLocks > 0 || scp->exclusiveLocks > 0) &&
!                 (scp->serverLock == -1)) {
!                 /* Oopsie */
!                 cm_LockMarkSCacheLost(scp);
!             }
!         }
! 
!         /* failure here has no bearing on the return value of
!            cm_Unlock() */
!         code = 0;
! 
!     } else if(scp->serverLock != (-1) && scp->exclusiveLocks == 0 && scp->sharedLocks == 0) {
!         cm_fid_t cfid;
! 
!         /* The serverLock should be released entirely */
! 
!         tfid.Volume = scp->fid.volume;
!         tfid.Vnode = scp->fid.vnode;
!         tfid.Unique = scp->fid.unique;
!         cfid = scp->fid;
! 
!         lock_ReleaseMutex(&scp->mx);
! 
!         osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
! 
!         do {
!             code = cm_Conn(&cfid, userp, reqp, &connp);
!             if (code) 
!                 break;
! 
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_ReleaseLock(callp, &tfid, &volSync);
!             rx_PutConnection(callp);
! 
!         } while (cm_Analyze(connp, userp, reqp, &cfid, &volSync,
!                             NULL, NULL, code));
!         code = cm_MapRPCError(code, reqp);
! 
!         if (code)
!             osi_Log1(afsd_logp, "CALL ReleaseLock FAILURE, code 0x%x", code);
!         else
!             osi_Log0(afsd_logp, "CALL ReleaseLock SUCCESS");
!         
!         lock_ObtainMutex(&scp->mx);
! 
!         if (code == 0)
!             scp->serverLock = (-1);
!     }
! 
!  done:
! 
!     osi_Log1(afsd_logp, "cm_UnlockByKey code 0x%x", code);
!     osi_Log3(afsd_logp, "   Leaving scp with exclusives[%d], shared[%d], serverLock[%d]",
!              scp->exclusiveLocks, scp->sharedLocks, (int)(signed char) scp->serverLock);
! 
!     return code;
! }
! 
! long cm_Unlock(cm_scache_t *scp, 
!                unsigned char sLockType,
!                LARGE_INTEGER LOffset, LARGE_INTEGER LLength,
!                cm_key_t key, 
!                cm_user_t *userp, 
!                cm_req_t *reqp)
! {
!     long code = 0;
!     int Which = ((sLockType & LOCKING_ANDX_SHARED_LOCK) ? LockRead : LockWrite);
!     AFSFid tfid;
!     AFSVolSync volSync;
!     cm_conn_t *connp;
!     cm_file_lock_t *fileLock;
!     osi_queue_t *q;
!     int release_userp = FALSE;
!     struct rx_connection * callp;
! 
!     osi_Log4(afsd_logp, "cm_Unlock scp 0x%x type 0x%x offset %d length %d",
!              (long) scp, sLockType, (unsigned long)LOffset.QuadPart, (unsigned long)LLength.QuadPart);
!     osi_Log2(afsd_logp, "... key 0x%x:%x",
!              (unsigned long) (key >> 32), (unsigned long) (key & 0xffffffff));
! 
!     lock_ObtainRead(&cm_scacheLock);
! 
!     for(q = scp->fileLocksH; q; q = osi_QNext(q)) {
!         fileLock = (cm_file_lock_t *)
!             ((char *) q - offsetof(cm_file_lock_t, fileq));
! 
! #ifdef DEBUG
!         if(cm_FidCmp(&fileLock->fid, &fileLock->scp->fid)) {
!             osi_Log0(afsd_logp, "!!fileLock->fid != scp->fid");
!             osi_Log4(afsd_logp, "  fileLock->fid(cell=[%d], volume=[%d], vnode=[%d], unique=[%d]",
!                      fileLock->fid.cell,
!                      fileLock->fid.volume,
!                      fileLock->fid.vnode,
!                      fileLock->fid.unique);
!             osi_Log4(afsd_logp, "  scp->fid(cell=[%d], volume=[%d], vnode=[%d], unique=[%d]",
!                      fileLock->scp->fid.cell,
!                      fileLock->scp->fid.volume,
!                      fileLock->scp->fid.vnode,
!                      fileLock->scp->fid.unique);
!             osi_assert(FALSE);
!         }
! #endif
!         if (!IS_LOCK_DELETED(fileLock) &&
!             fileLock->key == key &&
!             fileLock->range.offset == LOffset.QuadPart &&
!             fileLock->range.length == LLength.QuadPart) {
!             break;
!         }
!     }
! 
!     if(!q) {
!         osi_Log0(afsd_logp, "cm_Unlock lock not found; failure");
!         
!         lock_ReleaseRead(&cm_scacheLock);
! 
!         /* The lock didn't exist anyway. *shrug* */
!         return 0;
!     }
! 
!     lock_ReleaseRead(&cm_scacheLock);
! 
!     /* discard lock record */
!     lock_ObtainWrite(&cm_scacheLock);
!     if (scp->fileLocksT == q)
!         scp->fileLocksT = osi_QPrev(q);
!     osi_QRemove(&scp->fileLocksH, q);
! 
!     /*
!      * Don't delete it here; let the daemon delete it, to simplify
!      * the daemon's traversal of the list.
!      */
! 
!     if(IS_LOCK_ACCEPTED(fileLock)) {
!         if(fileLock->lockType == LockRead)
!             scp->sharedLocks--;
!         else
!             scp->exclusiveLocks--;
!     }
! 
!     fileLock->flags |= CM_FILELOCK_FLAG_DELETED;
!     if (userp != NULL) {
!         cm_ReleaseUser(fileLock->userp);
!     } else {
!         userp = fileLock->userp;
!         release_userp = TRUE;
!     }
!     fileLock->userp = NULL;
!     cm_ReleaseSCacheNoLock(scp);
!     fileLock->scp = NULL;
!     lock_ReleaseWrite(&cm_scacheLock);
! 
!     if (!SERVERLOCKS_ENABLED(scp)) {
!         osi_Log0(afsd_logp, "   Skipping server locks for scp");
!         goto done;
!     }
! 
!     /* Ideally we would go through the rest of the locks to determine
!      * if one or more locks that were formerly in WAITUNLOCK can now
!      * be put to ACTIVE or WAITLOCK and update scp->exclusiveLocks and
!      * scp->sharedLocks accordingly.  However, the retrying of locks
!      * in that manner is done cm_RetryLock() manually.
!      */
! 
!     if (scp->serverLock == LockWrite && scp->exclusiveLocks == 0 && scp->sharedLocks > 0) {
! 
!         cm_fid_t cfid;
! 
!         /* The serverLock should be downgraded to LockRead */
!         osi_Log0(afsd_logp, "  DOWNGRADE lock from LockWrite to LockRead");
! 
!         tfid.Volume = scp->fid.volume;
!         tfid.Vnode = scp->fid.vnode;
!         tfid.Unique = scp->fid.unique;
!         cfid = scp->fid;
! 
!         lock_ReleaseMutex(&scp->mx);
! 
!         osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
! 
!         do {
!             code = cm_Conn(&cfid, userp, reqp, &connp);
!             if (code) 
!                 break;
! 
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_ReleaseLock(callp, &tfid, &volSync);
!             rx_PutConnection(callp);
!             
!         } while (cm_Analyze(connp, userp, reqp, &cfid, &volSync,
!                             NULL, NULL, code));
! 
!         code = cm_MapRPCError(code, reqp);
! 
!         if (code)
!             osi_Log1(afsd_logp, "CALL ReleaseLock FAILURE, code 0x%x", code);
!         else
!             osi_Log0(afsd_logp, "CALL ReleaseLock SUCCESS");
!         
!         lock_ObtainMutex(&scp->mx);
! 
!         if (code) {
!             /* so we couldn't release it.  Just let the lock be for now */
!             code = 0;
!             goto done;
!         } else {
!             scp->serverLock = -1;
!         }
! 
!         tfid.Volume = scp->fid.volume;
!         tfid.Vnode = scp->fid.vnode;
!         tfid.Unique = scp->fid.unique;
!         cfid = scp->fid;
! 
!         osi_Log3(afsd_logp, "CALL SetLock scp 0x%x from %d to %d", (long) scp, (int) scp->serverLock, LockRead);
! 
!         lock_ReleaseMutex(&scp->mx);
! 
!         do {
! 
!             code = cm_Conn(&cfid, userp, reqp, &connp);
!             if (code) 
!                 break;
! 
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_SetLock(callp, &tfid, LockRead,
!                                  &volSync);
! 
!             rx_PutConnection(callp);
!             
!         } while (cm_Analyze(connp, userp, reqp, &cfid, &volSync,
!                             NULL, NULL, code));
! 
!         if (code)
!             osi_Log1(afsd_logp, "CALL SetLock FAILURE, code 0x%x", code);
!         else {
!             osi_Log0(afsd_logp, "CALL SetLock SUCCESS");
!         }
! 
!         lock_ObtainMutex(&scp->mx);
!         
!         if(code == 0)
!             scp->serverLock = LockRead;
!         else {
!             if ((scp->sharedLocks > 0 || scp->exclusiveLocks > 0) &&
!                 (scp->serverLock == -1)) {
!                 /* Oopsie */
!                 cm_LockMarkSCacheLost(scp);
!             }
!         }
! 
!         /* failure here has no bearing on the return value of
!            cm_Unlock() */
!         code = 0;
! 
!     } else if(scp->serverLock != (-1) && scp->exclusiveLocks == 0 && scp->sharedLocks == 0) {
!         cm_fid_t cfid;
! 
!         /* The serverLock should be released entirely */
! 
!         tfid.Volume = scp->fid.volume;
!         tfid.Vnode = scp->fid.vnode;
!         tfid.Unique = scp->fid.unique;
!         cfid = scp->fid;
! 
!         lock_ReleaseMutex(&scp->mx);
! 
!         osi_Log1(afsd_logp, "CALL ReleaseLock scp 0x%x", (long) scp);
! 
!         do {
!             code = cm_Conn(&cfid, userp, reqp, &connp);
!             if (code) 
!                 break;
! 
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_ReleaseLock(callp, &tfid, &volSync);
!             rx_PutConnection(callp);
! 
!         } while (cm_Analyze(connp, userp, reqp, &cfid, &volSync,
!                             NULL, NULL, code));
!         code = cm_MapRPCError(code, reqp);
! 
!         if (code)
!             osi_Log1(afsd_logp, "CALL ReleaseLock FAILURE, code 0x%x", code);
!         else
!             osi_Log0(afsd_logp, "CALL ReleaseLock SUCCESS");
!         
!         lock_ObtainMutex(&scp->mx);
! 
!         if (code == 0) {
!             scp->serverLock = (-1);
!         }
!     }
! 
!     if (release_userp)
!         cm_ReleaseUser(userp);
! 
!  done:
! 
!     osi_Log4(afsd_logp, "cm_Unlock code 0x%x leaving scp with exclusives[%d], shared[%d], serverLock[%d]",
!              code, scp->exclusiveLocks, scp->sharedLocks, (int)(signed char) scp->serverLock);
! 
!     return code;
! }
! 
! /* called with scp->mx held */
! static void cm_LockMarkSCacheLost(cm_scache_t * scp)
! {
!     cm_file_lock_t *fileLock;
!     osi_queue_t *q;
! 
!     osi_Log1(afsd_logp, "cm_LockMarkSCacheLost scp 0x%x", scp);
! 
! #ifdef DEBUG
!     /* With the current code, we can't lose a lock on a RO scp */
!     osi_assert(!(scp->flags & CM_SCACHEFLAG_RO));
! #endif
! 
!     /* cm_scacheLock needed because we are modifying fileLock->flags */
!     lock_ObtainWrite(&cm_scacheLock);
! 
!     for(q = scp->fileLocksH; q; q = osi_QNext(q)) {
!         fileLock = 
!             (cm_file_lock_t *)((char *) q - offsetof(cm_file_lock_t, fileq));
! 
!         if(IS_LOCK_ACTIVE(fileLock)) {
!             if (fileLock->lockType == LockRead)
!                 scp->sharedLocks--;
!             else
!                 scp->exclusiveLocks--;
! 
!             fileLock->flags |= CM_FILELOCK_FLAG_LOST;
!         }
!     }
! 
!     scp->serverLock = -1;
!     lock_ReleaseWrite(&cm_scacheLock);
! }
! 
! /* Called with no relevant locks held */
! void cm_CheckLocks()
! {
!     osi_queue_t *q, *nq;
!     cm_file_lock_t *fileLock;
!     cm_req_t req;
!     AFSFid tfid;
!     AFSVolSync volSync;
!     cm_conn_t *connp;
!     long code;
!     struct rx_connection * callp;
!     cm_scache_t * scp;
! 
!     cm_InitReq(&req);
! 
!     lock_ObtainWrite(&cm_scacheLock);
! 
!     cm_lockRefreshCycle++;
! 
!     osi_Log1(afsd_logp, "cm_CheckLocks starting lock check cycle %d", cm_lockRefreshCycle);
! 
!     for(q = cm_allFileLocks; q; q = nq) {
!         fileLock = (cm_file_lock_t *) q;
!         nq = osi_QNext(q);
! 	code = -1;
! 
!         if (IS_LOCK_DELETED(fileLock)) {
! 
!             osi_QRemove(&cm_allFileLocks, q);
!             cm_PutFileLock(fileLock);
! 
!         } else if (IS_LOCK_ACTIVE(fileLock) && !IS_LOCK_CLIENTONLY(fileLock)) {
! 
!             /* Server locks must have been enabled for us to have
!                received an active non-client-only lock. */
!             osi_assert(cm_enableServerLocks);
! 
!             scp = fileLock->scp;
!             osi_assert(scp != NULL);
! 
!             cm_HoldSCacheNoLock(scp);
! 
! #ifdef DEBUG
!             if(cm_FidCmp(&fileLock->fid, &fileLock->scp->fid)) {
!                 osi_Log0(afsd_logp, "!!fileLock->fid != scp->fid");
!                 osi_Log4(afsd_logp, "  fileLock->fid(cell=[%d], volume=[%d], vnode=[%d], unique=[%d]",
!                          fileLock->fid.cell,
!                          fileLock->fid.volume,
!                          fileLock->fid.vnode,
!                          fileLock->fid.unique);
!                 osi_Log4(afsd_logp, "  scp->fid(cell=[%d], volume=[%d], vnode=[%d], unique=[%d]",
!                          fileLock->scp->fid.cell,
!                          fileLock->scp->fid.volume,
!                          fileLock->scp->fid.vnode,
!                          fileLock->scp->fid.unique);
!                 osi_assert(FALSE);
!             }
! #endif
!             /* Server locks are extended once per scp per refresh
!                cycle. */
!             if (scp->lastRefreshCycle != cm_lockRefreshCycle) {
! 
!                 int scp_done = FALSE;
! 
!                 osi_Log1(afsd_logp, "cm_CheckLocks Updating scp 0x%x", scp);
! 
!                 lock_ReleaseWrite(&cm_scacheLock);
!                 lock_ObtainMutex(&scp->mx);
! 
!                 /* did the lock change while we weren't holding the lock? */
!                 if (!IS_LOCK_ACTIVE(fileLock))
!                     goto post_syncopdone;
! 
!                 code = cm_SyncOp(scp, NULL, fileLock->userp, &req, 0,
!                                  CM_SCACHESYNC_NEEDCALLBACK
!                                  | CM_SCACHESYNC_GETSTATUS
!                                  | CM_SCACHESYNC_LOCK);
! 
!                 if (code) {
!                     osi_Log1(smb_logp, "cm_CheckLocks SyncOp failure code 0x%x", code);
!                     goto post_syncopdone;
!                 }
! 
!                 /* cm_SyncOp releases scp->mx during which the lock
!                    may get released. */
!                 if (!IS_LOCK_ACTIVE(fileLock))
!                     goto pre_syncopdone;
! 
!                 if(scp->serverLock != -1) {
!                     cm_fid_t cfid;
!                     cm_user_t * userp;
! 
!                     tfid.Volume = scp->fid.volume;
!                     tfid.Vnode = scp->fid.vnode;
!                     tfid.Unique = scp->fid.unique;
!                     cfid = scp->fid;
!                     userp = fileLock->userp;
!                     
!                     osi_Log3(afsd_logp, "CALL ExtendLock lock 0x%x for scp=0x%x with lock %d", 
!                              (long) fileLock,
!                              (long) scp,
!                              (int) scp->serverLock);
! 
!                     lock_ReleaseMutex(&scp->mx);
! 
!                     do {
!                         code = cm_Conn(&cfid, userp,
!                                        &req, &connp);
!                         if (code) 
!                             break;
! 
!                         callp = cm_GetRxConn(connp);
!                         code = RXAFS_ExtendLock(callp, &tfid,
!                                                 &volSync);
!                         rx_PutConnection(callp);
! 
!                         osi_Log1(afsd_logp, "   ExtendLock returns %d", code);
! 
!                     } while (cm_Analyze(connp, userp, &req,
!                                         &cfid, &volSync, NULL, NULL,
!                                         code));
! 
!                     code = cm_MapRPCError(code, &req);
! 
!                     lock_ObtainMutex(&scp->mx);
! 
!                     if (code) {
!                         osi_Log1(afsd_logp, "CALL ExtendLock FAILURE, code 0x%x", code);
! 			if (code == EINVAL || code == CM_ERROR_INVAL)
! 			    cm_LockMarkSCacheLost(scp);
!                     } else {
!                         osi_Log0(afsd_logp, "CALL ExtendLock SUCCESS");
!                     }
!                 } else {
!                     /* interestingly, we have found an active lock
!                        belonging to an scache that has no
!                        serverLock */
!                     cm_LockMarkSCacheLost(scp);
!                 }
! 
!                 scp_done = TRUE;
! 
!             pre_syncopdone:
! 
!                 cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_LOCK);
! 
!             post_syncopdone:
!                 lock_ReleaseMutex(&scp->mx);
! 
!                 lock_ObtainWrite(&cm_scacheLock);
! 
!                 if (code == 0) {
!                     fileLock->lastUpdate = time(NULL);
!                 }
!                 
!                 if (scp_done)
!                     scp->lastRefreshCycle = cm_lockRefreshCycle;
! 
!             } else {
!                 /* we have already refreshed the locks on this scp */
!                 fileLock->lastUpdate = time(NULL);
!             }
! 
!             cm_ReleaseSCacheNoLock(scp);
! 
!         } else if (IS_LOCK_ACTIVE(fileLock) && IS_LOCK_CLIENTONLY(fileLock)) {
!             /* TODO: Check callbacks */
!         }
!     }
! 
!     lock_ReleaseWrite(&cm_scacheLock);
!     osi_Log1(afsd_logp, "cm_CheckLocks completes lock check cycle %d", cm_lockRefreshCycle);
! }
! 
! /* NOT called with scp->mx held. */
! long cm_RetryLock(cm_file_lock_t *oldFileLock, int client_is_dead)
! {
!     long code = 0;
!     cm_scache_t *scp = NULL;
!     AFSFid tfid;
!     AFSVolSync volSync;
!     cm_conn_t *connp;
!     cm_file_lock_t *fileLock;
!     osi_queue_t *q;
!     cm_req_t req;
!     struct rx_connection * callp;
!     int newLock = -1;
! 
!     cm_InitReq(&req);
! 
!     if (client_is_dead) {
!         code = CM_ERROR_TIMEDOUT;
!         goto updateLock;
!     }
! 
!     lock_ObtainRead(&cm_scacheLock);
! 
!     osi_Log2(afsd_logp, "cm_RetryLock checking lock %p (scp=%p)", oldFileLock, oldFileLock->scp);
!     osi_Log4(afsd_logp, "    offset(%x:%x) length(%x:%x)",
!              (unsigned)(oldFileLock->range.offset >> 32),
!              (unsigned)(oldFileLock->range.offset & 0xffffffff),
!              (unsigned)(oldFileLock->range.length >> 32),
!              (unsigned)(oldFileLock->range.length & 0xffffffff));
!     osi_Log3(afsd_logp, "    key(%x:%x) flags=%x",
!              (unsigned)(oldFileLock->key >> 32),
!              (unsigned)(oldFileLock->key & 0xffffffff),
!              (unsigned)(oldFileLock->flags));
! 
!     /* if the lock has already been granted, then we have nothing to do */
!     if(IS_LOCK_ACTIVE(oldFileLock)) {
!         lock_ReleaseRead(&cm_scacheLock);
!         osi_Log0(afsd_logp, "cm_RetryLock lock already granted");
!         return 0;
!     }
! 
!     /* we can't do anything with lost or deleted locks at the moment. */
!     if(IS_LOCK_LOST(oldFileLock) || IS_LOCK_DELETED(oldFileLock)) {
!         code = CM_ERROR_BADFD;
!         osi_Log0(afsd_logp, "cm_RetryLock lock is lost or deleted");
!         lock_ReleaseRead(&cm_scacheLock);
!         goto updateLock;
!     }
! 
!     scp = oldFileLock->scp;
! 
!     osi_assert(scp != NULL);
! 
!     lock_ReleaseRead(&cm_scacheLock);
!     lock_ObtainMutex(&scp->mx);
!     lock_ObtainWrite(&cm_scacheLock);
! 
!     /* Check if we already have a sufficient server lock to allow this
!        lock to go through */
!     if(IS_LOCK_WAITLOCK(oldFileLock) &&
!        (!SERVERLOCKS_ENABLED(scp) ||
!         scp->serverLock == oldFileLock->lockType ||
!         scp->serverLock == LockWrite)) {
! 
!         oldFileLock->flags &= ~CM_FILELOCK_FLAG_WAITLOCK;
! 
!         if (SERVERLOCKS_ENABLED(scp)) {
!             osi_Log1(afsd_logp, "cm_RetryLock Server lock (%d) is sufficient for lock.  Granting",
!                      (int) scp->serverLock);
!         } else {
!             osi_Log0(afsd_logp, "cm_RetryLock skipping server lock for scp");
!         }
! 
!         lock_ReleaseWrite(&cm_scacheLock);
!         lock_ReleaseMutex(&scp->mx);
! 
!         return 0;
!     }
! 
!     if(IS_LOCK_WAITUNLOCK(oldFileLock)) {
! 
!         /* check if the conflicting locks have dissappeared already */
!         for(q = scp->fileLocksH; q; q = osi_QNext(q)) {
! 
!             fileLock = (cm_file_lock_t *)
!                 ((char *) q - offsetof(cm_file_lock_t, fileq));
! 
!             if(IS_LOCK_LOST(fileLock)) {
!                 if (fileLock->key == oldFileLock->key) {
!                     code = CM_ERROR_BADFD;
!                     oldFileLock->flags |= CM_FILELOCK_FLAG_LOST;
!                     osi_Log1(afsd_logp, "    found lost lock %p for same key.  Marking lock as lost",
!                              fileLock);
!                     break;
!                 } else if (fileLock->lockType == LockWrite &&
!                            INTERSECT_RANGE(oldFileLock->range, fileLock->range)) {
!                     osi_Log1(afsd_logp, "    found conflicting LOST lock %p", fileLock);
!                     code = CM_ERROR_WOULDBLOCK;
!                     break;
!                 }
!             }
! 
!             if(IS_LOCK_ACCEPTED(fileLock) &&
!                INTERSECT_RANGE(oldFileLock->range, fileLock->range)) {
! 
!                 if(oldFileLock->lockType != LockRead ||
!                    fileLock->lockType != LockRead) {
! 
!                     osi_Log1(afsd_logp, "    found conflicting lock %p", fileLock);
!                     code = CM_ERROR_WOULDBLOCK;
!                     break;
!                 }
!             }
!         }
!     }
! 
!     if (code != 0) {
!         lock_ReleaseWrite(&cm_scacheLock);
!         lock_ReleaseMutex(&scp->mx);
! 
!         goto handleCode;
!     }
! 
!     /* when we get here, the lock is either a WAITUNLOCK or WAITLOCK.
!        If it is WAITUNLOCK, then we didn't find any conflicting lock
!        but we haven't verfied whether the serverLock is sufficient to
!        assert it.  If it is WAITLOCK, then the serverLock is
!        insufficient to assert it. Eitherway, we are ready to accept
!        the lock as either ACTIVE or WAITLOCK depending on the
!        serverLock. */
! 
!     /* First, promote the WAITUNLOCK to a WAITLOCK */
!     if (IS_LOCK_WAITUNLOCK(oldFileLock)) {
!         if (oldFileLock->lockType == LockRead)
!             scp->sharedLocks++;
!         else
!             scp->exclusiveLocks++;
! 
!         oldFileLock->flags &= ~CM_FILELOCK_FLAG_WAITUNLOCK;
!         oldFileLock->flags |= CM_FILELOCK_FLAG_WAITLOCK;
!     }
! 
!     if (!SERVERLOCKS_ENABLED(scp) ||
!         scp->serverLock == oldFileLock->lockType ||
!         (oldFileLock->lockType == LockRead &&
!          scp->serverLock == LockWrite)) {
! 
!         oldFileLock->flags &= ~CM_FILELOCK_FLAG_WAITLOCK;
! 
!         lock_ReleaseWrite(&cm_scacheLock);
!         lock_ReleaseMutex(&scp->mx);
! 
!         return 0;
! 
!     } else {
!         cm_fid_t cfid;
!         cm_user_t * userp;
! 
!         code = cm_SyncOp(scp, NULL, oldFileLock->userp, &req, 0,
!                          CM_SCACHESYNC_NEEDCALLBACK
! 			 | CM_SCACHESYNC_GETSTATUS
! 			 | CM_SCACHESYNC_LOCK);
!         if (code) {
!             osi_Log1(smb_logp, "cm_RetryLock SyncOp failure code 0x%x", code);
!             lock_ReleaseWrite(&cm_scacheLock);
!             goto post_syncopdone;
!         }
! 
!         if(!IS_LOCK_WAITLOCK(oldFileLock))
!             goto pre_syncopdone;
! 
!         tfid.Volume = scp->fid.volume;
!         tfid.Vnode = scp->fid.vnode;
!         tfid.Unique = scp->fid.unique;
!         cfid = scp->fid;
!         userp = oldFileLock->userp;
! 
! #ifndef AGGRESSIVE_LOCKS
!         newLock = oldFileLock->lockType;
! #else
!         newLock = LockWrite;
! #endif
! 
!         osi_Log1(afsd_logp, "CALL SetLock lock 0x%x", (long) oldFileLock);
! 
!         lock_ReleaseWrite(&cm_scacheLock);
!         lock_ReleaseMutex(&scp->mx);
! 
!         do {
!             code = cm_Conn(&cfid, userp, &req, &connp);
!             if (code) 
!                 break;
! 
!             callp = cm_GetRxConn(connp);
!             code = RXAFS_SetLock(callp, &tfid, newLock,
!                                   &volSync);
!             rx_PutConnection(callp);
! 
!         } while (cm_Analyze(connp, userp, &req,
!                              &cfid, &volSync,
!                              NULL, NULL, code));
!         code = cm_MapRPCError(code, &req);
! 
!         if (code) {
!             osi_Log1(afsd_logp, "CALL SetLock FAILURE, code 0x%x", code);
!         } else {
!             osi_Log0(afsd_logp, "CALL SetLock SUCCESS");
!         }
! 
!         lock_ObtainMutex(&scp->mx);
!     pre_syncopdone:
!         cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_LOCK);
!     post_syncopdone:
!         ;
      }
  
    handleCode:
      if (code != 0 && code != CM_ERROR_WOULDBLOCK) {
! 	lock_ObtainWrite(&cm_scacheLock);
!         if (scp->fileLocksT == &oldFileLock->fileq)
!             scp->fileLocksT = osi_QPrev(&oldFileLock->fileq);
!         osi_QRemove(&scp->fileLocksH, &oldFileLock->fileq);
! 	lock_ReleaseWrite(&cm_scacheLock);
!     } else if (code == 0 && IS_LOCK_WAITLOCK(oldFileLock)) {
!         scp->serverLock = newLock;
      }
+     lock_ReleaseMutex(&scp->mx);
+ 
+   updateLock:
      lock_ObtainWrite(&cm_scacheLock);
!     if (code == 0) {
!         oldFileLock->flags &= ~CM_FILELOCK_FLAG_WAITLOCK;
!     } else if (code != CM_ERROR_WOULDBLOCK) {
!         oldFileLock->flags |= CM_FILELOCK_FLAG_DELETED;
          cm_ReleaseUser(oldFileLock->userp);
          oldFileLock->userp = NULL;
+         if (oldFileLock->scp) {
+             cm_ReleaseSCacheNoLock(oldFileLock->scp);
+             oldFileLock->scp = NULL;
+         }
      }
      lock_ReleaseWrite(&cm_scacheLock);
  
      return code;
  }
+ 
+ cm_key_t cm_GenerateKey(unsigned int session_id, unsigned long process_id, unsigned int file_id)
+ {
+ #ifdef DEBUG
+     osi_assert((process_id & 0xffffffff) == process_id);
+     osi_assert((session_id & 0xffff) == session_id);
+     osi_assert((file_id & 0xffff) == file_id);
+ #endif
+ 
+     return 
+         (((cm_key_t) (process_id & 0xffffffff)) << 32) |
+         (((cm_key_t) (session_id & 0xffff)) << 16) |
+         (((cm_key_t) (file_id & 0xffff)));
+ }
+ 
+ static int cm_KeyEquals(cm_key_t k1, cm_key_t k2, int flags)
+ {
+     if (flags & CM_UNLOCK_BY_FID) {
+         return ((k1 & 0xffffffff) == (k2 & 0xffffffff));
+     } else {
+         return (k1 == k2);
+     }
+ }
+ 
+ void cm_ReleaseAllLocks(void)
+ {
+     cm_scache_t *scp;
+     cm_req_t req;
+     cm_user_t *userp;
+     cm_key_t   key;
+     cm_file_lock_t *fileLock;
+     int i;
+ 
+     for (i = 0; i < cm_data.hashTableSize; i++)
+     {
+ 	for ( scp = cm_data.hashTablep[i]; scp; scp = scp->nextp ) {
+ 	    while (scp->fileLocksH != NULL) {
+ 		lock_ObtainMutex(&scp->mx);
+ 		lock_ObtainWrite(&cm_scacheLock);
+ 		if (!scp->fileLocksH) {
+ 		    lock_ReleaseWrite(&cm_scacheLock);
+ 		    lock_ReleaseMutex(&scp->mx);
+ 		    break;
+ 		}
+ 		fileLock = (cm_file_lock_t *)((char *) scp->fileLocksH - offsetof(cm_file_lock_t, fileq));
+ 		userp = fileLock->userp;
+ 		cm_HoldUser(userp);
+ 		key = fileLock->key;
+ 		cm_HoldSCacheNoLock(scp);
+ 		lock_ReleaseWrite(&cm_scacheLock);
+ 		cm_UnlockByKey(scp, key, 0, userp, &req);
+ 		cm_ReleaseSCache(scp);
+ 		cm_ReleaseUser(userp);
+ 		lock_ReleaseMutex(&scp->mx);
+ 	    }
+ 	}
+     }
+ }
Index: openafs/src/WINNT/afsd/cm_vnodeops.h
diff -c openafs/src/WINNT/afsd/cm_vnodeops.h:1.5.2.5 openafs/src/WINNT/afsd/cm_vnodeops.h:1.5.2.8
*** openafs/src/WINNT/afsd/cm_vnodeops.h:1.5.2.5	Fri Mar 11 01:58:43 2005
--- openafs/src/WINNT/afsd/cm_vnodeops.h	Sun Jan  8 23:49:17 2006
***************
*** 12,17 ****
--- 12,19 ----
  
  extern unsigned int cm_mountRootGen;
  
+ extern int cm_enableServerLocks;
+ 
  /* parms for attribute setting call */
  typedef struct cm_attr {
  	int mask;
***************
*** 145,162 ****
  extern long cm_EvaluateSymLink(cm_scache_t *dscp, cm_scache_t *linkScp,
  	cm_scache_t **outScpp, cm_user_t *userp, cm_req_t *reqp);
  
! extern long cm_Lock(cm_scache_t *scp, unsigned char LockType,
! 	LARGE_INTEGER LOffset, LARGE_INTEGER LLength,
! 	u_long Timeout, cm_user_t *userp, cm_req_t *reqp,
! 	void **lockpp);
  
! extern long cm_Unlock(cm_scache_t *scp, unsigned char LockType,
! 	LARGE_INTEGER LOffset, LARGE_INTEGER LLength,
  	cm_user_t *userp, cm_req_t *reqp);
  
! extern void cm_CheckLocks();
  
! extern long cm_RetryLock(cm_file_lock_t *oldFileLock, int vcp_is_dead);
  
  #define MAX_SYMLINK_COUNT 16
  #endif /*  __CM_VNODEOPS_H_ENV__ */
--- 147,191 ----
  extern long cm_EvaluateSymLink(cm_scache_t *dscp, cm_scache_t *linkScp,
  	cm_scache_t **outScpp, cm_user_t *userp, cm_req_t *reqp);
  
! extern long cm_Lock(cm_scache_t *scp, unsigned char sLockType,
!         LARGE_INTEGER LOffset, LARGE_INTEGER LLength, cm_key_t key,
! 	int allowWait, cm_user_t *userp, cm_req_t *reqp,
! 	cm_file_lock_t **lockpp);
! 
! #define CM_UNLOCK_BY_FID 	0x0001
! 
! extern long cm_UnlockByKey(cm_scache_t * scp,
!         cm_key_t key,
!         int flags,
!         cm_user_t * userp,
!         cm_req_t * reqp);
  
! extern long cm_Unlock(cm_scache_t *scp, unsigned char sLockType,
!         LARGE_INTEGER LOffset, LARGE_INTEGER LLength, cm_key_t key,
  	cm_user_t *userp, cm_req_t *reqp);
  
! extern long cm_LockCheckRead(cm_scache_t *scp, 
!         LARGE_INTEGER LOffset, 
!         LARGE_INTEGER LLength, 
!         cm_key_t key);
! 
! extern long cm_LockCheckWrite(cm_scache_t *scp,
!         LARGE_INTEGER LOffset,
!         LARGE_INTEGER LLength,
!         cm_key_t key);
! 
! extern void cm_CheckLocks(void);
! 
! extern void cm_ReleaseAllLocks(void);
! 
! extern long cm_RetryLock(cm_file_lock_t *oldFileLock, int client_is_dead);
! 
! #define CM_SESSION_SMB      0xffff
! #define CM_SESSION_IFS      0xfffe
! #define CM_SESSION_CMINT    0xfffd
! #define CM_SESSION_RESERVED 0xfff0
  
! extern cm_key_t cm_GenerateKey(unsigned int session, unsigned long process_id, unsigned int file_id);
  
  #define MAX_SYMLINK_COUNT 16
  #endif /*  __CM_VNODEOPS_H_ENV__ */
Index: openafs/src/WINNT/afsd/cmdebug.c
diff -c openafs/src/WINNT/afsd/cmdebug.c:1.1.2.2 openafs/src/WINNT/afsd/cmdebug.c:removed
*** openafs/src/WINNT/afsd/cmdebug.c:1.1.2.2	Fri Jul 15 08:18:30 2005
--- openafs/src/WINNT/afsd/cmdebug.c	Fri Apr 14 09:27:22 2006
***************
*** 1,560 ****
- /*
-  * 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/WINNT/afsd/Attic/cmdebug.c,v 1.1.2.2 2005/07/15 12:18:30 jaltman Exp $");
- 
- 
- #include <sys/types.h>
- #ifdef AFS_NT40_ENV
- #include <winsock2.h>
- #include <rpc.h>
- #else
- #ifdef HAVE_NETINET_IN_H
- #include <netinet/in.h>
- #endif
- #include <sys/socket.h>
- #include <netdb.h>
- #endif
- #include <stdio.h>
- #ifdef HAVE_STRING_H
- #include <string.h>
- #else
- #ifdef HAVE_STRINGS_H
- #include <strings.h>
- #endif
- #endif
- #ifdef	AFS_AIX32_ENV
- #include <signal.h>
- #endif
- #include <afs/afscbint.h>
- #include <afs/cmd.h>
- #include <rx/rx.h>
- #include <lock.h>
- #include <afs/afs_args.h>
- 
- extern struct hostent *hostutil_GetHostByName();
- 
- static int
- PrintCacheConfig(struct rx_connection *aconn)
- {
-     struct cacheConfig c;
-     afs_uint32 srv_ver, conflen;
-     int code;
- 
-     c.cacheConfig_len = 0;
-     c.cacheConfig_val = NULL;
-     code = RXAFSCB_GetCacheConfig(aconn, 1, &srv_ver, &conflen, &c);
-     if (code) {
- 	printf("cmdebug: error checking cache config: %s\n",
- 	       error_message(code));
- 	return 0;
-     }
- 
-     if (srv_ver == AFS_CLIENT_RETRIEVAL_FIRST_EDITION) {
- 	struct cm_initparams_v1 *c1;
- 
- 	if (c.cacheConfig_len != sizeof(*c1) / sizeof(afs_uint32)) {
- 	    printf("cmdebug: configuration data size mismatch (%d != %d)\n",
- 		   c.cacheConfig_len, sizeof(*c1) / sizeof(afs_uint32));
- 	    return 0;
- 	}
- 
- 	c1 = (struct cm_initparams_v1 *)c.cacheConfig_val;
- 	printf("Chunk files:   %d\n", c1->nChunkFiles);
- 	printf("Stat caches:   %d\n", c1->nStatCaches);
- 	printf("Data caches:   %d\n", c1->nDataCaches);
- 	printf("Volume caches: %d\n", c1->nVolumeCaches);
- 	printf("Chunk size:    %d", c1->otherChunkSize);
- 	if (c1->firstChunkSize != c1->otherChunkSize)
- 	    printf(" (first: %d)", c1->firstChunkSize);
- 	printf("\n");
- 	printf("Cache size:    %d kB\n", c1->cacheSize);
- 	printf("Set time:      %s\n", c1->setTime ? "yes" : "no");
- 	printf("Cache type:    %s\n", c1->memCache ? "memory" : "disk");
-     } else {
- 	printf("cmdebug: unsupported server version %d\n", srv_ver);
-     }
- }
- 
- #ifndef CAPABILITY_BITS
- #define CAPABILITY_ERRORTRANS (1<<0)
- #define CAPABILITY_BITS 1
- #endif
- 
- static int
- PrintInterfaces(struct rx_connection *aconn)
- {
-     Capabilities caps;
-     struct interfaceAddr addr;
-     char * p;
-     int i, code;
- 
-     caps.Capabilities_val = NULL;
-     caps.Capabilities_len = 0;
- 
-     code = RXAFSCB_TellMeAboutYourself(aconn, &addr, &caps);
-     if (code == RXGEN_OPCODE)
-         code = RXAFSCB_WhoAreYou(aconn, &addr);
-     if (code) {
- 	printf("cmdebug: error checking interfaces: %s\n",
- 	       error_message(code));
- 	return 0;
-     }
- 
-     UuidToString((UUID *)&addr.uuid, &p);
-     printf("UUID: %s\n",p);
-     RpcStringFree(&p);
- 
-     printf("Host interfaces:\n");
-     for (i = 0; i < addr.numberOfInterfaces; i++) {
- 	printf("%s", afs_inet_ntoa(htonl(addr.addr_in[i])));
- 	if (addr.subnetmask[i])
- 	    printf(", netmask %s", afs_inet_ntoa(htonl(addr.subnetmask[i])));
- 	if (addr.mtu[i])
- 	    printf(", MTU %d", addr.mtu[i]);
- 	printf("\n");
-     }
- 
-     if (caps.Capabilities_val) {
-         printf("Capabilities:\n");
-         if (caps.Capabilities_val[0] & CAPABILITY_ERRORTRANS) {
-             printf("Error Translation\n");  
-         }
-         printf("\n");
-     }
- 
-     if (caps.Capabilities_val)
- 	free(caps.Capabilities_val);
-     caps.Capabilities_val = NULL;
-     caps.Capabilities_len = 0;
- 
-     return 0;
- }
- 
- static int
- IsLocked(register struct AFSDBLockDesc *alock)
- {
-     if (alock->waitStates || alock->exclLocked || alock->numWaiting
- 	|| alock->readersReading)
- 	return 1;
-     return 0;
- }
- 
- static int
- PrintLock(register struct AFSDBLockDesc *alock)
- {
-     printf("(");
-     if (alock->waitStates) {
- 	if (alock->waitStates & READ_LOCK)
- 	    printf("reader_waiting");
- 	if (alock->waitStates & WRITE_LOCK)
- 	    printf("writer_waiting");
- 	if (alock->waitStates & SHARED_LOCK)
- 	    printf("upgrade_waiting");
-     } else
- 	printf("none_waiting");
-     if (alock->exclLocked) {
- 	if (alock->exclLocked & WRITE_LOCK)
- 	    printf(", write_locked");
- 	if (alock->exclLocked & SHARED_LOCK)
- 	    printf(", upgrade_locked");
- 	printf("(pid:%d at:%d)", alock->pid_writer, alock->src_indicator);
-     }
-     if (alock->readersReading)
- 	printf(", %d read_locks(pid:%d)", alock->readersReading,
- 	       alock->pid_last_reader);
-     if (alock->numWaiting)
- 	printf(", %d waiters", alock->numWaiting);
-     printf(")");
-     return 0;
- }
- 
- static int
- PrintLocks(register struct rx_connection *aconn, int aint32)
- {
-     register int i;
-     struct AFSDBLock lock;
-     afs_int32 code;
- 
-     for (i = 0; i < 1000; i++) {
- 	code = RXAFSCB_GetLock(aconn, i, &lock);
- 	if (code) {
- 	    if (code == 1)
- 		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 */
- 	if (aint32 || IsLocked(&lock.lock)) {
- 	    printf("Lock %s status: ", lock.name);
- 	    PrintLock(&lock.lock);
- 	    printf("\n");
- 	}
-     }
-     return 0;
- }
- 
- struct cell_cache {
-     afs_int32 cellnum;
-     char *cellname;
-     struct cell_cache *next;
- };
- 
- static char *
- GetCellName(struct rx_connection *aconn, afs_int32 cellnum)
- {
-     static int no_getcellbynum;
-     static struct cell_cache *cache;
-     struct cell_cache *tcp;
-     int code;
-     char *cellname;
-     serverList sl;
- 
-     if (no_getcellbynum)
- 	return NULL;
- 
-     for (tcp = cache; tcp; tcp = tcp->next)
- 	if (tcp->cellnum == cellnum)
- 	    return tcp->cellname;
- 
-     cellname = NULL;
-     sl.serverList_len = 0;
-     sl.serverList_val = NULL;
-     code = RXAFSCB_GetCellByNum(aconn, cellnum, &cellname, &sl);
-     if (code) {
- 	if (code == RXGEN_OPCODE)
- 	    no_getcellbynum = 1;
- 	return NULL;
-     }
- 
-     if (sl.serverList_val)
- 	free(sl.serverList_val);
-     tcp = malloc(sizeof(struct cell_cache));
-     tcp->next = cache;
-     tcp->cellnum = cellnum;
-     tcp->cellname = cellname;
-     cache = tcp;
- 
-     return cellname;
- }
- 
- static int
- PrintCacheEntries32(struct rx_connection *aconn, int aint32)
- {
-     register int i;
-     register afs_int32 code;
-     struct AFSDBCacheEntry centry;
-     char *cellname;
- 
-     for (i = 0; i < 10000; i++) {
- 	code = RXAFSCB_GetCE(aconn, i, &centry);
- 	if (code) {
- 	    if (code == 1)
- 		break;
- 	    printf("cmdebug: failed to get cache entry %d (%s)\n", i,
- 		   error_message(code));
- 	    return code;
- 	}
- 
- 	if (centry.addr == 0) {
- 	    /* PS output */
- 	    printf("Proc %4d sleeping at %08x, pri %3d\n",
- 		   centry.netFid.Vnode, centry.netFid.Volume,
- 		   centry.netFid.Unique - 25);
- 	    continue;
- 	}
- 
- 	if (aint32 == 0 && !IsLocked(&centry.lock) ||
-             aint32 == 2 && centry.refCount == 0 ||
-             aint32 == 4 && centry.callback == 0)
- 	    continue;
- 
- 	/* otherwise print this entry */
- 	printf("** Cache entry @ 0x%08x for %d.%d.%d.%d", centry.addr,
- 	       centry.cell, centry.netFid.Volume, centry.netFid.Vnode,
- 	       centry.netFid.Unique);
- 
- 	cellname = GetCellName(aconn, centry.cell);
- 	if (cellname)
- 	    printf(" [%s]\n", cellname);
- 	else
- 	    printf("\n");
- 
- 	if (IsLocked(&centry.lock)) {
- 	    printf("    locks: ");
- 	    PrintLock(&centry.lock);
- 	    printf("\n");
- 	}
- 	printf("    %012d bytes  DV %012d  refcnt %05d\n", centry.Length,
- 	       centry.DataVersion, centry.refCount);
- 	printf("    callback %08x\texpires %u\n", centry.callback,
- 	       centry.cbExpires);
- 	printf("    %d opens\t%d writers\n", centry.opens, centry.writers);
- 
- 	/* now display states */
- 	printf("    ");
- 	if (centry.mvstat == 0)
- 	    printf("normal file");
- 	else if (centry.mvstat == 1)
- 	    printf("mount point");
- 	else if (centry.mvstat == 2)
- 	    printf("volume root");
- 	else if (centry.mvstat == 3)
- 	    printf("directory");
- 	else if (centry.mvstat == 4)
- 	    printf("symlink");
- 	else if (centry.mvstat == 5)
- 	    printf("microsoft dfs link");
- 	else if (centry.mvstat == 6)
- 	    printf("invalid link");
- 	else
- 	    printf("bogus mvstat %d", centry.mvstat);
- 	printf("\n    states (0x%x)", centry.states);
- 	if (centry.states & 1)
- 	    printf(", stat'd");
- 	if (centry.states & 2)
- 	    printf(", backup");
- 	if (centry.states & 4)
- 	    printf(", read-only");
- 	if (centry.states & 8)
- 	    printf(", mt pt valid");
- 	if (centry.states & 0x10)
- 	    printf(", pending core");
- 	if (centry.states & 0x40)
- 	    printf(", wait-for-store");
- 	if (centry.states & 0x80)
- 	    printf(", mapped");
- 	printf("\n");
-     }
-     return 0;
- }
- 
- static int
- PrintCacheEntries64(struct rx_connection *aconn, int aint32)
- {
-     register int i;
-     register afs_int32 code;
-     struct AFSDBCacheEntry64 centry;
-     char *cellname;
-     int ce64 = 0;
- 
-     for (i = 0; i < 10000; i++) {
- 	code = RXAFSCB_GetCE64(aconn, i, &centry);
- 	if (code) {
- 	    if (code == 1)
- 		break;
- 	    printf("cmdebug: failed to get cache entry %d (%s)\n", i,
- 		   error_message(code));
- 	    return code;
- 	}
- 
- 	if (centry.addr == 0) {
- 	    /* PS output */
- 	    printf("Proc %4d sleeping at %08x, pri %3d\n",
- 		   centry.netFid.Vnode, centry.netFid.Volume,
- 		   centry.netFid.Unique - 25);
- 	    continue;
- 	}
- 
- 	if (aint32 == 0 && !IsLocked(&centry.lock) ||
-             aint32 == 2 && centry.refCount == 0 ||
-             aint32 == 4 && centry.callback == 0)
- 	    continue;
- 
- 	/* otherwise print this entry */
- 	printf("** Cache entry @ 0x%08x for %d.%d.%d.%d", centry.addr,
- 	       centry.cell, centry.netFid.Volume, centry.netFid.Vnode,
- 	       centry.netFid.Unique);
- 
- 	cellname = GetCellName(aconn, centry.cell);
- 	if (cellname)
- 	    printf(" [%s]\n", cellname);
- 	else
- 	    printf("\n");
- 
- 	if (IsLocked(&centry.lock)) {
- 	    printf("    locks: ");
- 	    PrintLock(&centry.lock);
- 	    printf("\n");
- 	}
- #ifdef AFS_64BIT_ENV
- 	printf("    %012I64d bytes  DV %012d  refcnt %05d\n", centry.Length,
- 	       centry.DataVersion, centry.refCount);
- #else
- 	printf("    %012d bytes  DV %012d  refcnt %05d\n", centry.Length,
- 	       centry.DataVersion, centry.refCount);
- #endif
- 	printf("    callback %08x\texpires %u\n", centry.callback,
- 	       centry.cbExpires);
- 	printf("    %d opens\t%d writers\n", centry.opens, centry.writers);
- 
- 	/* now display states */
- 	printf("    ");
- 	if (centry.mvstat == 0)
- 	    printf("normal file");
- 	else if (centry.mvstat == 1)
- 	    printf("mount point");
- 	else if (centry.mvstat == 2)
- 	    printf("volume root");
- 	else if (centry.mvstat == 3)
- 	    printf("directory");
- 	else if (centry.mvstat == 4)
- 	    printf("symlink");
- 	else if (centry.mvstat == 5)
- 	    printf("microsoft dfs link");
- 	else if (centry.mvstat == 6)
- 	    printf("invalid link");
-         else
- 	    printf("bogus mvstat %d", centry.mvstat);
- 	printf("\n    states (0x%x)", centry.states);
- 	if (centry.states & 1)
- 	    printf(", stat'd");
- 	if (centry.states & 2)
- 	    printf(", backup");
- 	if (centry.states & 4)
- 	    printf(", read-only");
- 	if (centry.states & 8)
- 	    printf(", mt pt valid");
- 	if (centry.states & 0x10)
- 	    printf(", pending core");
- 	if (centry.states & 0x40)
- 	    printf(", wait-for-store");
- 	if (centry.states & 0x80)
- 	    printf(", mapped");
- 	printf("\n");
-     }
-     return 0;
- }
- 
- static int
- PrintCacheEntries(struct rx_connection *aconn, int aint32)
- {
-     register afs_int32 code;
-     struct AFSDBCacheEntry64 centry64;
- 
-     code = RXAFSCB_GetCE64(aconn, 0, &centry64);
-     if (code != RXGEN_OPCODE)
- 	return PrintCacheEntries64(aconn, aint32);
-     else
- 	return PrintCacheEntries32(aconn, aint32);
- }
- 
- static int
- CommandProc(struct cmd_syndesc *as)
- {
-     struct rx_connection *conn;
-     register char *hostName;
-     register struct hostent *thp;
-     afs_int32 port;
-     struct rx_securityClass *secobj;
-     int int32p;
-     afs_int32 addr;
- 
-     hostName = as->parms[0].items->data;
-     if (as->parms[1].items)
- 	port = atoi(as->parms[1].items->data);
-     else
- 	port = 7001;
-     thp = hostutil_GetHostByName(hostName);
-     if (!thp) {
- 	printf("cmdebug: can't resolve address for host %s.\n", hostName);
- 	exit(1);
-     }
-     memcpy(&addr, thp->h_addr, sizeof(afs_int32));
-     secobj = rxnull_NewServerSecurityObject();
-     conn = rx_NewConnection(addr, htons(port), 1, secobj, 0);
-     if (!conn) {
- 	printf("cmdebug: failed to create connection for host %s\n",
- 	       hostName);
- 	exit(1);
-     }
-     if (as->parms[5].items) {
- 	/* -addrs */
- 	PrintInterfaces(conn);
- 	return 0;
-     }
-     if (as->parms[6].items) {
- 	/* -cache */
- 	PrintCacheConfig(conn);
- 	return 0;
-     }
-     if (as->parms[2].items)
-         /* -long */
- 	int32p = 1;
-     else if (as->parms[3].items)
-         /* -refcounts */
-         int32p = 2;
-     else if (as->parms[4].items)
-         /* -callbacks */
-         int32p = 4;
-     else
- 	int32p = 0;
- 
-     if (int32p == 0 || int32p == 1)
-         PrintLocks(conn, int32p);
-     if (int32p >= 0 || int32p <= 4)
-         PrintCacheEntries(conn, int32p);
-     return 0;
- }
- 
- #ifndef AFS_NT40_ENV
- #include "AFS_component_version_number.c"
- #endif
- 
- int
- main(int argc, char **argv)
- {
-     register struct cmd_syndesc *ts;
- 
- #ifdef	AFS_AIX32_ENV
-     /*
-      * The following signal action for AIX is necessary so that in case of a 
-      * crash (i.e. core is generated) we can include the user's data section 
-      * in the core dump. Unfortunately, by default, only a partial core is
-      * generated which, in many cases, isn't too useful.
-      */
-     struct sigaction nsa;
- 
-     sigemptyset(&nsa.sa_mask);
-     nsa.sa_handler = SIG_DFL;
-     nsa.sa_flags = SA_FULLDUMP;
-     sigaction(SIGSEGV, &nsa, NULL);
- #endif
- 
- #ifdef AFS_NT40_ENV
-     if (afs_winsockInit() < 0) {
-         printf("%s: Couldn't initialize winsock. Exiting...\n", argv[0]);
-         return 1;
-     }
- #endif
- 
-     rx_Init(0);
- 
-     ts = cmd_CreateSyntax(NULL, CommandProc, 0, "probe unik server");
-     cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
-     cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
-     cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
-     cmd_AddParm(ts, "-refcounts", CMD_FLAG, CMD_OPTIONAL, 
-                  "print only cache entries with positive reference counts");
-     cmd_AddParm(ts, "-callbacks", CMD_FLAG, CMD_OPTIONAL, 
-                  "print only cache entries with callbacks");
-     cmd_AddParm(ts, "-addrs", CMD_FLAG, CMD_OPTIONAL,
- 		"print only host interfaces");
-     cmd_AddParm(ts, "-cache", CMD_FLAG, CMD_OPTIONAL,
- 		"print only cache configuration");
- 
-     cmd_Dispatch(argc, argv);
-     exit(0);
- }
--- 0 ----
Index: openafs/src/WINNT/afsd/smb.c
diff -c openafs/src/WINNT/afsd/smb.c:1.55.2.27.2.2 openafs/src/WINNT/afsd/smb.c:1.55.2.51
*** openafs/src/WINNT/afsd/smb.c:1.55.2.27.2.2	Wed Oct 19 03:00:23 2005
--- openafs/src/WINNT/afsd/smb.c	Mon Apr 10 13:56:30 2006
***************
*** 38,51 ****
  static char *illegalChars = "\\/:*?\"<>|";
  BOOL isWindows2000 = FALSE;
  
- smb_vc_t *dead_vcp = NULL;
- smb_vc_t *active_vcp = NULL;
- 
- /* TODO; logout mechanism needs to be thread-safe */
- char *loggedOutName = NULL;
- smb_user_t *loggedOutUserp = NULL;
- time_t loggedOutTime;
- int loggedOut = 0;
  int smbShutdownFlag = 0;
  
  int smb_LogoffTokenTransfer;
--- 38,43 ----
***************
*** 94,113 ****
  ULONG smb_lsaSecPackage;
  LSA_STRING smb_lsaLogonOrigin;
  
! #define NCBmax MAXIMUM_WAIT_OBJECTS
! EVENT_HANDLE NCBavails[NCBmax], NCBevents[NCBmax];
  EVENT_HANDLE **NCBreturns;
  EVENT_HANDLE **NCBShutdown;
  EVENT_HANDLE *smb_ServerShutdown;
! DWORD NCBsessions[NCBmax];
! NCB *NCBs[NCBmax];
! struct smb_packet *bufs[NCBmax];
! 
! #define Sessionmax MAXIMUM_WAIT_OBJECTS - 4
! EVENT_HANDLE SessionEvents[Sessionmax];
! unsigned short LSNs[Sessionmax];
! int lanas[Sessionmax];
! BOOL dead_sessions[Sessionmax];
  LANA_ENUM lana_list;
  
  /* for raw I/O */
--- 86,105 ----
  ULONG smb_lsaSecPackage;
  LSA_STRING smb_lsaLogonOrigin;
  
! #define NCB_MAX MAXIMUM_WAIT_OBJECTS
! EVENT_HANDLE NCBavails[NCB_MAX], NCBevents[NCB_MAX];
  EVENT_HANDLE **NCBreturns;
  EVENT_HANDLE **NCBShutdown;
  EVENT_HANDLE *smb_ServerShutdown;
! DWORD NCBsessions[NCB_MAX];
! NCB *NCBs[NCB_MAX];
! struct smb_packet *bufs[NCB_MAX];
! 
! #define SESSION_MAX MAXIMUM_WAIT_OBJECTS - 4
! EVENT_HANDLE SessionEvents[SESSION_MAX];
! unsigned short LSNs[SESSION_MAX];
! int lanas[SESSION_MAX];
! BOOL dead_sessions[SESSION_MAX];
  LANA_ENUM lana_list;
  
  /* for raw I/O */
***************
*** 172,185 ****
  char *smb_localNamep = NULL;
  
  smb_vc_t *smb_allVCsp;
  
  smb_username_t *usernamesp = NULL;
  
! smb_waitingLock_t *smb_allWaitingLocks;
  
  /* forward decl */
  void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
! 						NCB *ncbp, raw_write_cont_t *rwcp);
  void smb_NetbiosInit();
  #ifdef DJGPP
  #ifndef AFS_WIN95_ENV
--- 164,178 ----
  char *smb_localNamep = NULL;
  
  smb_vc_t *smb_allVCsp;
+ smb_vc_t *smb_deadVCsp;
  
  smb_username_t *usernamesp = NULL;
  
! smb_waitingLockRequest_t *smb_allWaitingLocks;
  
  /* forward decl */
  void smb_DispatchPacket(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp,
! 			NCB *ncbp, raw_write_cont_t *rwcp);
  void smb_NetbiosInit();
  #ifdef DJGPP
  #ifndef AFS_WIN95_ENV
***************
*** 812,817 ****
--- 805,814 ----
  
      lock_ObtainWrite(&smb_rctLock);
      for (vcp = smb_allVCsp; vcp; vcp=vcp->nextp) {
+ 	if (vcp->magic != SMB_VC_MAGIC)
+ 	    osi_panic("afsd: invalid smb_vc_t detected in smb_allVCsp", 
+ 		       __FILE__, __LINE__);
+ 
          if (lsn == vcp->lsn && lana == vcp->lana) {
              smb_HoldVCNoLock(vcp);
              break;
***************
*** 820,830 ****
      if (!vcp && (flags & SMB_FLAG_CREATE)) {
          vcp = malloc(sizeof(*vcp));
          memset(vcp, 0, sizeof(*vcp));
!         vcp->vcID = numVCs++;
!         vcp->refCount = 1;
          vcp->tidCounter = 1;
          vcp->fidCounter = 1;
!         vcp->uidCounter = 1;  /* UID 0 is reserved for blank user */
          vcp->nextp = smb_allVCsp;
          smb_allVCsp = vcp;
          lock_InitializeMutex(&vcp->mx, "vc_t mutex");
--- 817,830 ----
      if (!vcp && (flags & SMB_FLAG_CREATE)) {
          vcp = malloc(sizeof(*vcp));
          memset(vcp, 0, sizeof(*vcp));
! 	lock_ObtainWrite(&smb_globalLock);
!         vcp->vcID = ++numVCs;
! 	lock_ReleaseWrite(&smb_globalLock);
! 	vcp->magic = SMB_VC_MAGIC;
!         vcp->refCount = 2; 	/* smb_allVCsp and caller */
          vcp->tidCounter = 1;
          vcp->fidCounter = 1;
!         vcp->uidCounter = 1;  	/* UID 0 is reserved for blank user */
          vcp->nextp = smb_allVCsp;
          smb_allVCsp = vcp;
          lock_InitializeMutex(&vcp->mx, "vc_t mutex");
***************
*** 860,865 ****
--- 860,872 ----
          }
          else
              memset(vcp->encKey, 0, MSV1_0_CHALLENGE_LENGTH);
+ 
+         if (numVCs >= CM_SESSION_RESERVED) {
+ 	    lock_ObtainWrite(&smb_globalLock);
+             numVCs = 0;
+ 	    lock_ReleaseWrite(&smb_globalLock);
+             osi_Log0(smb_logp, "WARNING: numVCs wrapping around");
+         }
      }
      lock_ReleaseWrite(&smb_rctLock);
      return vcp;
***************
*** 872,901 ****
          
      for(i=0; i<11; i++) {
          tc = *maskp++;
!         if (tc == '?' || tc == '*' || tc == '>') return 1;        
      }	
      return 0;
  }
  
! void smb_ReleaseVCNoLock(smb_vc_t *vcp)
  {
!     osi_Log2(smb_logp,"smb_ReleaseVCNoLock vcp %x ref %d",vcp, vcp->refCount);
! #ifdef DEBUG
!     osi_assert(vcp->refCount-- != 0);
! #else
      vcp->refCount--;
  #endif
  }       
  
  void smb_ReleaseVC(smb_vc_t *vcp)
  {
      lock_ObtainWrite(&smb_rctLock);
      osi_Log2(smb_logp,"smb_ReleaseVC       vcp %x ref %d",vcp, vcp->refCount);
! #ifdef DEBUG
!     osi_assert(vcp->refCount-- != 0);
! #else
!     vcp->refCount--;
! #endif
      lock_ReleaseWrite(&smb_rctLock);
  }       
  
--- 879,941 ----
          
      for(i=0; i<11; i++) {
          tc = *maskp++;
!         if (tc == '?' || tc == '*' || tc == '>')
! 	    return 1;
      }	
      return 0;
  }
  
! void smb_ReleaseVCInternal(smb_vc_t *vcp)
  {
!     smb_vc_t **vcpp;
!     smb_vc_t * avcp;
! 
      vcp->refCount--;
+ 
+     if (vcp->refCount == 0) {
+ 	if (vcp->flags & SMB_VCFLAG_ALREADYDEAD) {
+ 	    /* remove VCP from smb_deadVCsp */
+ 	    for (vcpp = &smb_deadVCsp; *vcpp; vcpp = &((*vcpp)->nextp)) {
+ 		if (*vcpp == vcp) {
+ 		    *vcpp = vcp->nextp;
+ 		    break;
+ 		}
+ 	    }
+ 	    lock_FinalizeMutex(&vcp->mx);
+ 	    memset(vcp,0,sizeof(smb_vc_t));
+ 	    free(vcp);
+ 	} else {
+ 	    for (avcp = smb_allVCsp; avcp; avcp = avcp->nextp) {
+ 		if (avcp == vcp)
+ 		    break;
+ 	    }
+ 	    osi_Log3(smb_logp,"VCP not dead and %sin smb_allVCsp vcp %x ref %d",
+ 		      avcp?"not ":"",vcp, vcp->refCount);
+ #ifdef DEBUG
+ 	    GenerateMiniDump(NULL);
  #endif
+ 	    /* This is a wrong.  However, I suspect that there is an undercount
+ 	     * and I don't want to release 1.4.1 in a state that will allow 
+ 	     * smb_vc_t objects to be deallocated while still in the 
+ 	     * smb_allVCsp list.  The list is supposed to keep a reference
+ 	     * to the smb_vc_t.  Put it back.
+ 	     */
+ 	    vcp->refCount++;
+ 	}
+     }
+ }
+ 
+ void smb_ReleaseVCNoLock(smb_vc_t *vcp)
+ {
+     osi_Log2(smb_logp,"smb_ReleaseVCNoLock vcp %x ref %d",vcp, vcp->refCount);
+     smb_ReleaseVCInternal(vcp);
  }       
  
  void smb_ReleaseVC(smb_vc_t *vcp)
  {
      lock_ObtainWrite(&smb_rctLock);
      osi_Log2(smb_logp,"smb_ReleaseVC       vcp %x ref %d",vcp, vcp->refCount);
!     smb_ReleaseVCInternal(vcp);
      lock_ReleaseWrite(&smb_rctLock);
  }       
  
***************
*** 913,918 ****
--- 953,1051 ----
      lock_ReleaseWrite(&smb_rctLock);
  }       
  
+ void smb_CleanupDeadVC(smb_vc_t *vcp)
+ {
+     smb_fid_t *fidpIter;
+     smb_fid_t *fidpNext;
+     unsigned short fid;
+     smb_tid_t *tidpIter;
+     smb_tid_t *tidpNext;
+     unsigned short tid;
+     smb_user_t *uidpIter;
+     smb_user_t *uidpNext;
+     unsigned short uid;
+     smb_vc_t **vcpp;
+ 
+     osi_Log1(smb_logp, "Cleaning up dead vcp 0x%x", vcp);
+ 
+     lock_ObtainWrite(&smb_rctLock);
+     /* remove VCP from smb_allVCsp */
+     for (vcpp = &smb_allVCsp; *vcpp; vcpp = &((*vcpp)->nextp)) {
+ 	if ((*vcpp)->magic != SMB_VC_MAGIC)
+ 	    osi_panic("afsd: invalid smb_vc_t detected in smb_allVCsp", 
+ 		       __FILE__, __LINE__);
+         if (*vcpp == vcp) {
+             *vcpp = vcp->nextp;
+             vcp->nextp = smb_deadVCsp;
+             smb_deadVCsp = vcp;
+ 	    /* Hold onto the reference until we are done with this function */
+             break;
+         }
+     }
+ 
+     for (fidpIter = vcp->fidsp; fidpIter; fidpIter = fidpNext) {
+         fidpNext = (smb_fid_t *) osi_QNext(&fidpIter->q);
+ 
+         if (fidpIter->delete)
+             continue;
+ 
+         fid = fidpIter->fid;
+ 	osi_Log2(smb_logp, " Cleanup FID %d (fidp=0x%x)", fid, fidpIter);
+ 
+ 	smb_HoldFIDNoLock(fidpIter);
+ 	lock_ReleaseWrite(&smb_rctLock);
+ 
+         smb_CloseFID(vcp, fidpIter, NULL, 0);
+ 	smb_ReleaseFID(fidpIter);
+ 
+         lock_ObtainWrite(&smb_rctLock);
+ 	fidpNext = vcp->fidsp;
+     }
+ 
+     for (tidpIter = vcp->tidsp; tidpIter; tidpIter = tidpNext) {
+ 	tidpNext = tidpIter->nextp;
+ 	if (tidpIter->delete)
+ 	    continue;
+ 	tidpIter->delete = 1;
+ 
+ 	tid = tidpIter->tid;
+ 	osi_Log2(smb_logp, "  Cleanup TID %d (tidp=0x%x)", tid, tidpIter);
+ 
+ 	smb_HoldTIDNoLock(tidpIter);
+ 	lock_ReleaseWrite(&smb_rctLock);
+ 	smb_ReleaseTID(tidpIter);
+ 
+ 	lock_ObtainWrite(&smb_rctLock);
+ 	tidpNext = vcp->tidsp;
+     }
+ 
+     for (uidpIter = vcp->usersp; uidpIter; uidpIter = uidpNext) {
+ 	uidpNext = uidpIter->nextp;
+ 	if (uidpIter->delete)
+ 	    continue;
+ 	uidpIter->delete = 1;
+ 
+ 	uid = uidpIter->userID;
+ 	osi_Log2(smb_logp, "  Cleanup UID %d (uidp=0x%x)", uid, uidpIter);
+ 
+ 	/* do not add an additional reference count for the smb_user_t 
+ 	 * as the smb_vc_t already is holding a reference */
+ 	lock_ReleaseWrite(&smb_rctLock);
+ 
+ 	smb_ReleaseUID(uidpIter);
+ 
+ 	lock_ObtainWrite(&smb_rctLock);
+ 	uidpNext = vcp->usersp;
+     }
+ 
+     /* The vcp is now on the deadVCsp list.  We intentionally drop the
+      * reference so that the refcount can reach 0 and we can delete it */
+     smb_ReleaseVCNoLock(vcp);
+ 
+     lock_ReleaseWrite(&smb_rctLock);
+     osi_Log1(smb_logp, "Finished cleaning up dead vcp 0x%x", vcp);
+ }
+ 
  smb_tid_t *smb_FindTID(smb_vc_t *vcp, unsigned short tid, int flags)
  {
      smb_tid_t *tidp;
***************
*** 939,944 ****
--- 1072,1082 ----
      return tidp;
  }       	
  
+ void smb_HoldTIDNoLock(smb_tid_t *tidp)
+ {
+     tidp->refCount++;
+ }
+ 
  void smb_ReleaseTID(smb_tid_t *tidp)
  {
      smb_tid_t *tp;
***************
*** 948,954 ****
      userp = NULL;
      lock_ObtainWrite(&smb_rctLock);
      osi_assert(tidp->refCount-- > 0);
!     if (tidp->refCount == 0 && (tidp->flags & SMB_TIDFLAG_DELETE)) {
          ltpp = &tidp->vcp->tidsp;
          for(tp = *ltpp; tp; ltpp = &tp->nextp, tp = *ltpp) {
              if (tp == tidp) 
--- 1086,1092 ----
      userp = NULL;
      lock_ObtainWrite(&smb_rctLock);
      osi_assert(tidp->refCount-- > 0);
!     if (tidp->refCount == 0 && (tidp->delete)) {
          ltpp = &tidp->vcp->tidsp;
          for(tp = *ltpp; tp; ltpp = &tp->nextp, tp = *ltpp) {
              if (tp == tidp) 
***************
*** 960,966 ****
          userp = tidp->userp;	/* remember to drop ref later */
          tidp->userp = NULL;
          smb_ReleaseVCNoLock(tidp->vcp);
!         tidp->vcp = 0;
      }
      lock_ReleaseWrite(&smb_rctLock);
      if (userp)
--- 1098,1104 ----
          userp = tidp->userp;	/* remember to drop ref later */
          tidp->userp = NULL;
          smb_ReleaseVCNoLock(tidp->vcp);
!         tidp->vcp = NULL;
      }
      lock_ReleaseWrite(&smb_rctLock);
      if (userp)
***************
*** 985,991 ****
          uidp = malloc(sizeof(*uidp));
          memset(uidp, 0, sizeof(*uidp));
          uidp->nextp = vcp->usersp;
!         uidp->refCount = 1;
          uidp->vcp = vcp;
          smb_HoldVCNoLock(vcp);
          vcp->usersp = uidp;
--- 1123,1129 ----
          uidp = malloc(sizeof(*uidp));
          memset(uidp, 0, sizeof(*uidp));
          uidp->nextp = vcp->usersp;
!         uidp->refCount = 2; /* one for the vcp and one for the caller */
          uidp->vcp = vcp;
          smb_HoldVCNoLock(vcp);
          vcp->usersp = uidp;
***************
*** 997,1003 ****
      return uidp;
  }       	
  
! smb_username_t *smb_FindUserByName(char *usern, char *machine, int flags)
  {
      smb_username_t *unp= NULL;
  
--- 1135,1141 ----
      return uidp;
  }       	
  
! smb_username_t *smb_FindUserByName(char *usern, char *machine, afs_uint32 flags)
  {
      smb_username_t *unp= NULL;
  
***************
*** 1018,1024 ****
--- 1156,1165 ----
          unp->machine = strdup(machine);
          usernamesp = unp;
          lock_InitializeMutex(&unp->mx, "username_t mutex");
+ 	if (flags & SMB_FLAG_AFSLOGON)
+ 	    unp->flags = SMB_USERNAMEFLAG_AFSLOGON;
      }
+ 
      lock_ReleaseWrite(&smb_rctLock);
      return unp;
  }	
***************
*** 1041,1056 ****
      lock_ReleaseWrite(&smb_rctLock);
      return uidp;
  }       
  void smb_ReleaseUID(smb_user_t *uidp)
  {
      smb_user_t *up;
      smb_user_t **lupp;
!     cm_user_t *userp;
  
-     userp = NULL;
      lock_ObtainWrite(&smb_rctLock);
      osi_assert(uidp->refCount-- > 0);
!     if (uidp->refCount == 0 && (uidp->flags & SMB_USERFLAG_DELETE)) {
          lupp = &uidp->vcp->usersp;
          for(up = *lupp; up; lupp = &up->nextp, up = *lupp) {
              if (up == uidp) 
--- 1182,1234 ----
      lock_ReleaseWrite(&smb_rctLock);
      return uidp;
  }       
+ 
+ void smb_ReleaseUsername(smb_username_t *unp)
+ {
+     smb_username_t *up;
+     smb_username_t **lupp;
+     cm_user_t *userp = NULL;
+     time_t 	now = osi_Time();
+ 
+     lock_ObtainWrite(&smb_rctLock);
+     osi_assert(unp->refCount-- > 0);
+     if (unp->refCount == 0 && !(unp->flags & SMB_USERNAMEFLAG_AFSLOGON) &&
+ 	(unp->flags & SMB_USERNAMEFLAG_LOGOFF)) {
+         lupp = &usernamesp;
+         for(up = *lupp; up; lupp = &up->nextp, up = *lupp) {
+             if (up == unp) 
+                 break;
+         }
+         osi_assert(up != NULL);
+         *lupp = up->nextp;
+ 	up->nextp = NULL;			/* do not remove this */
+         lock_FinalizeMutex(&unp->mx);
+ 	userp = unp->userp;
+ 	free(unp->name);
+ 	free(unp->machine);
+ 	free(unp);
+     }		
+     lock_ReleaseWrite(&smb_rctLock);
+ 
+     if (userp) {
+         cm_ReleaseUser(userp);
+     }	
+ }	
+ 
+ void smb_HoldUIDNoLock(smb_user_t *uidp)
+ {
+     uidp->refCount++;
+ }
+ 
  void smb_ReleaseUID(smb_user_t *uidp)
  {
      smb_user_t *up;
      smb_user_t **lupp;
!     smb_username_t *unp = NULL;
  
      lock_ObtainWrite(&smb_rctLock);
      osi_assert(uidp->refCount-- > 0);
!     if (uidp->refCount == 0) {
          lupp = &uidp->vcp->usersp;
          for(up = *lupp; up; lupp = &up->nextp, up = *lupp) {
              if (up == uidp) 
***************
*** 1059,1078 ****
          osi_assert(up != NULL);
          *lupp = up->nextp;
          lock_FinalizeMutex(&uidp->mx);
!         if (uidp->unp) {
!             userp = uidp->unp->userp;   /* avoid deadlock by releasing */
!             uidp->unp->userp = NULL;    /* after releasing the lock */
!         }       
          smb_ReleaseVCNoLock(uidp->vcp);
!         uidp->vcp = NULL;
      }		
      lock_ReleaseWrite(&smb_rctLock);
-     if (userp) {
-         cm_ReleaseUserVCRef(userp);
-         cm_ReleaseUser(userp);
-     }	
- }	
  
  
  /* retrieve a held reference to a user structure corresponding to an incoming
   * request.
--- 1237,1255 ----
          osi_assert(up != NULL);
          *lupp = up->nextp;
          lock_FinalizeMutex(&uidp->mx);
! 	unp = uidp->unp;
          smb_ReleaseVCNoLock(uidp->vcp);
! 	uidp->vcp = NULL;
! 	free(uidp);
      }		
      lock_ReleaseWrite(&smb_rctLock);
  
+     if (unp) {
+ 	if (unp->userp)
+ 	    cm_ReleaseUserVCRef(unp->userp);
+ 	smb_ReleaseUsername(unp);
+     }
+ }	
  
  /* retrieve a held reference to a user structure corresponding to an incoming
   * request.
***************
*** 1081,1101 ****
  cm_user_t *smb_GetUser(smb_vc_t *vcp, smb_packet_t *inp)
  {
      smb_user_t *uidp;
!     cm_user_t *up;
      smb_t *smbp;
  
      smbp = (smb_t *) inp;
      uidp = smb_FindUID(vcp, smbp->uid, 0);
!     if ((!uidp) ||  (!uidp->unp))
!         return NULL;
! 
      lock_ObtainMutex(&uidp->mx);
!     up = uidp->unp->userp;
!     cm_HoldUser(up);
      lock_ReleaseMutex(&uidp->mx);
  
      smb_ReleaseUID(uidp);
- 
      return up;
  }
  
--- 1258,1279 ----
  cm_user_t *smb_GetUser(smb_vc_t *vcp, smb_packet_t *inp)
  {
      smb_user_t *uidp;
!     cm_user_t *up = NULL;
      smb_t *smbp;
  
      smbp = (smb_t *) inp;
      uidp = smb_FindUID(vcp, smbp->uid, 0);
!     if (!uidp)
! 	return NULL;
!     
      lock_ObtainMutex(&uidp->mx);
!     if (uidp->unp) {
! 	up = uidp->unp->userp;
! 	cm_HoldUser(up);
!     }
      lock_ReleaseMutex(&uidp->mx);
  
      smb_ReleaseUID(uidp);
      return up;
  }
  
***************
*** 1141,1147 ****
      return 1;
  }
  
! /* find a file ID.  If we pass in 0 we select an used File ID.
   * If the SMB_FLAG_CREATE flag is set, we allocate a new  
   * smb_fid_t data structure if desired File ID cannot be found.
   */
--- 1319,1325 ----
      return 1;
  }
  
! /* find a file ID.  If we pass in 0 we select an unused File ID.
   * If the SMB_FLAG_CREATE flag is set, we allocate a new  
   * smb_fid_t data structure if desired File ID cannot be found.
   */
***************
*** 1165,1178 ****
          if (fid == fidp->fid) {
              if (newFid) {
                  fid++;
!                 if (fid == 0) 
                      fid = 1;
                  goto retry;
              }
              fidp->refCount++;
              break;
          }
      }
      if (!fidp && (flags & SMB_FLAG_CREATE)) {
          char eventName[MAX_PATH];
          EVENT_HANDLE event;
--- 1343,1360 ----
          if (fid == fidp->fid) {
              if (newFid) {
                  fid++;
!                 if (fid == 0xFFFF) {
!                     osi_Log1(smb_logp,
!                              "New FID number wraps on vcp 0x%x", vcp);
                      fid = 1;
+                 }
                  goto retry;
              }
              fidp->refCount++;
              break;
          }
      }
+ 
      if (!fidp && (flags & SMB_FLAG_CREATE)) {
          char eventName[MAX_PATH];
          EVENT_HANDLE event;
***************
*** 1182,1189 ****
              osi_Log1(smb_logp, "Event Object Already Exists: %s", osi_LogSaveString(smb_logp, eventName));
              thrd_CloseHandle(event);
              fid++;
!             if (fid == 0)
                  fid = 1;
              goto retry;
          }
  
--- 1364,1373 ----
              osi_Log1(smb_logp, "Event Object Already Exists: %s", osi_LogSaveString(smb_logp, eventName));
              thrd_CloseHandle(event);
              fid++;
!             if (fid == 0xFFFF) {
!                 osi_Log1(smb_logp, "New FID wraps around for vcp 0x%x", vcp);
                  fid = 1;
+             }
              goto retry;
          }
  
***************
*** 1199,1254 ****
          fidp->raw_write_event = event;
          if (newFid) {
              vcp->fidCounter = fid+1;
!             if (vcp->fidCounter == 0) 
                  vcp->fidCounter = 1;
!         }
      }
      lock_ReleaseWrite(&smb_rctLock);
      return fidp;
  }
  
  void smb_ReleaseFID(smb_fid_t *fidp)
  {
!     cm_scache_t *scp;
      smb_vc_t *vcp = NULL;
      smb_ioctl_t *ioctlp;
  
-     if (!fidp)
-         return;
- 
-     scp = NULL;
      lock_ObtainWrite(&smb_rctLock);
      osi_assert(fidp->refCount-- > 0);
!     if (fidp->refCount == 0 && (fidp->flags & SMB_FID_DELETE)) {
!         vcp = fidp->vcp;
!         fidp->vcp = 0;
!         scp = fidp->scp;    /* release after lock is released */
!         fidp->scp = 0;
! 
!         osi_QRemove((osi_queue_t **) &vcp->fidsp, &fidp->q);
!         thrd_CloseHandle(fidp->raw_write_event);
! 
!         /* and see if there is ioctl stuff to free */
!         ioctlp = fidp->ioctlp;
!         if (ioctlp) {
!             if (ioctlp->prefix)
!                 cm_FreeSpace(ioctlp->prefix);
!             if (ioctlp->inAllocp)
!                 free(ioctlp->inAllocp);
!             if (ioctlp->outAllocp)
!                 free(ioctlp->outAllocp);
!             free(ioctlp);
!         }       
! 
          free(fidp);
  
!         smb_ReleaseVCNoLock(vcp);
      }
      lock_ReleaseWrite(&smb_rctLock);
  
      /* now release the scache structure */
      if (scp) 
          cm_ReleaseSCache(scp);
  }       
  
  /*
--- 1383,1455 ----
          fidp->raw_write_event = event;
          if (newFid) {
              vcp->fidCounter = fid+1;
!             if (vcp->fidCounter == 0xFFFF) {
! 		osi_Log1(smb_logp, "fidCounter wrapped around for vcp 0x%x",
! 			 vcp);
                  vcp->fidCounter = 1;
! 	    }
! 	}
      }
+ 
      lock_ReleaseWrite(&smb_rctLock);
      return fidp;
  }
  
+ void smb_HoldFIDNoLock(smb_fid_t *fidp)
+ {
+     fidp->refCount++;
+ }
+ 
  void smb_ReleaseFID(smb_fid_t *fidp)
  {
!     cm_scache_t *scp = NULL;
!     cm_user_t *userp = NULL;
      smb_vc_t *vcp = NULL;
      smb_ioctl_t *ioctlp;
  
      lock_ObtainWrite(&smb_rctLock);
      osi_assert(fidp->refCount-- > 0);
!     lock_ObtainMutex(&fidp->mx);
!     if (fidp->refCount == 0 && (fidp->delete)) {
! 	vcp = fidp->vcp;
! 	fidp->vcp = NULL;
! 	scp = fidp->scp;    /* release after lock is released */
! 	fidp->scp = NULL;
! 	userp = fidp->userp;
! 	fidp->userp = NULL;
! 
! 	if (vcp->fidsp)
! 	    osi_QRemove((osi_queue_t **) &vcp->fidsp, &fidp->q);
! 	thrd_CloseHandle(fidp->raw_write_event);
! 
! 	/* and see if there is ioctl stuff to free */
! 	ioctlp = fidp->ioctlp;
! 	if (ioctlp) {
! 	    if (ioctlp->prefix)
! 		cm_FreeSpace(ioctlp->prefix);
! 	    if (ioctlp->inAllocp)
! 		free(ioctlp->inAllocp);
! 	    if (ioctlp->outAllocp)
! 		free(ioctlp->outAllocp);
! 	    free(ioctlp);
! 	}
! 	lock_ReleaseMutex(&fidp->mx);
! 	lock_FinalizeMutex(&fidp->mx);
          free(fidp);
  
! 	if (vcp)
! 	    smb_ReleaseVCNoLock(vcp);
!     } else {
! 	lock_ReleaseMutex(&fidp->mx);
      }
      lock_ReleaseWrite(&smb_rctLock);
  
      /* now release the scache structure */
      if (scp) 
          cm_ReleaseSCache(scp);
+ 
+     if (userp)
+         cm_ReleaseUser(userp);
  }       
  
  /*
***************
*** 1726,1732 ****
--- 1927,1935 ----
           */
          if (tp->refCount == 0 && (isV3 || tp->cookie <= 255)) {
              /* hold and delete */
+ 	    lock_ObtainMutex(&tp->mx);
              tp->flags |= SMB_DIRSEARCH_DELETE;
+ 	    lock_ReleaseMutex(&tp->mx);
              victimsp[victimCount++] = tp;
              tp->refCount++;
          }
***************
*** 1871,1878 ****
      tbp = GetPacket();
      memcpy(tbp, pkt, sizeof(smb_packet_t));
      tbp->wctp = tbp->data + ((unsigned int)pkt->wctp - (unsigned int)pkt->data);
! 	if (tbp->vcp)
! 		smb_HoldVC(tbp->vcp);
      return tbp;
  }
  
--- 2074,2081 ----
      tbp = GetPacket();
      memcpy(tbp, pkt, sizeof(smb_packet_t));
      tbp->wctp = tbp->data + ((unsigned int)pkt->wctp - (unsigned int)pkt->data);
!     if (tbp->vcp)
! 	smb_HoldVC(tbp->vcp);
      return tbp;
  }
  
***************
*** 2294,2299 ****
--- 2497,2512 ----
              s = "unknown error";
          }
          osi_Log2(smb_logp, "SendPacket failure code %d \"%s\"", code, s);
+ 	osi_Log2(smb_logp, "marking dead vcp 0x%x, user struct 0x%x",
+ 		  vcp, vcp->usersp);
+ 
+ 	lock_ObtainMutex(&vcp->mx);
+ 	vcp->flags |= SMB_VCFLAG_ALREADYDEAD;
+ 	lock_ReleaseMutex(&vcp->mx);
+ 	lock_ObtainWrite(&smb_globalLock);
+ 	dead_sessions[vcp->session] = TRUE;
+ 	lock_ReleaseWrite(&smb_globalLock);
+ 	smb_CleanupDeadVC(vcp);
      }
  
      if (localNCB)
***************
*** 2327,2333 ****
      }
      else if (code == CM_ERROR_READONLY) {
          NTStatus = 0xC00000A2L;	/* Write protected */
!     }	
      else if (code == CM_ERROR_NOSUCHFILE) {
          NTStatus = 0xC000000FL;	/* No such file */
      }
--- 2540,2546 ----
      }
      else if (code == CM_ERROR_READONLY) {
          NTStatus = 0xC00000A2L;	/* Write protected */
!     }
      else if (code == CM_ERROR_NOSUCHFILE) {
          NTStatus = 0xC000000FL;	/* No such file */
      }
***************
*** 2407,2412 ****
--- 2620,2631 ----
      else if (code == CM_ERROR_WOULDBLOCK) {
          NTStatus = 0xC0000055L;	/* Lock not granted */
      }
+     else if (code == CM_ERROR_SHARING_VIOLATION) {
+         NTStatus = 0xC0000043L; /* Sharing violation */
+     }
+     else if (code == CM_ERROR_LOCK_CONFLICT) {
+         NTStatus = 0xC0000054L; /* Lock conflict */
+     }
      else if (code == CM_ERROR_PARTIALWRITE) {
          NTStatus = 0xC000007FL;	/* Disk full */
      }
***************
*** 2597,2602 ****
--- 2816,2829 ----
          class = 1;
          error = 33;	/* lock conflict */
      }
+     else if (code == CM_ERROR_LOCK_CONFLICT) {
+         class = 1;
+         error = 33;     /* lock conflict */
+     }
+     else if (code == CM_ERROR_SHARING_VIOLATION) {
+         class = 1;
+         error = 33;     /* lock conflict */
+     }
      else if (code == CM_ERROR_NOFILES) {
          class = 1;
          error = 18;	/* no files in search */
***************
*** 2655,2660 ****
--- 2882,2888 ----
      osi_hyper_t offset;
      long count, minCount, finalCount;
      unsigned short fd;
+     unsigned pid;
      smb_fid_t *fidp;
      long code = 0;
      cm_user_t *userp = NULL;
***************
*** 2683,2688 ****
--- 2911,2936 ----
      if (!fidp)
          goto send1;
  
+     pid = ((smb_t *) inp)->pid;
+     {
+         LARGE_INTEGER LOffset, LLength;
+         cm_key_t key;
+ 
+         key = cm_GenerateKey(vcp->vcID, pid, fd);
+ 
+         LOffset.HighPart = 0;
+         LOffset.LowPart = offset.LowPart;
+         LLength.HighPart = 0;
+         LLength.LowPart = count;
+ 
+         lock_ObtainMutex(&fidp->scp->mx);
+         code = cm_LockCheckRead(fidp->scp, LOffset, LLength, key);
+         lock_ReleaseMutex(&fidp->scp->mx);
+     }    
+     if (code) {
+         goto send1a;
+     }
+ 
      lock_ObtainMutex(&smb_RawBufLock);
      if (smb_RawBufs) {
          /* Get a raw buf, from head of list */
***************
*** 2697,2704 ****
--- 2945,2954 ----
      if (!rawBuf)
          goto send1a;
  
+     lock_ObtainMutex(&fidp->mx);
      if (fidp->flags & SMB_FID_IOCTL)
      {
+ 	lock_ReleaseMutex(&fidp->mx);
  #ifndef DJGPP
          rc = smb_IoctlReadRaw(fidp, vcp, inp, outp);
  #else
***************
*** 2720,2726 ****
          smb_ReleaseFID(fidp);
          return rc;
      }
!         
      userp = smb_GetUser(vcp, inp);
  
  #ifndef DJGPP
--- 2970,2977 ----
          smb_ReleaseFID(fidp);
          return rc;
      }
!     lock_ReleaseMutex(&fidp->mx);
! 
      userp = smb_GetUser(vcp, inp);
  
  #ifndef DJGPP
***************
*** 2811,2836 ****
  
      osi_Log1(smb_logp, "SMB receive negotiate; %d + 1 ongoing ops",
  			 ongoingOps - 1);
-     if (!isGateway) {
-         if (active_vcp) {
-             DWORD now = GetCurrentTime();
-             if (now - last_msg_time >= 30000
-                  && now - last_msg_time <= 90000) {
-                 osi_Log1(smb_logp,
-                           "Setting dead_vcp %x", active_vcp);
-                 if (dead_vcp) {
-                     smb_ReleaseVC(dead_vcp);
-                     osi_Log1(smb_logp,
-                              "Previous dead_vcp %x", dead_vcp);
-                 }
-                 smb_HoldVC(active_vcp);
-                 dead_vcp = active_vcp;
-                 dead_vcp->flags |= SMB_VCFLAG_ALREADYDEAD;
-             }
-         }
-     }
- 
-     inp->flags |= SMB_PACKETFLAG_PROFILE_UPDATE_OK;
  
      namep = smb_GetSMBData(inp, &dbytes);
      namex = 0;
--- 3062,3067 ----
***************
*** 2866,2871 ****
--- 3097,3103 ----
          tcounter++;		/* which proto entry we're looking at */
      }
  
+     lock_ObtainMutex(&vcp->mx);
      if (NTProtoIndex != -1) {
          protoIndex = NTProtoIndex;
          vcp->flags |= (SMB_VCFLAG_USENT | SMB_VCFLAG_USEV3);
***************
*** 2879,2884 ****
--- 3111,3117 ----
          vcp->flags |= SMB_VCFLAG_USECORE;
      }	
      else protoIndex = -1;
+     lock_ReleaseMutex(&vcp->mx);
  
      if (protoIndex == -1)
          return CM_ERROR_INVAL;
***************
*** 3021,3029 ****
--- 3254,3310 ----
      return 0;
  }
  
+ void smb_CheckVCs(void)
+ {
+     smb_vc_t * vcp, *nextp;
+     smb_packet_t * outp = GetPacket();
+     smb_t *smbp;
+             
+     lock_ObtainWrite(&smb_rctLock);
+     for ( vcp=smb_allVCsp, nextp=NULL; vcp; vcp = nextp ) 
+     {
+ 	if (vcp->magic != SMB_VC_MAGIC)
+ 	    osi_panic("afsd: invalid smb_vc_t detected in smb_allVCsp", 
+ 		       __FILE__, __LINE__);
+ 
+ 	nextp = vcp->nextp;
+ 
+ 	if (vcp->flags & SMB_VCFLAG_ALREADYDEAD)
+ 	    continue;
+ 
+ 	smb_HoldVCNoLock(vcp);
+ 	if (nextp)
+ 	    smb_HoldVCNoLock(nextp);
+ 	smb_FormatResponsePacket(vcp, NULL, outp);
+         smbp = (smb_t *)outp;
+ 	outp->inCom = smbp->com = 0x2b /* Echo */;
+         smbp->tid = 0xFFFF;
+         smbp->pid = 0;
+         smbp->uid = 0;
+         smbp->mid = 0;
+         smbp->res[0] = 0;
+         smbp->res[1] = 0;
+ 
+ 	smb_SetSMBParm(outp, 0, 0);
+ 	smb_SetSMBDataLength(outp, 0);
+ 	lock_ReleaseWrite(&smb_rctLock);
+ 
+ 	smb_SendPacket(vcp, outp);
+ 	
+ 	lock_ObtainWrite(&smb_rctLock);
+ 	smb_ReleaseVCNoLock(vcp);
+ 	if (nextp)
+ 	    smb_ReleaseVCNoLock(nextp);
+     }
+     lock_ReleaseWrite(&smb_rctLock);
+     smb_FreePacket(outp);
+ }
+ 
  void smb_Daemon(void *parmp)
  {
      afs_uint32 count = 0;
+     smb_username_t    **unpp;
+     time_t 		now;
  
      while(smbShutdownFlag == 0) {
          count++;
***************
*** 3053,3066 ****
              if ( smb_localZero != old_localZero )
                  cm_noteLocalMountPointChange();
  #endif
!         }
          /* XXX GC dir search entries */
      }
  }
  
  void smb_WaitingLocksDaemon()
  {
!     smb_waitingLock_t *wL, *nwL;
      int first;
      smb_vc_t *vcp;
      smb_packet_t *inp, *outp;
--- 3334,3390 ----
              if ( smb_localZero != old_localZero )
                  cm_noteLocalMountPointChange();
  #endif
! 
! 	    smb_CheckVCs();
! 	}
! 
! 	/* GC smb_username_t objects that will no longer be used */
! 	now = osi_Time();
! 	lock_ObtainWrite(&smb_rctLock);
! 	for ( unpp=&usernamesp; *unpp; ) {
! 	    int delete = 0;
! 	    smb_username_t *unp;
! 
! 	    lock_ObtainMutex(&(*unpp)->mx);
! 	    if ( (*unpp)->refCount > 0 || 
! 		 ((*unpp)->flags & SMB_USERNAMEFLAG_AFSLOGON) || 
! 		 !((*unpp)->flags & SMB_USERNAMEFLAG_LOGOFF))
! 		;
! 	    else if (!smb_LogoffTokenTransfer ||
! 		     ((*unpp)->last_logoff_t + smb_LogoffTransferTimeout < now))
! 		delete = 1;
! 	    lock_ReleaseMutex(&(*unpp)->mx);
! 
! 	    if (delete) {
! 		cm_user_t * userp;
! 
! 		unp = *unpp;	
! 		*unpp = unp->nextp;
! 		unp->nextp = NULL;
! 		lock_FinalizeMutex(&unp->mx);
! 		userp = unp->userp;
! 		free(unp->name);
! 		free(unp->machine);
! 		free(unp);
! 		if (userp) {
! 		    lock_ReleaseWrite(&smb_rctLock);
! 		    cm_ReleaseUser(userp);
! 		    lock_ObtainWrite(&smb_rctLock);
! 		}
! 	    } else {
! 		unpp = &(*unpp)->nextp;
! 	    }
! 	}
! 	lock_ReleaseWrite(&smb_rctLock);
! 
          /* XXX GC dir search entries */
      }
  }
  
  void smb_WaitingLocksDaemon()
  {
!     smb_waitingLockRequest_t *wlRequest, *nwlRequest;
!     smb_waitingLock_t *wl, *wlNext;
      int first;
      smb_vc_t *vcp;
      smb_packet_t *inp, *outp;
***************
*** 3069,3104 ****
  
      while (smbShutdownFlag == 0) {
          lock_ObtainWrite(&smb_globalLock);
!         nwL = smb_allWaitingLocks;
!         if (nwL == NULL) {
              osi_SleepW((long)&smb_allWaitingLocks, &smb_globalLock);
              thrd_Sleep(1000);
              continue;
!         } else 
              first = 1;
  
          do {
              if (first)
                  first = 0;
              else
                  lock_ObtainWrite(&smb_globalLock);
!             wL = nwL;
!             nwL = (smb_waitingLock_t *) osi_QNext(&wL->q);
              lock_ReleaseWrite(&smb_globalLock);
!             code = cm_RetryLock((cm_file_lock_t *) wL->lockp,
!                                  wL->vcp->flags & SMB_VCFLAG_ALREADYDEAD);
              if (code == CM_ERROR_WOULDBLOCK) {
                  /* no progress */
!                 if (wL->timeRemaining != 0xffffffff
!                      && (wL->timeRemaining -= 1000) < 0)
                      goto endWait;
                  continue;
              }
  
            endWait:
!             vcp = wL->vcp;
!             inp = wL->inp;
!             outp = wL->outp;
              ncbp = GetNCB();
              ncbp->ncb_length = inp->ncb_length;
              inp->spacep = cm_GetSpace();
--- 3393,3494 ----
  
      while (smbShutdownFlag == 0) {
          lock_ObtainWrite(&smb_globalLock);
!         nwlRequest = smb_allWaitingLocks;
!         if (nwlRequest == NULL) {
              osi_SleepW((long)&smb_allWaitingLocks, &smb_globalLock);
              thrd_Sleep(1000);
              continue;
!         } else {
              first = 1;
+             osi_Log0(smb_logp, "smb_WaitingLocksDaemon starting wait lock check");
+         }
  
          do {
              if (first)
                  first = 0;
              else
                  lock_ObtainWrite(&smb_globalLock);
! 
!             osi_Log1(smb_logp, "    Checking waiting lock request %p", nwlRequest);
! 
!             wlRequest = nwlRequest;
!             nwlRequest = (smb_waitingLockRequest_t *) osi_QNext(&wlRequest->q);
              lock_ReleaseWrite(&smb_globalLock);
! 
!             code = 0;
! 
!             for (wl = wlRequest->locks; wl; wl = (smb_waitingLock_t *) osi_QNext(&wl->q)) {
!                 if (wl->state == SMB_WAITINGLOCKSTATE_DONE)
!                     continue;
! 
!                 osi_assert(wl->state != SMB_WAITINGLOCKSTATE_ERROR);
!                 
!                 /* wl->state is either _DONE or _WAITING.  _ERROR
!                    would no longer be on the queue. */
!                 code = cm_RetryLock( wl->lockp,
!                                      !!(wlRequest->vcp->flags & SMB_VCFLAG_ALREADYDEAD) );
! 
!                 if (code == 0) {
!                     wl->state = SMB_WAITINGLOCKSTATE_DONE;
!                 } else if (code != CM_ERROR_WOULDBLOCK) {
!                     wl->state = SMB_WAITINGLOCKSTATE_ERROR;
!                     break;
!                 }
!             }
! 
              if (code == CM_ERROR_WOULDBLOCK) {
+ 
                  /* no progress */
!                 if (wlRequest->timeRemaining != 0xffffffff
!                      && (wlRequest->timeRemaining -= 1000) < 0)
                      goto endWait;
+ 
                  continue;
              }
  
            endWait:
! 
!             if (code != 0) {
!                 cm_scache_t * scp;
!                 cm_req_t req;
! 
!                 osi_Log1(smb_logp, "smb_WaitingLocksDaemon discarding lock req %p",
!                          wlRequest);
! 
!                 scp = wlRequest->scp;
! 
!                 cm_InitReq(&req);
! 
!                 lock_ObtainMutex(&scp->mx);
! 
!                 for (wl = wlRequest->locks; wl; wl = wlNext) {
!                     wlNext = (smb_waitingLock_t *) osi_QNext(&wl->q);
!                     
!                     cm_Unlock(scp, wlRequest->lockType, wl->LOffset, 
!                               wl->LLength, wl->key, NULL, &req);
! 
!                     osi_QRemove((osi_queue_t **) &wlRequest->locks, &wl->q);
! 
!                     free(wl);
!                 }
!                 
!                 lock_ReleaseMutex(&scp->mx);
! 
!             } else {
! 
!                 osi_Log1(smb_logp, "smb_WaitingLocksDaemon granting lock req %p",
!                          wlRequest);
! 
!                 for (wl = wlRequest->locks; wl; wl = wlNext) {
!                     wlNext = (smb_waitingLock_t *) osi_QNext(&wl->q);
!                     osi_QRemove((osi_queue_t **) &wlRequest->locks, &wl->q);
!                     free(wl);
!                 }
!             }
! 
!             vcp = wlRequest->vcp;
!             inp = wlRequest->inp;
!             outp = wlRequest->outp;
              ncbp = GetNCB();
              ncbp->ncb_length = inp->ncb_length;
              inp->spacep = cm_GetSpace();
***************
*** 3106,3112 ****
              /* Remove waitingLock from list */
              lock_ObtainWrite(&smb_globalLock);
              osi_QRemove((osi_queue_t **)&smb_allWaitingLocks,
!                          &wL->q);
              lock_ReleaseWrite(&smb_globalLock);
  
              /* Resume packet processing */
--- 3496,3502 ----
              /* Remove waitingLock from list */
              lock_ObtainWrite(&smb_globalLock);
              osi_QRemove((osi_queue_t **)&smb_allWaitingLocks,
!                          &wlRequest->q);
              lock_ReleaseWrite(&smb_globalLock);
  
              /* Resume packet processing */
***************
*** 3122,3130 ****
              smb_FreePacket(inp);
              smb_FreePacket(outp);
              smb_ReleaseVC(vcp);
              FreeNCB(ncbp);
!             free(wL);
!         } while (nwL && smbShutdownFlag == 0);
          thrd_Sleep(1000);
      }
  }
--- 3512,3521 ----
              smb_FreePacket(inp);
              smb_FreePacket(outp);
              smb_ReleaseVC(vcp);
+             cm_ReleaseSCache(wlRequest->scp);
              FreeNCB(ncbp);
!             free(wlRequest);
!         } while (nwlRequest && smbShutdownFlag == 0);
          thrd_Sleep(1000);
      }
  }
***************
*** 3749,3755 ****
                       LargeIntegerGreaterThanOrEqualTo(thyper, 
                                                        scp->bulkStatProgress)) {
                      /* Don't bulk stat if risking timeout */
!                     int now = GetCurrentTime();
                      if (now - req.startTime > 5000) {
                          scp->bulkStatProgress = thyper;
                          scp->flags &= ~CM_SCACHEFLAG_BULKSTATTING;
--- 4140,4146 ----
                       LargeIntegerGreaterThanOrEqualTo(thyper, 
                                                        scp->bulkStatProgress)) {
                      /* Don't bulk stat if risking timeout */
!                     int now = GetTickCount();
                      if (now - req.startTime > 5000) {
                          scp->bulkStatProgress = thyper;
                          scp->flags &= ~CM_SCACHEFLAG_BULKSTATTING;
***************
*** 4359,4367 ****
      /* find the tree and free it */
      tidp = smb_FindTID(vcp, ((smb_t *)inp)->tid, 0);
      if (tidp) {
!         lock_ObtainMutex(&tidp->mx);
!         tidp->flags |= SMB_TIDFLAG_DELETE;
!         lock_ReleaseMutex(&tidp->mx);
          smb_ReleaseTID(tidp);
      }
  
--- 4750,4758 ----
      /* find the tree and free it */
      tidp = smb_FindTID(vcp, ((smb_t *)inp)->tid, 0);
      if (tidp) {
! 	lock_ObtainWrite(&smb_rctLock);
!         tidp->delete = 1;
!         lock_ReleaseWrite(&smb_rctLock);
          smb_ReleaseTID(tidp);
      }
  
***************
*** 4477,4489 ****
--- 4868,4885 ----
  
      /* save a pointer to the vnode */
      fidp->scp = scp;
+     /* and the user */
+     cm_HoldUser(userp);
+     fidp->userp = userp;
  
+     lock_ObtainMutex(&fidp->mx);
      if ((share & 0xf) == 0)
          fidp->flags |= SMB_FID_OPENREAD;
      else if ((share & 0xf) == 1)
          fidp->flags |= SMB_FID_OPENWRITE;
      else 
          fidp->flags |= (SMB_FID_OPENREAD | SMB_FID_OPENWRITE);
+     lock_ReleaseMutex(&fidp->mx);
  
      lock_ObtainMutex(&scp->mx);
      smb_SetSMBParm(outp, 0, fidp->fid);
***************
*** 4745,4761 ****
      spacep = inp->spacep;
      smb_StripLastComponent(spacep->data, &oldLastNamep, oldPathp);
  
-     /*
-      * Changed to use CASEFOLD always.  This enables us to rename Foo/baz when
-      * what actually exists is foo/baz.  I don't know why the code used to be
-      * the way it was.  1/29/96
-      *
-      *     	caseFold = ((vcp->flags & SMB_VCFLAG_USEV3) ? 0: CM_FLAG_CASEFOLD);
-      *
-      * Changed to use CM_FLAG_FOLLOW.  7/24/96
-      *
-      *	caseFold = CM_FLAG_CASEFOLD;
-      */
      caseFold = CM_FLAG_FOLLOW | CM_FLAG_CASEFOLD;
      code = cm_NameI(cm_data.rootSCachep, spacep->data, caseFold,
                      userp, tidPathp, &req, &oldDscp);
--- 5141,5146 ----
***************
*** 4868,4873 ****
--- 5253,5259 ----
      thyper.HighPart = 0;
  
      code = cm_ApplyDir(oldDscp, smb_RenameProc, &rock, &thyper, userp, &req, NULL);
+     osi_Log1(smb_logp, "smb_RenameProc returns %ld", code);
  
      if (code == CM_ERROR_STOPNOW)
          code = 0;
***************
*** 5229,5239 ****
  
      fid = smb_ChainFID(fid, inp);
      fidp = smb_FindFID(vcp, fid, 0);
!     if (!fidp || (fidp->flags & SMB_FID_IOCTL)) {
!         if (fidp)
!             smb_ReleaseFID(fidp);
          return CM_ERROR_BADFD;
      }
          
      userp = smb_GetUser(vcp, inp);
  
--- 5615,5630 ----
  
      fid = smb_ChainFID(fid, inp);
      fidp = smb_FindFID(vcp, fid, 0);
!     if (!fidp)
! 	return CM_ERROR_BADFD;
!     
!     lock_ObtainMutex(&fidp->mx);
!     if (fidp->flags & SMB_FID_IOCTL) {
! 	lock_ReleaseMutex(&fidp->mx);
! 	smb_ReleaseFID(fidp);
          return CM_ERROR_BADFD;
      }
+     lock_ReleaseMutex(&fidp->mx);
          
      userp = smb_GetUser(vcp, inp);
  
***************
*** 5298,5329 ****
          *newPathp = strdup(pathp);
  }
  
! long smb_ReceiveCoreClose(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
! {
!     unsigned short fid;
!     smb_fid_t *fidp;
!     cm_user_t *userp;
!     afs_uint32 dosTime;
      long code = 0;
      cm_req_t req;
  
!     cm_InitReq(&req);
  
!     fid = smb_GetSMBParm(inp, 0);
!     dosTime = smb_GetSMBParm(inp, 1) | (smb_GetSMBParm(inp, 2) << 16);
  
!     osi_Log1(smb_logp, "SMB close fid %d", fid);
  
!     fid = smb_ChainFID(fid, inp);
!     fidp = smb_FindFID(vcp, fid, 0);
!     if (!fidp) {
!         return CM_ERROR_BADFD;
      }
!         
!     userp = smb_GetUser(vcp, inp);
  
      lock_ObtainMutex(&fidp->mx);
- 
      /* Don't jump the gun on an async raw write */
      while (fidp->raw_writers) {
          lock_ReleaseMutex(&fidp->mx);
--- 5689,5729 ----
          *newPathp = strdup(pathp);
  }
  
! long smb_CloseFID(smb_vc_t *vcp, smb_fid_t *fidp, cm_user_t *userp,
!                   afs_uint32 dosTime) {
      long code = 0;
      cm_req_t req;
+     cm_scache_t *dscp = fidp->NTopen_dscp;
+     char *pathp = fidp->NTopen_pathp;
  
!     osi_Log3(smb_logp, "smb_CloseFID Closing fidp 0x%x (fid=%d vcp=0x%x)",
!              fidp, fidp->fid, vcp);
  
!     if (!userp) {
! 	lock_ObtainMutex(&fidp->mx);
!         if (!fidp->userp && !(fidp->flags & SMB_FID_IOCTL)) {
! 	    lock_ReleaseMutex(&fidp->mx);
!             osi_Log0(smb_logp, "  No user specified.  Not closing fid.");
! 	    return CM_ERROR_BADFD;
! 	}
!         
!         userp = fidp->userp;    /* no hold required since fidp is held
!                                    throughout the function */
! 	lock_ReleaseMutex(&fidp->mx);
!     }
  
!     cm_InitReq(&req);
  
!     lock_ObtainWrite(&smb_rctLock);
!     if (fidp->delete) {
! 	osi_Log0(smb_logp, "  Fid already closed.");
! 	lock_ReleaseWrite(&smb_rctLock);
! 	return CM_ERROR_BADFD;
      }
!     fidp->delete = 1;
!     lock_ReleaseWrite(&smb_rctLock);
  
      lock_ObtainMutex(&fidp->mx);
      /* Don't jump the gun on an async raw write */
      while (fidp->raw_writers) {
          lock_ReleaseMutex(&fidp->mx);
***************
*** 5331,5338 ****
          lock_ObtainMutex(&fidp->mx);
      }
  
-     fidp->flags |= SMB_FID_DELETE;
-         
      /* watch for ioctl closes, and read-only opens */
      if (fidp->scp != NULL &&
          (fidp->flags & (SMB_FID_OPENWRITE | SMB_FID_DELONCLOSE))
--- 5731,5736 ----
***************
*** 5348,5356 ****
      else 
          code = 0;
  
      if (fidp->flags & SMB_FID_DELONCLOSE) {
-         cm_scache_t *dscp = fidp->NTopen_dscp;
-         char *pathp = fidp->NTopen_pathp;
          char *fullPathp;
  
          smb_FullName(dscp, fidp->scp, pathp, &fullPathp, userp, &req);
--- 5746,5787 ----
      else 
          code = 0;
  
+     /* unlock any pending locks */
+     if (!(fidp->flags & SMB_FID_IOCTL) && fidp->scp &&
+         fidp->scp->fileType == CM_SCACHETYPE_FILE) {
+         cm_key_t key;
+         cm_scache_t * scp;
+         long tcode;
+ 
+         /* CM_UNLOCK_BY_FID doesn't look at the process ID.  We pass
+            in zero. */
+         key = cm_GenerateKey(vcp->vcID, 0, fidp->fid);
+         scp = fidp->scp;
+         cm_HoldSCache(scp);
+         lock_ObtainMutex(&scp->mx);
+ 
+         tcode = cm_SyncOp(scp, NULL, userp, &req, 0,
+                           CM_SCACHESYNC_NEEDCALLBACK
+                           | CM_SCACHESYNC_GETSTATUS
+                           | CM_SCACHESYNC_LOCK);
+ 
+         if (tcode) {
+             osi_Log1(smb_logp,
+                      "smb CoreClose SyncOp failure code 0x%x", tcode);
+             goto post_syncopdone;
+         }
+ 
+         cm_UnlockByKey(scp, key, CM_UNLOCK_BY_FID, userp, &req);
+ 
+         cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_LOCK);
+ 
+     post_syncopdone:
+ 
+         lock_ReleaseMutex(&scp->mx);
+         cm_ReleaseSCache(scp);
+     }
+ 
      if (fidp->flags & SMB_FID_DELONCLOSE) {
          char *fullPathp;
  
          smb_FullName(dscp, fidp->scp, pathp, &fullPathp, userp, &req);
***************
*** 5360,5368 ****
                  smb_NotifyChange(FILE_ACTION_REMOVED,
                                   FILE_NOTIFY_CHANGE_DIR_NAME,
                                   dscp, fullPathp, NULL, TRUE);
!         }
!         else 
!         {
              code = cm_Unlink(dscp, fullPathp, userp, &req);
              if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
                  smb_NotifyChange(FILE_ACTION_REMOVED,
--- 5791,5797 ----
                  smb_NotifyChange(FILE_ACTION_REMOVED,
                                   FILE_NOTIFY_CHANGE_DIR_NAME,
                                   dscp, fullPathp, NULL, TRUE);
!         } else {
              code = cm_Unlink(dscp, fullPathp, userp, &req);
              if (code == 0 && (dscp->flags & CM_SCACHEFLAG_ANYWATCH))
                  smb_NotifyChange(FILE_ACTION_REMOVED,
***************
*** 5370,5384 ****
                                   dscp, fullPathp, NULL, TRUE);
          }
          free(fullPathp);
      }
-     lock_ReleaseMutex(&fidp->mx);
  
      if (fidp->flags & SMB_FID_NTOPEN) {
!         cm_ReleaseSCache(fidp->NTopen_dscp);
!         free(fidp->NTopen_pathp);
      }
!     if (fidp->NTopen_wholepathp)
          free(fidp->NTopen_wholepathp);
      
      smb_ReleaseFID(fidp);
      cm_ReleaseUser(userp);
--- 5799,5849 ----
                                   dscp, fullPathp, NULL, TRUE);
          }
          free(fullPathp);
+ 	fidp->flags &= ~SMB_FID_DELONCLOSE;
      }
  
      if (fidp->flags & SMB_FID_NTOPEN) {
! 	fidp->NTopen_dscp = NULL;
!         fidp->NTopen_pathp = NULL;
! 	fidp->flags &= ~SMB_FID_NTOPEN;
      }
!     if (fidp->NTopen_wholepathp) {
          free(fidp->NTopen_wholepathp);
+         fidp->NTopen_wholepathp = NULL;
+     }
+     lock_ReleaseMutex(&fidp->mx);
+ 
+     if (dscp)
+ 	cm_ReleaseSCache(dscp);
+ 
+     if (pathp)
+ 	free(pathp);
+ 
+     return code;
+ }
+ 
+ long smb_ReceiveCoreClose(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
+ {
+     unsigned short fid;
+     smb_fid_t *fidp;
+     cm_user_t *userp;
+     long code = 0;
+     afs_uint32 dosTime;
+ 
+     fid = smb_GetSMBParm(inp, 0);
+     dosTime = smb_GetSMBParm(inp, 1) | (smb_GetSMBParm(inp, 2) << 16);
+ 
+     osi_Log1(smb_logp, "SMB ReceiveCoreClose fid %d", fid);
+ 
+     fid = smb_ChainFID(fid, inp);
+     fidp = smb_FindFID(vcp, fid, 0);
+     if (!fidp) {
+         return CM_ERROR_BADFD;
+     }
+         
+     userp = smb_GetUser(vcp, inp);
+ 
+     code = smb_CloseFID(vcp, fidp, userp, dosTime);
      
      smb_ReleaseFID(fidp);
      cm_ReleaseUser(userp);
***************
*** 5426,5432 ****
          }
          if (fidp->curr_chunk == fidp->prev_chunk + 1)
              sequential = 1;
!     }       
  
      /* start by looking up the file's end */
      code = cm_SyncOp(scp, NULL, userp, &req, 0,
--- 5891,5897 ----
          }
          if (fidp->curr_chunk == fidp->prev_chunk + 1)
              sequential = 1;
!     }
  
      /* start by looking up the file's end */
      code = cm_SyncOp(scp, NULL, userp, &req, 0,
***************
*** 5592,5597 ****
--- 6057,6063 ----
          
      /* make sure we have a writable FD */
      if (!(fidp->flags & SMB_FID_OPENWRITE)) {
+ 	lock_ReleaseMutex(&fidp->mx);
          code = CM_ERROR_BADFDOP;
          goto done;
      }
***************
*** 5638,5644 ****
          /* handle over quota or out of space */
          if (scp->flags & (CM_SCACHEFLAG_OVERQUOTA | CM_SCACHEFLAG_OUTOFSPACE)) {
              *writtenp = written;
!             code = CM_ERROR_QUOTA;
              break;
          }
  
--- 6104,6110 ----
          /* handle over quota or out of space */
          if (scp->flags & (CM_SCACHEFLAG_OVERQUOTA | CM_SCACHEFLAG_OUTOFSPACE)) {
              *writtenp = written;
!             code = (scp->flags & CM_SCACHEFLAG_OVERQUOTA) ? CM_ERROR_QUOTA : CM_ERROR_SPACE;
              break;
          }
  
***************
*** 5756,5762 ****
  
    done:
      lock_ReleaseMutex(&scp->mx);
!     lock_ReleaseMutex(&fidp->mx);
      if (bufferp) {
          lock_ReleaseMutex(&bufferp->mx);
          buf_Release(bufferp);
--- 6222,6228 ----
  
    done:
      lock_ReleaseMutex(&scp->mx);
! 
      if (bufferp) {
          lock_ReleaseMutex(&bufferp->mx);
          buf_Release(bufferp);
***************
*** 5768,5773 ****
--- 6234,6240 ----
                            fidp->NTopen_dscp, fidp->NTopen_pathp,
                            NULL, TRUE);
      }       
+     lock_ReleaseMutex(&fidp->mx);
  
      if (code == 0 && doWriteBack) {
          long code2;
***************
*** 5792,5797 ****
--- 6259,6265 ----
      osi_hyper_t offset;
      long count, written = 0, total_written = 0;
      unsigned short fd;
+     unsigned pid;
      smb_fid_t *fidp;
      long code = 0;
      cm_user_t *userp;
***************
*** 5812,5827 ****
          
      fd = smb_ChainFID(fd, inp);
      fidp = smb_FindFID(vcp, fd, 0);
!     if (!fidp) {
          return CM_ERROR_BADFD;
-     }
-         
-     if (fidp->flags & SMB_FID_IOCTL)
-         return smb_IoctlWrite(fidp, vcp, inp, outp);
          
      userp = smb_GetUser(vcp, inp);
  
! 	/* special case: 0 bytes transferred means truncate to this position */
      if (count == 0) {
          cm_req_t req;
  
--- 6280,6299 ----
          
      fd = smb_ChainFID(fd, inp);
      fidp = smb_FindFID(vcp, fd, 0);
!     if (!fidp)
          return CM_ERROR_BADFD;
          
+     lock_ObtainMutex(&fidp->mx);
+     if (fidp->flags & SMB_FID_IOCTL) {
+ 	lock_ReleaseMutex(&fidp->mx);
+         code = smb_IoctlWrite(fidp, vcp, inp, outp);
+ 	smb_ReleaseFID(fidp);
+ 	return code;
+     }
+     lock_ReleaseMutex(&fidp->mx);
      userp = smb_GetUser(vcp, inp);
  
!     /* special case: 0 bytes transferred means truncate to this position */
      if (count == 0) {
          cm_req_t req;
  
***************
*** 5832,5844 ****
          truncAttr.length.HighPart = 0;
          lock_ObtainMutex(&fidp->mx);
          code = cm_SetAttr(fidp->scp, &truncAttr, userp, &req);
          lock_ReleaseMutex(&fidp->mx);
          smb_SetSMBParm(outp, 0, /* count */ 0);
          smb_SetSMBDataLength(outp, 0);
-         fidp->flags |= SMB_FID_LENGTHSETDONE;
          goto done;
      }
  
      /*
       * Work around bug in NT client
       *
--- 6304,6337 ----
          truncAttr.length.HighPart = 0;
          lock_ObtainMutex(&fidp->mx);
          code = cm_SetAttr(fidp->scp, &truncAttr, userp, &req);
+ 	fidp->flags |= SMB_FID_LENGTHSETDONE;
          lock_ReleaseMutex(&fidp->mx);
          smb_SetSMBParm(outp, 0, /* count */ 0);
          smb_SetSMBDataLength(outp, 0);
          goto done;
      }
  
+     {
+         cm_key_t key;
+         LARGE_INTEGER LOffset;
+         LARGE_INTEGER LLength;
+ 
+         pid = ((smb_t *) inp)->pid;
+         key = cm_GenerateKey(vcp->vcID, pid, fd);
+ 
+         LOffset.HighPart = offset.HighPart;
+         LOffset.LowPart = offset.LowPart;
+         LLength.HighPart = 0;
+         LLength.LowPart = count;
+ 
+         lock_ObtainMutex(&fidp->scp->mx);
+         code = cm_LockCheckWrite(fidp->scp, LOffset, LLength, key);
+         lock_ReleaseMutex(&fidp->scp->mx);
+ 
+         if (code)
+             goto done;
+     }
+ 
      /*
       * Work around bug in NT client
       *
***************
*** 5849,5858 ****
--- 6342,6353 ----
       * and don't set client mod time if we think that would go against the
       * intention.
       */
+     lock_ObtainMutex(&fidp->mx);
      if ((fidp->flags & SMB_FID_MTIMESETDONE) != SMB_FID_MTIMESETDONE) {
          fidp->scp->mask |= CM_SCACHEMASK_CLIENTMODTIME;
          fidp->scp->clientModTime = time(NULL);
      }
+     lock_ReleaseMutex(&fidp->mx);
  
      code = 0;
      while ( code == 0 && count > 0 ) {
***************
*** 5990,5995 ****
--- 6485,6514 ----
      if (!fidp) {
          return CM_ERROR_BADFD;
      }
+ 
+     {
+         unsigned pid;
+         cm_key_t key;
+         LARGE_INTEGER LOffset;
+         LARGE_INTEGER LLength;
+ 
+         pid = ((smb_t *) inp)->pid;
+         key = cm_GenerateKey(vcp->vcID, pid, fd);
+ 
+         LOffset.HighPart = offset.HighPart;
+         LOffset.LowPart = offset.LowPart;
+         LLength.HighPart = 0;
+         LLength.LowPart = count;
+ 
+         lock_ObtainMutex(&fidp->scp->mx);
+         code = cm_LockCheckWrite(fidp->scp, LOffset, LLength, key);
+         lock_ReleaseMutex(&fidp->scp->mx);
+ 
+         if (code) {
+             smb_ReleaseFID(fidp);
+             return code;
+         }
+     }
          
      userp = smb_GetUser(vcp, inp);
  
***************
*** 6003,6012 ****
--- 6522,6533 ----
       * and don't set client mod time if we think that would go against the
       * intention.
       */
+     lock_ObtainMutex(&fidp->mx);
      if ((fidp->flags & SMB_FID_LOOKSLIKECOPY) != SMB_FID_LOOKSLIKECOPY) {
          fidp->scp->mask |= CM_SCACHEMASK_CLIENTMODTIME;
          fidp->scp->clientModTime = time(NULL);
      }
+     lock_ReleaseMutex(&fidp->mx);
  
      code = 0;
      while ( code == 0 && count > 0 ) {
***************
*** 6084,6089 ****
--- 6605,6611 ----
      osi_hyper_t offset;
      long count, finalCount;
      unsigned short fd;
+     unsigned pid;
      smb_fid_t *fidp;
      long code = 0;
      cm_user_t *userp;
***************
*** 6099,6110 ****
          
      fd = smb_ChainFID(fd, inp);
      fidp = smb_FindFID(vcp, fd, 0);
!     if (!fidp) {
          return CM_ERROR_BADFD;
-     }
          
      if (fidp->flags & SMB_FID_IOCTL) {
!         return smb_IoctlRead(fidp, vcp, inp, outp);
      }
          
      userp = smb_GetUser(vcp, inp);
--- 6621,6657 ----
          
      fd = smb_ChainFID(fd, inp);
      fidp = smb_FindFID(vcp, fd, 0);
!     if (!fidp)
          return CM_ERROR_BADFD;
          
+     lock_ObtainMutex(&fidp->mx);
      if (fidp->flags & SMB_FID_IOCTL) {
! 	lock_ReleaseMutex(&fidp->mx);
!         code = smb_IoctlRead(fidp, vcp, inp, outp);
! 	smb_ReleaseFID(fidp);
! 	return code;
!     }
!     lock_ReleaseMutex(&fidp->mx);
! 
!     {
!         LARGE_INTEGER LOffset, LLength;
!         cm_key_t key;
! 
!         pid = ((smb_t *) inp)->pid;
!         key = cm_GenerateKey(vcp->vcID, pid, fd);
! 
!         LOffset.HighPart = 0;
!         LOffset.LowPart = offset.LowPart;
!         LLength.HighPart = 0;
!         LLength.LowPart = count;
!         
!         lock_ObtainMutex(&fidp->scp->mx);
!         code = cm_LockCheckRead(fidp->scp, LOffset, LLength, key);
!         lock_ReleaseMutex(&fidp->scp->mx);
!     }
!     if (code) {
!         smb_ReleaseFID(fidp);
!         return code;
      }
          
      userp = smb_GetUser(vcp, inp);
***************
*** 6426,6444 ****
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
      osi_assert(fidp);
  	
!     /* save a pointer to the vnode */
!     fidp->scp = scp;
!         
      /* always create it open for read/write */
      fidp->flags |= (SMB_FID_OPENREAD | SMB_FID_OPENWRITE);
  
!     smb_ReleaseFID(fidp);
!         
      smb_SetSMBParm(outp, 0, fidp->fid);
      smb_SetSMBDataLength(outp, 0);
  
      cm_Open(scp, 0, userp);
  
      cm_ReleaseUser(userp);
      /* leave scp held since we put it in fidp->scp */
      return 0;
--- 6973,6996 ----
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
      osi_assert(fidp);
  	
!     cm_HoldUser(userp);
! 
!     lock_ObtainMutex(&fidp->mx);
      /* always create it open for read/write */
      fidp->flags |= (SMB_FID_OPENREAD | SMB_FID_OPENWRITE);
  
!     /* save a pointer to the vnode */
!     fidp->scp = scp;
!     /* and the user */
!     fidp->userp = userp;
!     lock_ReleaseMutex(&fidp->mx);
! 
      smb_SetSMBParm(outp, 0, fidp->fid);
      smb_SetSMBDataLength(outp, 0);
  
      cm_Open(scp, 0, userp);
  
+     smb_ReleaseFID(fidp);
      cm_ReleaseUser(userp);
      /* leave scp held since we put it in fidp->scp */
      return 0;
***************
*** 6464,6472 ****
      /* try to find the file descriptor */
      fd = smb_ChainFID(fd, inp);
      fidp = smb_FindFID(vcp, fd, 0);
!     if (!fidp || (fidp->flags & SMB_FID_IOCTL)) {
          return CM_ERROR_BADFD;
      }
  	
      userp = smb_GetUser(vcp, inp);
  
--- 7016,7032 ----
      /* try to find the file descriptor */
      fd = smb_ChainFID(fd, inp);
      fidp = smb_FindFID(vcp, fd, 0);
! 
!     if (!fidp)
! 	return CM_ERROR_BADFD;
! 
!     lock_ObtainMutex(&fidp->mx);
!     if (fidp->flags & SMB_FID_IOCTL) {
! 	lock_ReleaseMutex(&fidp->mx);
! 	smb_ReleaseFID(fidp);
          return CM_ERROR_BADFD;
      }
+     lock_ReleaseMutex(&fidp->mx);
  	
      userp = smb_GetUser(vcp, inp);
  
***************
*** 6559,6565 ****
  
      /* Remember session generation number and time */
      oldGen = sessionGen;
!     oldTime = GetCurrentTime();
  
      while (inp->inCom != 0xff) {
          dp = &smb_dispatchTable[inp->inCom];
--- 7119,7125 ----
  
      /* Remember session generation number and time */
      oldGen = sessionGen;
!     oldTime = GetTickCount();
  
      while (inp->inCom != 0xff) {
          dp = &smb_dispatchTable[inp->inCom];
***************
*** 6603,6616 ****
  
              if (inp->inCom == 0x1d)
                  /* Raw Write */
!                 code = smb_ReceiveCoreWriteRaw (vcp, inp, outp,
!                                                  rwcp);
              else {
                  osi_LogEvent("AFS Dispatch %s",(myCrt_Dispatch(inp->inCom)),"vcp 0x%x lana %d lsn %d",(int)vcp,vcp->lana,vcp->lsn);
                  osi_Log4(smb_logp,"Dispatch %s vcp 0x%x lana %d lsn %d",myCrt_Dispatch(inp->inCom),vcp,vcp->lana,vcp->lsn);
                  code = (*(dp->procp)) (vcp, inp, outp);
!                 osi_LogEvent("AFS Dispatch return",NULL,"Code 0x%x",(code==0)?0:code-CM_ERROR_BASE);
!                 osi_Log4(smb_logp,"Dispatch return  code 0x%x vcp 0x%x lana %d lsn %d",(code==0)?0:code-CM_ERROR_BASE,vcp,vcp->lana,vcp->lsn);
  #ifdef LOG_PACKET
                  if ( code == CM_ERROR_BADSMB ||
                       code == CM_ERROR_BADOP )
--- 7163,7175 ----
  
              if (inp->inCom == 0x1d)
                  /* Raw Write */
!                 code = smb_ReceiveCoreWriteRaw (vcp, inp, outp, rwcp);
              else {
                  osi_LogEvent("AFS Dispatch %s",(myCrt_Dispatch(inp->inCom)),"vcp 0x%x lana %d lsn %d",(int)vcp,vcp->lana,vcp->lsn);
                  osi_Log4(smb_logp,"Dispatch %s vcp 0x%x lana %d lsn %d",myCrt_Dispatch(inp->inCom),vcp,vcp->lana,vcp->lsn);
                  code = (*(dp->procp)) (vcp, inp, outp);
!                 osi_LogEvent("AFS Dispatch return",NULL,"Code 0x%x",code);
!                 osi_Log4(smb_logp,"Dispatch return  code 0x%x vcp 0x%x lana %d lsn %d",code,vcp,vcp->lana,vcp->lsn);
  #ifdef LOG_PACKET
                  if ( code == CM_ERROR_BADSMB ||
                       code == CM_ERROR_BADOP )
***************
*** 6623,6629 ****
                  HANDLE h;
                  char *ptbuf[1];
                  char s[100];
!                 newTime = GetCurrentTime();
                  h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME);
                  sprintf(s, "Pkt straddled session startup, took %d ms, ncb length %d",
                           newTime - oldTime, ncbp->ncb_length);
--- 7182,7188 ----
                  HANDLE h;
                  char *ptbuf[1];
                  char s[100];
!                 newTime = GetTickCount();
                  h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME);
                  sprintf(s, "Pkt straddled session startup, took %d ms, ncb length %d",
                           newTime - oldTime, ncbp->ncb_length);
***************
*** 6776,6814 ****
          outWctp = tp;
      }	/* while loop over all requests in the packet */
  
-     /* done logging out, turn off logging-out flag */
-     if (!(inp->flags & SMB_PACKETFLAG_PROFILE_UPDATE_OK)) {
-         vcp->justLoggedOut = NULL;
-         if (loggedOut) {
-             loggedOut = 0;
-             free(loggedOutName);
-             loggedOutName = NULL;
-             smb_ReleaseUID(loggedOutUserp);
-             loggedOutUserp = NULL;
-         }
-     }
-  
      /* now send the output packet, and return */
      if (!noSend)
          smb_SendPacket(vcp, outp);
      thrd_Decrement(&ongoingOps);
  
-     if (!(vcp->flags & SMB_VCFLAG_ALREADYDEAD)) {
-         if (active_vcp != vcp) {
-             if (active_vcp) {
-                 smb_ReleaseVC(active_vcp);
-                 osi_Log2(smb_logp,
-                       "Replacing active_vcp %x with %x", active_vcp, vcp);
-             }
-             smb_HoldVC(vcp);
-             active_vcp = vcp;
-         }
-         last_msg_time = GetCurrentTime();
-     } else if (active_vcp == vcp) {
-         smb_ReleaseVC(active_vcp);
-         active_vcp = NULL;
-     }
- 
      return;
  }
  
--- 7335,7345 ----
***************
*** 7021,7026 ****
--- 7552,7561 ----
      outbufp->ncbp = outncbp;
  
      while (1) {
+ 	if (vcp) {
+ 	    smb_ReleaseVC(vcp);
+ 	    vcp = NULL;
+ 	}
          code = thrd_WaitForMultipleObjects_Event(numNCBs, NCBreturns[myIdx],
                                                   FALSE, INFINITE);
  
***************
*** 7194,7199 ****
--- 7729,7735 ----
  
          switch (rc) {
          case NRC_GOODRET: 
+             vcp = smb_FindVC(ncbp->ncb_lsn, 0, lanas[idx_session]);
              break;
  
          case NRC_PENDING:
***************
*** 7201,7244 ****
              osi_Log2(smb_logp, "NCBRECV pending lsn %d session %d", ncbp->ncb_lsn, idx_session);
              continue;
  
-         case NRC_SCLOSED:
          case NRC_SNUMOUT:
              /* Client closed session */
-             dead_sessions[idx_session] = TRUE;
-             if (vcp)
-                 smb_ReleaseVC(vcp);
              vcp = smb_FindVC(ncbp->ncb_lsn, 0, lanas[idx_session]);
-             /* Should also release vcp.  [done] 2004-05-11 jaltman
-              * Also, should do
-              * sanity check that all TID's are gone. 
-              *
-              * TODO: check if we could use LSNs[idx_session] instead, 
-              * also cleanup after dead vcp 
-              */
              if (vcp) {
!                 if (dead_vcp == vcp)
!                     osi_Log1(smb_logp, "dead_vcp already set, 0x%x", dead_vcp);
!                 else if (!(vcp->flags & SMB_VCFLAG_ALREADYDEAD)) {
!                     osi_Log2(smb_logp, "setting dead_vcp 0x%x, user struct 0x%x",
                               vcp, vcp->usersp);
-                     smb_HoldVC(vcp);
-                     if (dead_vcp) {
-                         smb_ReleaseVC(dead_vcp);
-                         osi_Log1(smb_logp,
-                                   "Previous dead_vcp %x", dead_vcp);
-                     }
-                     dead_vcp = vcp;
                      vcp->flags |= SMB_VCFLAG_ALREADYDEAD;
!                 }
!                 if (vcp->justLoggedOut) {
!                     loggedOut = 1;
!                     loggedOutTime = vcp->logoffTime;
!                     loggedOutName = strdup(vcp->justLoggedOut->unp->name);
!                     loggedOutUserp = vcp->justLoggedOut;
!                     lock_ObtainWrite(&smb_rctLock);
!                     loggedOutUserp->refCount++;
!                     lock_ReleaseWrite(&smb_rctLock);
!                 }
              }
              goto doneWithNCB;
  
--- 7737,7763 ----
              osi_Log2(smb_logp, "NCBRECV pending lsn %d session %d", ncbp->ncb_lsn, idx_session);
              continue;
  
          case NRC_SNUMOUT:
+ 	case NRC_SABORT:
+ 	case NRC_SCLOSED:
              /* Client closed session */
              vcp = smb_FindVC(ncbp->ncb_lsn, 0, lanas[idx_session]);
              if (vcp) {
! 		lock_ObtainMutex(&vcp->mx);
! 		if (!(vcp->flags & SMB_VCFLAG_ALREADYDEAD)) {
!                     osi_Log2(smb_logp, "marking dead vcp 0x%x, user struct 0x%x",
                               vcp, vcp->usersp);
                      vcp->flags |= SMB_VCFLAG_ALREADYDEAD;
! 		    lock_ReleaseMutex(&vcp->mx);
! 		    lock_ObtainWrite(&smb_globalLock);
! 		    dead_sessions[vcp->session] = TRUE;
! 		    lock_ReleaseWrite(&smb_globalLock);
! 		    smb_CleanupDeadVC(vcp);
! 		    smb_ReleaseVC(vcp);
! 		    vcp = NULL;
!                 } else {
! 		    lock_ReleaseMutex(&vcp->mx);
! 		}
              }
              goto doneWithNCB;
  
***************
*** 7273,7289 ****
                   *
                   continue;
                   */
                  break;
              }
  
          default:
!             /* A weird error code.  Log it, sleep, and
!             * continue. */
              if (vcp && vcp->errorCount++ > 3) {
                  osi_Log2(smb_logp, "session [ %d ] closed, vcp->errorCount = %d", idx_session, vcp->errorCount);
!                 dead_sessions[idx_session] = TRUE;
              }
              else {
                  thrd_Sleep(1000);
                  thrd_SetEvent(SessionEvents[idx_session]);
              }
--- 7792,7827 ----
                   *
                   continue;
                   */
+ 		vcp = smb_FindVC(ncbp->ncb_lsn, 0, lanas[idx_session]);
                  break;
              }
  
          default:
!             /* A weird error code.  Log it, sleep, and continue. */
! 	    vcp = smb_FindVC(ncbp->ncb_lsn, 0, lanas[idx_session]);
! 	    if (vcp)
! 		lock_ObtainMutex(&vcp->mx);
              if (vcp && vcp->errorCount++ > 3) {
                  osi_Log2(smb_logp, "session [ %d ] closed, vcp->errorCount = %d", idx_session, vcp->errorCount);
! 		if (!(vcp->flags & SMB_VCFLAG_ALREADYDEAD)) {
! 		    osi_Log2(smb_logp, "marking dead vcp 0x%x, user struct 0x%x",
!                               vcp, vcp->usersp);
! 		    vcp->flags |= SMB_VCFLAG_ALREADYDEAD;
! 		    lock_ReleaseMutex(&vcp->mx);
! 		    lock_ObtainWrite(&smb_globalLock);
! 		    dead_sessions[vcp->session] = TRUE;
! 		    lock_ReleaseWrite(&smb_globalLock);
! 		    smb_CleanupDeadVC(vcp);
! 		    smb_ReleaseVC(vcp);
! 		    vcp = NULL;
! 		} else {
! 		    lock_ReleaseMutex(&vcp->mx);
! 		}
!  		goto doneWithNCB;
              }
              else {
+ 		if (vcp)
+ 		    lock_ReleaseMutex(&vcp->mx);
                  thrd_Sleep(1000);
                  thrd_SetEvent(SessionEvents[idx_session]);
              }
***************
*** 7296,7304 ****
          if (smb_concurrentCalls > smb_maxObsConcurrentCalls)
              smb_maxObsConcurrentCalls = smb_concurrentCalls;
  
-         if (vcp)
-             smb_ReleaseVC(vcp);
-         vcp = smb_FindVC(ncbp->ncb_lsn, 0, ncbp->ncb_lana_num);
          /*
           * If at this point vcp is NULL (implies that packet was invalid)
           * then we are in big trouble. This means either :
--- 7834,7839 ----
***************
*** 7351,7357 ****
              continue;
          }
  
- 
          vcp->errorCount = 0;
          bufp = (struct smb_packet *) ncbp->ncb_buffer;
  #ifdef DJGPP
--- 7886,7891 ----
***************
*** 7498,7505 ****
      NCB *ncbp;
      long code = 0;
      long len;
!     long i, j;
!     smb_vc_t *vcp = 0;
      int flags = 0;
      char rname[NCBNAMSZ+1];
      char cname[MAX_COMPUTERNAME_LENGTH+1];
--- 8032,8040 ----
      NCB *ncbp;
      long code = 0;
      long len;
!     long i;
!     int  session, thread;
!     smb_vc_t *vcp = NULL;
      int flags = 0;
      char rname[NCBNAMSZ+1];
      char cname[MAX_COMPUTERNAME_LENGTH+1];
***************
*** 7599,7665 ****
              if (strncmp(rname, cname, NCBNAMSZ) != 0)
                  flags |= SMB_VCFLAG_REMOTECONN;
  
-         osi_Log1(smb_logp, "New session lsn %d", ncbp->ncb_lsn);
          /* lock */
          lock_ObtainMutex(&smb_ListenerLock);
  
!         /* New generation */
!         sessionGen++;
  
!         /* Log session startup */
  #ifdef NOTSERVICE
!         fprintf(stderr, "New session(ncb_lsn,ncb_lana_num) %d,%d starting from host "
!                  "%s\n",
!                  ncbp->ncb_lsn,ncbp->ncb_lana_num, rname);
  #endif /* NOTSERVICE */
!         osi_Log4(smb_logp, "New session(ncb_lsn,ncb_lana_num) (%d,%d) starting from host %s, %d ongoing ops",
!                   ncbp->ncb_lsn,ncbp->ncb_lana_num, osi_LogSaveString(smb_logp, rname), ongoingOps);
  
!         if (reportSessionStartups) {
  #ifndef DJGPP
!             HANDLE h;
!             char *ptbuf[1];
!             char s[100];
! 
!             h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME);
!             sprintf(s, "SMB session startup, %d ongoing ops", ongoingOps);
!             ptbuf[0] = s;
!             ReportEvent(h, EVENTLOG_WARNING_TYPE, 0, 1004, NULL,
!                          1, 0, ptbuf, NULL);
!             DeregisterEventSource(h);
  #else /* DJGPP */
!             time(&now);
!             fprintf(stderr, "%s: New session %d starting from host %s\n",
!                     asctime(localtime(&now)), ncbp->ncb_lsn, rname);
!             fflush(stderr);
  #endif /* !DJGPP */
!         }
!         osi_Log1(smb_logp, "NCBLISTEN completed, call from %s", osi_LogSaveString(smb_logp, rname));
!         osi_Log1(smb_logp, "SMB session startup, %d ongoing ops",
!                   ongoingOps);
  
!         /* now ncbp->ncb_lsn is the connection ID */
!         vcp = smb_FindVC(ncbp->ncb_lsn, SMB_FLAG_CREATE, ncbp->ncb_lana_num);
!         vcp->flags |= flags;
!         strcpy(vcp->rname, rname);
  
!         /* Allocate slot in session arrays */
!         /* Re-use dead session if possible, otherwise add one more */
!         /* But don't look at session[0], it is reserved */
!         for (i = 1; i < numSessions; i++) {
!             if (dead_sessions[i]) {
!                 osi_Log1(smb_logp, "connecting to dead session [ %d ]", i);
!                 dead_sessions[i] = FALSE;
!                 break;
!             }
!         }
  
!         if (i >= Sessionmax - 1  || numNCBs >= NCBmax - 1) {
              unsigned long code = CM_ERROR_ALLBUSY;
              smb_packet_t * outp = GetPacket();
              unsigned char *outWctp;
              smb_t *smbp;
              
              outp->ncbp = ncbp;
  
              if (vcp->flags & SMB_VCFLAG_STATUS32) {
--- 8134,8240 ----
              if (strncmp(rname, cname, NCBNAMSZ) != 0)
                  flags |= SMB_VCFLAG_REMOTECONN;
  
          /* lock */
          lock_ObtainMutex(&smb_ListenerLock);
  
! 	osi_Log1(smb_logp, "NCBLISTEN completed, call from %s", osi_LogSaveString(smb_logp, rname));
! 	osi_Log1(smb_logp, "SMB session startup, %d ongoing ops", ongoingOps);
!  
! 	/* now ncbp->ncb_lsn is the connection ID */
! 	vcp = smb_FindVC(ncbp->ncb_lsn, SMB_FLAG_CREATE, ncbp->ncb_lana_num);
!  	if (vcp->session == 0) {
!  	    /* New generation */
!  	    osi_Log1(smb_logp, "New session lsn %d", ncbp->ncb_lsn);
!  	    sessionGen++;
  
!  	    /* Log session startup */
  #ifdef NOTSERVICE
! 	    fprintf(stderr, "New session(ncb_lsn,ncb_lana_num) %d,%d starting from host %s\n",
! 		    ncbp->ncb_lsn,ncbp->ncb_lana_num, rname);
  #endif /* NOTSERVICE */
! 	    osi_Log4(smb_logp, "New session(ncb_lsn,ncb_lana_num) (%d,%d) starting from host %s, %d ongoing ops",
! 		     ncbp->ncb_lsn,ncbp->ncb_lana_num, osi_LogSaveString(smb_logp, rname), ongoingOps);
  
! 	    if (reportSessionStartups) {
  #ifndef DJGPP
! 		HANDLE h;
! 		char *ptbuf[1];
! 		char s[100];
! 
! 		h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME);
! 		sprintf(s, "SMB session startup, %d ongoing ops", ongoingOps);
! 		ptbuf[0] = s;
! 		ReportEvent(h, EVENTLOG_WARNING_TYPE, 0, 1004, NULL,
! 			     1, 0, ptbuf, NULL);
! 		DeregisterEventSource(h);
  #else /* DJGPP */
! 		time(&now);
! 		fprintf(stderr, "%s: New session %d starting from host %s\n",
! 			 asctime(localtime(&now)), ncbp->ncb_lsn, rname);
! 		fflush(stderr);
  #endif /* !DJGPP */
! 	    }
  
! 	    lock_ObtainMutex(&vcp->mx);
! 	    strcpy(vcp->rname, rname);
! 	    vcp->flags |= flags;
! 	    lock_ReleaseMutex(&vcp->mx);
! 
! 	    /* Allocate slot in session arrays */
! 	    /* Re-use dead session if possible, otherwise add one more */
! 	    /* But don't look at session[0], it is reserved */
! 	    lock_ObtainWrite(&smb_globalLock);
! 	    for (session = 1; session < numSessions; session++) {
! 		if (dead_sessions[session]) {
! 		    osi_Log1(smb_logp, "connecting to dead session [ %d ]", session);
! 		    dead_sessions[session] = FALSE;
! 		    break;
! 		}
! 	    }
! 	    lock_ReleaseWrite(&smb_globalLock);
! 	} else {
!  	    /* We are re-using an existing VC because the lsn and lana 
!  	     * were re-used */
!  	    session = vcp->session;
!  
!  	    osi_Log1(smb_logp, "Re-using session lsn %d", ncbp->ncb_lsn);
!  
!  	    /* Log session startup */
! #ifdef NOTSERVICE
! 	    fprintf(stderr, "Re-using session(ncb_lsn,ncb_lana_num) %d,%d starting from host %s\n",
! 		    ncbp->ncb_lsn,ncbp->ncb_lana_num, rname);
! #endif /* NOTSERVICE */
! 	    osi_Log4(smb_logp, "Re-using session(ncb_lsn,ncb_lana_num) (%d,%d) starting from host %s, %d ongoing ops",
! 		     ncbp->ncb_lsn,ncbp->ncb_lana_num, osi_LogSaveString(smb_logp, rname), ongoingOps);
  
! 	    if (reportSessionStartups) {
! #ifndef DJGPP
! 		HANDLE h;
! 		char *ptbuf[1];
! 		char s[100];
! 
! 		h = RegisterEventSource(NULL, AFS_DAEMON_EVENT_NAME);
! 		sprintf(s, "SMB session startup, %d ongoing ops", ongoingOps);
! 		ptbuf[0] = s;
! 		ReportEvent(h, EVENTLOG_WARNING_TYPE, 0, 1004, NULL,
! 			     1, 0, ptbuf, NULL);
! 		DeregisterEventSource(h);
! #else /* DJGPP */
! 		time(&now);
! 		fprintf(stderr, "%s: Re-using session %d starting from host %s\n",
! 			asctime(localtime(&now)), ncbp->ncb_lsn, rname);
! 		fflush(stderr);
! #endif /* !DJGPP */
! 	    }
! 	}
  
!         if (session >= SESSION_MAX - 1  || numNCBs >= NCB_MAX - 1) {
              unsigned long code = CM_ERROR_ALLBUSY;
              smb_packet_t * outp = GetPacket();
              unsigned char *outWctp;
              smb_t *smbp;
              
+ 	    smb_FormatResponsePacket(vcp, NULL, outp);
              outp->ncbp = ncbp;
  
              if (vcp->flags & SMB_VCFLAG_STATUS32) {
***************
*** 7690,7731 ****
              }
              smb_SendPacket(vcp, outp);
              smb_FreePacket(outp);
          } else {
              /* assert that we do not exceed the maximum number of sessions or NCBs.
!             * we should probably want to wait for a session to be freed in case
!             * we run out.
!             */
!             osi_assert(i < Sessionmax - 1);
!             osi_assert(numNCBs < NCBmax - 1);   /* if we pass this test we can allocate one more */
  
!             LSNs[i] = ncbp->ncb_lsn;
!             lanas[i] = ncbp->ncb_lana_num;
  		
!             if (i == numSessions) {
                  /* Add new NCB for new session */
                  char eventName[MAX_PATH];
  
                  osi_Log1(smb_logp, "smb_Listener creating new session %d", i);
  
                  InitNCBslot(numNCBs);
                  numNCBs++;
                  thrd_SetEvent(NCBavails[0]);
                  thrd_SetEvent(NCBevents[0]);
!                 for (j = 0; j < smb_NumServerThreads; j++)
!                     thrd_SetEvent(NCBreturns[j][0]);
                  /* Also add new session event */
!                 sprintf(eventName, "SessionEvents[%d]", i);
!                 SessionEvents[i] = thrd_CreateEvent(NULL, FALSE, TRUE, eventName);
                  if ( GetLastError() == ERROR_ALREADY_EXISTS )
                      osi_Log1(smb_logp, "Event Object Already Exists: %s", osi_LogSaveString(smb_logp, eventName));
                  numSessions++;
                  osi_Log2(smb_logp, "increasing numNCBs [ %d ] numSessions [ %d ]", numNCBs, numSessions);
                  thrd_SetEvent(SessionEvents[0]);
              } else {
!                 thrd_SetEvent(SessionEvents[i]);
              }
          }
-         
          smb_ReleaseVC(vcp);
  
          /* unlock */
--- 8265,8319 ----
              }
              smb_SendPacket(vcp, outp);
              smb_FreePacket(outp);
+ 
+ 	    lock_ObtainMutex(&vcp->mx);
+ 	    vcp->flags |= SMB_VCFLAG_ALREADYDEAD;
+ 	    lock_ReleaseMutex(&vcp->mx);
+ 	    smb_CleanupDeadVC(vcp);
          } else {
              /* assert that we do not exceed the maximum number of sessions or NCBs.
!              * we should probably want to wait for a session to be freed in case
!              * we run out.
!              */
!             osi_assert(session < SESSION_MAX - 1);
!             osi_assert(numNCBs < NCB_MAX - 1);   /* if we pass this test we can allocate one more */
  
! 	    lock_ObtainMutex(&vcp->mx);
! 	    vcp->session   = session;
! 	    lock_ReleaseMutex(&vcp->mx);
! 	    lock_ObtainWrite(&smb_globalLock);
!             LSNs[session]  = ncbp->ncb_lsn;
!             lanas[session] = ncbp->ncb_lana_num;
! 	    lock_ReleaseWrite(&smb_globalLock);
  		
!             if (session == numSessions) {
                  /* Add new NCB for new session */
                  char eventName[MAX_PATH];
  
                  osi_Log1(smb_logp, "smb_Listener creating new session %d", i);
  
                  InitNCBslot(numNCBs);
+ 		lock_ObtainWrite(&smb_globalLock);
                  numNCBs++;
+ 		lock_ReleaseWrite(&smb_globalLock);
                  thrd_SetEvent(NCBavails[0]);
                  thrd_SetEvent(NCBevents[0]);
!                 for (thread = 0; thread < smb_NumServerThreads; thread++)
!                     thrd_SetEvent(NCBreturns[thread][0]);
                  /* Also add new session event */
!                 sprintf(eventName, "SessionEvents[%d]", session);
!                 SessionEvents[session] = thrd_CreateEvent(NULL, FALSE, TRUE, eventName);
                  if ( GetLastError() == ERROR_ALREADY_EXISTS )
                      osi_Log1(smb_logp, "Event Object Already Exists: %s", osi_LogSaveString(smb_logp, eventName));
+ 		lock_ObtainWrite(&smb_globalLock);
                  numSessions++;
+ 		lock_ReleaseWrite(&smb_globalLock);
                  osi_Log2(smb_logp, "increasing numNCBs [ %d ] numSessions [ %d ]", numNCBs, numSessions);
                  thrd_SetEvent(SessionEvents[0]);
              } else {
!                 thrd_SetEvent(SessionEvents[session]);
              }
          }
          smb_ReleaseVC(vcp);
  
          /* unlock */
***************
*** 8036,8042 ****
      if ( GetLastError() == ERROR_ALREADY_EXISTS )
          afsi_log("Event Object Already Exists: %s", eventName);
      for (i = 0; i < smb_NumServerThreads; i++) {
!         NCBreturns[i] = malloc(NCBmax * sizeof(EVENT_HANDLE));
          NCBreturns[i][0] = retHandle;
      }
  
--- 8624,8630 ----
      if ( GetLastError() == ERROR_ALREADY_EXISTS )
          afsi_log("Event Object Already Exists: %s", eventName);
      for (i = 0; i < smb_NumServerThreads; i++) {
!         NCBreturns[i] = malloc(NCB_MAX * sizeof(EVENT_HANDLE));
          NCBreturns[i][0] = retHandle;
      }
  
***************
*** 8411,8417 ****
          smb_fid_t *fidp;
          smb_tid_t *tidp;
       
!         for (fidp = vcp->fidsp; fidp; fidp = (smb_fid_t *) osi_QNext(&fidp->q))
          {
              if (fidp->scp != NULL) {
                  cm_scache_t * scp;
--- 8999,9009 ----
          smb_fid_t *fidp;
          smb_tid_t *tidp;
       
! 	if (vcp->magic != SMB_VC_MAGIC)
! 	    osi_panic("afsd: invalid smb_vc_t detected in smb_allVCsp", 
! 		       __FILE__, __LINE__);
! 
! 	for (fidp = vcp->fidsp; fidp; fidp = (smb_fid_t *) osi_QNext(&fidp->q))
          {
              if (fidp->scp != NULL) {
                  cm_scache_t * scp;
***************
*** 8514,8520 ****
  
          *cp = 0;
  
!         osi_Log0( smb_logp, osi_LogSaveString(smb_logp, buf));
      }
  
      osi_Log0(smb_logp, "*** End SMB packet dump ***");
--- 9106,9112 ----
  
          *cp = 0;
  
!         osi_Log1( smb_logp, "%s", osi_LogSaveString(smb_logp, buf));
      }
  
      osi_Log0(smb_logp, "*** End SMB packet dump ***");
***************
*** 8562,8567 ****
--- 9154,9189 ----
      sprintf(output, "done dumping smb_vc_t\n");
      WriteFile(outputFile, output, strlen(output), &zilch, NULL);
    
+     sprintf(output, "begin dumping DEAD smb_vc_t\n");
+     WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
+ 
+     for (vcp = smb_deadVCsp; vcp; vcp=vcp->nextp) 
+     {
+         smb_fid_t *fidp;
+       
+         sprintf(output, "%s vcp=0x%p, refCount=%d, flags=%d, vcID=%d, lsn=%d, uidCounter=%d, tidCounter=%d, fidCounter=%d\n",
+                  cookie, vcp, vcp->refCount, vcp->flags, vcp->vcID, vcp->lsn, vcp->uidCounter, vcp->tidCounter, vcp->fidCounter);
+         WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
+       
+         sprintf(output, "begin dumping smb_fid_t\n");
+         WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
+ 
+         for (fidp = vcp->fidsp; fidp; fidp = (smb_fid_t *) osi_QNext(&fidp->q))
+         {
+             sprintf(output, "%s -- smb_fidp=0x%p, refCount=%d, fid=%d, vcp=0x%p, scp=0x%p, ioctlp=0x%p, NTopen_pathp=%s, NTopen_wholepathp=%s\n", 
+                      cookie, fidp, fidp->refCount, fidp->fid, fidp->vcp, fidp->scp, fidp->ioctlp, 
+                      fidp->NTopen_pathp ? fidp->NTopen_pathp : "NULL", 
+                      fidp->NTopen_wholepathp ? fidp->NTopen_wholepathp : "NULL");
+             WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
+         }
+       
+         sprintf(output, "done dumping smb_fid_t\n");
+         WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
+     }
+ 
+     sprintf(output, "done dumping DEAD smb_vc_t\n");
+     WriteFile(outputFile, output, (DWORD)strlen(output), &zilch, NULL);
+   
      if (lock)
          lock_ReleaseRead(&smb_rctLock);
      return 0;
Index: openafs/src/WINNT/afsd/smb.h
diff -c openafs/src/WINNT/afsd/smb.h:1.14.2.12 openafs/src/WINNT/afsd/smb.h:1.14.2.22
*** openafs/src/WINNT/afsd/smb.h:1.14.2.12	Tue Apr 19 01:11:18 2005
--- openafs/src/WINNT/afsd/smb.h	Sun Apr  9 00:56:39 2006
***************
*** 91,96 ****
--- 91,97 ----
  
  /* flags for functions */
  #define SMB_FLAG_CREATE		1	/* create the structure if necessary */
+ #define SMB_FLAG_AFSLOGON       2       /* operating on behalf of afslogon.dll */
  
  /* max # of bytes we'll receive in an incoming SMB message */
  /* the maximum is 2^18-1 for NBT and 2^25-1 for Raw transport messages */
***************
*** 166,174 ****
  } smb_packet_t;
  
  /* smb_packet flags */
! #define SMB_PACKETFLAG_PROFILE_UPDATE_OK	1
! #define SMB_PACKETFLAG_NOSEND			2
! #define SMB_PACKETFLAG_SUSPENDED		4
  
  /* a structure for making Netbios calls; locked by smb_globalLock */
  #define SMB_NCBMAGIC	0x2334344
--- 167,174 ----
  } smb_packet_t;
  
  /* smb_packet flags */
! #define SMB_PACKETFLAG_NOSEND			1
! #define SMB_PACKETFLAG_SUSPENDED		2
  
  /* a structure for making Netbios calls; locked by smb_globalLock */
  #define SMB_NCBMAGIC	0x2334344
***************
*** 192,197 ****
--- 192,198 ----
  /* one per virtual circuit */
  typedef struct smb_vc {
      struct smb_vc *nextp;		/* not used */
+     afs_uint32 magic;			/* a magic value to detect bad entries */
      unsigned long refCount;		/* the reference count */
      long flags;			        /* the flags, if any; locked by mx */
      osi_mutex_t mx;			/* the mutex */
***************
*** 203,210 ****
      struct smb_tid *tidsp;		/* the first child in the tid list */
      struct smb_user *usersp;	        /* the first child in the user session list */
      struct smb_fid *fidsp;		/* the first child in the open file list */
-     struct smb_user *justLoggedOut;	/* ready for profile upload? */
-     time_t logoffTime;	                /* tick count when logged off */
      unsigned char errorCount;
      char rname[17];
      int lana;
--- 204,209 ----
***************
*** 212,219 ****
--- 211,220 ----
      void * secCtx;                      /* security context when negotiating SMB extended auth
                                           * valid when SMB_VCFLAG_AUTH_IN_PROGRESS is set
                                           */
+     unsigned short session;		/* This is the Session Index associated with the NCBs */
  } smb_vc_t;
  
+ #define SMB_VC_MAGIC ('S' | 'C'<<8 | 'A'<<16 | 'C'<<24)
  					/* have we negotiated ... */
  #define SMB_VCFLAG_USEV3	1	/* ... version 3 of the protocol */
  #define SMB_VCFLAG_USECORE	2	/* ... the core protocol */
***************
*** 228,240 ****
  typedef struct smb_user {
      struct smb_user *nextp;		/* next sibling */
      unsigned long refCount;		/* ref count */
!     long flags;			        /* flags; locked by mx */
      osi_mutex_t mx;
!     long userID;			/* the session identifier */
      struct smb_vc *vcp;		        /* back ptr to virtual circuit */
      struct smb_username *unp;           /* user name struct */
  } smb_user_t;
  
  typedef struct smb_username {
      struct smb_username *nextp;		/* next sibling */
      unsigned long refCount;		/* ref count */
--- 229,244 ----
  typedef struct smb_user {
      struct smb_user *nextp;		/* next sibling */
      unsigned long refCount;		/* ref count */
!     afs_uint32 flags;		        /* flags; locked by mx */
      osi_mutex_t mx;
!     unsigned short userID;		/* the session identifier */
      struct smb_vc *vcp;		        /* back ptr to virtual circuit */
      struct smb_username *unp;           /* user name struct */
+     afs_uint32	delete;			/* ok to del: locked by smb_rctLock */
  } smb_user_t;
  
+ #define SMB_USERFLAG_DELETE	    1	/* delete struct when ref count zero */
+ 
  typedef struct smb_username {
      struct smb_username *nextp;		/* next sibling */
      unsigned long refCount;		/* ref count */
***************
*** 243,251 ****
      struct cm_user *userp;		/* CM user structure */
      char *name;			        /* user name */
      char *machine;                      /* machine name */
  } smb_username_t;
  
! #define SMB_USERFLAG_DELETE	1	/* delete struct when ref count zero */
  
  #define SMB_MAX_USERNAME_LENGTH 256
  
--- 247,271 ----
      struct cm_user *userp;		/* CM user structure */
      char *name;			        /* user name */
      char *machine;                      /* machine name */
+     time_t last_logoff_t;		/* most recent logoff time */
  } smb_username_t;
  
! /* The SMB_USERNAMEFLAG_AFSLOGON is used to preserve the existence of an 
!  * smb_username_t even when the refCount is zero.  This is used to ensure
!  * that tokens set to a username during the integrated logon process are 
!  * preserved until the SMB Session that will require the tokens is created.
!  * The cm_IoctlSetTokens() function when executed from the Network Provider
!  * connects to the AFS Client Service using the credentials of the machine
!  * and not the user for whom the tokens are being configured. */
! #define SMB_USERNAMEFLAG_AFSLOGON   1
! 
! /* The SMB_USERNAMEFLAG_LOGOFF is used to indicate that the user most
!  * recently logged off at 'last_logoff_t'.  The smb_username_t should not
!  * be deleted even if the refCount is zero before 'last_logoff_t' + 
!  * 'smb_LogoffTransferTimeout' if 'smb_LogoffTokenTransfer' is non-zero.
!  * The smb_Daemon() thread is responsible for purging the expired objects */
! 
! #define SMB_USERNAMEFLAG_LOGOFF     2
  
  #define SMB_MAX_USERNAME_LENGTH 256
  
***************
*** 253,269 ****
  typedef struct smb_tid {
      struct smb_tid *nextp;		/* next sibling */
      unsigned long refCount;
!     long flags;
      osi_mutex_t mx;			/* for non-tree-related stuff */
      unsigned short tid;		        /* the tid */
      struct smb_vc *vcp;		        /* back ptr */
      struct cm_user *userp;		/* user logged in at the
  					 * tree connect level (base) */
      char *pathname;			/* pathname derived from sharename */
  } smb_tid_t;
  
! #define SMB_TIDFLAG_DELETE	1	/* delete struct when ref count zero */
! #define SMB_TIDFLAG_IPC	2 /* IPC$ */
  
  /* one per process ID */
  typedef struct smb_pid {
--- 273,289 ----
  typedef struct smb_tid {
      struct smb_tid *nextp;		/* next sibling */
      unsigned long refCount;
!     afs_uint32 flags;			/* protected by mx */
      osi_mutex_t mx;			/* for non-tree-related stuff */
      unsigned short tid;		        /* the tid */
      struct smb_vc *vcp;		        /* back ptr */
      struct cm_user *userp;		/* user logged in at the
  					 * tree connect level (base) */
      char *pathname;			/* pathname derived from sharename */
+     afs_uint32	delete;			/* ok to del: locked by smb_rctLock */
  } smb_tid_t;
  
! #define SMB_TIDFLAG_IPC		1 	/* IPC$ */
  
  /* one per process ID */
  typedef struct smb_pid {
***************
*** 310,320 ****
  typedef struct smb_fid {
      osi_queue_t q;
      unsigned long refCount;
!     unsigned long flags;
      osi_mutex_t mx;			/* for non-tree-related stuff */
      unsigned short fid;		        /* the file ID */
      struct smb_vc *vcp;		        /* back ptr */
      struct cm_scache *scp;		/* scache of open file */
      long offset;			/* our file pointer */
      smb_ioctl_t *ioctlp;		/* ptr to ioctl structure */
  					/* Under NT, we may need to know the
--- 330,344 ----
  typedef struct smb_fid {
      osi_queue_t q;
      unsigned long refCount;
!     afs_uint32 flags;			/* protected by mx */
      osi_mutex_t mx;			/* for non-tree-related stuff */
      unsigned short fid;		        /* the file ID */
      struct smb_vc *vcp;		        /* back ptr */
      struct cm_scache *scp;		/* scache of open file */
+     struct cm_user *userp;              /* user that opened the file
+                                            originally (used to close
+                                            the file if session is
+                                            terminated) */
      long offset;			/* our file pointer */
      smb_ioctl_t *ioctlp;		/* ptr to ioctl structure */
  					/* Under NT, we may need to know the
***************
*** 329,343 ****
      int prev_chunk;			/* previous chunk read */
      int raw_writers;		        /* pending async raw writes */
      EVENT_HANDLE raw_write_event;	/* signal this when raw_writers zero */
  } smb_fid_t;
  
  #define SMB_FID_OPENREAD		1	/* open for reading */
  #define SMB_FID_OPENWRITE		2	/* open for writing */
! #define SMB_FID_DELETE			4	/* delete struct on ref count 0 */
  #define SMB_FID_IOCTL			8	/* a file descriptor for the
  						 * magic ioctl file */
  #define SMB_FID_OPENDELETE		0x10	/* open for deletion (NT) */
  #define SMB_FID_DELONCLOSE		0x20	/* marked for deletion */
  /*
   * Now some special flags to work around a bug in NT Client
   */
--- 353,369 ----
      int prev_chunk;			/* previous chunk read */
      int raw_writers;		        /* pending async raw writes */
      EVENT_HANDLE raw_write_event;	/* signal this when raw_writers zero */
+     afs_uint32	delete;			/* ok to del: locked by smb_rctLock */
  } smb_fid_t;
  
  #define SMB_FID_OPENREAD		1	/* open for reading */
  #define SMB_FID_OPENWRITE		2	/* open for writing */
! #define SMB_FID_UNUSED                  4       /* free for use */
  #define SMB_FID_IOCTL			8	/* a file descriptor for the
  						 * magic ioctl file */
  #define SMB_FID_OPENDELETE		0x10	/* open for deletion (NT) */
  #define SMB_FID_DELONCLOSE		0x20	/* marked for deletion */
+ 
  /*
   * Now some special flags to work around a bug in NT Client
   */
***************
*** 346,351 ****
--- 372,385 ----
  #define SMB_FID_LOOKSLIKECOPY	(SMB_FID_LENGTHSETDONE | SMB_FID_MTIMESETDONE)
  #define SMB_FID_NTOPEN			0x100	/* have dscp and pathp */
  
+ #define SMB_FID_SHARE_READ              0x1000
+ #define SMB_FID_SHARE_WRITE             0x2000
+ 
+ #define SMB_FID_QLOCK_HIGH              0x0fe00000
+ #define SMB_FID_QLOCK_LOW               0x00000000
+ #define SMB_FID_QLOCK_LENGTH            1
+ #define SMB_FID_QLOCK_PID               0
+ 
  /*
   * SMB file attributes (32-bit)
   */
***************
*** 406,422 ****
   * Note: will not be set if smb_hideDotFiles is false 
   */
  
! /* waiting lock list elements */
  typedef struct smb_waitingLock {
!     osi_queue_t q;
!     smb_vc_t *vcp;
      smb_packet_t *inp;
      smb_packet_t *outp;
!     time_t timeRemaining;
!     void *lockp;
! } smb_waitingLock_t;
  
! extern smb_waitingLock_t *smb_allWaitingLocks;
  
  typedef long (smb_proc_t)(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp);
  
--- 440,472 ----
   * Note: will not be set if smb_hideDotFiles is false 
   */
  
! /* individual lock on a waiting lock request */
  typedef struct smb_waitingLock {
!     osi_queue_t      q;
!     cm_key_t         key;
!     LARGE_INTEGER    LOffset;
!     LARGE_INTEGER    LLength;
!     cm_file_lock_t * lockp;
!     int              state;
! } smb_waitingLock_t;
! 
! #define SMB_WAITINGLOCKSTATE_WAITING 0
! #define SMB_WAITINGLOCKSTATE_DONE    1
! #define SMB_WAITINGLOCKSTATE_ERROR   2
! 
! /* waiting lock request */
! typedef struct smb_waitingLockRequest {
!     osi_queue_t   q;
!     smb_vc_t *    vcp;
!     cm_scache_t * scp;
      smb_packet_t *inp;
      smb_packet_t *outp;
!     int           lockType;
!     time_t        timeRemaining;
!     smb_waitingLock_t * locks;
! } smb_waitingLockRequest_t;
  
! extern smb_waitingLockRequest_t *smb_allWaitingLocks;
  
  typedef long (smb_proc_t)(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp);
  
***************
*** 458,480 ****
  
  extern smb_vc_t *smb_FindVC(unsigned short lsn, int flags, int lana);
  
  extern void smb_ReleaseVC(smb_vc_t *vcp);
  
  extern void smb_ReleaseVCNoLock(smb_vc_t *vcp);
  
  extern smb_tid_t *smb_FindTID(smb_vc_t *vcp, unsigned short tid, int flags);
  
  extern void smb_ReleaseTID(smb_tid_t *tidp);
  
  extern smb_user_t *smb_FindUID(smb_vc_t *vcp, unsigned short uid, int flags);
  
! extern smb_username_t *smb_FindUserByName(char *usern, char *machine, int flags);
  
  extern smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, char *usern); 
  
! extern smb_username_t *smb_FindUserByName(char *usern, char *machine, int flags);
  
! extern smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, char *usern);
  
  extern void smb_ReleaseUID(smb_user_t *uidp);
  
--- 508,534 ----
  
  extern smb_vc_t *smb_FindVC(unsigned short lsn, int flags, int lana);
  
+ extern void smb_CleanupDeadVC(smb_vc_t *vcp);
+ 
  extern void smb_ReleaseVC(smb_vc_t *vcp);
  
  extern void smb_ReleaseVCNoLock(smb_vc_t *vcp);
  
  extern smb_tid_t *smb_FindTID(smb_vc_t *vcp, unsigned short tid, int flags);
  
+ extern void smb_HoldTIDNoLock(smb_tid_t *tidp);
+ 
  extern void smb_ReleaseTID(smb_tid_t *tidp);
  
  extern smb_user_t *smb_FindUID(smb_vc_t *vcp, unsigned short uid, int flags);
  
! extern smb_username_t *smb_FindUserByName(char *usern, char *machine, afs_uint32 flags);
  
  extern smb_user_t *smb_FindUserByNameThisSession(smb_vc_t *vcp, char *usern); 
  
! extern void smb_ReleaseUsername(smb_username_t *unp);
  
! extern void smb_HoldUIDNoLock(smb_user_t *uidp);
  
  extern void smb_ReleaseUID(smb_user_t *uidp);
  
***************
*** 484,491 ****
--- 538,550 ----
  
  extern smb_fid_t *smb_FindFID(smb_vc_t *vcp, unsigned short fid, int flags);
  
+ extern void smb_HoldFIDNoLock(smb_fid_t *fidp);
+ 
  extern void smb_ReleaseFID(smb_fid_t *fidp);
  
+ extern long smb_CloseFID(smb_vc_t *vcp, smb_fid_t *fidp, cm_user_t *userp,
+                          afs_uint32 dosTime);
+ 
  extern int smb_FindShare(smb_vc_t *vcp, smb_user_t *uidp, char *shareName, char **pathNamep);
  
  extern int smb_FindShareCSCPolicy(char *shareName);
***************
*** 543,552 ****
  
  /* some globals, too */
  extern char *smb_localNamep;
- extern int loggedOut;
- extern time_t loggedOutTime;
- extern char *loggedOutName;
- extern smb_user_t *loggedOutUserp;
  
  extern osi_log_t *smb_logp;
  
--- 602,607 ----
Index: openafs/src/WINNT/afsd/smb3.c
diff -c openafs/src/WINNT/afsd/smb3.c:1.42.2.28.2.1 openafs/src/WINNT/afsd/smb3.c:1.42.2.44
*** openafs/src/WINNT/afsd/smb3.c:1.42.2.28.2.1	Fri Oct 14 07:24:26 2005
--- openafs/src/WINNT/afsd/smb3.c	Fri Feb  3 18:05:28 2006
***************
*** 49,55 ****
      cm_user_t *up = NULL;
          
      uidp = smb_FindUID(vcp, inp->uid, 0);
!     if (!uidp) return NULL;
          
      lock_ObtainMutex(&uidp->mx);
      if (uidp->unp) {
--- 49,56 ----
      cm_user_t *up = NULL;
          
      uidp = smb_FindUID(vcp, inp->uid, 0);
!     if (!uidp) 
! 	return NULL;
          
      lock_ObtainMutex(&uidp->mx);
      if (uidp->unp) {
***************
*** 121,127 ****
      return inp;
  }   
  
- /*DEBUG do not checkin*/
  void OutputDebugF(char * format, ...) {
      va_list args;
      int len;
--- 122,127 ----
***************
*** 174,182 ****
          OutputDebugString(buf);
      }   
  }
- /**/
  
  #define SMB_EXT_SEC_PACKAGE_NAME "Negotiate"
  void smb_NegotiateExtendedSecurity(void ** secBlob, int * secBlobLength) {
      SECURITY_STATUS status, istatus;
      CredHandle creds = {0,0};
--- 174,182 ----
          OutputDebugString(buf);
      }   
  }
  
  #define SMB_EXT_SEC_PACKAGE_NAME "Negotiate"
+ 
  void smb_NegotiateExtendedSecurity(void ** secBlob, int * secBlobLength) {
      SECURITY_STATUS status, istatus;
      CredHandle creds = {0,0};
***************
*** 201,207 ****
                                         &creds,
                                         &expiry);
  
!     if (status != SEC_E_OK) {       
          /* Really bad. We return an empty security blob */
          OutputDebugF("AcquireCredentialsHandle failed with %lX", status);
          goto nes_0;
--- 201,207 ----
                                         &creds,
                                         &expiry);
  
!     if (status != SEC_E_OK) {
          /* Really bad. We return an empty security blob */
          OutputDebugF("AcquireCredentialsHandle failed with %lX", status);
          goto nes_0;
***************
*** 649,659 ****
      return 0;
  }
  
! /* When using SMB auth, all SMB sessions have to pass through here first to
!  * authenticate the user. 
!  * Caveat: If not use the SMB auth the protocol does not require sending a
!  * session setup packet, which means that we can't rely on a UID in subsequent
!  * packets.  Though in practice we get one anyway.
   */
  long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
--- 649,660 ----
      return 0;
  }
  
! /* When using SMB auth, all SMB sessions have to pass through here
!  * first to authenticate the user.  
!  *
!  * Caveat: If not using SMB auth, the protocol does not require
!  * sending a session setup packet, which means that we can't rely on a
!  * UID in subsequent packets.  Though in practice we get one anyway.
   */
  long smb_ReceiveV3SessionSetupX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
***************
*** 661,667 ****
      smb_user_t *uidp;
      unsigned short newUid;
      unsigned long caps = 0;
-     cm_user_t *userp;
      smb_username_t *unp;
      char *s1 = " ";
      long code = 0; 
--- 662,667 ----
***************
*** 841,860 ****
      uidp = smb_FindUserByNameThisSession(vcp, usern);
      if (uidp) {   /* already there, so don't create a new one */
          unp = uidp->unp;
!         userp = unp->userp;
!         newUid = (unsigned short)uidp->userID;  /* For some reason these are different types!*/
!         osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"FindUserByName:Lana[%d],lsn[%d],userid[%d],name[%s]",vcp->lana,vcp->lsn,newUid,osi_LogSaveString(smb_logp, usern));
!         osi_Log3(smb_logp,"smb_ReceiveV3SessionSetupX FindUserByName:Lana[%d],lsn[%d],userid[%d]",vcp->lana,vcp->lsn,newUid);
          smb_ReleaseUID(uidp);
      }
      else {
!       /* do a global search for the username/machine name pair */
          unp = smb_FindUserByName(usern, vcp->rname, SMB_FLAG_CREATE);
  
          /* Create a new UID and cm_user_t structure */
          userp = unp->userp;
          if (!userp)
              userp = cm_NewUser();
          lock_ObtainMutex(&vcp->mx);
          if (!vcp->uidCounter)
              vcp->uidCounter++; /* handle unlikely wraparounds */
--- 841,872 ----
      uidp = smb_FindUserByNameThisSession(vcp, usern);
      if (uidp) {   /* already there, so don't create a new one */
          unp = uidp->unp;
!         newUid = uidp->userID;
!         osi_LogEvent("AFS smb_ReceiveV3SessionSetupX",NULL,"FindUserByName:Lana[%d],lsn[%d],userid[%d],name[%s]",
! 		      vcp->lana,vcp->lsn,newUid,osi_LogSaveString(smb_logp, usern));
!         osi_Log3(smb_logp,"smb_ReceiveV3SessionSetupX FindUserByName:Lana[%d],lsn[%d],userid[%d]",
! 		  vcp->lana,vcp->lsn,newUid);
          smb_ReleaseUID(uidp);
      }
      else {
! 	cm_user_t *userp;
! 
! 	/* do a global search for the username/machine name pair */
          unp = smb_FindUserByName(usern, vcp->rname, SMB_FLAG_CREATE);
+ 	lock_ObtainMutex(&unp->mx);
+ 	if (unp->flags & SMB_USERNAMEFLAG_AFSLOGON) {
+ 	    /* clear the afslogon flag so that the tickets can now 
+ 	     * be freed when the refCount returns to zero.
+ 	     */
+ 	    unp->flags &= ~SMB_USERNAMEFLAG_AFSLOGON;
+ 	}
+ 	lock_ReleaseMutex(&unp->mx);
  
          /* Create a new UID and cm_user_t structure */
          userp = unp->userp;
          if (!userp)
              userp = cm_NewUser();
+ 	cm_HoldUserVCRef(userp);
          lock_ObtainMutex(&vcp->mx);
          if (!vcp->uidCounter)
              vcp->uidCounter++; /* handle unlikely wraparounds */
***************
*** 926,956 ****
  {
      smb_user_t *uidp;
  
-     /* don't get tokens from this VC */
-     vcp->flags |= SMB_VCFLAG_ALREADYDEAD;
- 
-     inp->flags |= SMB_PACKETFLAG_PROFILE_UPDATE_OK;
- 
      /* find the tree and free it */
      uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
-     /* TODO: smb_ReleaseUID() ? */
      if (uidp) {
!         char *s1 = NULL, *s2 = NULL;
! 
!         if (s2 == NULL) s2 = " ";
!         if (s1 == NULL) {s1 = s2; s2 = " ";}
  
!         osi_Log4(smb_logp, "SMB3 user logoffX uid %d name %s%s%s", uidp->userID,
!                   osi_LogSaveString(smb_logp, (uidp->unp) ? uidp->unp->name: " "), 
!                   osi_LogSaveString(smb_logp,s1), osi_LogSaveString(smb_logp,s2));
  
          lock_ObtainMutex(&uidp->mx);
!         uidp->flags |= SMB_USERFLAG_DELETE;
!         /*
!          * it doesn't get deleted right away
!          * because the vcp points to it
!          */
          lock_ReleaseMutex(&uidp->mx);
      }
      else    
          osi_Log0(smb_logp, "SMB3 user logoffX");
--- 938,970 ----
  {
      smb_user_t *uidp;
  
      /* find the tree and free it */
      uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
      if (uidp) {
! 	smb_username_t * unp;
  
!         osi_Log2(smb_logp, "SMB3 user logoffX uid %d name %s", uidp->userID,
!                   osi_LogSaveString(smb_logp, (uidp->unp) ? uidp->unp->name: " "));
  
          lock_ObtainMutex(&uidp->mx);
! 	unp = uidp->unp;
          lock_ReleaseMutex(&uidp->mx);
+ 
+ #ifdef COMMENT
+ 	/* we can't do this.  we get logoff messages prior to a session
+ 	 * disconnect even though it doesn't mean the user is logging out.
+ 	 * we need to create a new pioctl and EventLogoff handler to set
+ 	 * SMB_USERNAMEFLAG_LOGOFF.
+ 	 */
+ 	if (unp && smb_LogoffTokenTransfer) {
+ 	    lock_ObtainMutex(&unp->mx);
+ 	    unp->flags |= SMB_USERNAMEFLAG_LOGOFF;
+ 	    unp->last_logoff_t = osi_Time() + smb_LogoffTransferTimeout;
+ 	    lock_ReleaseMutex(&unp->mx);
+ 	}
+ #endif
+ 
+ 	smb_ReleaseUID(uidp);
      }
      else    
          osi_Log0(smb_logp, "SMB3 user logoffX");
***************
*** 1128,1134 ****
          
      tp = malloc(sizeof(*tp));
      memset(tp, 0, sizeof(*tp));
!     tp->vcp = NULL;
      tp->curData = tp->curParms = 0;
      tp->totalData = totalData;
      tp->totalParms = totalParms;
--- 1142,1149 ----
          
      tp = malloc(sizeof(*tp));
      memset(tp, 0, sizeof(*tp));
!     smb_HoldVC(vcp);
!     tp->vcp = vcp;
      tp->curData = tp->curParms = 0;
      tp->totalData = totalData;
      tp->totalParms = totalParms;
***************
*** 1159,1169 ****
      return tp;
  }       
  
! /* free a tran2 packet; must be called with smb_globalLock held */
  void smb_FreeTran2Packet(smb_tran2Packet_t *t2p)
  {
!     if (t2p->vcp) 
          smb_ReleaseVC(t2p->vcp);
      if (t2p->flags & SMB_TRAN2PFLAG_ALLOC) {
          if (t2p->parmsp)
              free(t2p->parmsp);
--- 1174,1186 ----
      return tp;
  }       
  
! /* free a tran2 packet */
  void smb_FreeTran2Packet(smb_tran2Packet_t *t2p)
  {
!     if (t2p->vcp) {
          smb_ReleaseVC(t2p->vcp);
+ 	t2p->vcp = NULL;
+     }
      if (t2p->flags & SMB_TRAN2PFLAG_ALLOC) {
          if (t2p->parmsp)
              free(t2p->parmsp);
***************
*** 1380,1385 ****
--- 1397,1404 ----
              osi_LogEvent("AFS-Dispatch-RAP[%s]",myCrt_RapDispatch(rapOp),"vcp[%x] lana[%d] lsn[%d]",(int)vcp,vcp->lana,vcp->lsn);
              osi_Log4(smb_logp,"AFS Server - Dispatch-RAP %s vcp[%x] lana[%d] lsn[%d]",myCrt_RapDispatch(rapOp),vcp,vcp->lana,vcp->lsn);
              code = (*smb_rapDispatchTable[rapOp].procp)(vcp, asp, outp);
+             osi_LogEvent("AFS-Dispatch-RAP return",myCrt_RapDispatch(rapOp),"Code 0x%x",code);
+             osi_Log4(smb_logp,"AFS Server - Dispatch-RAP return  code 0x%x vcp[%x] lana[%d] lsn[%d]",code,vcp,vcp->lana,vcp->lsn);
          }
          else {
              osi_LogEvent("AFS-Dispatch-RAP [invalid]", NULL, "op[%x] vcp[%x] lana[%d] lsn[%d]", rapOp, vcp, vcp->lana, vcp->lsn);
***************
*** 1397,1405 ****
          }
  
          /* free the input tran 2 packet */
-         lock_ObtainWrite(&smb_globalLock);
          smb_FreeTran2Packet(asp);
-         lock_ReleaseWrite(&smb_globalLock);
      }
      else if (firstPacket) {
          /* the first packet in a multi-packet request, we need to send an
--- 1416,1422 ----
***************
*** 2035,2043 ****
          }
  
          /* free the input tran 2 packet */
-         lock_ObtainWrite(&smb_globalLock);
          smb_FreeTran2Packet(asp);
-         lock_ReleaseWrite(&smb_globalLock);
      }
      else if (firstPacket) {
          /* the first packet in a multi-packet request, we need to send an
--- 2052,2058 ----
***************
*** 2360,2372 ****
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
      osi_assert(fidp);
  	
      /* save a pointer to the vnode */
      fidp->scp = scp;
          
      /* compute open mode */
!     if (openMode != 1) fidp->flags |= SMB_FID_OPENREAD;
      if (openMode == 1 || openMode == 2)
          fidp->flags |= SMB_FID_OPENWRITE;
  
      smb_ReleaseFID(fidp);
          
--- 2375,2393 ----
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
      osi_assert(fidp);
  	
+     cm_HoldUser(userp);
+     lock_ObtainMutex(&fidp->mx);
      /* save a pointer to the vnode */
      fidp->scp = scp;
+     /* and the user */
+     fidp->userp = userp;
          
      /* compute open mode */
!     if (openMode != 1) 
! 	fidp->flags |= SMB_FID_OPENREAD;
      if (openMode == 1 || openMode == 2)
          fidp->flags |= SMB_FID_OPENWRITE;
+     lock_ReleaseMutex(&fidp->mx);
  
      smb_ReleaseFID(fidp);
          
***************
*** 2931,2937 ****
--- 2952,2960 ----
          *((LARGE_INTEGER *)op) = scp->length; op += 8;	/* alloc size */
          *((LARGE_INTEGER *)op) = scp->length; op += 8;	/* EOF */
          *((u_long *)op) = scp->linkCount; op += 4;
+ 	lock_ObtainMutex(&fidp->mx);
          *op++ = ((fidp->flags & SMB_FID_DELONCLOSE) ? 1 : 0);
+ 	lock_ReleaseMutex(&fidp->mx);
          *op++ = (scp->fileType == CM_SCACHETYPE_DIRECTORY ? 1 : 0);
          *op++ = 0;
          *op++ = 0;
***************
*** 2998,3014 ****
          return 0;
      }
  
      if (infoLevel == SMB_QUERY_FILE_STANDARD_INFO && !(fidp->flags & SMB_FID_OPENDELETE)) {
!         smb_SendTran2Error(vcp, p, op, CM_ERROR_NOACCESS);
          smb_ReleaseFID(fidp);
          return 0;
      }
      if ((infoLevel == SMB_QUERY_FILE_EA_INFO || infoLevel == SMB_QUERY_FILE_NAME_INFO)
           && !(fidp->flags & SMB_FID_OPENWRITE)) {
!         smb_SendTran2Error(vcp, p, op, CM_ERROR_NOACCESS);
          smb_ReleaseFID(fidp);
          return 0;
      }
  
      osi_Log1(smb_logp, "T2 SFileInfo type 0x%x", infoLevel);
  
--- 3021,3041 ----
          return 0;
      }
  
+     lock_ObtainMutex(&fidp->mx);
      if (infoLevel == SMB_QUERY_FILE_STANDARD_INFO && !(fidp->flags & SMB_FID_OPENDELETE)) {
! 	lock_ReleaseMutex(&fidp->mx);
          smb_ReleaseFID(fidp);
+         smb_SendTran2Error(vcp, p, op, CM_ERROR_NOACCESS);
          return 0;
      }
      if ((infoLevel == SMB_QUERY_FILE_EA_INFO || infoLevel == SMB_QUERY_FILE_NAME_INFO)
           && !(fidp->flags & SMB_FID_OPENWRITE)) {
! 	lock_ReleaseMutex(&fidp->mx);
          smb_ReleaseFID(fidp);
+         smb_SendTran2Error(vcp, p, op, CM_ERROR_NOACCESS);
          return 0;
      }
+     lock_ReleaseMutex(&fidp->mx);
  
      osi_Log1(smb_logp, "T2 SFileInfo type 0x%x", infoLevel);
  
***************
*** 3055,3061 ****
--- 3082,3090 ----
               lastMod.dwLowDateTime != -1 && lastMod.dwHighDateTime != -1) {
              attr.mask |= CM_ATTRMASK_CLIENTMODTIME;
              smb_UnixTimeFromLargeSearchTime(&attr.clientModTime, &lastMod);
+ 	    lock_ObtainMutex(&fidp->mx);
              fidp->flags |= SMB_FID_MTIMESETDONE;
+ 	    lock_ReleaseMutex(&fidp->mx);
          }
  		
          attribute = *((u_long *)(p->datap + 32));
***************
*** 3094,3105 ****
          if (*((char *)(p->datap))) {
              code = cm_CheckNTDelete(fidp->NTopen_dscp, scp, userp,
                                       &req);
!             if (code == 0)          
                  fidp->flags |= SMB_FID_DELONCLOSE;
!         }               
          else {  
              code = 0;
              fidp->flags &= ~SMB_FID_DELONCLOSE;
          }
      }       
  
--- 3123,3139 ----
          if (*((char *)(p->datap))) {
              code = cm_CheckNTDelete(fidp->NTopen_dscp, scp, userp,
                                       &req);
!             if (code == 0) {
! 		lock_ObtainMutex(&fidp->mx);
                  fidp->flags |= SMB_FID_DELONCLOSE;
! 		lock_ReleaseMutex(&fidp->mx);
! 	    }
! 	}               
          else {  
              code = 0;
+ 	    lock_ObtainMutex(&fidp->mx);
              fidp->flags &= ~SMB_FID_DELONCLOSE;
+ 	    lock_ReleaseMutex(&fidp->mx);
          }
      }       
  
***************
*** 3185,3191 ****
      char requestFileName[1024] = "";
      smb_tran2Packet_t *outp = 0;
      cm_user_t *userp = 0;
-     cm_scache_t *scp;
      cm_req_t req;
      CPINFO CodePageInfo;
      int i, nbnLen, reqLen;
--- 3219,3224 ----
***************
*** 4098,4104 ****
                  if ((dsp->flags & SMB_DIRSEARCH_BULKST) &&
                      LargeIntegerGreaterThanOrEqualTo(thyper, scp->bulkStatProgress)) {
                      /* Don't bulk stat if risking timeout */
!                     int now = GetCurrentTime();
                      if (now - req.startTime > 5000) {
                          scp->bulkStatProgress = thyper;
                          scp->flags &= ~CM_SCACHEFLAG_BULKSTATTING;
--- 4131,4137 ----
                  if ((dsp->flags & SMB_DIRSEARCH_BULKST) &&
                      LargeIntegerGreaterThanOrEqualTo(thyper, scp->bulkStatProgress)) {
                      /* Don't bulk stat if risking timeout */
!                     int now = GetTickCount();
                      if (now - req.startTime > 5000) {
                          scp->bulkStatProgress = thyper;
                          scp->flags &= ~CM_SCACHEFLAG_BULKSTATTING;
***************
*** 4515,4531 ****
  
      scp = NULL;
          
!     extraInfo = (smb_GetSMBParm(inp, 2) & 1);	/* return extra info */
!     openFun = smb_GetSMBParm(inp, 8);	/* open function */
      excl = ((openFun & 3) == 0);
!     trunc = ((openFun & 3) == 2);		/* truncate it */
      openMode = (smb_GetSMBParm(inp, 3) & 0x7);
!     openAction = 0;			/* tracks what we did */
  
      attributes = smb_GetSMBParm(inp, 5);
      dosTime = smb_GetSMBParm(inp, 6) | (smb_GetSMBParm(inp, 7) << 16);
  
! 	/* compute initial mode bits based on read-only flag in attributes */
      initialModeBits = 0666;
      if (attributes & 1) initialModeBits &= ~0222;
          
--- 4548,4564 ----
  
      scp = NULL;
          
!     extraInfo = (smb_GetSMBParm(inp, 2) & 1); /* return extra info */
!     openFun = smb_GetSMBParm(inp, 8); /* open function */
      excl = ((openFun & 3) == 0);
!     trunc = ((openFun & 3) == 2); /* truncate it */
      openMode = (smb_GetSMBParm(inp, 3) & 0x7);
!     openAction = 0;             /* tracks what we did */
  
      attributes = smb_GetSMBParm(inp, 5);
      dosTime = smb_GetSMBParm(inp, 6) | (smb_GetSMBParm(inp, 7) << 16);
  
!                                 /* compute initial mode bits based on read-only flag in attributes */
      initialModeBits = 0666;
      if (attributes & 1) initialModeBits &= ~0222;
          
***************
*** 4739,4746 ****
--- 4772,4783 ----
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
      osi_assert(fidp);
  	
+     cm_HoldUser(userp);
+     lock_ObtainMutex(&fidp->mx);
      /* save a pointer to the vnode */
      fidp->scp = scp;
+     /* also the user */
+     fidp->userp = userp;
          
      /* compute open mode */
      if (openMode != 1) 
***************
*** 4748,4753 ****
--- 4785,4791 ----
      if (openMode == 1 || openMode == 2)
          fidp->flags |= SMB_FID_OPENWRITE;
  
+     lock_ReleaseMutex(&fidp->mx);
      smb_ReleaseFID(fidp);
          
      cm_Open(scp, 0, userp);
***************
*** 4786,4800 ****
      return 0;
  }       
  
! /* The file locking code is incomplete and that which is implemented in cm_Lock()
!  * is broken.  What exists functions only because it is rarely if ever called.
!  * The tests activated by FULL_LOCKS_ONLY ensure that cm_Lock() is only called
!  * if the lock covers the entire file.  Therefore, RXAFS_SetLock is only called 
!  * rarely.   That means that AFS locks are ignored by Windows clients.
!  * When cm_Lock is re-written, undefine or better yet remove, the FULL_LOCKS_ONLY
!  * code.
!  */
! #define FULL_LOCKS_ONLY
  long smb_ReceiveV3LockingX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
      cm_req_t req;
--- 4824,4855 ----
      return 0;
  }       
  
! static void smb_GetLockParams(unsigned char LockType, 
!                               char ** buf, 
!                               unsigned int * ppid, 
!                               LARGE_INTEGER * pOffset, 
!                               LARGE_INTEGER * pLength)
! {
!     if (LockType & LOCKING_ANDX_LARGE_FILES) {
!         /* Large Files */
!         *ppid = *((USHORT *) *buf);
!         pOffset->HighPart = *((LONG *)(*buf + 4));
!         pOffset->LowPart = *((DWORD *)(*buf + 8));
!         pLength->HighPart = *((LONG *)(*buf + 12));
!         pLength->LowPart = *((DWORD *)(*buf + 16));
!         *buf += 20;
!     }
!     else {
!         /* Not Large Files */
!         *ppid = *((USHORT *) *buf);
!         pOffset->HighPart = 0;
!         pOffset->LowPart = *((DWORD *)(*buf + 2));
!         pLength->HighPart = 0;
!         pLength->LowPart = *((DWORD *)(*buf + 6));
!         *buf += 10;
!     }
! }
! 
  long smb_ReceiveV3LockingX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
      cm_req_t req;
***************
*** 4804,4816 ****
      cm_scache_t *scp;
      unsigned char LockType;
      unsigned short NumberOfUnlocks, NumberOfLocks;
!     unsigned long Timeout;
      char *op;
      LARGE_INTEGER LOffset, LLength;
!     smb_waitingLock_t *waitingLock;
!     void *lockp;
      long code = 0;
      int i;
  
      cm_InitReq(&req);
  
--- 4859,4874 ----
      cm_scache_t *scp;
      unsigned char LockType;
      unsigned short NumberOfUnlocks, NumberOfLocks;
!     long Timeout;
      char *op;
+     char *op_locks;
      LARGE_INTEGER LOffset, LLength;
!     smb_waitingLockRequest_t *wlRequest = NULL;
!     cm_file_lock_t *lockp;
      long code = 0;
      int i;
+     cm_key_t key;
+     unsigned int pid;
  
      cm_InitReq(&req);
  
***************
*** 4818,4827 ****
      fid = smb_ChainFID(fid, inp);
  
      fidp = smb_FindFID(vcp, fid, 0);
!     if (!fidp || (fidp->flags & SMB_FID_IOCTL)) {
          osi_Log0(smb_logp, "smb_ReceiveV3Locking BadFD");
          return CM_ERROR_BADFD;
      }
      /* set inp->fid so that later read calls in same msg can find fid */
      inp->fid = fid;
  
--- 4876,4893 ----
      fid = smb_ChainFID(fid, inp);
  
      fidp = smb_FindFID(vcp, fid, 0);
!     if (!fidp)
! 	return CM_ERROR_BADFD;
!     
!     lock_ObtainMutex(&fidp->mx);
!     if (fidp->flags & SMB_FID_IOCTL) {
          osi_Log0(smb_logp, "smb_ReceiveV3Locking BadFD");
+ 	lock_ReleaseMutex(&fidp->mx);
+ 	smb_ReleaseFID(fidp);
          return CM_ERROR_BADFD;
      }
+     lock_ReleaseMutex(&fidp->mx);
+ 
      /* set inp->fid so that later read calls in same msg can find fid */
      inp->fid = fid;
  
***************
*** 4844,4946 ****
      NumberOfUnlocks = smb_GetSMBParm(inp, 6);
      NumberOfLocks = smb_GetSMBParm(inp, 7);
  
      op = smb_GetSMBData(inp, NULL);
  
      for (i=0; i<NumberOfUnlocks; i++) {
!         if (LockType & LOCKING_ANDX_LARGE_FILES) {
!             /* Large Files */
!             LOffset.HighPart = *((LONG *)(op + 4));
!             LOffset.LowPart = *((DWORD *)(op + 8));
!             LLength.HighPart = *((LONG *)(op + 12));
!             LLength.LowPart = *((DWORD *)(op + 16));
!             op += 20;
!         }
!         else {
!             /* Not Large Files */
!             LOffset.HighPart = 0;
!             LOffset.LowPart = *((DWORD *)(op + 2));
!             LLength.HighPart = 0;
!             LLength.LowPart = *((DWORD *)(op + 6));
!             op += 10;
!         }
! #ifdef FULL_LOCKS_ONLY
!         if (LargeIntegerNotEqualToZero(LOffset)) {
!             osi_Log2(smb_logp, "smb_ReceiveV3Locking Unlock %d offset 0x%x != Zero",
!                      i, (long)LOffset.QuadPart);
!             continue;
!         }
! #endif /* FULL_LOCKS_ONLY */
!         /* Do not check length -- length check done in cm_Unlock */
  
!         code = cm_Unlock(scp, LockType, LOffset, LLength, userp, &req);
!         if (code) goto done;
!     }       
  
      for (i=0; i<NumberOfLocks; i++) {
!         if (LockType & LOCKING_ANDX_LARGE_FILES) {
!             /* Large Files */
!             LOffset.HighPart = *((LONG *)(op + 4));
!             LOffset.LowPart = *((DWORD *)(op + 8));
!             LLength.HighPart = *((LONG *)(op + 12));
!             LLength.LowPart = *((DWORD *)(op + 16));
!             op += 20;
!         }
!         else {
!             /* Not Large Files */
!             LOffset.HighPart = 0;
!             LOffset.LowPart = *((DWORD *)(op + 2));
!             LLength.HighPart = 0;
!             LLength.LowPart = *((DWORD *)(op + 6));
!             op += 10;
!         }
! #ifdef FULL_LOCKS_ONLY
!         if (LargeIntegerNotEqualToZero(LOffset)) {
!             osi_Log2(smb_logp, "smb_ReceiveV3Locking Lock %d offset 0x%x != Zero",
!                      i, (long)LOffset.QuadPart);
!             continue;
!         }
!         if (LargeIntegerLessThan(LOffset, scp->length)) {
!             osi_Log3(smb_logp, "smb_ReceiveV3Locking Unlock %d offset 0x%x < 0x%x",
!                      i, (long)LOffset.QuadPart, (long)scp->length.QuadPart);
!             continue;
!         }
! #endif /* FULL_LOCKS_ONLY */
!         code = cm_Lock(scp, LockType, LOffset, LLength, Timeout,
                          userp, &req, &lockp);
          if (code == CM_ERROR_WOULDBLOCK && Timeout != 0) {
              /* Put on waiting list */
!             waitingLock = malloc(sizeof(smb_waitingLock_t));
!             waitingLock->vcp = vcp;
!             smb_HoldVC(vcp);
!             waitingLock->inp = smb_CopyPacket(inp);
!             waitingLock->outp = smb_CopyPacket(outp);
!             waitingLock->timeRemaining = Timeout;
!             waitingLock->lockp = lockp;
!             lock_ObtainWrite(&smb_globalLock);
!             osi_QAdd((osi_queue_t **)&smb_allWaitingLocks,
!                       &waitingLock->q);
!             osi_Wakeup((long) &smb_allWaitingLocks);
!             lock_ReleaseWrite(&smb_globalLock);
!             /* don't send reply immediately */
!             outp->flags |= SMB_PACKETFLAG_NOSEND;
              osi_Log1(smb_logp, "smb_ReceiveV3Locking WaitingLock created 0x%x",
!                      (long) waitingLock);
              continue;
          }
          if (code) {
              osi_Log1(smb_logp, "smb_ReceiveV3Locking cm_Lock failure code 0x%x", code);
              break;
          }
!     }           
  
      if (code) {
!         /* release any locks acquired before the failure */
!         osi_Log0(smb_logp, "smb_ReceiveV3Locking - failure; should be releasing locks but don't!!!!");
!     }
!     else
          smb_SetSMBDataLength(outp, 0);
    done:   
      cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_LOCK);
    doneSync:
      lock_ReleaseMutex(&scp->mx);
      cm_ReleaseUser(userp);
--- 4910,5095 ----
      NumberOfUnlocks = smb_GetSMBParm(inp, 6);
      NumberOfLocks = smb_GetSMBParm(inp, 7);
  
+     if ((LockType & LOCKING_ANDX_CANCEL_LOCK) ||
+         (LockType & LOCKING_ANDX_CHANGE_LOCKTYPE)) {
+ 
+         /* We don't support these requests.  Apparently, we can safely
+            not deal with them too. */
+         osi_Log1(smb_logp, "smb_ReceiveV3Locking received unsupported request [%s]",
+                  ((LockType & LOCKING_ANDX_CANCEL_LOCK)?
+                   "LOCKING_ANDX_CANCEL_LOCK":
+                   "LOCKING_ANDX_CHANGE_LOCKTYPE")); 
+         /* No need to call osi_LogSaveString since these are string
+            constants.*/
+ 
+         code = CM_ERROR_BADOP;
+         goto done;
+ 
+     }
+ 
      op = smb_GetSMBData(inp, NULL);
  
      for (i=0; i<NumberOfUnlocks; i++) {
!         smb_GetLockParams(LockType, &op, &pid, &LOffset, &LLength);
  
!         key = cm_GenerateKey(vcp->vcID, pid, fidp->fid);
! 
!         code = cm_Unlock(scp, LockType, LOffset, LLength, key, userp, &req);
! 
!         if (code) 
!             goto done;
!     }
! 
!     op_locks = op;
  
      for (i=0; i<NumberOfLocks; i++) {
!         smb_GetLockParams(LockType, &op, &pid, &LOffset, &LLength);
! 
!         key = cm_GenerateKey(vcp->vcID, pid, fidp->fid);
! 
!         code = cm_Lock(scp, LockType, LOffset, LLength, key, (Timeout != 0),
                          userp, &req, &lockp);
+ 
          if (code == CM_ERROR_WOULDBLOCK && Timeout != 0) {
+             smb_waitingLock_t * wLock;
+ 
              /* Put on waiting list */
!             if(wlRequest == NULL) {
!                 int j;
!                 char * opt;
!                 cm_key_t tkey;
!                 LARGE_INTEGER tOffset, tLength;
! 
!                 wlRequest = malloc(sizeof(smb_waitingLockRequest_t));
! 
!                 osi_assert(wlRequest != NULL);
! 
!                 wlRequest->vcp = vcp;
!                 smb_HoldVC(vcp);
!                 wlRequest->scp = scp;
!                 cm_HoldSCache(scp);
!                 wlRequest->inp = smb_CopyPacket(inp);
!                 wlRequest->outp = smb_CopyPacket(outp);
!                 wlRequest->lockType = LockType;
!                 wlRequest->timeRemaining = Timeout;
!                 wlRequest->locks = NULL;
! 
!                 /* The waiting lock request needs to have enough
!                    information to undo all the locks in the request.
!                    We do the following to store info about locks that
!                    have already been granted.  Sure, we can get most
!                    of the info from the packet, but the packet doesn't
!                    hold the result of cm_Lock call.  In practice we
!                    only receive packets with one or two locks, so we
!                    are only wasting a few bytes here and there and
!                    only for a limited period of time until the waiting
!                    lock times out or is freed. */
! 
!                 for(opt = op_locks, j=i; j > 0; j--) {
!                     smb_GetLockParams(LockType, &opt, &pid, &tOffset, &tLength);
! 
!                     tkey = cm_GenerateKey(vcp->vcID, pid, fidp->fid);
! 
!                     wLock = malloc(sizeof(smb_waitingLock_t));
! 
!                     osi_assert(wLock != NULL);
! 
!                     wLock->key = tkey;
!                     wLock->LOffset = tOffset;
!                     wLock->LLength = tLength;
!                     wLock->lockp = NULL;
!                     wLock->state = SMB_WAITINGLOCKSTATE_DONE;
!                     osi_QAdd((osi_queue_t **) &wlRequest->locks,
!                              &wLock->q);
!                 }
!             }
! 
!             wLock = malloc(sizeof(smb_waitingLock_t));
! 
!             osi_assert(wLock != NULL);
! 
!             wLock->key = key;
!             wLock->LOffset = LOffset;
!             wLock->LLength = LLength;
!             wLock->lockp = lockp;
!             wLock->state = SMB_WAITINGLOCKSTATE_WAITING;
!             osi_QAdd((osi_queue_t **) &wlRequest->locks,
!                      &wLock->q);
! 
              osi_Log1(smb_logp, "smb_ReceiveV3Locking WaitingLock created 0x%x",
!                      (long) wLock);
! 
!             code = 0;
              continue;
          }
+ 
          if (code) {
              osi_Log1(smb_logp, "smb_ReceiveV3Locking cm_Lock failure code 0x%x", code);
              break;
          }
!     }
  
      if (code) {
! 
!         /* Since something went wrong with the lock number i, we now
!            have to go ahead and release any locks acquired before the
!            failure.  All locks before lock number i (of which there
!            are i of them) have either been successful or are waiting.
!            Either case requires calling cm_Unlock(). */
! 
!         /* And purge the waiting lock */
!         if(wlRequest != NULL) {
!             smb_waitingLock_t * wl;
!             smb_waitingLock_t * wlNext;
!             long ul_code;
! 
!             for(wl = wlRequest->locks; wl; wl = wlNext) {
! 
!                 wlNext = (smb_waitingLock_t *) osi_QNext(&wl->q);
! 
!                 ul_code = cm_Unlock(scp, LockType, wl->LOffset, wl->LLength, wl->key, userp, &req);
!                 
!                 if(ul_code != 0) {
!                     osi_Log1(smb_logp, "smb_ReceiveV3Locking cm_Unlock returns code %d", ul_code);
!                 } else {
!                     osi_Log0(smb_logp, "smb_ReceiveV3Locking cm_Unlock successful");
!                 }
! 
!                 osi_QRemove((osi_queue_t **) &wlRequest->locks, &wl->q);
!                 free(wl);
! 
!             }
! 
!             smb_ReleaseVC(wlRequest->vcp);
!             cm_ReleaseSCache(wlRequest->scp);
!             smb_FreePacket(wlRequest->inp);
!             smb_FreePacket(wlRequest->outp);
! 
!             free(wlRequest);
! 
!             wlRequest = NULL;
!         }
! 
!     } else {
! 
!         if (wlRequest != NULL) {
! 
!             lock_ObtainWrite(&smb_globalLock);
!             osi_QAdd((osi_queue_t **)&smb_allWaitingLocks,
!                      &wlRequest->q);
!             osi_Wakeup((long) &smb_allWaitingLocks);
!             lock_ReleaseWrite(&smb_globalLock);
! 
!             /* don't send reply immediately */
!             outp->flags |= SMB_PACKETFLAG_NOSEND;
!         }
! 
          smb_SetSMBDataLength(outp, 0);
+     }
+ 
    done:   
      cm_SyncOpDone(scp, NULL, CM_SCACHESYNC_LOCK);
+ 
    doneSync:
      lock_ReleaseMutex(&scp->mx);
      cm_ReleaseUser(userp);
***************
*** 4965,4973 ****
      fid = smb_ChainFID(fid, inp);
          
      fidp = smb_FindFID(vcp, fid, 0);
!     if (!fidp || (fidp->flags & SMB_FID_IOCTL)) {
          return CM_ERROR_BADFD;
      }
          
      userp = smb_GetUser(vcp, inp);
          
--- 5114,5129 ----
      fid = smb_ChainFID(fid, inp);
          
      fidp = smb_FindFID(vcp, fid, 0);
!     if (!fidp)
! 	return CM_ERROR_BADFD;
!     
!     lock_ObtainMutex(&fidp->mx);
!     if (fidp->flags & SMB_FID_IOCTL) {
! 	lock_ReleaseMutex(&fidp->mx);
! 	smb_ReleaseFID(fidp);
          return CM_ERROR_BADFD;
      }
+     lock_ReleaseMutex(&fidp->mx);
          
      userp = smb_GetUser(vcp, inp);
          
***************
*** 5029,5037 ****
      fid = smb_ChainFID(fid, inp);
          
      fidp = smb_FindFID(vcp, fid, 0);
!     if (!fidp || (fidp->flags & SMB_FID_IOCTL)) {
          return CM_ERROR_BADFD;
      }
          
      userp = smb_GetUser(vcp, inp);
          
--- 5185,5200 ----
      fid = smb_ChainFID(fid, inp);
          
      fidp = smb_FindFID(vcp, fid, 0);
!     if (!fidp)
! 	return CM_ERROR_BADFD;
!     
!     lock_ObtainMutex(&fidp->mx);
!     if (fidp->flags & SMB_FID_IOCTL) {
! 	lock_ReleaseMutex(&fidp->mx);
! 	smb_ReleaseFID(fidp);
          return CM_ERROR_BADFD;
      }
+     lock_ReleaseMutex(&fidp->mx);
          
      userp = smb_GetUser(vcp, inp);
          
***************
*** 5067,5077 ****
  long smb_ReceiveV3ReadX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
      osi_hyper_t offset;
!     long count, finalCount;
      unsigned short fd;
      smb_fid_t *fidp;
      long code = 0;
      cm_user_t *userp;
      char *op;
          
      fd = smb_GetSMBParm(inp, 2);
--- 5230,5243 ----
  long smb_ReceiveV3ReadX(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
      osi_hyper_t offset;
!     long count;
!     long finalCount = 0;
      unsigned short fd;
+     unsigned pid;
      smb_fid_t *fidp;
      long code = 0;
      cm_user_t *userp;
+     cm_key_t key;
      char *op;
          
      fd = smb_GetSMBParm(inp, 2);
***************
*** 5087,5099 ****
      if (!fidp) {
          return CM_ERROR_BADFD;
      }
      /* set inp->fid so that later read calls in same msg can find fid */
      inp->fid = fd;
  
      if (fidp->flags & SMB_FID_IOCTL) {
!         return smb_IoctlV3Read(fidp, vcp, inp, outp);
      }
!         
      userp = smb_GetUser(vcp, inp);
  
      /* 0 and 1 are reserved for request chaining, were setup by our caller,
--- 5253,5291 ----
      if (!fidp) {
          return CM_ERROR_BADFD;
      }
+ 
+     pid = ((smb_t *) inp)->pid;
+     key = cm_GenerateKey(vcp->vcID, pid, fd);
+     {
+         LARGE_INTEGER LOffset, LLength;
+ 
+         LOffset.HighPart = offset.HighPart;
+         LOffset.LowPart = offset.LowPart;
+         LLength.HighPart = 0;
+         LLength.LowPart = count;
+ 
+         lock_ObtainMutex(&fidp->scp->mx);
+         code = cm_LockCheckRead(fidp->scp, LOffset, LLength, key);
+         lock_ReleaseMutex(&fidp->scp->mx);
+     }
+ 
+     if (code) {
+         smb_ReleaseFID(fidp);
+         return code;
+     }
+ 
      /* set inp->fid so that later read calls in same msg can find fid */
      inp->fid = fd;
  
+     lock_ObtainMutex(&fidp->mx);
      if (fidp->flags & SMB_FID_IOCTL) {
! 	lock_ReleaseMutex(&fidp->mx);
!         code = smb_IoctlV3Read(fidp, vcp, inp, outp);
! 	smb_ReleaseFID(fidp);
! 	return code;
      }
!     lock_ReleaseMutex(&fidp->mx);
! 
      userp = smb_GetUser(vcp, inp);
  
      /* 0 and 1 are reserved for request chaining, were setup by our caller,
***************
*** 5188,5193 ****
--- 5380,5386 ----
      unsigned int extAttributes;
      unsigned int createDisp;
      unsigned int createOptions;
+     unsigned int shareAccess;
      int initialModeBits;
      unsigned short baseFid;
      smb_fid_t *baseFidp;
***************
*** 5232,5237 ****
--- 5425,5432 ----
          | (smb_GetSMBOffsetParm(inp, 8, 1) << 16);
      extAttributes = smb_GetSMBOffsetParm(inp, 13, 1)
          | (smb_GetSMBOffsetParm(inp, 14, 1) << 16);
+     shareAccess = smb_GetSMBOffsetParm(inp, 15, 1)
+         | (smb_GetSMBOffsetParm(inp, 16, 1) << 16);
      createDisp = smb_GetSMBOffsetParm(inp, 17, 1)
          | (smb_GetSMBOffsetParm(inp, 18, 1) << 16);
      createOptions = smb_GetSMBOffsetParm(inp, 19, 1)
***************
*** 5252,5258 ****
       * extended attributes
       */
      initialModeBits = 0666;
!     if (extAttributes & 1) 
          initialModeBits &= ~0222;
  
      pathp = smb_GetSMBData(inp, NULL);
--- 5447,5453 ----
       * extended attributes
       */
      initialModeBits = 0666;
!     if (extAttributes & SMB_ATTR_READONLY) 
          initialModeBits &= ~0222;
  
      pathp = smb_GetSMBData(inp, NULL);
***************
*** 5268,5274 ****
  
      osi_Log1(smb_logp,"NTCreateX for [%s]",osi_LogSaveString(smb_logp,realPathp));
      osi_Log4(smb_logp,"... da=[%x] ea=[%x] cd=[%x] co=[%x]", desiredAccess, extAttributes, createDisp, createOptions);
!     osi_Log2(smb_logp,"... flags=[%x] lastNamep=[%s]", flags, osi_LogSaveString(smb_logp,(lastNamep?lastNamep:"null")));
  
      if (lastNamep && strcmp(lastNamep, SMB_IOCTL_FILENAME) == 0) {
          /* special case magic file name for receiving IOCTL requests
--- 5463,5469 ----
  
      osi_Log1(smb_logp,"NTCreateX for [%s]",osi_LogSaveString(smb_logp,realPathp));
      osi_Log4(smb_logp,"... da=[%x] ea=[%x] cd=[%x] co=[%x]", desiredAccess, extAttributes, createDisp, createOptions);
!     osi_Log3(smb_logp,"... share=[%x] flags=[%x] lastNamep=[%s]", shareAccess, flags, osi_LogSaveString(smb_logp,(lastNamep?lastNamep:"null")));
  
      if (lastNamep && strcmp(lastNamep, SMB_IOCTL_FILENAME) == 0) {
          /* special case magic file name for receiving IOCTL requests
***************
*** 5316,5321 ****
--- 5511,5517 ----
      	free(hexp);
      }
  #endif
+ 
      userp = smb_GetUser(vcp, inp);
      if (!userp) {
      	osi_Log1(smb_logp, "NTCreateX Invalid user [%d]", ((smb_t *) inp)->uid);
***************
*** 5324,5329 ****
--- 5520,5526 ----
      }
  
      if (baseFid == 0) {
+ 	baseFidp = NULL;
          baseDirp = cm_data.rootSCachep;
          code = smb_LookupTIDPath(vcp, ((smb_t *)inp)->tid, &tidPathp);
          if (code == CM_ERROR_TIDIPC) {
***************
*** 5364,5369 ****
--- 5561,5572 ----
      if (createOptions & FILE_DELETE_ON_CLOSE)
          fidflags |= SMB_FID_DELONCLOSE;
  
+     /* and the share mode */
+     if (shareAccess & FILE_SHARE_READ)
+         fidflags |= SMB_FID_SHARE_READ;
+     if (shareAccess & FILE_SHARE_WRITE)
+         fidflags |= SMB_FID_SHARE_WRITE;
+ 
      code = 0;
  
      /* For an exclusive create, we want to do a case sensitive match for the last component. */
***************
*** 5378,5383 ****
--- 5581,5588 ----
                  cm_ReleaseSCache(dscp);
                  cm_ReleaseUser(userp);
                  free(realPathp);
+ 		if (baseFidp) 
+ 		    smb_ReleaseFID(baseFidp);
                  if ( WANTS_DFS_PATHNAMES(inp) )
                      return CM_ERROR_PATH_NOT_COVERED;
                  else
***************
*** 5394,5399 ****
--- 5599,5606 ----
                      cm_ReleaseSCache(dscp);
                      cm_ReleaseUser(userp);
                      free(realPathp);
+ 		    if (baseFidp) 
+ 			smb_ReleaseFID(baseFidp);
                      return CM_ERROR_EXISTS;
                  }
              }
***************
*** 5407,5412 ****
--- 5614,5621 ----
              cm_ReleaseSCache(scp);
              cm_ReleaseUser(userp);
              free(realPathp);
+ 	    if (baseFidp) 
+ 		smb_ReleaseFID(baseFidp);
              if ( WANTS_DFS_PATHNAMES(inp) )
                  return CM_ERROR_PATH_NOT_COVERED;
              else
***************
*** 5443,5448 ****
--- 5652,5659 ----
                      cm_ReleaseSCache(dscp);
                      cm_ReleaseUser(userp);
                      free(realPathp);
+ 		    if (baseFidp) 
+ 			smb_ReleaseFID(baseFidp);
                      if ( WANTS_DFS_PATHNAMES(inp) )
                          return CM_ERROR_PATH_NOT_COVERED;
                      else
***************
*** 5459,5465 ****
                      treeStartp = realPathp + (tp - spacep->data);
  
                      if (*tp && !smb_IsLegalFilename(tp)) {
!                         if (baseFid != 0) 
                              smb_ReleaseFID(baseFidp);
                          cm_ReleaseUser(userp);
                          free(realPathp);
--- 5670,5676 ----
                      treeStartp = realPathp + (tp - spacep->data);
  
                      if (*tp && !smb_IsLegalFilename(tp)) {
!                         if (baseFidp) 
                              smb_ReleaseFID(baseFidp);
                          cm_ReleaseUser(userp);
                          free(realPathp);
***************
*** 5475,5481 ****
  
          /* we might have scp and we might have dscp */
  
!         if (baseFid != 0) 
              smb_ReleaseFID(baseFidp);
  
          if (code) {
--- 5686,5692 ----
  
          /* we might have scp and we might have dscp */
  
!         if (baseFidp)
              smb_ReleaseFID(baseFidp);
  
          if (code) {
***************
*** 5537,5545 ****
          /* we have scp and dscp */
      } else {
          /* we have scp but not dscp */
!         if (baseFid != 0) 
              smb_ReleaseFID(baseFidp);
!     }       
  
      /* if we get here, if code is 0, the file exists and is represented by
       * scp.  Otherwise, we have to create it.  The dir may be represented
--- 5748,5756 ----
          /* we have scp and dscp */
      } else {
          /* we have scp but not dscp */
!         if (baseFidp)
              smb_ReleaseFID(baseFidp);
!     }
  
      /* if we get here, if code is 0, the file exists and is represented by
       * scp.  Otherwise, we have to create it.  The dir may be represented
***************
*** 5547,5553 ****
       * scp is NULL.
       */
      if (code == 0 && !treeCreate) {
!         if (createDisp == FILE_CREATE) {
              /* oops, file shouldn't be there */
              if (dscp)
                  cm_ReleaseSCache(dscp);
--- 5758,5775 ----
       * scp is NULL.
       */
      if (code == 0 && !treeCreate) {
!         code = cm_CheckNTOpen(scp, desiredAccess, createDisp, userp, &req);
!         if (code) {
!             if (dscp)
!                 cm_ReleaseSCache(dscp);
!             if (scp)
!                 cm_ReleaseSCache(scp);
!             cm_ReleaseUser(userp);
!             free(realPathp);
!             return code;
!         }
! 
! 	if (createDisp == FILE_CREATE) {
              /* oops, file shouldn't be there */
              if (dscp)
                  cm_ReleaseSCache(dscp);
***************
*** 5560,5565 ****
--- 5782,5788 ----
  
          if ( createDisp == FILE_OVERWRITE || 
               createDisp == FILE_OVERWRITE_IF) {
+ 
              setAttr.mask = CM_ATTRMASK_LENGTH;
              setAttr.length.LowPart = 0;
              setAttr.length.HighPart = 0;
***************
*** 5586,5601 ****
          else 
              openAction = 1;	/* found existing file */
  
-         code = cm_CheckNTOpen(scp, desiredAccess, createDisp, userp, &req);
-         if (code) {
-             if (dscp)
-                 cm_ReleaseSCache(dscp);
-             if (scp)
-                 cm_ReleaseSCache(scp);
-             cm_ReleaseUser(userp);
-             free(realPathp);
-             return code;
-         }
      } else if (createDisp == FILE_OPEN || createDisp == FILE_OVERWRITE) {
          /* don't create if not found */
          if (dscp)
--- 5809,5814 ----
***************
*** 5667,5672 ****
--- 5880,5892 ----
                    osi_LogSaveString(smb_logp, treeStartp));
          openAction = 2;		/* created directory */
  
+ 	/* if the request is to create the root directory 
+ 	 * it will appear as a directory name of the nul-string
+ 	 * and a code of CM_ERROR_NOSUCHFILE
+ 	 */
+ 	if ( !*treeStartp && code == CM_ERROR_NOSUCHFILE)
+ 	    code = CM_ERROR_EXISTS;
+ 
          setAttr.mask = CM_ATTRMASK_CLIENTMODTIME;
          setAttr.clientModTime = time(NULL);
  
***************
*** 5784,5789 ****
--- 6004,6055 ----
      /* open the file itself */
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
      osi_assert(fidp);
+ 
+     /* save a reference to the user */
+     cm_HoldUser(userp);
+     fidp->userp = userp;
+ 
+     /* If we are restricting sharing, we should do so with a suitable
+        share lock. */
+     if (scp->fileType == CM_SCACHETYPE_FILE &&
+         !(fidflags & SMB_FID_SHARE_WRITE)) {
+         cm_key_t key;
+         LARGE_INTEGER LOffset, LLength;
+         int sLockType;
+ 
+         LOffset.HighPart = SMB_FID_QLOCK_HIGH;
+         LOffset.LowPart = SMB_FID_QLOCK_LOW;
+         LLength.HighPart = 0;
+         LLength.LowPart = SMB_FID_QLOCK_LENGTH;
+ 
+         if (fidflags & SMB_FID_SHARE_READ) {
+             sLockType = LOCKING_ANDX_SHARED_LOCK;
+         } else {
+             sLockType = 0;
+         }
+ 
+         key = cm_GenerateKey(vcp->vcID, SMB_FID_QLOCK_PID, fidp->fid);
+         
+         lock_ObtainMutex(&scp->mx);
+         code = cm_Lock(scp, sLockType, LOffset, LLength, key, 0, userp, &req, NULL);
+         lock_ReleaseMutex(&scp->mx);
+ 
+         if (code) {
+             /* shouldn't this be smb_CloseFID() fidp->flags = SMB_FID_DELETE; */
+ 	    smb_CloseFID(vcp, fidp, NULL, 0);
+             smb_ReleaseFID(fidp);
+ 
+             cm_ReleaseSCache(scp);
+             if (dscp)
+                 cm_ReleaseSCache(dscp);
+             cm_ReleaseUser(userp);
+             free(realPathp);
+             
+             return code;
+         }
+     }
+ 
+     lock_ObtainMutex(&fidp->mx);
      /* save a pointer to the vnode */
      fidp->scp = scp;    /* Hold transfered to fidp->scp and no longer needed */
  
***************
*** 5797,5808 ****
--- 6063,6076 ----
          fidp->NTopen_pathp = strdup(lastNamep);
      }
      fidp->NTopen_wholepathp = realPathp;
+     lock_ReleaseMutex(&fidp->mx);
  
      /* we don't need this any longer */
      if (dscp) {
          cm_ReleaseSCache(dscp);
          dscp = NULL;
      }
+ 
      cm_Open(scp, 0, userp);
  
      /* set inp->fid so that later read calls in same msg can find fid */
***************
*** 5837,5843 ****
  
      cm_ReleaseUser(userp);
  
!     /* Can't free realPathp if we get here since fidp->NTopen_wholepathp is pointing there */
  
      /* leave scp held since we put it in fidp->scp */
      return 0;
--- 6105,6112 ----
  
      cm_ReleaseUser(userp);
  
!     /* Can't free realPathp if we get here since
!        fidp->NTopen_wholepathp is pointing there */
  
      /* leave scp held since we put it in fidp->scp */
      return 0;
***************
*** 5868,5875 ****
      unsigned int desiredAccess;
  #ifdef DEBUG_VERBOSE    
      unsigned int allocSize;
-     unsigned int shareAccess;
  #endif
      unsigned int extAttributes;
      unsigned int createDisp;
  #ifdef DEBUG_VERBOSE
--- 6137,6144 ----
      unsigned int desiredAccess;
  #ifdef DEBUG_VERBOSE    
      unsigned int allocSize;
  #endif
+     unsigned int shareAccess;
      unsigned int extAttributes;
      unsigned int createDisp;
  #ifdef DEBUG_VERBOSE
***************
*** 5921,5929 ****
      allocSize = lparmp[3];
  #endif /* DEBUG_VERSOSE */
      extAttributes = lparmp[5];
- #ifdef DEBUG_VEROSE
      shareAccess = lparmp[6];
- #endif
      createDisp = lparmp[7];
      createOptions = lparmp[8];
  #ifdef DEBUG_VERBOSE
--- 6190,6196 ----
***************
*** 5989,5994 ****
--- 6256,6262 ----
      }
  
      if (baseFid == 0) {
+ 	baseFidp = NULL;
          baseDirp = cm_data.rootSCachep;
          code = smb_LookupTIDPath(vcp, ((smb_t *)inp)->tid, &tidPathp);
          if (code == CM_ERROR_TIDIPC) {
***************
*** 6007,6013 ****
      } else {
          baseFidp = smb_FindFID(vcp, baseFid, 0);
          if (!baseFidp) {
!         	osi_Log1(smb_logp, "NTTranCreate Invalid fid [%d]", baseFid);
              free(realPathp);
              cm_ReleaseUser(userp);
              return CM_ERROR_INVAL;
--- 6275,6281 ----
      } else {
          baseFidp = smb_FindFID(vcp, baseFid, 0);
          if (!baseFidp) {
! 	    osi_Log1(smb_logp, "NTTranCreate Invalid fid [%d]", baseFid);
              free(realPathp);
              cm_ReleaseUser(userp);
              return CM_ERROR_INVAL;
***************
*** 6027,6032 ****
--- 6295,6306 ----
      if (createOptions & FILE_DELETE_ON_CLOSE)
          fidflags |= SMB_FID_DELONCLOSE;
  
+     /* And the share mode */
+     if (shareAccess & FILE_SHARE_READ)
+         fidflags |= SMB_FID_SHARE_READ;
+     if (shareAccess & FILE_SHARE_WRITE)
+         fidflags |= SMB_FID_SHARE_WRITE;
+ 
      dscp = NULL;
      code = 0;
      if ( createDisp == FILE_OPEN || 
***************
*** 6040,6045 ****
--- 6314,6321 ----
                  cm_ReleaseSCache(dscp);
                  cm_ReleaseUser(userp);
                  free(realPathp);
+ 		if (baseFidp)
+ 		    smb_ReleaseFID(baseFidp);
                  if ( WANTS_DFS_PATHNAMES(inp) )
                      return CM_ERROR_PATH_NOT_COVERED;
                  else
***************
*** 6056,6061 ****
--- 6332,6339 ----
                      cm_ReleaseSCache(dscp);
                      cm_ReleaseUser(userp);
                      free(realPathp);
+ 		    if (baseFidp)
+ 			smb_ReleaseFID(baseFidp);
                      return CM_ERROR_EXISTS;
                  }
              }
***************
*** 6069,6074 ****
--- 6347,6354 ----
              cm_ReleaseSCache(scp);
              cm_ReleaseUser(userp);
              free(realPathp);
+ 	    if (baseFidp)
+ 		smb_ReleaseFID(baseFidp);
              if ( WANTS_DFS_PATHNAMES(inp) )
                  return CM_ERROR_PATH_NOT_COVERED;
              else
***************
*** 6091,6096 ****
--- 6371,6378 ----
                  cm_ReleaseSCache(dscp);
                  cm_ReleaseUser(userp);
                  free(realPathp);
+ 		if (baseFidp)
+ 		    smb_ReleaseFID(baseFidp);
                  if ( WANTS_DFS_PATHNAMES(inp) )
                      return CM_ERROR_PATH_NOT_COVERED;
                  else
***************
*** 6102,6111 ****
          
          cm_FreeSpace(spacep);
  
!         if (baseFid != 0) {
              smb_ReleaseFID(baseFidp);
-             baseFidp = 0;
-         }
  
          if (code) {
              cm_ReleaseUser(userp);
--- 6384,6391 ----
          
          cm_FreeSpace(spacep);
  
!         if (baseFidp)
              smb_ReleaseFID(baseFidp);
  
          if (code) {
              cm_ReleaseUser(userp);
***************
*** 6113,6120 ****
              return code;
          }
  
!         if (!lastNamep) lastNamep = realPathp;
!         else lastNamep++;
  
          if (!smb_IsLegalFilename(lastNamep))
              return CM_ERROR_BADNTFILENAME;
--- 6393,6402 ----
              return code;
          }
  
!         if (!lastNamep)
! 	    lastNamep = realPathp;
!         else 
! 	    lastNamep++;
  
          if (!smb_IsLegalFilename(lastNamep))
              return CM_ERROR_BADNTFILENAME;
***************
*** 6136,6145 ****
              }
          }
      } else {
!         if (baseFid != 0) {
              smb_ReleaseFID(baseFidp);
-             baseFidp = 0;
-         }
          cm_FreeSpace(spacep);
      }
  
--- 6418,6425 ----
              }
          }
      } else {
!         if (baseFidp)
              smb_ReleaseFID(baseFidp);
          cm_FreeSpace(spacep);
      }
  
***************
*** 6327,6332 ****
--- 6607,6655 ----
      fidp = smb_FindFID(vcp, 0, SMB_FLAG_CREATE);
      osi_assert(fidp);
  
+     /* save a reference to the user */
+     cm_HoldUser(userp);
+     fidp->userp = userp;
+ 
+     /* If we are restricting sharing, we should do so with a suitable
+        share lock. */
+     if (scp->fileType == CM_SCACHETYPE_FILE &&
+         !(fidflags & SMB_FID_SHARE_WRITE)) {
+         cm_key_t key;
+         LARGE_INTEGER LOffset, LLength;
+         int sLockType;
+ 
+         LOffset.HighPart = SMB_FID_QLOCK_HIGH;
+         LOffset.LowPart = SMB_FID_QLOCK_LOW;
+         LLength.HighPart = 0;
+         LLength.LowPart = SMB_FID_QLOCK_LENGTH;
+ 
+         if (fidflags & SMB_FID_SHARE_READ) {
+             sLockType = LOCKING_ANDX_SHARED_LOCK;
+         } else {
+             sLockType = 0;
+         }
+ 
+         key = cm_GenerateKey(vcp->vcID, SMB_FID_QLOCK_PID, fidp->fid);
+         
+         lock_ObtainMutex(&scp->mx);
+         code = cm_Lock(scp, sLockType, LOffset, LLength, key, 0, userp, &req, NULL);
+         lock_ReleaseMutex(&scp->mx);
+ 
+         if (code) {
+             /* Shouldn't this be smb_CloseFID()?  fidp->flags = SMB_FID_DELETE; */
+ 	    smb_CloseFID(vcp, fidp, NULL, 0);
+             smb_ReleaseFID(fidp);
+ 
+             cm_ReleaseSCache(scp);
+             cm_ReleaseUser(userp);
+             free(realPathp);
+             
+             return CM_ERROR_SHARING_VIOLATION;
+         }
+     }
+ 
+     lock_ObtainMutex(&fidp->mx);
      /* save a pointer to the vnode */
      fidp->scp = scp;
  
***************
*** 6340,6345 ****
--- 6663,6669 ----
          fidp->NTopen_pathp = strdup(lastNamep);
      }
      fidp->NTopen_wholepathp = realPathp;
+     lock_ReleaseMutex(&fidp->mx);
  
      /* we don't need this any longer */
      if (dscp) 
***************
*** 6484,6489 ****
--- 6808,6815 ----
  
      savedPacketp = smb_CopyPacket(inp);
      smb_HoldVC(vcp);
+     if (savedPacketp->vcp)
+ 	smb_ReleaseVC(savedPacketp->vcp);
      savedPacketp->vcp = vcp;
      lock_ObtainMutex(&smb_Dir_Watch_Lock);
      savedPacketp->nextp = smb_Directory_Watches;
***************
*** 6602,6616 ****
          ((smb_t *)outp)->flg2 |= SMB_FLAGS2_IS_LONG_NAME;
          
      switch (function) {
-     case 6: 
-         return smb_ReceiveNTTranQuerySecurityDesc(vcp, inp, outp);
-     case 4: 
-         return smb_ReceiveNTTranNotifyChange(vcp, inp, outp);
      case 1: 
          return smb_ReceiveNTTranCreate(vcp, inp, outp);
!     default: 
!         return CM_ERROR_INVAL;
      }
  }
  
  /*
--- 6928,6950 ----
          ((smb_t *)outp)->flg2 |= SMB_FLAGS2_IS_LONG_NAME;
          
      switch (function) {
      case 1: 
          return smb_ReceiveNTTranCreate(vcp, inp, outp);
!     case 2:
! 	osi_Log0(smb_logp, "SMB NT Transact Ioctl - not implemented");
! 	break;
!     case 3:
! 	osi_Log0(smb_logp, "SMB NT Transact SetSecurityDesc - not implemented");
! 	break;
!     case 4:
!         return smb_ReceiveNTTranNotifyChange(vcp, inp, outp);
!     case 5:
! 	osi_Log0(smb_logp, "SMB NT Transact Rename - not implemented");
! 	break;
!     case 6:
!         return smb_ReceiveNTTranQuerySecurityDesc(vcp, inp, outp);
      }
+     return CM_ERROR_INVAL;
  }
  
  /*
***************
*** 6633,6639 ****
      BOOL twoEntries = FALSE;
      ULONG otherNameLen, oldParmCount = 0;
      DWORD otherAction;
-     smb_vc_t *vcp;
      smb_fid_t *fidp;
  
      /* Get ready for rename within directory */
--- 6967,6972 ----
***************
*** 6654,6660 ****
          wtree = smb_GetSMBParm(watch, 22) & 0xffff;  /* TODO: should this be 0xff ? */
          maxLen = smb_GetSMBOffsetParm(watch, 5, 1)
              | (smb_GetSMBOffsetParm(watch, 6, 1) << 16);
-         vcp = watch->vcp;
  
          /*
           * Strange hack - bug in NT Client and NT Server that we
--- 6987,6992 ----
***************
*** 6663,6669 ****
          if (filter == 3 && wtree)
              filter = 0x17;
  
!         fidp = smb_FindFID(vcp, fid, 0);
          if (!fidp) {
              osi_Log1(smb_logp," no fidp for fid[%d]",fid);
              lastWatch = watch;
--- 6995,7001 ----
          if (filter == 3 && wtree)
              filter = 0x17;
  
!         fidp = smb_FindFID(watch->vcp, fid, 0);
          if (!fidp) {
              osi_Log1(smb_logp," no fidp for fid[%d]",fid);
              lastWatch = watch;
***************
*** 6793,6799 ****
              ((smb_t *) watch)->flg2 |= SMB_FLAGS2_32BIT_STATUS;
          }
  
!         smb_SendPacket(vcp, watch);
          smb_FreePacket(watch);
          watch = nextWatch;
      }
--- 7125,7131 ----
              ((smb_t *) watch)->flg2 |= SMB_FLAGS2_32BIT_STATUS;
          }
  
!         smb_SendPacket(watch->vcp, watch);
          smb_FreePacket(watch);
          watch = nextWatch;
      }
***************
*** 6922,6933 ****
      lock_InitializeMutex(&smb_Dir_Watch_Lock, "Directory Watch List Lock");
  }
  
! cm_user_t *smb_FindCMUserByName(/*smb_vc_t *vcp,*/ char *usern, char *machine)
  {
-     /*int newUid;*/
      smb_username_t *unp;
  
!     unp = smb_FindUserByName(usern, machine, SMB_FLAG_CREATE);
      if (!unp->userp) {
          lock_ObtainMutex(&unp->mx);
          unp->userp = cm_NewUser();
--- 7254,7265 ----
      lock_InitializeMutex(&smb_Dir_Watch_Lock, "Directory Watch List Lock");
  }
  
! cm_user_t *smb_FindCMUserByName(char *usern, char *machine, afs_uint32 flags)
  {
      smb_username_t *unp;
+     cm_user_t *     userp;
  
!     unp = smb_FindUserByName(usern, machine, flags);
      if (!unp->userp) {
          lock_ObtainMutex(&unp->mx);
          unp->userp = cm_NewUser();
***************
*** 6937,6943 ****
      }  else	{
          osi_Log2(smb_logp,"smb_FindCMUserByName Not found name[%s] machine[%s]",osi_LogSaveString(smb_logp,usern),osi_LogSaveString(smb_logp,machine));
          osi_LogEvent("AFS smb_FindCMUserByName : Found",NULL,"name[%s] machine[%s]",usern,machine);
! 	}
!     return unp->userp;
  }
  
--- 7269,7278 ----
      }  else	{
          osi_Log2(smb_logp,"smb_FindCMUserByName Not found name[%s] machine[%s]",osi_LogSaveString(smb_logp,usern),osi_LogSaveString(smb_logp,machine));
          osi_LogEvent("AFS smb_FindCMUserByName : Found",NULL,"name[%s] machine[%s]",usern,machine);
!     }
!     userp = unp->userp;
!     cm_HoldUser(userp);
!     smb_ReleaseUsername(unp);
!     return userp;
  }
  
Index: openafs/src/WINNT/afsd/smb3.h
diff -c openafs/src/WINNT/afsd/smb3.h:1.7.2.3 openafs/src/WINNT/afsd/smb3.h:1.7.2.4
*** openafs/src/WINNT/afsd/smb3.h:1.7.2.3	Fri Mar 11 01:58:52 2005
--- openafs/src/WINNT/afsd/smb3.h	Thu Jan 19 18:08:46 2006
***************
*** 192,198 ****
  extern int smb_V3MatchMask(char *namep, char *maskp, int flags);
  
  extern void smb3_Init();
! extern cm_user_t *smb_FindCMUserByName(/*smb_vc_t *vcp,*/ char *usern, char *machine);
  
  /* SMB auth related functions */
  extern void smb_NegotiateExtendedSecurity(void ** secBlob, int * secBlobLength);
--- 192,198 ----
  extern int smb_V3MatchMask(char *namep, char *maskp, int flags);
  
  extern void smb3_Init();
! extern cm_user_t *smb_FindCMUserByName(char *usern, char *machine, afs_uint32 flags);
  
  /* SMB auth related functions */
  extern void smb_NegotiateExtendedSecurity(void ** secBlob, int * secBlobLength);
Index: openafs/src/WINNT/afsd/smb_ioctl.c
diff -c openafs/src/WINNT/afsd/smb_ioctl.c:1.14.2.5 openafs/src/WINNT/afsd/smb_ioctl.c:1.14.2.9
*** openafs/src/WINNT/afsd/smb_ioctl.c:1.14.2.5	Sun Oct  2 02:08:56 2005
--- openafs/src/WINNT/afsd/smb_ioctl.c	Sun Apr  9 03:29:37 2006
***************
*** 31,89 ****
  
  void smb_InitIoctl(void)
  {
!         int i;
!         for (i=0; i<SMB_IOCTL_MAXPROCS; i++)
! 	    smb_ioctlProcsp[i] = NULL;
! 
! 	smb_ioctlProcsp[VIOCGETAL] = cm_IoctlGetACL;
!         smb_ioctlProcsp[VIOC_FILE_CELL_NAME] = cm_IoctlGetFileCellName;
!         smb_ioctlProcsp[VIOCSETAL] = cm_IoctlSetACL;
!         smb_ioctlProcsp[VIOC_FLUSHVOLUME] = cm_IoctlFlushVolume;
!         smb_ioctlProcsp[VIOCFLUSH] = cm_IoctlFlushFile;
!         smb_ioctlProcsp[VIOCSETVOLSTAT] = cm_IoctlSetVolumeStatus;
!         smb_ioctlProcsp[VIOCGETVOLSTAT] = cm_IoctlGetVolumeStatus;
!         smb_ioctlProcsp[VIOCWHEREIS] = cm_IoctlWhereIs;
!         smb_ioctlProcsp[VIOC_AFS_STAT_MT_PT] = cm_IoctlStatMountPoint;
!         smb_ioctlProcsp[VIOC_AFS_DELETE_MT_PT] = cm_IoctlDeleteMountPoint;
!         smb_ioctlProcsp[VIOCCKSERV] = cm_IoctlCheckServers;
!         smb_ioctlProcsp[VIOC_GAG] = cm_IoctlGag;
!         smb_ioctlProcsp[VIOCCKBACK] = cm_IoctlCheckVolumes;
!         smb_ioctlProcsp[VIOCSETCACHESIZE] = cm_IoctlSetCacheSize;
!         smb_ioctlProcsp[VIOCGETCACHEPARMS] = cm_IoctlGetCacheParms;
!         smb_ioctlProcsp[VIOCGETCELL] = cm_IoctlGetCell;
!         smb_ioctlProcsp[VIOCNEWCELL] = cm_IoctlNewCell;
!         smb_ioctlProcsp[VIOC_GET_WS_CELL] = cm_IoctlGetWsCell;
!         smb_ioctlProcsp[VIOC_AFS_SYSNAME] = cm_IoctlSysName;
!         smb_ioctlProcsp[VIOC_GETCELLSTATUS] = cm_IoctlGetCellStatus;
!         smb_ioctlProcsp[VIOC_SETCELLSTATUS] = cm_IoctlSetCellStatus;
!         smb_ioctlProcsp[VIOC_SETSPREFS] = cm_IoctlSetSPrefs;
!         smb_ioctlProcsp[VIOC_GETSPREFS] = cm_IoctlGetSPrefs;
!         smb_ioctlProcsp[VIOC_STOREBEHIND] = cm_IoctlStoreBehind;
!         smb_ioctlProcsp[VIOC_AFS_CREATE_MT_PT] = cm_IoctlCreateMountPoint;
!         smb_ioctlProcsp[VIOC_TRACECTL] = cm_IoctlTraceControl;
! 	smb_ioctlProcsp[VIOCSETTOK] = cm_IoctlSetToken;
! 	smb_ioctlProcsp[VIOCGETTOK] = cm_IoctlGetTokenIter;
! 	smb_ioctlProcsp[VIOCNEWGETTOK] = cm_IoctlGetToken;
! 	smb_ioctlProcsp[VIOCDELTOK] = cm_IoctlDelToken;
! 	smb_ioctlProcsp[VIOCDELALLTOK] = cm_IoctlDelAllToken;
! 	smb_ioctlProcsp[VIOC_SYMLINK] = cm_IoctlSymlink;
! 	smb_ioctlProcsp[VIOC_LISTSYMLINK] = cm_IoctlListlink;
! 	smb_ioctlProcsp[VIOC_DELSYMLINK] = cm_IoctlDeletelink;
! 	smb_ioctlProcsp[VIOC_MAKESUBMOUNT] = cm_IoctlMakeSubmount;
! 	smb_ioctlProcsp[VIOC_GETRXKCRYPT] = cm_IoctlGetRxkcrypt;
! 	smb_ioctlProcsp[VIOC_SETRXKCRYPT] = cm_IoctlSetRxkcrypt;
! 	smb_ioctlProcsp[VIOC_ISSYMLINK] = cm_IoctlIslink;
  #ifdef DJGPP
! 	smb_ioctlProcsp[VIOC_SHUTDOWN] = cm_IoctlShutdown;
  #endif
! 	smb_ioctlProcsp[VIOC_TRACEMEMDUMP] = cm_IoctlMemoryDump;
! 	smb_ioctlProcsp[VIOC_ISSYMLINK] = cm_IoctlIslink;
!         smb_ioctlProcsp[VIOC_FLUSHALL] = cm_IoctlFlushAllVolumes;
!         smb_ioctlProcsp[VIOCGETFID] = cm_IoctlGetFid;
!         smb_ioctlProcsp[VIOCGETOWNER] = cm_IoctlGetOwner;
!         smb_ioctlProcsp[VIOC_RXSTAT_PROC] = cm_IoctlRxStatProcess;
!         smb_ioctlProcsp[VIOC_RXSTAT_PEER] = cm_IoctlRxStatPeer;
! }
  
  /* called to make a fid structure into an IOCTL fid structure */
  void smb_SetupIoctlFid(smb_fid_t *fidp, cm_space_t *prefix)
--- 31,89 ----
  
  void smb_InitIoctl(void)
  {
!     int i;
!     for (i=0; i<SMB_IOCTL_MAXPROCS; i++)
! 	smb_ioctlProcsp[i] = NULL;
! 
!     smb_ioctlProcsp[VIOCGETAL] = cm_IoctlGetACL;
!     smb_ioctlProcsp[VIOC_FILE_CELL_NAME] = cm_IoctlGetFileCellName;
!     smb_ioctlProcsp[VIOCSETAL] = cm_IoctlSetACL;
!     smb_ioctlProcsp[VIOC_FLUSHVOLUME] = cm_IoctlFlushVolume;
!     smb_ioctlProcsp[VIOCFLUSH] = cm_IoctlFlushFile;
!     smb_ioctlProcsp[VIOCSETVOLSTAT] = cm_IoctlSetVolumeStatus;
!     smb_ioctlProcsp[VIOCGETVOLSTAT] = cm_IoctlGetVolumeStatus;
!     smb_ioctlProcsp[VIOCWHEREIS] = cm_IoctlWhereIs;
!     smb_ioctlProcsp[VIOC_AFS_STAT_MT_PT] = cm_IoctlStatMountPoint;
!     smb_ioctlProcsp[VIOC_AFS_DELETE_MT_PT] = cm_IoctlDeleteMountPoint;
!     smb_ioctlProcsp[VIOCCKSERV] = cm_IoctlCheckServers;
!     smb_ioctlProcsp[VIOC_GAG] = cm_IoctlGag;
!     smb_ioctlProcsp[VIOCCKBACK] = cm_IoctlCheckVolumes;
!     smb_ioctlProcsp[VIOCSETCACHESIZE] = cm_IoctlSetCacheSize;
!     smb_ioctlProcsp[VIOCGETCACHEPARMS] = cm_IoctlGetCacheParms;
!     smb_ioctlProcsp[VIOCGETCELL] = cm_IoctlGetCell;
!     smb_ioctlProcsp[VIOCNEWCELL] = cm_IoctlNewCell;
!     smb_ioctlProcsp[VIOC_GET_WS_CELL] = cm_IoctlGetWsCell;
!     smb_ioctlProcsp[VIOC_AFS_SYSNAME] = cm_IoctlSysName;
!     smb_ioctlProcsp[VIOC_GETCELLSTATUS] = cm_IoctlGetCellStatus;
!     smb_ioctlProcsp[VIOC_SETCELLSTATUS] = cm_IoctlSetCellStatus;
!     smb_ioctlProcsp[VIOC_SETSPREFS] = cm_IoctlSetSPrefs;
!     smb_ioctlProcsp[VIOC_GETSPREFS] = cm_IoctlGetSPrefs;
!     smb_ioctlProcsp[VIOC_STOREBEHIND] = cm_IoctlStoreBehind;
!     smb_ioctlProcsp[VIOC_AFS_CREATE_MT_PT] = cm_IoctlCreateMountPoint;
!     smb_ioctlProcsp[VIOC_TRACECTL] = cm_IoctlTraceControl;
!     smb_ioctlProcsp[VIOCSETTOK] = cm_IoctlSetToken;
!     smb_ioctlProcsp[VIOCGETTOK] = cm_IoctlGetTokenIter;
!     smb_ioctlProcsp[VIOCNEWGETTOK] = cm_IoctlGetToken;
!     smb_ioctlProcsp[VIOCDELTOK] = cm_IoctlDelToken;
!     smb_ioctlProcsp[VIOCDELALLTOK] = cm_IoctlDelAllToken;
!     smb_ioctlProcsp[VIOC_SYMLINK] = cm_IoctlSymlink;
!     smb_ioctlProcsp[VIOC_LISTSYMLINK] = cm_IoctlListlink;
!     smb_ioctlProcsp[VIOC_DELSYMLINK] = cm_IoctlDeletelink;
!     smb_ioctlProcsp[VIOC_MAKESUBMOUNT] = cm_IoctlMakeSubmount;
!     smb_ioctlProcsp[VIOC_GETRXKCRYPT] = cm_IoctlGetRxkcrypt;
!     smb_ioctlProcsp[VIOC_SETRXKCRYPT] = cm_IoctlSetRxkcrypt;
!     smb_ioctlProcsp[VIOC_ISSYMLINK] = cm_IoctlIslink;
  #ifdef DJGPP
!     smb_ioctlProcsp[VIOC_SHUTDOWN] = cm_IoctlShutdown;
  #endif
!     smb_ioctlProcsp[VIOC_TRACEMEMDUMP] = cm_IoctlMemoryDump;
!     smb_ioctlProcsp[VIOC_ISSYMLINK] = cm_IoctlIslink;
!     smb_ioctlProcsp[VIOC_FLUSHALL] = cm_IoctlFlushAllVolumes;
!     smb_ioctlProcsp[VIOCGETFID] = cm_IoctlGetFid;
!     smb_ioctlProcsp[VIOCGETOWNER] = cm_IoctlGetOwner;
!     smb_ioctlProcsp[VIOC_RXSTAT_PROC] = cm_IoctlRxStatProcess;
!     smb_ioctlProcsp[VIOC_RXSTAT_PEER] = cm_IoctlRxStatPeer;
! }	
  
  /* called to make a fid structure into an IOCTL fid structure */
  void smb_SetupIoctlFid(smb_fid_t *fidp, cm_space_t *prefix)
***************
*** 116,122 ****
  smb_IoctlPrepareRead(smb_fid_t *fidp, smb_ioctl_t *ioctlp, cm_user_t *userp)
  {
      long opcode;
!     smb_ioctlProc_t *procp;
      long code;
  
      if (ioctlp->flags & SMB_IOCTLFLAG_DATAIN) {
--- 116,122 ----
  smb_IoctlPrepareRead(smb_fid_t *fidp, smb_ioctl_t *ioctlp, cm_user_t *userp)
  {
      long opcode;
!     smb_ioctlProc_t *procp = NULL;
      long code;
  
      if (ioctlp->flags & SMB_IOCTLFLAG_DATAIN) {
***************
*** 137,143 ****
              return CM_ERROR_TOOBIG;
  
          /* check for no such proc */
!         procp = smb_ioctlProcsp[opcode];
          if (procp == NULL) 
              return CM_ERROR_BADOP;
  
--- 137,147 ----
              return CM_ERROR_TOOBIG;
  
          /* check for no such proc */
! 	if (fidp->flags & SMB_FID_IOCTL)
! 	    procp = smb_ioctlProcsp[opcode];
! 	else
! 	    procp = NULL;
! 
          if (procp == NULL) 
              return CM_ERROR_BADOP;
  
***************
*** 159,287 ****
   */
  void smb_IoctlPrepareWrite(smb_fid_t *fidp, smb_ioctl_t *ioctlp)
  {
! 	/* make sure the buffer(s) are allocated */
! 	if (!ioctlp->inAllocp) ioctlp->inAllocp = malloc(SMB_IOCTL_MAXDATA);
!         if (!ioctlp->outAllocp) ioctlp->outAllocp = malloc(SMB_IOCTL_MAXDATA);
! 
! 	/* Fixes fs la problem.  We do a StrToOEM later and if this data isn't initialized we get memory issues. */
!        (void) memset(ioctlp->inAllocp, 0, SMB_IOCTL_MAXDATA);
!        (void) memset(ioctlp->outAllocp, 0, SMB_IOCTL_MAXDATA);
! 
! 	/* and make sure that we've reset our state for the new incoming request */
! 	if (!(ioctlp->flags & SMB_IOCTLFLAG_DATAIN)) {
! 	        ioctlp->inCopied = 0;
! 	        ioctlp->outCopied = 0;
! 		ioctlp->inDatap = ioctlp->inAllocp;
! 		ioctlp->outDatap = ioctlp->outAllocp;
! 	        ioctlp->flags |= SMB_IOCTLFLAG_DATAIN;
! 	}
! }
  
  /* called from smb_ReceiveCoreRead when we receive a read on the ioctl fid */
  long smb_IoctlRead(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp,
! 	smb_packet_t *outp)
  {
! 	smb_ioctl_t *iop;
!         long count;
!         long leftToCopy;
!         char *op;
!         long code;
!         cm_user_t *userp;
! 
!         iop = fidp->ioctlp;
!         count = smb_GetSMBParm(inp, 1);
!         userp = smb_GetUser(vcp, inp);
  
! 	/* Identify tree */
      code = smb_LookupTIDPath(vcp, ((smb_t *)inp)->tid, &iop->tidPathp);
!     if(code) {
          cm_ReleaseUser(userp);
          return CM_ERROR_NOSUCHPATH;
      }
  
! 	/* turn the connection around, if required */
! 	code = smb_IoctlPrepareRead(fidp, iop, userp);
  
! 	if (code) {
! 		cm_ReleaseUser(userp);
! 		return code;
!         }
  
! 	leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
!         if (count > leftToCopy) count = leftToCopy;
!         
!         /* now set the parms for a read of count bytes */
!         smb_SetSMBParm(outp, 0, count);
!         smb_SetSMBParm(outp, 1, 0);
!         smb_SetSMBParm(outp, 2, 0);
!         smb_SetSMBParm(outp, 3, 0);
!         smb_SetSMBParm(outp, 4, 0);
! 
! 	smb_SetSMBDataLength(outp, count+3);
! 
!         op = smb_GetSMBData(outp, NULL);
!         *op++ = 1;
!         *op++ = (char)(count & 0xff);
!         *op++ = (char)((count >> 8) & 0xff);
!         
! 	/* now copy the data into the response packet */
!         memcpy(op, iop->outCopied + iop->outAllocp, count);
  
!         /* and adjust the counters */
!         iop->outCopied += count;
!         
!         cm_ReleaseUser(userp);
!         smb_ReleaseFID(fidp);
  
!         return 0;
! }
  
  /* called from smb_ReceiveCoreWrite when we receive a write call on the IOCTL
   * file descriptor.
   */
  long smb_IoctlWrite(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
! 	smb_ioctl_t *iop;
!         long count;
!         long code;
!         char *op;
!         int inDataBlockCount;
! 
! 	code = 0;
! 	count = smb_GetSMBParm(inp, 1);
!         iop = fidp->ioctlp;
!         
! 	smb_IoctlPrepareWrite(fidp, iop);
  
!         op = smb_GetSMBData(inp, NULL);
! 	op = smb_ParseDataBlock(op, NULL, &inDataBlockCount);
! 	
!         if (count + iop->inCopied > SMB_IOCTL_MAXDATA) {
! 		code = CM_ERROR_TOOBIG;
!                 goto done;
!         }
          
! 	/* copy data */
!         memcpy(iop->inDatap + iop->inCopied, op, count);
          
!         /* adjust counts */
!         iop->inCopied += count;
  
! done:
! 	/* return # of bytes written */
! 	if (code == 0) {
! 		smb_SetSMBParm(outp, 0, count);
!                 smb_SetSMBDataLength(outp, 0);
!         }
  
!         smb_ReleaseFID(fidp);
!         return code;
  }
  
  /* called from V3 read to handle IOCTL descriptor reads */
  long smb_IoctlV3Read(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
! 	smb_ioctl_t *iop;
      long count;
      long code;
      long leftToCopy;
--- 163,289 ----
   */
  void smb_IoctlPrepareWrite(smb_fid_t *fidp, smb_ioctl_t *ioctlp)
  {
!     /* make sure the buffer(s) are allocated */
!     if (!ioctlp->inAllocp) ioctlp->inAllocp = malloc(SMB_IOCTL_MAXDATA);
!     if (!ioctlp->outAllocp) ioctlp->outAllocp = malloc(SMB_IOCTL_MAXDATA);
! 
!     /* Fixes fs la problem.  We do a StrToOEM later and if this data isn't initialized we get memory issues. */
!     (void) memset(ioctlp->inAllocp, 0, SMB_IOCTL_MAXDATA);
!     (void) memset(ioctlp->outAllocp, 0, SMB_IOCTL_MAXDATA);
! 
!     /* and make sure that we've reset our state for the new incoming request */
!     if (!(ioctlp->flags & SMB_IOCTLFLAG_DATAIN)) {
! 	ioctlp->inCopied = 0;
! 	ioctlp->outCopied = 0;
! 	ioctlp->inDatap = ioctlp->inAllocp;
! 	ioctlp->outDatap = ioctlp->outAllocp;
! 	ioctlp->flags |= SMB_IOCTLFLAG_DATAIN;
!     }
! }	
  
  /* called from smb_ReceiveCoreRead when we receive a read on the ioctl fid */
  long smb_IoctlRead(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp,
! 		   smb_packet_t *outp)
  {
!     smb_ioctl_t *iop;
!     long count;
!     long leftToCopy;
!     char *op;
!     long code;
!     cm_user_t *userp;
! 
!     iop = fidp->ioctlp;
!     count = smb_GetSMBParm(inp, 1);
!     userp = smb_GetUser(vcp, inp);
  
!     /* Identify tree */
      code = smb_LookupTIDPath(vcp, ((smb_t *)inp)->tid, &iop->tidPathp);
!     if (code) {
          cm_ReleaseUser(userp);
          return CM_ERROR_NOSUCHPATH;
      }
  
!     /* turn the connection around, if required */
!     code = smb_IoctlPrepareRead(fidp, iop, userp);
! 
!     if (code) {
! 	cm_ReleaseUser(userp);
! 	return code;
!     }
! 
!     leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
!     if (count > leftToCopy) count = leftToCopy;
  
!     /* now set the parms for a read of count bytes */
!     smb_SetSMBParm(outp, 0, count);
!     smb_SetSMBParm(outp, 1, 0);
!     smb_SetSMBParm(outp, 2, 0);
!     smb_SetSMBParm(outp, 3, 0);
!     smb_SetSMBParm(outp, 4, 0);
! 
!     smb_SetSMBDataLength(outp, count+3);
! 
!     op = smb_GetSMBData(outp, NULL);
!     *op++ = 1;
!     *op++ = (char)(count & 0xff);
!     *op++ = (char)((count >> 8) & 0xff);
  
!     /* now copy the data into the response packet */
!     memcpy(op, iop->outCopied + iop->outAllocp, count);
  
!     /* and adjust the counters */
!     iop->outCopied += count;
  
!     cm_ReleaseUser(userp);
! 
!     return 0;
! }	
  
  /* called from smb_ReceiveCoreWrite when we receive a write call on the IOCTL
   * file descriptor.
   */
  long smb_IoctlWrite(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
!     smb_ioctl_t *iop;
!     long count;
!     long code;
!     char *op;
!     int inDataBlockCount;
  
!     code = 0;
!     count = smb_GetSMBParm(inp, 1);
!     iop = fidp->ioctlp;
          
!     smb_IoctlPrepareWrite(fidp, iop);
! 
!     op = smb_GetSMBData(inp, NULL);
!     op = smb_ParseDataBlock(op, NULL, &inDataBlockCount);
! 
!     if (count + iop->inCopied > SMB_IOCTL_MAXDATA) {
! 	code = CM_ERROR_TOOBIG;
! 	goto done;
!     }
          
!     /* copy data */
!     memcpy(iop->inDatap + iop->inCopied, op, count);
  
!     /* adjust counts */
!     iop->inCopied += count;
  
!   done:
!     /* return # of bytes written */
!     if (code == 0) {
! 	smb_SetSMBParm(outp, 0, count);
! 	smb_SetSMBDataLength(outp, 0);
!     }
! 
!     return code;
  }
  
  /* called from V3 read to handle IOCTL descriptor reads */
  long smb_IoctlV3Read(smb_fid_t *fidp, smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *outp)
  {
!     smb_ioctl_t *iop;
      long count;
      long code;
      long leftToCopy;
***************
*** 292,373 ****
      iop = fidp->ioctlp;
      count = smb_GetSMBParm(inp, 5);
  	
! 	userp = smb_GetUser(vcp, inp);
! 	osi_assert(userp != 0);
  
      uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
      iop->uidp = uidp;
!     if (uidp && uidp->unp)
          osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
!                   uidp->userID, userp,
!                   osi_LogSaveString(afsd_logp, uidp->unp->name));
!     else {
          if (uidp)
! 		    osi_Log2(afsd_logp, "Ioctl uid %d user %x no name",
!                       uidp->userID, userp);
          else
! 		    osi_Log1(afsd_logp, "Ioctl no uid user %x no name",
!                      userp);
      }
  
! 	code = smb_LookupTIDPath(vcp, ((smb_t *)inp)->tid, &iop->tidPathp);
!     if(code) {
!         smb_ReleaseUID(uidp);
          cm_ReleaseUser(userp);
-         smb_ReleaseFID(fidp);
          return CM_ERROR_NOSUCHPATH;
      }
  
! 	code = smb_IoctlPrepareRead(fidp, iop, userp);
      if (uidp) {
          iop->uidp = 0;
          smb_ReleaseUID(uidp);
      }
      if (code) {
! 		cm_ReleaseUser(userp);
!         smb_ReleaseFID(fidp);
! 		return code;
      }
  
! 	leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
      if (count > leftToCopy) count = leftToCopy;
          
! 	/* 0 and 1 are reserved for request chaining, were setup by our caller,
!          * and will be further filled in after we return.
!          */
!         smb_SetSMBParm(outp, 2, 0);	/* remaining bytes, for pipes */
!         smb_SetSMBParm(outp, 3, 0);	/* resvd */
!         smb_SetSMBParm(outp, 4, 0);	/* resvd */
! 	smb_SetSMBParm(outp, 5, count);	/* # of bytes we're going to read */
!         /* fill in #6 when we have all the parameters' space reserved */
!         smb_SetSMBParm(outp, 7, 0);	/* resv'd */
!         smb_SetSMBParm(outp, 8, 0);	/* resv'd */
!         smb_SetSMBParm(outp, 9, 0);	/* resv'd */
!         smb_SetSMBParm(outp, 10, 0);	/* resv'd */
! 	smb_SetSMBParm(outp, 11, 0);	/* reserved */
  
! 	/* get op ptr after putting in the last parm, since otherwise we don't
!          * know where the data really is.
!          */
!         op = smb_GetSMBData(outp, NULL);
!         
!         /* now fill in offset from start of SMB header to first data byte (to op) */
!         smb_SetSMBParm(outp, 6, ((int) (op - outp->data)));
  
! 	/* set the packet data length the count of the # of bytes */
!         smb_SetSMBDataLength(outp, count);
!         
! 	/* now copy the data into the response packet */
!         memcpy(op, iop->outCopied + iop->outAllocp, count);
  
!         /* and adjust the counters */
!         iop->outCopied += count;
!         
!         /* and cleanup things */
!         cm_ReleaseUser(userp);
!         smb_ReleaseFID(fidp);
  
!         return 0;
  }
  
  /* called from Read Raw to handle IOCTL descriptor reads */
--- 294,373 ----
      iop = fidp->ioctlp;
      count = smb_GetSMBParm(inp, 5);
  	
!     userp = smb_GetUser(vcp, inp);
!     osi_assert(userp != 0);
  
      uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
      iop->uidp = uidp;
!     if (uidp && uidp->unp) {
          osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
!                  uidp->userID, userp,
!                  osi_LogSaveString(afsd_logp, uidp->unp->name));
!     } else {
          if (uidp)
! 	    osi_Log2(afsd_logp, "Ioctl uid %d user %x no name",
!                      uidp->userID, userp);
          else
! 	    osi_Log1(afsd_logp, "Ioctl no uid user %x no name",
! 		     userp);
      }
  
!     code = smb_LookupTIDPath(vcp, ((smb_t *)inp)->tid, &iop->tidPathp);
!     if (code) {
! 	if (uidp)
! 	    smb_ReleaseUID(uidp);
          cm_ReleaseUser(userp);
          return CM_ERROR_NOSUCHPATH;
      }
  
!     code = smb_IoctlPrepareRead(fidp, iop, userp);
      if (uidp) {
          iop->uidp = 0;
          smb_ReleaseUID(uidp);
      }
      if (code) {
! 	cm_ReleaseUser(userp);
! 	return code;
      }
  
!     leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
      if (count > leftToCopy) count = leftToCopy;
          
!     /* 0 and 1 are reserved for request chaining, were setup by our caller,
!      * and will be further filled in after we return.
!      */
!     smb_SetSMBParm(outp, 2, 0);	/* remaining bytes, for pipes */
!     smb_SetSMBParm(outp, 3, 0);	/* resvd */
!     smb_SetSMBParm(outp, 4, 0);	/* resvd */
!     smb_SetSMBParm(outp, 5, count);	/* # of bytes we're going to read */
!     /* fill in #6 when we have all the parameters' space reserved */
!     smb_SetSMBParm(outp, 7, 0);	/* resv'd */
!     smb_SetSMBParm(outp, 8, 0);	/* resv'd */
!     smb_SetSMBParm(outp, 9, 0);	/* resv'd */
!     smb_SetSMBParm(outp, 10, 0);	/* resv'd */
!     smb_SetSMBParm(outp, 11, 0);	/* reserved */
! 
!     /* get op ptr after putting in the last parm, since otherwise we don't
!      * know where the data really is.
!      */
!     op = smb_GetSMBData(outp, NULL);
! 
!     /* now fill in offset from start of SMB header to first data byte (to op) */
!     smb_SetSMBParm(outp, 6, ((int) (op - outp->data)));
! 
!     /* set the packet data length the count of the # of bytes */
!     smb_SetSMBDataLength(outp, count);
  
!     /* now copy the data into the response packet */
!     memcpy(op, iop->outCopied + iop->outAllocp, count);
  
!     /* and adjust the counters */
!     iop->outCopied += count;
  
!     /* and cleanup things */
!     cm_ReleaseUser(userp);
  
!     return 0;
  }
  
  /* called from Read Raw to handle IOCTL descriptor reads */
***************
*** 378,459 ****
  #endif /* DJGPP */
  )
  {
! 	smb_ioctl_t *iop;
! 	long leftToCopy;
! 	NCB *ncbp;
! 	long code;
! 	cm_user_t *userp;
  #ifdef DJGPP
!         dos_ptr dos_ncb;
  
!         if (rawBuf == 0)
!         {
!                 osi_Log0(afsd_logp, "Failed to get raw buf for smb_IoctlReadRaw");
!                 return -1;
!         }
  #endif /* DJGPP */
  
! 	iop = fidp->ioctlp;
! 
! 	userp = smb_GetUser(vcp, inp);
  
! 	{
! 		smb_user_t *uidp;
  
! 		uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
! 		if (uidp && uidp->unp)
! 		    osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
! 			     uidp->userID, userp,
! 			     osi_LogSaveString(afsd_logp, uidp->unp->name));
! 		else if (uidp)
! 		    osi_Log2(afsd_logp, "Ioctl uid %d user %x no name",
! 			     uidp->userID, userp);
!         else 
! 		    osi_Log1(afsd_logp, "Ioctl no uid user %x no name",
! 			     userp);
! 		if (uidp) smb_ReleaseUID(uidp);
  	}
  
      code = smb_LookupTIDPath(vcp, ((smb_t *)inp)->tid, &iop->tidPathp);
      if(code) {
          cm_ReleaseUser(userp);
-         smb_ReleaseFID(fidp);
          return CM_ERROR_NOSUCHPATH;
      }
  
! 	code = smb_IoctlPrepareRead(fidp, iop, userp);
! 	if (code) {
! 		cm_ReleaseUser(userp);
! 		smb_ReleaseFID(fidp);
! 		return code;
! 	}
  
! 	leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
  
! 	ncbp = outp->ncbp;
! 	memset((char *)ncbp, 0, sizeof(NCB));
  
! 	ncbp->ncb_length = (unsigned short) leftToCopy;
! 	ncbp->ncb_lsn = (unsigned char) vcp->lsn;
! 	ncbp->ncb_command = NCBSEND;
      /*ncbp->ncb_lana_num = smb_LANadapter;*/
! 	ncbp->ncb_lana_num = vcp->lana;
  
  #ifndef DJGPP
! 	ncbp->ncb_buffer = iop->outCopied + iop->outAllocp;
! 	code = Netbios(ncbp);
  #else /* DJGPP */
!         dosmemput(iop->outCopied + iop->outAllocp, ncbp->ncb_length, rawBuf);
!         ncbp->ncb_buffer = rawBuf;
!         dos_ncb = ((smb_ncb_t *)ncbp)->dos_ncb;
! 	code = Netbios(ncbp, dos_ncb);
  #endif /* !DJGPP */
  
! 	if (code != 0)
! 		osi_Log1(afsd_logp, "ReadRaw send failure code %d", code);
  
! 	cm_ReleaseUser(userp);
! 	smb_ReleaseFID(fidp);
  
! 	return 0;
  }
--- 378,459 ----
  #endif /* DJGPP */
  )
  {
!     smb_ioctl_t *iop;
!     long leftToCopy;
!     NCB *ncbp;
!     long code;
!     cm_user_t *userp;
  #ifdef DJGPP
!     dos_ptr dos_ncb;
  
!     if (rawBuf == 0)
!     {
! 	osi_Log0(afsd_logp, "Failed to get raw buf for smb_IoctlReadRaw");
! 	return -1;
!     }
  #endif /* DJGPP */
  
!     iop = fidp->ioctlp;
  
!     userp = smb_GetUser(vcp, inp);
  
!     /* Log the user */
!     {
! 	smb_user_t *uidp;
! 
! 	uidp = smb_FindUID(vcp, ((smb_t *)inp)->uid, 0);
! 	if (uidp && uidp->unp) {
! 	    osi_Log3(afsd_logp, "Ioctl uid %d user %x name %s",
! 		     uidp->userID, userp,
! 		     osi_LogSaveString(afsd_logp, uidp->unp->name));
! 	} else if (uidp) {
! 	    osi_Log2(afsd_logp, "Ioctl uid %d user %x no name",
! 		     uidp->userID, userp);
! 	} else {
! 	    osi_Log1(afsd_logp, "Ioctl no uid user %x no name",
! 		      userp);
  	}
+ 	if (uidp) 
+ 	    smb_ReleaseUID(uidp);
+     }
  
      code = smb_LookupTIDPath(vcp, ((smb_t *)inp)->tid, &iop->tidPathp);
      if(code) {
          cm_ReleaseUser(userp);
          return CM_ERROR_NOSUCHPATH;
      }
  
!     code = smb_IoctlPrepareRead(fidp, iop, userp);
!     if (code) {
! 	cm_ReleaseUser(userp);
! 	return code;
!     }
  
!     leftToCopy = (iop->outDatap - iop->outAllocp) - iop->outCopied;
  
!     ncbp = outp->ncbp;
!     memset((char *)ncbp, 0, sizeof(NCB));
  
!     ncbp->ncb_length = (unsigned short) leftToCopy;
!     ncbp->ncb_lsn = (unsigned char) vcp->lsn;
!     ncbp->ncb_command = NCBSEND;
      /*ncbp->ncb_lana_num = smb_LANadapter;*/
!     ncbp->ncb_lana_num = vcp->lana;
  
  #ifndef DJGPP
!     ncbp->ncb_buffer = iop->outCopied + iop->outAllocp;
!     code = Netbios(ncbp);
  #else /* DJGPP */
!     dosmemput(iop->outCopied + iop->outAllocp, ncbp->ncb_length, rawBuf);
!     ncbp->ncb_buffer = rawBuf;
!     dos_ncb = ((smb_ncb_t *)ncbp)->dos_ncb;
!     code = Netbios(ncbp, dos_ncb);
  #endif /* !DJGPP */
  
!     if (code != 0)
! 	osi_Log1(afsd_logp, "ReadRaw send failure code %d", code);
  
!     cm_ReleaseUser(userp);
  
!     return 0;
  }
Index: openafs/src/WINNT/client_config/afsmap.c
diff -c openafs/src/WINNT/client_config/afsmap.c:1.1.2.1 openafs/src/WINNT/client_config/afsmap.c:1.1.2.2
*** openafs/src/WINNT/client_config/afsmap.c:1.1.2.1	Fri Mar 11 02:23:09 2005
--- openafs/src/WINNT/client_config/afsmap.c	Mon Jan 16 22:58:05 2006
***************
*** 91,97 ****
  	if (code == ERROR_SUCCESS) {
  		cm_mountRootLen = strlen(cm_mountRoot);
  	} else {
! 		strcpy(mountRoot, sizeof(cm_mountRoot), "/afs");
  		cm_mountRootLen = 4;
  	}
  
--- 91,97 ----
  	if (code == ERROR_SUCCESS) {
  		cm_mountRootLen = strlen(cm_mountRoot);
  	} else {
! 		strncpy(mountRoot, sizeof(cm_mountRoot), "/afs");
  		cm_mountRootLen = 4;
  	}
  
Index: openafs/src/WINNT/client_config/drivemap.cpp
diff -c openafs/src/WINNT/client_config/drivemap.cpp:1.27.2.6 openafs/src/WINNT/client_config/drivemap.cpp:1.27.2.7
*** openafs/src/WINNT/client_config/drivemap.cpp:1.27.2.6	Wed Jul  6 20:29:12 2005
--- openafs/src/WINNT/client_config/drivemap.cpp	Mon Nov 21 19:37:50 2005
***************
*** 1005,1011 ****
  void SetBitLogonOption(BOOL set,DWORD value)
  {
  
!    RWLogonOption(FALSE,((set)?value | RWLogonOption(TRUE,0):RWLogonOption(TRUE,0) & ~value) );	
  }
  
  DWORD RWLogonOption(BOOL read,DWORD value)
--- 1005,1011 ----
  void SetBitLogonOption(BOOL set,DWORD value)
  {
  
!     RWLogonOption(FALSE,((set)?value | RWLogonOption(TRUE,0):RWLogonOption(TRUE,0) & ~value) );	
  }
  
  DWORD RWLogonOption(BOOL read,DWORD value)
***************
*** 1040,1066 ****
  
  void MapShareName(char *pszCmdLineA)
  {
! 	fUserName = TRUE;
! 	TCHAR *p=pUserName;
! 	pszCmdLineA++;
! 	while (*pszCmdLineA && (*pszCmdLineA != ' '))
! 	{
! 	  *p++=*pszCmdLineA++;
! 	}
  }
  
  void GenRandomName(TCHAR *pname,int len)
  {
! 	if (fUserName)
! 	{		//user name was passed through command line, use once
! 		fUserName=FALSE;
! 		return;
! 	}
! 	srand( (unsigned)time( NULL ) );
! 	for (int i=0;i<len;i++)
! 		pname[i]='a'+(rand() % 26);
! 	pname[len]=0;
  	return;
  }
  
  /*
--- 1040,1066 ----
  
  void MapShareName(char *pszCmdLineA)
  {
!     fUserName = TRUE;
!     TCHAR *p=pUserName;
!     pszCmdLineA++;
!     while (*pszCmdLineA && (*pszCmdLineA != ' '))
!     {
! 	*p++=*pszCmdLineA++;
!     }
  }
  
  void GenRandomName(TCHAR *pname,int len)
  {
!     if (fUserName)
!     {		//user name was passed through command line, use once
! 	fUserName=FALSE;
  	return;
+     }
+     srand( (unsigned)time( NULL ) );
+     for (int i=0;i<len;i++)
+ 	pname[i]='a'+(rand() % 26);
+     pname[len]=0;
+     return;
  }
  
  /*
***************
*** 1071,1084 ****
  BOOL TestAndDoMapShare(DWORD dwState)
  {
      if ((dwState!=SERVICE_RUNNING) || (dwOldState!=SERVICE_START_PENDING))
! 	{
! 		dwOldState=dwState;
! 		return TRUE;
! 	}
! 	dwOldState=SERVICE_RUNNING;
! 	if (RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY))
! 	    return (DoMapShare() && GlobalMountDrive());
! 	return GlobalMountDrive();
  }
  
  BOOL IsServiceActive()
--- 1071,1084 ----
  BOOL TestAndDoMapShare(DWORD dwState)
  {
      if ((dwState!=SERVICE_RUNNING) || (dwOldState!=SERVICE_START_PENDING))
!     {
! 	dwOldState=dwState;
! 	return TRUE;
!     }
!     dwOldState=SERVICE_RUNNING;
!     if (RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY))
! 	return (DoMapShare() && GlobalMountDrive());
!     return GlobalMountDrive();
  }
  
  BOOL IsServiceActive()
***************
*** 1102,1221 ****
  
  void TestAndDoUnMapShare()
  {
! 	if (!RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY))
! 		return;
! 	DoUnMapShare(FALSE);	
  }
  
  void DoUnMapShare(BOOL drivemap)	//disconnect drivemap 
  {
! 	TCHAR szMachine[MAX_PATH],szPath[MAX_PATH];
! 	DWORD rc=28;
! 	HANDLE hEnum;
! 	LPNETRESOURCE lpnrLocal,lpnr=NULL;
! 	DWORD res;
! 	DWORD cbBuffer=16384;
! 	DWORD cEntries=-1;
! 	CHAR *pSubmount="";
  
      memset(szMachine, '\0', sizeof(szMachine));
      GetClientNetbiosName(szMachine);
  
     // Initialize the data structure
! 	if ((res=WNetOpenEnum(RESOURCE_CONNECTED,RESOURCETYPE_DISK,RESOURCEUSAGE_CONNECTABLE,lpnr,&hEnum))!=NO_ERROR)
! 		return;
! 	sprintf(szPath,"\\\\%s\\",szMachine);
! 	_strlwr(szPath);
! 	lpnrLocal=(LPNETRESOURCE) GlobalAlloc(GPTR,cbBuffer);
! 	do {
! 		memset(lpnrLocal,0,cbBuffer);
! 		if ((res = WNetEnumResource(hEnum,&cEntries,lpnrLocal,&cbBuffer))==NO_ERROR)
  		{
! 			for (DWORD i=0;i<cEntries;i++)
! 			{
! 				if (strstr(_strlwr(lpnrLocal[i].lpRemoteName),szPath))
! 				{
! 					if ((lpnrLocal[i].lpLocalName) && (strlen(lpnrLocal[i].lpLocalName)>0))
! 					{
! 						if (drivemap) {
! 						    DisMountDOSDrive(*lpnrLocal[i].lpLocalName);
                              DEBUG_EVENT1("AFS DriveUnMap","UnMap-Local=%x",res);
!                         }
! 					} else {
! 					    DisMountDOSDriveFull(lpnrLocal[i].lpRemoteName);
                          DEBUG_EVENT1("AFS DriveUnMap","UnMap-Remote=%x",res);
                      }
- 				}
- 			}
  		}
! 	} while (res!=ERROR_NO_MORE_ITEMS);
! 	GlobalFree((HGLOBAL)lpnrLocal);
! 	WNetCloseEnum(hEnum);
  }
  
! BOOL DoMapShareChange()
! {
! 	DRIVEMAPLIST List;
! 	TCHAR szMachine[ MAX_PATH],szPath[MAX_PATH];
! 	DWORD rc=28;
! 	HANDLE hEnum;
! 	LPNETRESOURCE lpnrLocal,lpnr=NULL;
! 	DWORD res;
! 	DWORD cEntries=-1;
      DWORD cbBuffer=16384;
  
      memset(szMachine, '\0', sizeof(szMachine));
      GetClientNetbiosName(szMachine);
  
      // Initialize the data structure
! 	if (!IsServiceActive())
! 		return TRUE;
! 	memset (&List, 0x00, sizeof(DRIVEMAPLIST));
! 	for (size_t ii = 0; ii < 26; ++ii)
! 		List.aDriveMap[ii].chDrive = chDRIVE_A + ii;
! 	QueryDriveMapList_ReadSubmounts (&List);
! 	if ((res=WNetOpenEnum(RESOURCE_CONNECTED,RESOURCETYPE_DISK,RESOURCEUSAGE_CONNECTABLE,lpnr,&hEnum))!=NO_ERROR)
! 		return FALSE;
! 	lpnrLocal=(LPNETRESOURCE) GlobalAlloc(GPTR,cbBuffer);
! 	sprintf(szPath,"\\\\%s\\",szMachine);
! 	_strlwr(szPath);
! 	do {
! 		memset(lpnrLocal,0,cbBuffer);
! 		if ((res = WNetEnumResource(hEnum,&cEntries,lpnrLocal,&cbBuffer))==NO_ERROR)
  		{
! 			for (DWORD i=0;i<cEntries;i++)
! 			{
! 				if (strstr(_strlwr(lpnrLocal[i].lpRemoteName),szPath)==NULL)
! 					continue;	//only look at real afs mappings
! 				CHAR * pSubmount=strrchr(lpnrLocal[i].lpRemoteName,'\\')+1;
! 				if (lstrcmpi(pSubmount,"all")==0) 
! 					continue;				// do not remove 'all'
! 				for (DWORD j=0;j<List.cSubmounts;j++)
! 				{
! 					if (
! 						(List.aSubmounts[j].szSubmount[0]) &&
! 						(lstrcmpi(List.aSubmounts[j].szSubmount,pSubmount)==0)
! 						) 
! 					{
! 						List.aSubmounts[j].fInUse=TRUE; 
! 						goto nextname;
! 					}
! 				}
! 				// wasn't on list so lets remove
! 				DisMountDOSDrive(pSubmount);
! 				nextname:;
! 			}
  		}
! 	} while (res!=ERROR_NO_MORE_ITEMS);
! 	GlobalFree((HGLOBAL)lpnrLocal);
! 	WNetCloseEnum(hEnum);
! 	sprintf(szPath,"\\\\%s\\all",szMachine);
  
! 	// Lets connect all submounts that weren't connectd
      DWORD cbUser=MAXRANDOMNAMELEN-1;
! 	CHAR szUser[MAXRANDOMNAMELEN];
      CHAR * pUser = NULL;
! 	if (WNetGetUser(szPath,(LPSTR)szUser,&cbUser)!=NO_ERROR) {
          if (RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY)) {
              if (!pUserName[0]) {
                  GenRandomName(szUser,MAXRANDOMNAMELEN-1);
--- 1102,1220 ----
  
  void TestAndDoUnMapShare()
  {
!     if (!RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY))
! 	return;
!     DoUnMapShare(FALSE);	
  }
  
  void DoUnMapShare(BOOL drivemap)	//disconnect drivemap 
  {
!     TCHAR szMachine[MAX_PATH],szPath[MAX_PATH];
!     DWORD rc=28;
!     HANDLE hEnum;
!     LPNETRESOURCE lpnrLocal,lpnr=NULL;
!     DWORD res;
!     DWORD cbBuffer=16384;
!     DWORD cEntries=-1;
!     CHAR *pSubmount="";
  
      memset(szMachine, '\0', sizeof(szMachine));
      GetClientNetbiosName(szMachine);
  
     // Initialize the data structure
!     if ((res=WNetOpenEnum(RESOURCE_CONNECTED,RESOURCETYPE_DISK,RESOURCEUSAGE_CONNECTABLE,lpnr,&hEnum))!=NO_ERROR)
! 	return;
!     sprintf(szPath,"\\\\%s\\",szMachine);
!     _strlwr(szPath);
!     lpnrLocal=(LPNETRESOURCE) GlobalAlloc(GPTR,cbBuffer);
!     do {
! 	memset(lpnrLocal,0,cbBuffer);
! 	if ((res = WNetEnumResource(hEnum,&cEntries,lpnrLocal,&cbBuffer))==NO_ERROR)
! 	{
! 	    for (DWORD i=0;i<cEntries;i++)
! 	    {
! 		if (strstr(_strlwr(lpnrLocal[i].lpRemoteName),szPath))
  		{
! 		    if ((lpnrLocal[i].lpLocalName) && (strlen(lpnrLocal[i].lpLocalName)>0))
! 		    {
! 			if (drivemap) {
! 			    DisMountDOSDrive(*lpnrLocal[i].lpLocalName);
                              DEBUG_EVENT1("AFS DriveUnMap","UnMap-Local=%x",res);
!                         }		
! 		    } else {
! 			DisMountDOSDriveFull(lpnrLocal[i].lpRemoteName);
                          DEBUG_EVENT1("AFS DriveUnMap","UnMap-Remote=%x",res);
                      }
  		}
! 	    }
! 	}
!     } while (res!=ERROR_NO_MORE_ITEMS);
!     GlobalFree((HGLOBAL)lpnrLocal);
!     WNetCloseEnum(hEnum);
  }
  
! BOOL DoMapShareChange(BOOL removeUnknown)
! {
!     DRIVEMAPLIST List;
!     TCHAR szMachine[ MAX_PATH],szPath[MAX_PATH];
!     DWORD rc=28;
!     HANDLE hEnum;
!     LPNETRESOURCE lpnrLocal,lpnr=NULL;
!     DWORD res;
!     DWORD cEntries=-1;
      DWORD cbBuffer=16384;
  
      memset(szMachine, '\0', sizeof(szMachine));
      GetClientNetbiosName(szMachine);
  
      // Initialize the data structure
!     if (!IsServiceActive())
! 	return TRUE;
!     memset (&List, 0x00, sizeof(DRIVEMAPLIST));
!     for (size_t ii = 0; ii < 26; ++ii)
! 	List.aDriveMap[ii].chDrive = chDRIVE_A + ii;
!     QueryDriveMapList_ReadSubmounts (&List);
!     if ((res=WNetOpenEnum(RESOURCE_CONNECTED,RESOURCETYPE_DISK,RESOURCEUSAGE_CONNECTABLE,lpnr,&hEnum))!=NO_ERROR)
! 	return FALSE;
!     lpnrLocal=(LPNETRESOURCE) GlobalAlloc(GPTR,cbBuffer);
!     sprintf(szPath,"\\\\%s\\",szMachine);
!     _strlwr(szPath);
!     do {
! 	memset(lpnrLocal,0,cbBuffer);
! 	if ((res = WNetEnumResource(hEnum,&cEntries,lpnrLocal,&cbBuffer))==NO_ERROR)
! 	{
! 	    for (DWORD i=0;i<cEntries;i++)
! 	    {
! 		if (strstr(_strlwr(lpnrLocal[i].lpRemoteName),szPath)==NULL)
! 		    continue;	//only look at real afs mappings
! 		CHAR * pSubmount=strrchr(lpnrLocal[i].lpRemoteName,'\\')+1;
! 		if (lstrcmpi(pSubmount,"all")==0) 
! 		    continue;				// do not remove 'all'
! 		for (DWORD j=0;j<List.cSubmounts;j++)
  		{
! 		    if ((List.aSubmounts[j].szSubmount[0]) &&
! 			 (lstrcmpi(List.aSubmounts[j].szSubmount,pSubmount)==0)
! 			 ) 
! 		    {
! 			List.aSubmounts[j].fInUse=TRUE; 
! 			goto nextname;
! 		    }
  		}
! 		// wasn't on list so lets remove
! 		DisMountDOSDrive(pSubmount);
! 	      nextname:;
! 	    }
! 	}
!     } while (res!=ERROR_NO_MORE_ITEMS);
!     GlobalFree((HGLOBAL)lpnrLocal);
!     WNetCloseEnum(hEnum);
!     sprintf(szPath,"\\\\%s\\all",szMachine);
  
!     // Lets connect all submounts that weren't connectd
      DWORD cbUser=MAXRANDOMNAMELEN-1;
!     CHAR szUser[MAXRANDOMNAMELEN];
      CHAR * pUser = NULL;
!     if (WNetGetUser(szPath,(LPSTR)szUser,&cbUser)!=NO_ERROR) {
          if (RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY)) {
              if (!pUserName[0]) {
                  GenRandomName(szUser,MAXRANDOMNAMELEN-1);
***************
*** 1225,1266 ****
              }
          }
      } else {
! 		if ((pUser=strchr(szUser,'\\'))!=NULL)
              pUser++;
! 	}
  
      for (DWORD j=0;j<List.cSubmounts;j++)
! 	{
! 		if (List.aSubmounts[j].fInUse)
! 			continue;
! 		DWORD res=MountDOSDrive(0,List.aSubmounts[j].szSubmount,FALSE,pUser);
! 	}
! 	return TRUE;
  }
  
  BOOL DoMapShare()
  {
! 	DRIVEMAPLIST List;
! 	DWORD rc=28;
! 	BOOL bMappedAll=FALSE;
  
     // Initialize the data structure
! 	DEBUG_EVENT0("AFS DoMapShare");
! 	QueryDriveMapList (&List);
! 	DoUnMapShare(TRUE);
! 	// All connections have been removed
! 	// Lets restore them after making the connection from the random name
  
! 	TCHAR szMachine[ MAX_PATH],szPath[MAX_PATH];
      memset(szMachine, '\0', sizeof(szMachine));
      GetClientNetbiosName(szMachine);
      sprintf(szPath,"\\\\%s\\all",szMachine);
  
      // Lets connect all submounts that weren't connectd
      DWORD cbUser=MAXRANDOMNAMELEN-1;
! 	CHAR szUser[MAXRANDOMNAMELEN];
      CHAR * pUser = NULL;
! 	if (WNetGetUser(szPath,(LPSTR)szUser,&cbUser)!=NO_ERROR) {
          if (RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY)) {
              if (!pUserName[0]) {
                  GenRandomName(szUser,MAXRANDOMNAMELEN-1);
--- 1224,1265 ----
              }
          }
      } else {
! 	if ((pUser=strchr(szUser,'\\'))!=NULL)
              pUser++;
!     }
  
      for (DWORD j=0;j<List.cSubmounts;j++)
!     {
! 	if (List.aSubmounts[j].fInUse)
! 	    continue;
! 	DWORD res=MountDOSDrive(0,List.aSubmounts[j].szSubmount,FALSE,pUser);
!     }
!     return TRUE;
  }
  
  BOOL DoMapShare()
  {
!     DRIVEMAPLIST List;
!     DWORD rc=28;
!     BOOL bMappedAll=FALSE;
  
     // Initialize the data structure
!     DEBUG_EVENT0("AFS DoMapShare");
!     QueryDriveMapList (&List);
!     DoUnMapShare(TRUE);
!     // All connections have been removed
!     // Lets restore them after making the connection from the random name
  
!     TCHAR szMachine[ MAX_PATH],szPath[MAX_PATH];
      memset(szMachine, '\0', sizeof(szMachine));
      GetClientNetbiosName(szMachine);
      sprintf(szPath,"\\\\%s\\all",szMachine);
  
      // Lets connect all submounts that weren't connectd
      DWORD cbUser=MAXRANDOMNAMELEN-1;
!     CHAR szUser[MAXRANDOMNAMELEN];
      CHAR * pUser = NULL;
!     if (WNetGetUser(szPath,(LPSTR)szUser,&cbUser)!=NO_ERROR) {
          if (RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY)) {
              if (!pUserName[0]) {
                  GenRandomName(szUser,MAXRANDOMNAMELEN-1);
***************
*** 1270,1302 ****
              }
          }
      } else {
! 		if ((pUser=strchr(szUser,'\\'))!=NULL)
              pUser++;
! 	}
  
! 	for (DWORD i=0;i<List.cSubmounts;i++)
  	{
! 		if (List.aSubmounts[i].szSubmount[0])
! 		{
! 			DWORD res=MountDOSDrive(0,List.aSubmounts[i].szSubmount,FALSE,pUser);
! 			if (lstrcmpi("all",List.aSubmounts[i].szSubmount)==0)
! 				bMappedAll=TRUE;
! 		}
  	}
! 	if (!bMappedAll)	//make sure all is mapped also
! 	{
          DWORD res=MountDOSDrive(0,"all",FALSE,pUser);
          if (res==ERROR_SESSION_CREDENTIAL_CONFLICT)
          {
              DisMountDOSDrive("all");
              MountDOSDrive(0,"all",FALSE,pUser);
          }
! 	}
! 	for (TCHAR chDrive = chDRIVE_A; chDrive <= chDRIVE_Z; ++chDrive)
  	{
- 		if (List.aDriveMap[chDrive-chDRIVE_A].fActive ||
-             ForceMapActive(chDrive))
- 		{
              TCHAR szSubmount[ MAX_PATH ];
              if (List.aDriveMap[chDrive-chDRIVE_A].szSubmount[0])
                  lstrcpy(szSubmount,List.aDriveMap[chDrive-chDRIVE_A].szSubmount);
--- 1269,1301 ----
              }
          }
      } else {
! 	if ((pUser=strchr(szUser,'\\'))!=NULL)
              pUser++;
!     }
  
!     for (DWORD i=0;i<List.cSubmounts;i++)
!     {
! 	if (List.aSubmounts[i].szSubmount[0])
  	{
! 	    DWORD res=MountDOSDrive(0,List.aSubmounts[i].szSubmount,FALSE,pUser);
! 	    if (lstrcmpi("all",List.aSubmounts[i].szSubmount)==0)
! 		bMappedAll=TRUE;
  	}
!     }
!     if (!bMappedAll)	//make sure all is mapped also
!     {
          DWORD res=MountDOSDrive(0,"all",FALSE,pUser);
          if (res==ERROR_SESSION_CREDENTIAL_CONFLICT)
          {
              DisMountDOSDrive("all");
              MountDOSDrive(0,"all",FALSE,pUser);
          }
!     }
!     for (TCHAR chDrive = chDRIVE_A; chDrive <= chDRIVE_Z; ++chDrive)
!     {
! 	if (List.aDriveMap[chDrive-chDRIVE_A].fActive ||
! 	     ForceMapActive(chDrive))
  	{
              TCHAR szSubmount[ MAX_PATH ];
              if (List.aDriveMap[chDrive-chDRIVE_A].szSubmount[0])
                  lstrcpy(szSubmount,List.aDriveMap[chDrive-chDRIVE_A].szSubmount);
***************
*** 1306,1317 ****
              BOOL fPersistent = List.aDriveMap[chDrive-chDRIVE_A].fPersistent;
              if (RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY))
                  fPersistent = FALSE;
! 		    DWORD res=MountDOSDrive(chDrive
! 					    ,szSubmount
! 					    ,fPersistent,pUser);
! 		}
  	}
! 	return TRUE;
  }
  
  BOOL GlobalMountDrive()
--- 1305,1316 ----
              BOOL fPersistent = List.aDriveMap[chDrive-chDRIVE_A].fPersistent;
              if (RWLogonOption(TRUE,LOGON_OPTION_HIGHSECURITY))
                  fPersistent = FALSE;
! 	    DWORD res=MountDOSDrive(chDrive
! 				     ,szSubmount
! 				     ,fPersistent,pUser);
  	}
!     }
!     return TRUE;
  }
  
  BOOL GlobalMountDrive()
Index: openafs/src/WINNT/client_config/drivemap.h
diff -c openafs/src/WINNT/client_config/drivemap.h:1.5 openafs/src/WINNT/client_config/drivemap.h:1.5.2.1
*** openafs/src/WINNT/client_config/drivemap.h:1.5	Thu Feb 26 14:22:46 2004
--- openafs/src/WINNT/client_config/drivemap.h	Mon Nov 21 19:37:50 2005
***************
*** 89,95 ****
  BOOL DoMapShare();
  void MapShareName(char *);
  void DoUnMapShare(BOOL);
! BOOL DoMapShareChange();
  DWORD RWLogonOption(BOOL read,DWORD value);
  BOOL GlobalMountDrive();
  DWORD MountDOSDrive(char chDrive,const char *szSubmount,BOOL bPresistant=TRUE,const char *puser=NULL);
--- 89,95 ----
  BOOL DoMapShare();
  void MapShareName(char *);
  void DoUnMapShare(BOOL);
! BOOL DoMapShareChange(BOOL removeUnknown=TRUE);
  DWORD RWLogonOption(BOOL read,DWORD value);
  BOOL GlobalMountDrive();
  DWORD MountDOSDrive(char chDrive,const char *szSubmount,BOOL bPresistant=TRUE,const char *puser=NULL);
Index: openafs/src/WINNT/client_creds/main.cpp
diff -c openafs/src/WINNT/client_creds/main.cpp:1.14.2.1 openafs/src/WINNT/client_creds/main.cpp:1.14.2.2
*** openafs/src/WINNT/client_creds/main.cpp:1.14.2.1	Fri Mar 11 02:00:24 2005
--- openafs/src/WINNT/client_creds/main.cpp	Mon Nov 21 19:37:51 2005
***************
*** 334,340 ****
        {
            if ( IsDebuggerPresent() )
                OutputDebugString("Renewing Drive Maps\n");
!           DoMapShare();
        }
        if (fShow)
        {
--- 334,340 ----
        {
            if ( IsDebuggerPresent() )
                OutputDebugString("Renewing Drive Maps\n");
!           DoMapShareChange(FALSE);
        }
        if (fShow)
        {
Index: openafs/src/WINNT/client_exp/gui2fs.cpp
diff -c openafs/src/WINNT/client_exp/gui2fs.cpp:1.10.2.7 openafs/src/WINNT/client_exp/gui2fs.cpp:1.10.2.8
*** openafs/src/WINNT/client_exp/gui2fs.cpp:1.10.2.7	Sun Oct  2 05:08:18 2005
--- openafs/src/WINNT/client_exp/gui2fs.cpp	Sat Oct 15 17:48:27 2005
***************
*** 32,37 ****
--- 32,38 ----
  #include <afsint.h>
  #include <afs/auth.h>
  #include <WINNT\afsreg.h>
+ #include <cm.h>
  }
  
  
***************
*** 298,307 ****
--- 299,352 ----
      dlg.DoModal();
  }       
  
+ static int
+ CMtoUNIXerror(int cm_code)
+ {
+     switch (cm_code) {
+     case CM_ERROR_TIMEDOUT:
+ 	return ETIMEDOUT;
+     case CM_ERROR_NOACCESS:
+ 	return EACCES;
+     case CM_ERROR_NOSUCHFILE:
+ 	return ENOENT;
+     case CM_ERROR_INVAL:
+ 	return EINVAL;
+     case CM_ERROR_BADFD:
+ 	return EBADF;
+     case CM_ERROR_EXISTS:
+ 	return EEXIST;
+     case CM_ERROR_CROSSDEVLINK:
+ 	return EXDEV;
+     case CM_ERROR_NOTDIR:
+ 	return ENOTDIR;
+     case CM_ERROR_ISDIR:
+ 	return EISDIR;
+     case CM_ERROR_READONLY:
+ 	return EROFS;
+     case CM_ERROR_WOULDBLOCK:
+ 	return EWOULDBLOCK;
+     case CM_ERROR_NOSUCHCELL:
+ 	return ESRCH;		/* hack */
+     case CM_ERROR_NOSUCHVOLUME:
+ 	return EPIPE;		/* hack */
+     case CM_ERROR_NOMORETOKENS:
+ 	return EDOM;		/* hack */
+     case CM_ERROR_TOOMANYBUFS:
+ 	return EFBIG;		/* hack */
+     default:
+ 	if (cm_code > 0 && cm_code < EILSEQ)
+ 	    return cm_code;
+ 	else
+ 	    return ENOTTY;
+     }
+ }
+ 
  CString GetAfsError(int code, const char *filename)
  {
      CString strMsg;
  
+     code = CMtoUNIXerror(code);
+ 
      if (code == EINVAL) {
          if (filename)
              strMsg.Format("Invalid argument; it is possible that the file is not in AFS");
Index: openafs/src/WINNT/client_exp/set_afs_acl.cpp
diff -c openafs/src/WINNT/client_exp/set_afs_acl.cpp:1.2.20.1 openafs/src/WINNT/client_exp/set_afs_acl.cpp:1.2.20.2
*** openafs/src/WINNT/client_exp/set_afs_acl.cpp:1.2.20.1	Wed Jul  6 20:29:14 2005
--- openafs/src/WINNT/client_exp/set_afs_acl.cpp	Sat Oct 15 17:48:27 2005
***************
*** 350,360 ****
  
  void CSetAfsAcl::OnNothingSelected()
  {
! 	m_NormalRights.SetSel(-1, FALSE);	// Unselect any selected normal rights
! 	m_NegativeRights.SetSel(-1, FALSE);	// Unselect any selected negative rights
! 	ShowRights("");						// Show no rights
! 	EnablePermChanges(FALSE);			// Allow no rights changes
! 	m_Remove.EnableWindow(FALSE);		// Disable remove button
  }
  
  void CSetAfsAcl::OnSelection()
--- 350,369 ----
  
  void CSetAfsAcl::OnNothingSelected()
  {
!     //m_NormalRights.SetSel(-1,FALSE);	// Unselect any selected normal rights
!     //m_NegativeRights.SetSel(-1,FALSE);	// Unselect any selected negative rights
! 
!     for (int i=0;i < m_NormalRights.GetCount();i++)
!     {
! 	m_NormalRights.SetSel(i, FALSE);
!     }
!     for (int i=0;i < m_NegativeRights.GetCount();i++)
!     {
! 	m_NegativeRights.SetSel(i, FALSE);
!     }
!     ShowRights("");				// Show no rights
!     EnablePermChanges(FALSE);		// Allow no rights changes
!     m_Remove.EnableWindow(FALSE);		// Disable remove button
  }
  
  void CSetAfsAcl::OnSelection()
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/frames.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/frames.htm:1.1.2.2 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/frames.htm:1.1.2.5
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/frames.htm:1.1.2.2	Sun Sep 25 21:07:05 2005
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/frames.htm	Sun Feb  5 03:14:16 2006
***************
*** 8,22 ****
  <meta name=Generator content="Microsoft Word 11">
  <meta name=Originator content="Microsoft Word 11">
  <link rel=File-List href="frames_files/filelist.xml">
! <title>OpenAFS for Windows 1.4.0 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Author>Jeffrey Altman</o:Author>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
    <o:Revision>2</o:Revision>
    <o:TotalTime>0</o:TotalTime>
!   <o:Created>2005-09-25T20:26:00Z</o:Created>
!   <o:LastSaved>2005-09-25T20:26:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
    <o:Words>9</o:Words>
    <o:Characters>53</o:Characters>
--- 8,22 ----
  <meta name=Generator content="Microsoft Word 11">
  <meta name=Originator content="Microsoft Word 11">
  <link rel=File-List href="frames_files/filelist.xml">
! <title>OpenAFS for Windows 1.4.1 Release Notes</title>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Author>Jeffrey Altman</o:Author>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
    <o:Revision>2</o:Revision>
    <o:TotalTime>0</o:TotalTime>
!   <o:Created>2006-02-05T08:10:00Z</o:Created>
!   <o:LastSaved>2006-02-05T08:10:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
    <o:Words>9</o:Words>
    <o:Characters>53</o:Characters>
***************
*** 24,30 ****
    <o:Lines>1</o:Lines>
    <o:Paragraphs>1</o:Paragraphs>
    <o:CharactersWithSpaces>61</o:CharactersWithSpaces>
!   <o:Version>11.6408</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
--- 24,30 ----
    <o:Lines>1</o:Lines>
    <o:Paragraphs>1</o:Paragraphs>
    <o:CharactersWithSpaces>61</o:CharactersWithSpaces>
!   <o:Version>11.6568</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
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.2 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.2.5
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm:1.1.2.2	Sun Sep 25 21:07:05 2005
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/logo.htm	Sun Feb  5 03:14:16 2006
***************
*** 24,39 ****
    <o:Author>Jeffrey Altman</o:Author>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
    <o:Revision>1</o:Revision>
!   <o:TotalTime>0</o:TotalTime>
!   <o:Created>2005-09-25T20:09:00Z</o:Created>
!   <o:LastSaved>2005-09-25T20:09:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
    <o:Characters>1</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
    <o:Lines>1</o:Lines>
    <o:Paragraphs>1</o:Paragraphs>
    <o:CharactersWithSpaces>1</o:CharactersWithSpaces>
!   <o:Version>11.6408</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
--- 24,39 ----
    <o:Author>Jeffrey Altman</o:Author>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
    <o:Revision>1</o:Revision>
!   <o:TotalTime>2</o:TotalTime>
!   <o:Created>2005-09-25T21:09:00Z</o:Created>
!   <o:LastSaved>2005-09-25T21:09:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
    <o:Characters>1</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
    <o:Lines>1</o:Lines>
    <o:Paragraphs>1</o:Paragraphs>
    <o:CharactersWithSpaces>1</o:CharactersWithSpaces>
!   <o:Version>11.6568</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
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.5.2.1 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.2.2.9
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm:1.2.2.5.2.1	Sat Oct  8 10:17:23 2005
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes.htm	Sun Feb  5 03:14:17 2006
***************
*** 11,53 ****
  <meta name=Originator content="Microsoft Word 11">
  <link rel=File-List href="relnotes_files/filelist.xml">
  <link rel=Preview href="relnotes_files/preview.wmf">
! <title>OpenAFS for Windows 1.4.0 Release Notes</title>
  <o:SmartTagType namespaceuri="urn:schemas:contacts" name="GivenName"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="address"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PostalCode"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="State"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="City"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="Street"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="country-region"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PlaceType"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PlaceName"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="place"/>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Author>Jeffrey Altman</o:Author>
!   <o:Keywords>OpenAFS 1.4.0</o:Keywords>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
!   <o:Revision>6</o:Revision>
!   <o:TotalTime>48</o:TotalTime>
!   <o:LastPrinted>2005-09-26T23:55:00Z</o:LastPrinted>
!   <o:Created>2005-09-25T20:12:00Z</o:Created>
!   <o:LastSaved>2005-10-08T14:11:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
!   <o:Words>14555</o:Words>
!   <o:Characters>82969</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
!   <o:Lines>691</o:Lines>
    <o:Paragraphs>194</o:Paragraphs>
!   <o:CharactersWithSpaces>97330</o:CharactersWithSpaces>
    <o:Version>11.6568</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
--- 11,53 ----
  <meta name=Originator content="Microsoft Word 11">
  <link rel=File-List href="relnotes_files/filelist.xml">
  <link rel=Preview href="relnotes_files/preview.wmf">
! <title>OpenAFS for Windows 1.4.1 Release Notes</title>
  <o:SmartTagType namespaceuri="urn:schemas:contacts" name="GivenName"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PlaceType"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PlaceName"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="place"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="country-region"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="address"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="City"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="State"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PostalCode"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="Street"/>
  <!--[if gte mso 9]><xml>
   <o:DocumentProperties>
    <o:Author>Jeffrey Altman</o:Author>
!   <o:Keywords>OpenAFS 1.4.1 AFS Windows</o:Keywords>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
!   <o:Revision>3</o:Revision>
!   <o:TotalTime>11</o:TotalTime>
!   <o:LastPrinted>1601-01-01T07:00:00Z</o:LastPrinted>
!   <o:Created>2005-09-25T21:12:00Z</o:Created>
!   <o:LastSaved>2006-01-09T05:13:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
!   <o:Words>14578</o:Words>
!   <o:Characters>83097</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
!   <o:Lines>692</o:Lines>
    <o:Paragraphs>194</o:Paragraphs>
!   <o:CharactersWithSpaces>97481</o:CharactersWithSpaces>
    <o:Version>11.6568</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
***************
*** 73,79 ****
     <w:AdjustLineHeightInTable/>
     <w:SelectEntireFieldWithStartOrEnd/>
     <w:UseWord2002TableStyleRules/>
-    <w:UseFELayout/>
    </w:Compatibility>
    <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
   </w:WordDocument>
--- 73,78 ----
***************
*** 90,95 ****
--- 89,101 ----
  <!--
   /* Font Definitions */
   @font-face
+ 	{font-family:Wingdings;
+ 	panose-1:5 0 0 0 0 0 0 0 0 0;
+ 	mso-font-charset:2;
+ 	mso-generic-font-family:auto;
+ 	mso-font-pitch:variable;
+ 	mso-font-signature:0 268435456 0 0 -2147483648 0;}
+ @font-face
  	{font-family:"MS Mincho";
  	panose-1:2 2 6 9 4 2 5 8 3 4;
  	mso-font-alt:"\FF2D\FF33 \660E\671D";
***************
*** 158,164 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  h1
  	{mso-style-parent:Heading;
  	mso-style-next:"Body Text";
--- 164,171 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
  h1
  	{mso-style-parent:Heading;
  	mso-style-next:"Body Text";
***************
*** 170,182 ****
  	mso-pagination:none;
  	page-break-after:avoid;
  	mso-outline-level:1;
! 	mso-list:l11 level1 lfo2;
  	mso-hyphenate:none;
  	tab-stops:list 0pt;
  	font-size:16.0pt;
  	font-family:Albany;
  	mso-bidi-font-family:Tahoma;
! 	mso-font-kerning:0pt;}
  h2
  	{mso-style-parent:Heading;
  	mso-style-next:"Body Text";
--- 177,191 ----
  	mso-pagination:none;
  	page-break-after:avoid;
  	mso-outline-level:1;
! 	mso-list:l21 level1 lfo12;
  	mso-hyphenate:none;
  	tab-stops:list 0pt;
  	font-size:16.0pt;
  	font-family:Albany;
+ 	mso-fareast-font-family:"MS Mincho";
  	mso-bidi-font-family:Tahoma;
! 	mso-font-kerning:0pt;
! 	mso-fareast-language:#00FF;}
  h2
  	{mso-style-parent:Heading;
  	mso-style-next:"Body Text";
***************
*** 188,199 ****
  	mso-pagination:none;
  	page-break-after:avoid;
  	mso-outline-level:2;
! 	mso-list:l11 level2 lfo2;
  	mso-hyphenate:none;
  	tab-stops:list 0pt;
  	font-size:14.0pt;
  	font-family:Albany;
  	mso-bidi-font-family:Tahoma;
  	font-style:italic;}
  h3
  	{mso-style-parent:Heading;
--- 197,210 ----
  	mso-pagination:none;
  	page-break-after:avoid;
  	mso-outline-level:2;
! 	mso-list:l21 level2 lfo12;
  	mso-hyphenate:none;
  	tab-stops:list 0pt;
  	font-size:14.0pt;
  	font-family:Albany;
+ 	mso-fareast-font-family:"MS Mincho";
  	mso-bidi-font-family:Tahoma;
+ 	mso-fareast-language:#00FF;
  	font-style:italic;}
  h3
  	{mso-style-parent:Heading;
***************
*** 207,218 ****
  	mso-pagination:none;
  	page-break-after:avoid;
  	mso-outline-level:3;
! 	mso-list:l11 level3 lfo2;
  	mso-hyphenate:none;
  	tab-stops:list 0pt;
  	font-size:14.0pt;
  	font-family:Albany;
! 	mso-bidi-font-family:Tahoma;}
  h4
  	{mso-style-link:"Heading 4 Char";
  	mso-style-next:Normal;
--- 218,231 ----
  	mso-pagination:none;
  	page-break-after:avoid;
  	mso-outline-level:3;
! 	mso-list:l21 level3 lfo12;
  	mso-hyphenate:none;
  	tab-stops:list 0pt;
  	font-size:14.0pt;
  	font-family:Albany;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:Tahoma;
! 	mso-fareast-language:#00FF;}
  h4
  	{mso-style-link:"Heading 4 Char";
  	mso-style-next:Normal;
***************
*** 226,232 ****
  	mso-hyphenate:none;
  	font-size:14.0pt;
  	font-family:"Times New Roman";
! 	mso-fareast-font-family:"Andale Sans UI";}
  h5
  	{mso-style-next:Normal;
  	margin-top:12.0pt;
--- 239,246 ----
  	mso-hyphenate:none;
  	font-size:14.0pt;
  	font-family:"Times New Roman";
! 	mso-fareast-font-family:"Andale Sans UI";
! 	mso-fareast-language:#00FF;}
  h5
  	{mso-style-next:Normal;
  	margin-top:12.0pt;
***************
*** 239,244 ****
--- 253,259 ----
  	font-size:13.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
+ 	mso-fareast-language:#00FF;
  	font-style:italic;}
  h6
  	{mso-style-next:Normal;
***************
*** 251,257 ****
  	mso-hyphenate:none;
  	font-size:11.0pt;
  	font-family:"Times New Roman";
! 	mso-fareast-font-family:"Andale Sans UI";}
  p.MsoToc1, li.MsoToc1, div.MsoToc1
  	{mso-style-noshow:yes;
  	mso-style-parent:Index;
--- 266,273 ----
  	mso-hyphenate:none;
  	font-size:11.0pt;
  	font-family:"Times New Roman";
! 	mso-fareast-font-family:"Andale Sans UI";
! 	mso-fareast-language:#00FF;}
  p.MsoToc1, li.MsoToc1, div.MsoToc1
  	{mso-style-noshow:yes;
  	mso-style-parent:Index;
***************
*** 265,271 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;}
  p.MsoToc2, li.MsoToc2, div.MsoToc2
  	{mso-style-noshow:yes;
  	mso-style-parent:Index;
--- 281,288 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;
! 	mso-fareast-language:#00FF;}
  p.MsoToc2, li.MsoToc2, div.MsoToc2
  	{mso-style-noshow:yes;
  	mso-style-parent:Index;
***************
*** 279,285 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;}
  p.MsoToc3, li.MsoToc3, div.MsoToc3
  	{mso-style-noshow:yes;
  	mso-style-parent:Index;
--- 296,303 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;
! 	mso-fareast-language:#00FF;}
  p.MsoToc3, li.MsoToc3, div.MsoToc3
  	{mso-style-noshow:yes;
  	mso-style-parent:Index;
***************
*** 293,299 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;}
  p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
  	{mso-style-noshow:yes;
  	margin-top:7.2pt;
--- 311,318 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;
! 	mso-fareast-language:#00FF;}
  p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
  	{mso-style-noshow:yes;
  	margin-top:7.2pt;
***************
*** 305,311 ****
  	font-size:10.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoHeader, li.MsoHeader, div.MsoHeader
  	{margin-top:7.2pt;
  	margin-right:0pt;
--- 324,331 ----
  	font-size:10.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
  p.MsoHeader, li.MsoHeader, div.MsoHeader
  	{margin-top:7.2pt;
  	margin-right:0pt;
***************
*** 317,323 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoFooter, li.MsoFooter, div.MsoFooter
  	{margin-top:7.2pt;
  	margin-right:0pt;
--- 337,344 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
  p.MsoFooter, li.MsoFooter, div.MsoFooter
  	{margin-top:7.2pt;
  	margin-right:0pt;
***************
*** 329,335 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoEnvelopeAddress, li.MsoEnvelopeAddress, div.MsoEnvelopeAddress
  	{margin-top:7.2pt;
  	margin-right:0pt;
--- 350,357 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
  p.MsoEnvelopeAddress, li.MsoEnvelopeAddress, div.MsoEnvelopeAddress
  	{margin-top:7.2pt;
  	margin-right:0pt;
***************
*** 345,353 ****
  	mso-element-anchor-horizontal:page;
  	mso-element-left:center;
  	mso-element-top:bottom;
  	font-size:12.0pt;
  	font-family:Arial;
! 	mso-fareast-font-family:"Andale Sans UI";}
  span.MsoFootnoteReference
  	{mso-style-noshow:yes;
  	vertical-align:super;}
--- 367,377 ----
  	mso-element-anchor-horizontal:page;
  	mso-element-left:center;
  	mso-element-top:bottom;
+ 	mso-height-rule:exactly;
  	font-size:12.0pt;
  	font-family:Arial;
! 	mso-fareast-font-family:"Andale Sans UI";
! 	mso-fareast-language:#00FF;}
  span.MsoFootnoteReference
  	{mso-style-noshow:yes;
  	vertical-align:super;}
***************
*** 362,368 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;}
  p.MsoTitle, li.MsoTitle, div.MsoTitle
  	{mso-style-parent:Heading;
  	mso-style-next:Subtitle;
--- 386,393 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;
! 	mso-fareast-language:#00FF;}
  p.MsoTitle, li.MsoTitle, div.MsoTitle
  	{mso-style-parent:Heading;
  	mso-style-next:Subtitle;
***************
*** 378,383 ****
--- 403,409 ----
  	font-family:Albany;
  	mso-fareast-font-family:"MS Mincho";
  	mso-bidi-font-family:Tahoma;
+ 	mso-fareast-language:#00FF;
  	font-weight:bold;}
  p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
  	{mso-style-link:"Body Text Char";
***************
*** 390,396 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoBodyTextIndent, li.MsoBodyTextIndent, div.MsoBodyTextIndent
  	{mso-style-parent:"Body Text";
  	margin-top:0pt;
--- 416,423 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
  p.MsoBodyTextIndent, li.MsoBodyTextIndent, div.MsoBodyTextIndent
  	{mso-style-parent:"Body Text";
  	margin-top:0pt;
***************
*** 402,420 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
! 	{margin-top:7.2pt;
  	margin-right:0pt;
! 	margin-bottom:3.0pt;
  	margin-left:0pt;
  	text-align:center;
  	mso-pagination:none;
! 	mso-outline-level:2;
  	mso-hyphenate:none;
! 	font-size:12.0pt;
! 	font-family:Arial;
! 	mso-fareast-font-family:"Andale Sans UI";}
  a:link, span.MsoHyperlink
  	{mso-style-parent:"";
  	color:navy;
--- 429,453 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
  p.MsoSubtitle, li.MsoSubtitle, div.MsoSubtitle
! 	{mso-style-parent:Heading;
! 	mso-style-next:"Body Text";
! 	margin-top:12.0pt;
  	margin-right:0pt;
! 	margin-bottom:6.0pt;
  	margin-left:0pt;
  	text-align:center;
  	mso-pagination:none;
! 	page-break-after:avoid;
  	mso-hyphenate:none;
! 	font-size:14.0pt;
! 	font-family:Albany;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:Tahoma;
! 	mso-fareast-language:#00FF;
! 	font-style:italic;}
  a:link, span.MsoHyperlink
  	{mso-style-parent:"";
  	color:navy;
***************
*** 425,468 ****
  	color:maroon;
  	text-decoration:underline;
  	text-underline:single;}
! span.Heading4Char
! 	{mso-style-name:"Heading 4 Char";
! 	mso-style-locked:yes;
! 	mso-style-link:"Heading 4";
! 	mso-ansi-font-size:14.0pt;
! 	mso-bidi-font-size:14.0pt;
! 	font-family:"Andale Sans UI";
! 	mso-ascii-font-family:"Andale Sans UI";
! 	mso-fareast-font-family:"Andale Sans UI";
! 	mso-hansi-font-family:"Andale Sans UI";
! 	mso-ansi-language:EN-US;
! 	mso-bidi-language:AR-SA;
! 	font-weight:bold;}
! span.BodyTextChar
! 	{mso-style-name:"Body Text Char";
! 	mso-style-locked:yes;
! 	mso-style-link:"Body Text";
! 	mso-ansi-font-size:12.0pt;
! 	mso-bidi-font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-ascii-font-family:Thorndale;
! 	mso-fareast-font-family:"Andale Sans UI";
! 	mso-hansi-font-family:Thorndale;
! 	mso-ansi-language:EN-US;
! 	mso-bidi-language:AR-SA;}
! span.HeadingChar
! 	{mso-style-name:"Heading Char";
! 	mso-style-locked:yes;
! 	mso-style-link:Heading;
! 	mso-ansi-font-size:14.0pt;
! 	mso-bidi-font-size:14.0pt;
! 	font-family:Albany;
! 	mso-ascii-font-family:Albany;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-hansi-font-family:Albany;
! 	mso-bidi-font-family:Tahoma;
! 	mso-ansi-language:EN-US;
! 	mso-bidi-language:AR-SA;}
  p.Heading, li.Heading, div.Heading
  	{mso-style-name:Heading;
  	mso-style-link:"Heading Char";
--- 458,482 ----
  	color:maroon;
  	text-decoration:underline;
  	text-underline:single;}
! span.NumberingSymbols
! 	{mso-style-name:"Numbering Symbols";
! 	mso-style-parent:"";}
! span.Bullets
! 	{mso-style-name:Bullets;
! 	mso-style-parent:"";
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	font-family:StarSymbol;
! 	mso-ascii-font-family:StarSymbol;
! 	mso-fareast-font-family:StarSymbol;
! 	mso-hansi-font-family:StarSymbol;
! 	mso-bidi-font-family:StarSymbol;}
! span.FootnoteCharacters
! 	{mso-style-name:"Footnote Characters";
! 	mso-style-parent:"";}
! span.EndnoteCharacters
! 	{mso-style-name:"Endnote Characters";
! 	mso-style-parent:"";}
  p.Heading, li.Heading, div.Heading
  	{mso-style-name:Heading;
  	mso-style-link:"Heading Char";
***************
*** 477,483 ****
  	font-size:14.0pt;
  	font-family:Albany;
  	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:Tahoma;}
  p.Caption1, li.Caption1, div.Caption1
  	{mso-style-name:Caption1;
  	margin-top:6.0pt;
--- 491,498 ----
  	font-size:14.0pt;
  	font-family:Albany;
  	mso-fareast-font-family:"MS Mincho";
! 	mso-bidi-font-family:Tahoma;
! 	mso-fareast-language:#00FF;}
  p.Caption1, li.Caption1, div.Caption1
  	{mso-style-name:Caption1;
  	margin-top:6.0pt;
***************
*** 490,495 ****
--- 505,511 ----
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
  	mso-bidi-font-family:Tahoma;
+ 	mso-fareast-language:#00FF;
  	font-style:italic;}
  p.Index, li.Index, div.Index
  	{mso-style-name:Index;
***************
*** 502,508 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;}
  p.ContentsHeading, li.ContentsHeading, div.ContentsHeading
  	{mso-style-name:"Contents Heading";
  	mso-style-parent:Heading;
--- 518,525 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:Tahoma;
! 	mso-fareast-language:#00FF;}
  p.ContentsHeading, li.ContentsHeading, div.ContentsHeading
  	{mso-style-name:"Contents Heading";
  	mso-style-parent:Heading;
***************
*** 517,522 ****
--- 534,540 ----
  	font-family:Albany;
  	mso-fareast-font-family:"MS Mincho";
  	mso-bidi-font-family:Tahoma;
+ 	mso-fareast-language:#00FF;
  	font-weight:bold;}
  p.PreformattedText, li.PreformattedText, div.PreformattedText
  	{mso-style-name:"Preformatted Text";
***************
*** 527,533 ****
  	font-size:10.0pt;
  	font-family:Cumberland;
  	mso-fareast-font-family:Cumberland;
! 	mso-bidi-font-family:Cumberland;}
  p.ListContents, li.ListContents, div.ListContents
  	{mso-style-name:"List Contents";
  	margin-top:7.2pt;
--- 545,552 ----
  	font-size:10.0pt;
  	font-family:Cumberland;
  	mso-fareast-font-family:Cumberland;
! 	mso-bidi-font-family:Cumberland;
! 	mso-fareast-language:#00FF;}
  p.ListContents, li.ListContents, div.ListContents
  	{mso-style-name:"List Contents";
  	margin-top:7.2pt;
***************
*** 539,545 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  p.ListHeading, li.ListHeading, div.ListHeading
  	{mso-style-name:"List Heading";
  	mso-style-next:"List Contents";
--- 558,565 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
  p.ListHeading, li.ListHeading, div.ListHeading
  	{mso-style-name:"List Heading";
  	mso-style-next:"List Contents";
***************
*** 552,558 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  p.Header5, li.Header5, div.Header5
  	{mso-style-name:"Header 5";
  	margin-top:7.2pt;
--- 572,609 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
! span.HeadingChar
! 	{mso-style-name:"Heading Char";
! 	mso-style-locked:yes;
! 	mso-style-link:Heading;
! 	mso-ansi-font-size:14.0pt;
! 	mso-bidi-font-size:14.0pt;
! 	font-family:Albany;
! 	mso-ascii-font-family:Albany;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-hansi-font-family:Albany;
! 	mso-bidi-font-family:Tahoma;
! 	mso-ansi-language:EN-US;
! 	mso-fareast-language:#00FF;
! 	mso-bidi-language:AR-SA;}
! span.Heading3Char
! 	{mso-style-name:"Heading 3 Char";
! 	mso-style-locked:yes;
! 	mso-style-parent:"Heading Char";
! 	mso-style-link:"Heading 3";
! 	mso-ansi-font-size:14.0pt;
! 	mso-bidi-font-size:14.0pt;
! 	font-family:Albany;
! 	mso-ascii-font-family:Albany;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-hansi-font-family:Albany;
! 	mso-bidi-font-family:Tahoma;
! 	mso-ansi-language:EN-US;
! 	mso-fareast-language:#00FF;
! 	mso-bidi-language:AR-SA;
! 	font-weight:bold;}
  p.Header5, li.Header5, div.Header5
  	{mso-style-name:"Header 5";
  	margin-top:7.2pt;
***************
*** 564,570 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  p.Heading3, li.Heading3, div.Heading3
  	{mso-style-name:Heading3;
  	margin-top:7.2pt;
--- 615,622 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
  p.Heading3, li.Heading3, div.Heading3
  	{mso-style-name:Heading3;
  	margin-top:7.2pt;
***************
*** 576,582 ****
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";}
  p.Default, li.Default, div.Default
  	{mso-style-name:Default;
  	mso-style-parent:"";
--- 628,647 ----
  	font-size:12.0pt;
  	font-family:Thorndale;
  	mso-fareast-font-family:"Andale Sans UI";
! 	mso-bidi-font-family:"Times New Roman";
! 	mso-fareast-language:#00FF;}
! span.Heading4Char
! 	{mso-style-name:"Heading 4 Char";
! 	mso-style-locked:yes;
! 	mso-style-link:"Heading 4";
! 	mso-ansi-font-size:14.0pt;
! 	mso-bidi-font-size:14.0pt;
! 	font-family:"Andale Sans UI";
! 	mso-fareast-font-family:"Andale Sans UI";
! 	mso-ansi-language:EN-US;
! 	mso-fareast-language:#00FF;
! 	mso-bidi-language:AR-SA;
! 	font-weight:bold;}
  p.Default, li.Default, div.Default
  	{mso-style-name:Default;
  	mso-style-parent:"";
***************
*** 589,628 ****
  	font-family:Arial;
  	mso-fareast-font-family:"MS Mincho";
  	color:black;}
! span.NumberingSymbols
! 	{mso-style-name:"Numbering Symbols";
! 	mso-style-parent:"";}
! span.Bullets
! 	{mso-style-name:Bullets;
! 	mso-style-parent:"";
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	font-family:StarSymbol;
! 	mso-ascii-font-family:StarSymbol;
! 	mso-fareast-font-family:StarSymbol;
! 	mso-hansi-font-family:StarSymbol;
! 	mso-bidi-font-family:StarSymbol;}
! span.FootnoteCharacters
! 	{mso-style-name:"Footnote Characters";
! 	mso-style-parent:"";}
! span.EndnoteCharacters
! 	{mso-style-name:"Endnote Characters";
! 	mso-style-parent:"";}
! span.Heading3Char
! 	{mso-style-name:"Heading 3 Char";
  	mso-style-locked:yes;
! 	mso-style-parent:"Heading Char";
! 	mso-style-link:"Heading 3";
! 	mso-ansi-font-size:14.0pt;
! 	mso-bidi-font-size:14.0pt;
! 	font-family:Albany;
! 	mso-ascii-font-family:Albany;
! 	mso-fareast-font-family:"MS Mincho";
! 	mso-hansi-font-family:Albany;
! 	mso-bidi-font-family:Tahoma;
  	mso-ansi-language:EN-US;
! 	mso-bidi-language:AR-SA;
! 	font-weight:bold;}
   /* Page Definitions */
   @page
  	{mso-footnote-separator:url("relnotes_files/header.htm") fs;
--- 654,672 ----
  	font-family:Arial;
  	mso-fareast-font-family:"MS Mincho";
  	color:black;}
! span.BodyTextChar
! 	{mso-style-name:"Body Text Char";
  	mso-style-locked:yes;
! 	mso-style-link:"Body Text";
! 	mso-ansi-font-size:12.0pt;
! 	mso-bidi-font-size:12.0pt;
! 	font-family:Thorndale;
! 	mso-ascii-font-family:Thorndale;
! 	mso-fareast-font-family:"Andale Sans UI";
! 	mso-hansi-font-family:Thorndale;
  	mso-ansi-language:EN-US;
! 	mso-fareast-language:#00FF;
! 	mso-bidi-language:AR-SA;}
   /* Page Definitions */
   @page
  	{mso-footnote-separator:url("relnotes_files/header.htm") fs;
***************
*** 647,666 ****
  	mso-header:url("relnotes_files/header.htm") h2;
  	mso-paper-source:0;}
  div.Section2
! 	{page:Section2;
! 	mso-footnote-position:beneath-text;}
   /* List Definitions */
   @list l0
  	{mso-list-id:1;
  	mso-list-template-ids:1148726518;}
! @list l0:level1
  	{mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
  	margin-left:18.0pt;
  	text-indent:-18.0pt;
  	mso-ansi-font-size:9.0pt;
  	mso-bidi-font-size:9.0pt;}
! @list l0:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 691,812 ----
  	mso-header:url("relnotes_files/header.htm") h2;
  	mso-paper-source:0;}
  div.Section2
! 	{page:Section2;}
   /* List Definitions */
   @list l0
+ 	{mso-list-id:-132;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:-1234375184;}
+ @list l0:level1
+ 	{mso-level-tab-stop:90.0pt;
+ 	mso-level-number-position:left;
+ 	margin-left:90.0pt;
+ 	text-indent:-18.0pt;}
+ @list l1
+ 	{mso-list-id:-131;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:1628742212;}
+ @list l1:level1
+ 	{mso-level-tab-stop:72.0pt;
+ 	mso-level-number-position:left;
+ 	margin-left:72.0pt;
+ 	text-indent:-18.0pt;}
+ @list l2
+ 	{mso-list-id:-130;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:1598849380;}
+ @list l2:level1
+ 	{mso-level-tab-stop:54.0pt;
+ 	mso-level-number-position:left;
+ 	margin-left:54.0pt;
+ 	text-indent:-18.0pt;}
+ @list l3
+ 	{mso-list-id:-129;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:-1708084928;}
+ @list l3:level1
+ 	{mso-level-tab-stop:36.0pt;
+ 	mso-level-number-position:left;
+ 	text-indent:-18.0pt;}
+ @list l4
+ 	{mso-list-id:-128;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:-573116274;}
+ @list l4:level1
+ 	{mso-level-number-format:bullet;
+ 	mso-level-text:\F0B7;
+ 	mso-level-tab-stop:90.0pt;
+ 	mso-level-number-position:left;
+ 	margin-left:90.0pt;
+ 	text-indent:-18.0pt;
+ 	font-family:Symbol;}
+ @list l5
+ 	{mso-list-id:-127;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:-1674157402;}
+ @list l5:level1
+ 	{mso-level-number-format:bullet;
+ 	mso-level-text:\F0B7;
+ 	mso-level-tab-stop:72.0pt;
+ 	mso-level-number-position:left;
+ 	margin-left:72.0pt;
+ 	text-indent:-18.0pt;
+ 	font-family:Symbol;}
+ @list l6
+ 	{mso-list-id:-126;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:-855098526;}
+ @list l6:level1
+ 	{mso-level-number-format:bullet;
+ 	mso-level-text:\F0B7;
+ 	mso-level-tab-stop:54.0pt;
+ 	mso-level-number-position:left;
+ 	margin-left:54.0pt;
+ 	text-indent:-18.0pt;
+ 	font-family:Symbol;}
+ @list l7
+ 	{mso-list-id:-125;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:1629288942;}
+ @list l7:level1
+ 	{mso-level-number-format:bullet;
+ 	mso-level-text:\F0B7;
+ 	mso-level-tab-stop:36.0pt;
+ 	mso-level-number-position:left;
+ 	text-indent:-18.0pt;
+ 	font-family:Symbol;}
+ @list l8
+ 	{mso-list-id:-120;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:1092749420;}
+ @list l8:level1
+ 	{mso-level-tab-stop:18.0pt;
+ 	mso-level-number-position:left;
+ 	margin-left:18.0pt;
+ 	text-indent:-18.0pt;}
+ @list l9
+ 	{mso-list-id:-119;
+ 	mso-list-type:simple;
+ 	mso-list-template-ids:-593317242;}
+ @list l9:level1
+ 	{mso-level-number-format:bullet;
+ 	mso-level-text:\F0B7;
+ 	mso-level-tab-stop:18.0pt;
+ 	mso-level-number-position:left;
+ 	margin-left:18.0pt;
+ 	text-indent:-18.0pt;
+ 	font-family:Symbol;}
+ @list l10
  	{mso-list-id:1;
  	mso-list-template-ids:1148726518;}
! @list l10:level1
  	{mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
  	margin-left:18.0pt;
  	text-indent:-18.0pt;
  	mso-ansi-font-size:9.0pt;
  	mso-bidi-font-size:9.0pt;}
! @list l10:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 672,678 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l0:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 818,824 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 684,690 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l0:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 830,836 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 696,702 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l0:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 842,848 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 708,714 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l0:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 854,860 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 720,726 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l0:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 866,872 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 732,738 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l0:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 878,884 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 744,750 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l0:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 890,896 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 756,765 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l1
  	{mso-list-id:2;
  	mso-list-template-ids:2;}
! @list l1:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 902,911 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11
  	{mso-list-id:2;
  	mso-list-template-ids:2;}
! @list l11:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 771,777 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l1:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 917,923 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 783,789 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l1:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 929,935 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 795,801 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l1:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 941,947 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 807,813 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l1:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 953,959 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 819,825 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l1:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 965,971 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 831,837 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l1:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 977,983 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 843,849 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l1:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 989,995 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 855,861 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l1:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 1001,1007 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 867,876 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l2
  	{mso-list-id:3;
  	mso-list-template-ids:3;}
! @list l2:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 1013,1022 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l12
  	{mso-list-id:3;
  	mso-list-template-ids:3;}
! @list l12:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 882,888 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l2:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 1028,1034 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l12:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 894,900 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l2:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 1040,1046 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l12:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 906,912 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l2:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 1052,1058 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l12:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 918,924 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l2:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 1064,1070 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l12:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 930,936 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l2:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 1076,1082 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l12:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 942,948 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l2:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 1088,1094 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l12:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 954,960 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l2:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 1100,1106 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l12:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 966,972 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l2:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 1112,1118 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l12:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 978,987 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l3
  	{mso-list-id:4;
  	mso-list-template-ids:4;}
! @list l3:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 1124,1133 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l13
  	{mso-list-id:4;
  	mso-list-template-ids:4;}
! @list l13:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 993,999 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l3:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 1139,1145 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l13:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 1005,1011 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l3:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 1151,1157 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l13:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 1017,1023 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l3:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 1163,1169 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l13:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 1029,1035 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l3:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 1175,1181 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l13:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 1041,1047 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l3:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 1187,1193 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l13:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 1053,1059 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l3:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 1199,1205 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l13:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 1065,1071 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l3:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 1211,1217 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l13:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 1077,1083 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l3:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 1223,1229 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l13:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 1089,1098 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l4
  	{mso-list-id:5;
  	mso-list-template-ids:5;}
! @list l4:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 1235,1244 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14
  	{mso-list-id:5;
  	mso-list-template-ids:5;}
! @list l14:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 1104,1110 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l4:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 1250,1256 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 1116,1122 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l4:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 1262,1268 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 1128,1134 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l4:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 1274,1280 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 1140,1146 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l4:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 1286,1292 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 1152,1158 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l4:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 1298,1304 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 1164,1170 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l4:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 1310,1316 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 1176,1182 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l4:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 1322,1328 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 1188,1194 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l4:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 1334,1340 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 1200,1209 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l5
  	{mso-list-id:6;
  	mso-list-template-ids:6;}
! @list l5:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 1346,1355 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15
  	{mso-list-id:6;
  	mso-list-template-ids:6;}
! @list l15:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 1215,1221 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l5:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 1361,1367 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 1227,1233 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l5:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 1373,1379 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 1239,1245 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l5:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 1385,1391 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 1251,1257 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l5:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 1397,1403 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 1263,1269 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l5:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 1409,1415 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 1275,1281 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l5:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 1421,1427 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 1287,1293 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l5:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 1433,1439 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 1299,1305 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l5:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 1445,1451 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 1311,1320 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l6
  	{mso-list-id:7;
  	mso-list-template-ids:7;}
! @list l6:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 1457,1466 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l16
  	{mso-list-id:7;
  	mso-list-template-ids:7;}
! @list l16:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 1326,1332 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l6:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 1472,1478 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l16:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 1338,1344 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l6:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 1484,1490 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l16:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 1350,1356 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l6:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 1496,1502 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l16:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 1362,1368 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l6:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 1508,1514 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l16:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 1374,1380 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l6:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 1520,1526 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l16:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 1386,1392 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l6:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 1532,1538 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l16:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 1398,1404 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l6:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 1544,1550 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l16:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 1410,1416 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l6:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 1556,1562 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l16:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 1422,1431 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l7
  	{mso-list-id:8;
  	mso-list-template-ids:8;}
! @list l7:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 1568,1577 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l17
  	{mso-list-id:8;
  	mso-list-template-ids:8;}
! @list l17:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 1437,1443 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l7:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 1583,1589 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l17:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 1449,1455 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l7:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 1595,1601 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l17:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 1461,1467 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l7:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 1607,1613 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l17:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 1473,1479 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l7:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 1619,1625 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l17:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 1485,1491 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l7:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 1631,1637 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l17:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 1497,1503 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l7:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 1643,1649 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l17:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 1509,1515 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l7:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 1655,1661 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l17:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 1521,1527 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l7:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 1667,1673 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l17:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 1533,1542 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l8
  	{mso-list-id:9;
  	mso-list-template-ids:9;}
! @list l8:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 1679,1688 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l18
  	{mso-list-id:9;
  	mso-list-template-ids:9;}
! @list l18:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 1548,1554 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l8:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 1694,1700 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l18:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 1560,1566 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l8:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 1706,1712 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l18:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 1572,1578 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l8:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 1718,1724 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l18:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 1584,1590 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l8:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 1730,1736 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l18:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 1596,1602 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l8:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 1742,1748 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l18:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 1608,1614 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l8:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 1754,1760 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l18:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 1620,1626 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l8:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 1766,1772 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l18:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 1632,1638 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l8:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 1778,1784 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l18:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 1644,1653 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l9
  	{mso-list-id:10;
  	mso-list-template-ids:10;}
! @list l9:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 1790,1799 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l19
  	{mso-list-id:10;
  	mso-list-template-ids:10;}
! @list l19:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 1659,1665 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l9:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 1805,1811 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l19:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 1671,1677 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l9:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 1817,1823 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l19:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 1683,1689 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l9:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 1829,1835 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l19:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 1695,1701 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l9:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 1841,1847 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l19:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 1707,1713 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l9:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 1853,1859 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l19:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 1719,1725 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l9:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 1865,1871 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l19:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 1731,1737 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l9:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 1877,1883 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l19:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 1743,1749 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l9:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 1889,1895 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l19:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 1755,1764 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10
  	{mso-list-id:11;
  	mso-list-template-ids:11;}
! @list l10:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
--- 1901,1910 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l20
  	{mso-list-id:11;
  	mso-list-template-ids:11;}
! @list l20:level1
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:14.15pt;
***************
*** 1770,1776 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 1916,1922 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l20:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 1782,1788 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 1928,1934 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l20:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 1794,1800 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 1940,1946 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l20:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 1806,1812 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 1952,1958 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l20:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 1818,1824 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 1964,1970 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l20:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 1830,1836 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 1976,1982 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l20:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 1842,1848 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 1988,1994 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l20:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 1854,1860 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l10:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 2000,2006 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l20:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 1866,2044 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l11
  	{mso-list-id:12;
  	mso-list-template-ids:12;}
! @list l11:level1
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l11:level2
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l11:level3
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l11:level4
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l11:level5
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l11:level6
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l11:level7
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l11:level8
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l11:level9
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l12
  	{mso-list-id:116531205;
  	mso-list-template-ids:-1288027304;}
! @list l12:level1
  	{mso-level-text:"%1\)";
  	mso-level-tab-stop:36.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l12:level2
! 	{mso-level-tab-stop:72.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l12:level3
! 	{mso-level-tab-stop:108.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l12:level4
! 	{mso-level-tab-stop:144.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l12:level5
! 	{mso-level-tab-stop:180.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l12:level6
! 	{mso-level-tab-stop:216.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l12:level7
! 	{mso-level-tab-stop:252.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l12:level8
! 	{mso-level-tab-stop:288.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l12:level9
! 	{mso-level-tab-stop:324.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l13
! 	{mso-list-id:276641855;
  	mso-list-template-ids:67698719;}
! @list l13:level1
  	{mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
  	margin-left:18.0pt;
  	text-indent:-18.0pt;}
! @list l13:level2
  	{mso-level-text:"%1\.%2\.";
  	mso-level-tab-stop:39.6pt;
  	mso-level-number-position:left;
  	margin-left:39.6pt;
  	text-indent:-21.6pt;}
! @list l13:level3
  	{mso-level-text:"%1\.%2\.%3\.";
  	mso-level-tab-stop:72.0pt;
  	mso-level-number-position:left;
  	margin-left:61.2pt;
  	text-indent:-25.2pt;}
! @list l13:level4
  	{mso-level-text:"%1\.%2\.%3\.%4\.";
  	mso-level-tab-stop:90.0pt;
  	mso-level-number-position:left;
  	margin-left:86.4pt;
  	text-indent:-32.4pt;}
! @list l13:level5
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.";
  	mso-level-tab-stop:126.0pt;
  	mso-level-number-position:left;
  	margin-left:111.6pt;
  	text-indent:-39.6pt;}
! @list l13:level6
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.";
  	mso-level-tab-stop:144.0pt;
  	mso-level-number-position:left;
  	margin-left:136.8pt;
  	text-indent:-46.8pt;}
! @list l13:level7
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.";
  	mso-level-tab-stop:180.0pt;
  	mso-level-number-position:left;
  	margin-left:162.0pt;
  	text-indent:-54.0pt;}
! @list l13:level8
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.";
  	mso-level-tab-stop:198.0pt;
  	mso-level-number-position:left;
  	margin-left:187.2pt;
  	text-indent:-61.2pt;}
! @list l13:level9
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9\.";
  	mso-level-tab-stop:234.0pt;
  	mso-level-number-position:left;
  	margin-left:216.0pt;
  	text-indent:-72.0pt;}
! @list l14
  	{mso-list-id:858816198;
  	mso-list-template-ids:1148726518;}
! @list l14:level1
  	{mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
  	margin-left:18.0pt;
  	text-indent:-18.0pt;
  	mso-ansi-font-size:9.0pt;
  	mso-bidi-font-size:9.0pt;}
! @list l14:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
--- 2012,2442 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l21
  	{mso-list-id:12;
  	mso-list-template-ids:12;}
! @list l21:level1
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l21:level2
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l21:level3
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l21:level4
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l21:level5
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l21:level6
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l21:level7
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l21:level8
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l21:level9
  	{mso-level-number-format:none;
  	mso-level-text:"";
  	mso-level-tab-stop:0pt;
  	mso-level-number-position:left;
  	margin-left:0pt;
  	text-indent:0pt;}
! @list l22
  	{mso-list-id:116531205;
  	mso-list-template-ids:-1288027304;}
! @list l22:level1
  	{mso-level-text:"%1\)";
  	mso-level-tab-stop:36.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l23
! 	{mso-list-id:276641855;
! 	mso-list-template-ids:67698719;}
! @list l23:level1
! 	{mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
+ 	margin-left:18.0pt;
  	text-indent:-18.0pt;}
! @list l23:level2
! 	{mso-level-text:"%1\.%2\.";
! 	mso-level-tab-stop:39.6pt;
  	mso-level-number-position:left;
! 	margin-left:39.6pt;
! 	text-indent:-21.6pt;}
! @list l23:level3
! 	{mso-level-text:"%1\.%2\.%3\.";
! 	mso-level-tab-stop:72.0pt;
  	mso-level-number-position:left;
! 	margin-left:61.2pt;
! 	text-indent:-25.2pt;}
! @list l23:level4
! 	{mso-level-text:"%1\.%2\.%3\.%4\.";
! 	mso-level-tab-stop:90.0pt;
  	mso-level-number-position:left;
! 	margin-left:86.4pt;
! 	text-indent:-32.4pt;}
! @list l23:level5
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.";
! 	mso-level-tab-stop:126.0pt;
  	mso-level-number-position:left;
! 	margin-left:111.6pt;
! 	text-indent:-39.6pt;}
! @list l23:level6
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.";
! 	mso-level-tab-stop:144.0pt;
  	mso-level-number-position:left;
! 	margin-left:136.8pt;
! 	text-indent:-46.8pt;}
! @list l23:level7
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.";
! 	mso-level-tab-stop:180.0pt;
  	mso-level-number-position:left;
! 	margin-left:162.0pt;
! 	text-indent:-54.0pt;}
! @list l23:level8
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.";
! 	mso-level-tab-stop:198.0pt;
  	mso-level-number-position:left;
! 	margin-left:187.2pt;
! 	text-indent:-61.2pt;}
! @list l23:level9
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9\.";
! 	mso-level-tab-stop:234.0pt;
! 	mso-level-number-position:left;
! 	margin-left:216.0pt;
! 	text-indent:-72.0pt;}
! @list l24
! 	{mso-list-id:291328403;
! 	mso-list-template-ids:1148726518;}
! @list l24:level1
! 	{mso-level-tab-stop:18.0pt;
! 	mso-level-number-position:left;
! 	margin-left:18.0pt;
! 	text-indent:-18.0pt;
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;}
! @list l24:level2
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:28.35pt;
! 	mso-level-number-position:left;
! 	margin-left:28.35pt;
! 	text-indent:-14.15pt;
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	mso-ascii-font-family:Symbol;
! 	mso-hansi-font-family:Symbol;
! 	mso-bidi-font-family:StarSymbol;}
! @list l24:level3
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:42.5pt;
! 	mso-level-number-position:left;
! 	margin-left:42.5pt;
! 	text-indent:-14.15pt;
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	mso-ascii-font-family:Symbol;
! 	mso-hansi-font-family:Symbol;
! 	mso-bidi-font-family:StarSymbol;}
! @list l24:level4
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:56.7pt;
! 	mso-level-number-position:left;
! 	margin-left:56.7pt;
! 	text-indent:-14.15pt;
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	mso-ascii-font-family:Symbol;
! 	mso-hansi-font-family:Symbol;
! 	mso-bidi-font-family:StarSymbol;}
! @list l24:level5
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:70.85pt;
! 	mso-level-number-position:left;
! 	margin-left:70.85pt;
! 	text-indent:-14.15pt;
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	mso-ascii-font-family:Symbol;
! 	mso-hansi-font-family:Symbol;
! 	mso-bidi-font-family:StarSymbol;}
! @list l24:level6
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:85.05pt;
! 	mso-level-number-position:left;
! 	margin-left:85.05pt;
! 	text-indent:-14.15pt;
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	mso-ascii-font-family:Symbol;
! 	mso-hansi-font-family:Symbol;
! 	mso-bidi-font-family:StarSymbol;}
! @list l24:level7
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:99.2pt;
! 	mso-level-number-position:left;
! 	margin-left:99.2pt;
! 	text-indent:-14.15pt;
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	mso-ascii-font-family:Symbol;
! 	mso-hansi-font-family:Symbol;
! 	mso-bidi-font-family:StarSymbol;}
! @list l24:level8
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:113.4pt;
! 	mso-level-number-position:left;
! 	margin-left:113.4pt;
! 	text-indent:-14.15pt;
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	mso-ascii-font-family:Symbol;
! 	mso-hansi-font-family:Symbol;
! 	mso-bidi-font-family:StarSymbol;}
! @list l24:level9
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:127.55pt;
! 	mso-level-number-position:left;
! 	margin-left:127.55pt;
! 	text-indent:-14.15pt;
! 	mso-ansi-font-size:9.0pt;
! 	mso-bidi-font-size:9.0pt;
! 	mso-ascii-font-family:Symbol;
! 	mso-hansi-font-family:Symbol;
! 	mso-bidi-font-family:StarSymbol;}
! @list l25
! 	{mso-list-id:465316796;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:747157604 -1330584532 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
! @list l25:level1
! 	{mso-level-start-at:0;
! 	mso-level-number-format:bullet;
! 	mso-level-text:\F0D8;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;
! 	mso-fareast-font-family:Cumberland;
! 	mso-bidi-font-family:Cumberland;}
! @list l26
! 	{mso-list-id:604534799;
! 	mso-list-template-ids:1659901228;}
! @list l26:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l26:level2
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:72.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l26:level3
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:108.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l26:level4
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:144.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l26:level5
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:180.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l26:level6
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:216.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l26:level7
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:252.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l26:level8
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:288.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l26:level9
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:324.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l27
! 	{mso-list-id:671564588;
  	mso-list-template-ids:67698719;}
! @list l27:level1
  	{mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
  	margin-left:18.0pt;
  	text-indent:-18.0pt;}
! @list l27:level2
  	{mso-level-text:"%1\.%2\.";
  	mso-level-tab-stop:39.6pt;
  	mso-level-number-position:left;
  	margin-left:39.6pt;
  	text-indent:-21.6pt;}
! @list l27:level3
  	{mso-level-text:"%1\.%2\.%3\.";
  	mso-level-tab-stop:72.0pt;
  	mso-level-number-position:left;
  	margin-left:61.2pt;
  	text-indent:-25.2pt;}
! @list l27:level4
  	{mso-level-text:"%1\.%2\.%3\.%4\.";
  	mso-level-tab-stop:90.0pt;
  	mso-level-number-position:left;
  	margin-left:86.4pt;
  	text-indent:-32.4pt;}
! @list l27:level5
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.";
  	mso-level-tab-stop:126.0pt;
  	mso-level-number-position:left;
  	margin-left:111.6pt;
  	text-indent:-39.6pt;}
! @list l27:level6
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.";
  	mso-level-tab-stop:144.0pt;
  	mso-level-number-position:left;
  	margin-left:136.8pt;
  	text-indent:-46.8pt;}
! @list l27:level7
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.";
  	mso-level-tab-stop:180.0pt;
  	mso-level-number-position:left;
  	margin-left:162.0pt;
  	text-indent:-54.0pt;}
! @list l27:level8
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.";
  	mso-level-tab-stop:198.0pt;
  	mso-level-number-position:left;
  	margin-left:187.2pt;
  	text-indent:-61.2pt;}
! @list l27:level9
  	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9\.";
  	mso-level-tab-stop:234.0pt;
  	mso-level-number-position:left;
  	margin-left:216.0pt;
  	text-indent:-72.0pt;}
! @list l28
! 	{mso-list-id:696472061;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:986222236 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
! @list l28:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l29
! 	{mso-list-id:718094992;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:-1288027304 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
! @list l29:level1
! 	{mso-level-text:"%1\)";
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l30
! 	{mso-list-id:753824527;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:-1854628230 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
! @list l30:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l31
! 	{mso-list-id:803735998;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:58764522 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
! @list l31:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l32
  	{mso-list-id:858816198;
  	mso-list-template-ids:1148726518;}
! @list l32:level1
  	{mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
  	margin-left:18.0pt;
  	text-indent:-18.0pt;
  	mso-ansi-font-size:9.0pt;
  	mso-bidi-font-size:9.0pt;}
! @list l32:level2
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:28.35pt;
***************
*** 2050,2056 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
--- 2448,2454 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l32:level3
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:42.5pt;
***************
*** 2062,2068 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
--- 2460,2466 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l32:level4
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:56.7pt;
***************
*** 2074,2080 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
--- 2472,2478 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l32:level5
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:70.85pt;
***************
*** 2086,2092 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
--- 2484,2490 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l32:level6
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:85.05pt;
***************
*** 2098,2104 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
--- 2496,2502 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l32:level7
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:99.2pt;
***************
*** 2110,2116 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
--- 2508,2514 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l32:level8
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:113.4pt;
***************
*** 2122,2128 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l14:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
--- 2520,2526 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l32:level9
  	{mso-level-number-format:bullet;
  	mso-level-text:\F0B7;
  	mso-level-tab-stop:127.55pt;
***************
*** 2134,2259 ****
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l15
  	{mso-list-id:865482897;
  	mso-list-type:hybrid;
  	mso-list-template-ids:-2013987438 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
! @list l15:level1
  	{mso-level-tab-stop:36.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l15:level2
! 	{mso-level-tab-stop:72.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l15:level3
! 	{mso-level-tab-stop:108.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l15:level4
! 	{mso-level-tab-stop:144.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l15:level5
! 	{mso-level-tab-stop:180.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l15:level6
! 	{mso-level-tab-stop:216.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l15:level7
! 	{mso-level-tab-stop:252.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l15:level8
! 	{mso-level-tab-stop:288.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l15:level9
! 	{mso-level-tab-stop:324.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l16
! 	{mso-list-id:1082213354;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:1622673204 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
! @list l16:level1
! 	{mso-level-tab-stop:36.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l16:level2
! 	{mso-level-tab-stop:72.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l16:level3
! 	{mso-level-tab-stop:108.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l16:level4
! 	{mso-level-tab-stop:144.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l16:level5
! 	{mso-level-tab-stop:180.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l16:level6
! 	{mso-level-tab-stop:216.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l16:level7
! 	{mso-level-tab-stop:252.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l16:level8
! 	{mso-level-tab-stop:288.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l16:level9
! 	{mso-level-tab-stop:324.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l17
! 	{mso-list-id:1281301046;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:1985279396 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
! @list l17:level1
! 	{mso-level-tab-stop:36.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l17:level2
! 	{mso-level-tab-stop:72.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l17:level3
! 	{mso-level-tab-stop:108.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l17:level4
! 	{mso-level-tab-stop:144.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l17:level5
! 	{mso-level-tab-stop:180.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l17:level6
! 	{mso-level-tab-stop:216.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l17:level7
! 	{mso-level-tab-stop:252.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l17:level8
! 	{mso-level-tab-stop:288.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l17:level9
! 	{mso-level-tab-stop:324.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
  ol
  	{margin-bottom:0pt;}
  ul
--- 2532,3027 ----
  	mso-ascii-font-family:Symbol;
  	mso-hansi-font-family:Symbol;
  	mso-bidi-font-family:StarSymbol;}
! @list l33
  	{mso-list-id:865482897;
  	mso-list-type:hybrid;
  	mso-list-template-ids:-2013987438 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
! @list l33:level1
  	{mso-level-tab-stop:36.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l34
! 	{mso-list-id:1082213354;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:1622673204 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
! @list l34:level1
! 	{mso-level-tab-stop:36.0pt;
  	mso-level-number-position:left;
  	text-indent:-18.0pt;}
! @list l35
! 	{mso-list-id:1281301046;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:1985279396 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
! @list l35:level1
! 	{mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;}
! @list l36
! 	{mso-list-id:1320424235;
! 	mso-list-template-ids:-1854628230;}
! @list l36:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l36:level2
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:72.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l36:level3
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:108.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l36:level4
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:144.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l36:level5
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:180.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l36:level6
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:216.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l36:level7
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:252.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l36:level8
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:288.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l36:level9
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:324.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l37
! 	{mso-list-id:1438016346;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:1659901228 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
! @list l37:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l38
! 	{mso-list-id:1495950886;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:-898045188 -1269669692 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
! @list l38:level1
! 	{mso-level-start-at:0;
! 	mso-level-number-format:bullet;
! 	mso-level-text:\F0D8;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;
! 	mso-fareast-font-family:Cumberland;
! 	mso-bidi-font-family:Cumberland;}
! @list l39
! 	{mso-list-id:1678120386;
! 	mso-list-template-ids:58764522;}
! @list l39:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l39:level2
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:72.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l39:level3
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:108.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l39:level4
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:144.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l39:level5
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:180.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l39:level6
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:216.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l39:level7
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:252.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l39:level8
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:288.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l39:level9
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:324.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l40
! 	{mso-list-id:1740133347;
! 	mso-list-template-ids:-5492374;}
! @list l40:level1
! 	{mso-level-text:"%1\)";
! 	mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
+ 	margin-left:18.0pt;
  	text-indent:-18.0pt;}
! @list l40:level2
! 	{mso-level-number-format:alpha-lower;
! 	mso-level-tab-stop:54.0pt;
  	mso-level-number-position:left;
+ 	margin-left:54.0pt;
  	text-indent:-18.0pt;}
! @list l40:level3
! 	{mso-level-number-format:roman-lower;
! 	mso-level-tab-stop:90.0pt;
! 	mso-level-number-position:right;
! 	margin-left:90.0pt;
! 	text-indent:-9.0pt;}
! @list l40:level4
! 	{mso-level-tab-stop:126.0pt;
  	mso-level-number-position:left;
+ 	margin-left:126.0pt;
  	text-indent:-18.0pt;}
! @list l40:level5
! 	{mso-level-number-format:alpha-lower;
! 	mso-level-tab-stop:162.0pt;
  	mso-level-number-position:left;
+ 	margin-left:162.0pt;
  	text-indent:-18.0pt;}
! @list l40:level6
! 	{mso-level-number-format:roman-lower;
! 	mso-level-tab-stop:198.0pt;
! 	mso-level-number-position:right;
! 	margin-left:198.0pt;
! 	text-indent:-9.0pt;}
! @list l40:level7
! 	{mso-level-tab-stop:234.0pt;
  	mso-level-number-position:left;
+ 	margin-left:234.0pt;
  	text-indent:-18.0pt;}
! @list l40:level8
! 	{mso-level-number-format:alpha-lower;
! 	mso-level-tab-stop:270.0pt;
  	mso-level-number-position:left;
+ 	margin-left:270.0pt;
  	text-indent:-18.0pt;}
! @list l40:level9
! 	{mso-level-number-format:roman-lower;
! 	mso-level-tab-stop:306.0pt;
! 	mso-level-number-position:right;
! 	margin-left:306.0pt;
! 	text-indent:-9.0pt;}
! @list l41
! 	{mso-list-id:1781024997;
! 	mso-list-template-ids:67698719;}
! @list l41:level1
! 	{mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
+ 	margin-left:18.0pt;
  	text-indent:-18.0pt;}
! @list l41:level2
! 	{mso-level-text:"%1\.%2\.";
! 	mso-level-tab-stop:39.6pt;
  	mso-level-number-position:left;
! 	margin-left:39.6pt;
! 	text-indent:-21.6pt;}
! @list l41:level3
! 	{mso-level-text:"%1\.%2\.%3\.";
! 	mso-level-tab-stop:72.0pt;
  	mso-level-number-position:left;
! 	margin-left:61.2pt;
! 	text-indent:-25.2pt;}
! @list l41:level4
! 	{mso-level-text:"%1\.%2\.%3\.%4\.";
! 	mso-level-tab-stop:90.0pt;
  	mso-level-number-position:left;
! 	margin-left:86.4pt;
! 	text-indent:-32.4pt;}
! @list l41:level5
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.";
! 	mso-level-tab-stop:126.0pt;
  	mso-level-number-position:left;
! 	margin-left:111.6pt;
! 	text-indent:-39.6pt;}
! @list l41:level6
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.";
! 	mso-level-tab-stop:144.0pt;
  	mso-level-number-position:left;
! 	margin-left:136.8pt;
! 	text-indent:-46.8pt;}
! @list l41:level7
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.";
! 	mso-level-tab-stop:180.0pt;
  	mso-level-number-position:left;
! 	margin-left:162.0pt;
! 	text-indent:-54.0pt;}
! @list l41:level8
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.";
! 	mso-level-tab-stop:198.0pt;
  	mso-level-number-position:left;
! 	margin-left:187.2pt;
! 	text-indent:-61.2pt;}
! @list l41:level9
! 	{mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9\.";
! 	mso-level-tab-stop:234.0pt;
  	mso-level-number-position:left;
! 	margin-left:216.0pt;
! 	text-indent:-72.0pt;}
! @list l42
! 	{mso-list-id:1834448678;
! 	mso-list-template-ids:-5492374;}
! @list l42:level1
! 	{mso-level-text:"%1\)";
! 	mso-level-tab-stop:18.0pt;
  	mso-level-number-position:left;
+ 	margin-left:18.0pt;
  	text-indent:-18.0pt;}
! @list l42:level2
! 	{mso-level-number-format:alpha-lower;
! 	mso-level-tab-stop:54.0pt;
  	mso-level-number-position:left;
+ 	margin-left:54.0pt;
  	text-indent:-18.0pt;}
! @list l42:level3
! 	{mso-level-number-format:roman-lower;
! 	mso-level-tab-stop:90.0pt;
! 	mso-level-number-position:right;
! 	margin-left:90.0pt;
! 	text-indent:-9.0pt;}
! @list l42:level4
! 	{mso-level-tab-stop:126.0pt;
  	mso-level-number-position:left;
+ 	margin-left:126.0pt;
  	text-indent:-18.0pt;}
! @list l42:level5
! 	{mso-level-number-format:alpha-lower;
! 	mso-level-tab-stop:162.0pt;
  	mso-level-number-position:left;
+ 	margin-left:162.0pt;
  	text-indent:-18.0pt;}
! @list l42:level6
! 	{mso-level-number-format:roman-lower;
! 	mso-level-tab-stop:198.0pt;
! 	mso-level-number-position:right;
! 	margin-left:198.0pt;
! 	text-indent:-9.0pt;}
! @list l42:level7
! 	{mso-level-tab-stop:234.0pt;
  	mso-level-number-position:left;
+ 	margin-left:234.0pt;
  	text-indent:-18.0pt;}
! @list l42:level8
! 	{mso-level-number-format:alpha-lower;
! 	mso-level-tab-stop:270.0pt;
  	mso-level-number-position:left;
+ 	margin-left:270.0pt;
  	text-indent:-18.0pt;}
! @list l42:level9
! 	{mso-level-number-format:roman-lower;
! 	mso-level-tab-stop:306.0pt;
! 	mso-level-number-position:right;
! 	margin-left:306.0pt;
! 	text-indent:-9.0pt;}
! @list l43
! 	{mso-list-id:1954169307;
! 	mso-list-template-ids:986222236;}
! @list l43:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l43:level2
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:72.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l43:level3
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:108.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l43:level4
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:144.0pt;
  	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l43:level5
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:180.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l43:level6
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:216.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l43:level7
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:252.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l43:level8
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:288.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l43:level9
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:324.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l44
! 	{mso-list-id:2000840094;
! 	mso-list-template-ids:519993794;}
! @list l44:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l44:level2
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:72.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l44:level3
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:108.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l44:level4
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:144.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l44:level5
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:180.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l44:level6
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:216.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l44:level7
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:252.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
! @list l44:level8
! 	{mso-level-number-format:bullet;
! 	mso-level-text:o;
! 	mso-level-tab-stop:288.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:"Courier New";}
! @list l44:level9
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0A7;
! 	mso-level-tab-stop:324.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Wingdings;}
! @list l45
! 	{mso-list-id:2140024448;
! 	mso-list-type:hybrid;
! 	mso-list-template-ids:519993794 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
! @list l45:level1
! 	{mso-level-number-format:bullet;
! 	mso-level-text:\F0B7;
! 	mso-level-tab-stop:36.0pt;
! 	mso-level-number-position:left;
! 	text-indent:-18.0pt;
! 	font-family:Symbol;}
  ol
  	{margin-bottom:0pt;}
  ul
***************
*** 2275,2281 ****
  	mso-pagination:widow-orphan;
  	font-size:10.0pt;
  	font-family:"Times New Roman";
- 	mso-fareast-font-family:"Times New Roman";
  	mso-ansi-language:#0400;
  	mso-fareast-language:#0400;
  	mso-bidi-language:#0400;}
--- 3043,3048 ----
***************
*** 2430,2436 ****
  	mso-bidi-language:#0400;}
  </style>
  <![endif]--><!--[if gte mso 9]><xml>
!  <o:shapedefaults v:ext="edit" spidmax="6146"/>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1"/>
--- 3197,3203 ----
  	mso-bidi-language:#0400;}
  </style>
  <![endif]--><!--[if gte mso 9]><xml>
!  <o:shapedefaults v:ext="edit" spidmax="2050"/>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <o:shapelayout v:ext="edit">
    <o:idmap v:ext="edit" data="1"/>
***************
*** 2442,2448 ****
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.4.0<br>
  Release Notes</p>
  
  <p class=MsoBodyText>The Andrew File System (AFS) is a location-independent
--- 3209,3215 ----
  
  <div class=Section1>
  
! <p class=MsoTitle>OpenAFS for Windows 1.4.1<br>
  Release Notes</p>
  
  <p class=MsoBodyText>The Andrew File System (AFS) is a location-independent
***************
*** 2473,2480 ****
  files in the volume are in use.<span style='mso-spacerun:yes'>  </span></p>
  
  <p class=MsoBodyText>AFS volumes can be replicated to read-only copies.<span
! style='mso-spacerun:yes'>   </span>When accessing files from a read-only
! replica, clients will read all of the data from a single replica.<span
  style='mso-spacerun:yes'>   </span>If that replica becomes unavailable, the
  clients will failover to any replica that is reachable.<span
  style='mso-spacerun:yes'>  </span>Users of the data are unaware of where the
--- 3240,3247 ----
  files in the volume are in use.<span style='mso-spacerun:yes'>  </span></p>
  
  <p class=MsoBodyText>AFS volumes can be replicated to read-only copies.<span
! style='mso-spacerun:yes'>   </span>When accessing files from a read-only replica,
! clients will read all of the data from a single replica.<span
  style='mso-spacerun:yes'>   </span>If that replica becomes unavailable, the
  clients will failover to any replica that is reachable.<span
  style='mso-spacerun:yes'>  </span>Users of the data are unaware of where the
***************
*** 2503,2772 ****
  <p class=MsoToc1><!--[if supportFields]><span style='mso-element:field-begin'></span><span
  style='mso-spacerun:yes'> </span>TOC \o &quot;1-1&quot; \h \z \u <span
  style='mso-element:field-separator'></span><![endif]--><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a href="#_Toc115417109">1.
! Installer Options<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span> PAGEREF
! _Toc115417109 \h </span><span style='color:windowtext;text-decoration:none;
! text-underline:none'><span style='display:none;mso-hide:screen'><span
! style='mso-element:field-separator'></span></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>1<!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100300039000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="#_Toc115417110">2. System Requirements<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span> PAGEREF
! _Toc115417110 \h </span><span style='color:windowtext;text-decoration:none;
! text-underline:none'><span style='display:none;mso-hide:screen'><span
! style='mso-element:field-separator'></span></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>2<!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310030000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="#_Toc115417111">3. Operational Notes<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span> PAGEREF
! _Toc115417111 \h </span><span style='color:windowtext;text-decoration:none;
! text-underline:none'><span style='display:none;mso-hide:screen'><span
! style='mso-element:field-separator'></span></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>2<!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310031000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="#_Toc115417112">4. How to Debug Problems with OpenAFS for Windows:<span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span> PAGEREF
! _Toc115417112 \h </span><span style='color:windowtext;text-decoration:none;
! text-underline:none'><span style='display:none;mso-hide:screen'><span
! style='mso-element:field-separator'></span></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>11<!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310032000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="#_Toc115417113">5. Reporting Bugs:<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span> PAGEREF
! _Toc115417113 \h </span><span style='color:windowtext;text-decoration:none;
! text-underline:none'><span style='display:none;mso-hide:screen'><span
! style='mso-element:field-separator'></span></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>13<!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310033000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="#_Toc115417114">6. How to Contribute to the Development of OpenAFS for
! Windows<span style='color:windowtext;display:none;mso-hide:screen;text-decoration:
! none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span> PAGEREF _Toc115417114
! \h </span><span style='color:windowtext;text-decoration:none;text-underline:
! none'><span style='display:none;mso-hide:screen'><span style='mso-element:field-separator'></span></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>14<!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310034000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="#_Toc115417115">7. MSI Deployment Guide<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span> PAGEREF
! _Toc115417115 \h </span><span style='color:windowtext;text-decoration:none;
! text-underline:none'><span style='display:none;mso-hide:screen'><span
! style='mso-element:field-separator'></span></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>15<!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310035000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="#_Toc115417116">Appendix A: Registry Values<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span> PAGEREF
! _Toc115417116 \h </span><span style='color:windowtext;text-decoration:none;
! text-underline:none'><span style='display:none;mso-hide:screen'><span
! style='mso-element:field-separator'></span></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>26<!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310036000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-no-proof:yes'><o:p></o:p></span></p>
  
  <h1 style='margin-left:0pt;text-indent:0pt'><!--[if supportFields]><span
! style='mso-element:field-end'></span><![endif]--><a name="_Toc115417109"></a><a
! name="_Toc115417037"></a><a name="_Toc115416098"><span style='mso-bookmark:
! _Toc115417037'><span style='mso-bookmark:_Toc115417109'>1. Installer Options</span></span></a></h1>
  
  <p class=MsoNormal>It can be installed either as a new installation or an
  upgrade from previous versions of OpenAFS for Windows or IBM AFS for
  Windows.<span style='mso-spacerun:yes'>  </span>Installers are provided in two
  forms:</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo4;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;
  mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>an executable (.exe) that is built using the
  Nullsoft Scriptable Installation System, or</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l0 level1 lfo4;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;
  mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>a Windows Installer package (.msi) that is built
  using WiX and can be customized for organizations via the use of MSI Transforms
! (see <a href="#_MSI_Deployment_Guide">MSI Deployment Guide</a>)</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417110"></a><a
! name="_Toc115417038"></a><a name="_Toc115416099"><span style='mso-bookmark:
! _Toc115417038'><span style='mso-bookmark:_Toc115417110'>2. System Requirements</span></span></a></h1>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417039"></a><a
! name="_Toc115416100"><span style='mso-bookmark:_Toc115417039'>2.1 Supported
! Operating Systems</span></a></h2>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l1 level1 lfo6;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 2000 Workstation</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l1 level1 lfo6;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 2000 Server</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l1 level1 lfo6;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows XP Home</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l1 level1 lfo6;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows XP Professional</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l1 level1 lfo6;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 2003 Server</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l1 level1 lfo6;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 2003 R2 Server</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416101">2.1.1
! Unsupported Operating Systems</a></h3>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l2 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 95</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l2 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 98</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l2 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 98 OSR2</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l2 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows ME</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l2 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  NT</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l2 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows Vista (as of Beta 1 bugs in Windows prevent its use)</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l2 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>All
--- 3270,3563 ----
  <p class=MsoToc1><!--[if supportFields]><span style='mso-element:field-begin'></span><span
  style='mso-spacerun:yes'> </span>TOC \o &quot;1-1&quot; \h \z \u <span
  style='mso-element:field-separator'></span><![endif]--><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="oafw-1-4-release-notes.doc#_Toc115417109">1. Installer Options<span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417109 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>1</span><span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100300039000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA;mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="oafw-1-4-release-notes.doc#_Toc115417110">2. System Requirements<span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417110 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>2</span><span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310030000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA;mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="oafw-1-4-release-notes.doc#_Toc115417111">3. Operational Notes<span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417111 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>2</span><span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310031000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA;mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="oafw-1-4-release-notes.doc#_Toc115417112">4. How to Debug Problems with
! OpenAFS for Windows:<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417112 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>11</span><span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310032000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA;mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="oafw-1-4-release-notes.doc#_Toc115417113">5. Reporting Bugs:<span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417113 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>13</span><span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310033000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA;mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="oafw-1-4-release-notes.doc#_Toc115417114">6. How to Contribute to the
! Development of OpenAFS for Windows<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417114 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>14</span><span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310034000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA;mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="oafw-1-4-release-notes.doc#_Toc115417115">7. MSI Deployment Guide<span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417115 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>15</span><span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310035000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA;mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1><span class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="oafw-1-4-release-notes.doc#_Toc115417116">Appendix A: Registry Values<span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
  style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417116 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>26</span><span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><!--[if gte mso 9]><xml>
   <w:data>08D0C9EA79F9BACE118C8200AA004BA90B02000000080000000E0000005F0054006F0063003100310035003400310037003100310036000000</w:data>
  </xml><![endif]--></span><!--[if supportFields]><span style='color:windowtext;
  display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
  style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA;mso-no-proof:yes'><o:p></o:p></span></p>
  
  <h1 style='margin-left:0pt;text-indent:0pt'><!--[if supportFields]><span
! style='mso-element:field-end'></span><![endif]--><a name="_Toc126872163"></a><a
! name="_Toc115417109"></a><a name="_Toc115417037"></a><a name="_Toc115416098"><span
! style='mso-bookmark:_Toc115417037'><span style='mso-bookmark:_Toc115417109'><span
! style='mso-bookmark:_Toc126872163'>1. Installer Options</span></span></span></a></h1>
  
  <p class=MsoNormal>It can be installed either as a new installation or an
  upgrade from previous versions of OpenAFS for Windows or IBM AFS for
  Windows.<span style='mso-spacerun:yes'>  </span>Installers are provided in two
  forms:</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l10 level1 lfo1;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;
  mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>an executable (.exe) that is built using the
  Nullsoft Scriptable Installation System, or</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l10 level1 lfo1;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;
  mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>a Windows Installer package (.msi) that is built
  using WiX and can be customized for organizations via the use of MSI Transforms
! (see <a href="oafw-1-4-release-notes.doc#_MSI_Deployment_Guide">MSI Deployment
! Guide</a>)</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872164"></a><a
! name="_Toc115417110"></a><a name="_Toc115417038"></a><a name="_Toc115416099"><span
! style='mso-bookmark:_Toc115417038'><span style='mso-bookmark:_Toc115417110'><span
! style='mso-bookmark:_Toc126872164'>2. System Requirements</span></span></span></a></h1>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872165"></a><a
! name="_Toc115417039"></a><a name="_Toc115416100"><span style='mso-bookmark:
! _Toc115417039'><span style='mso-bookmark:_Toc126872165'>2.1 Supported Operating
! Systems</span></span></a></h2>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l11 level1 lfo2;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 2000 Workstation</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l11 level1 lfo2;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 2000 Server</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l11 level1 lfo2;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows XP Home</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l11 level1 lfo2;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows XP Professional</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l11 level1 lfo2;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 2003 Server</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l11 level1 lfo2;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 2003 R2 Server</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872166"></a><a
! name="_Toc115416101"><span style='mso-bookmark:_Toc126872166'>2.1.1 Unsupported
! Operating Systems</span></a></h3>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l12 level1 lfo3;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 95</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l12 level1 lfo3;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 98</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l12 level1 lfo3;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows 98 OSR2</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l12 level1 lfo3;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows ME</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l12 level1 lfo3;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  NT</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l12 level1 lfo3;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Microsoft
  Windows Vista (as of Beta 1 bugs in Windows prevent its use)</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l12 level1 lfo3;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>All
***************
*** 2778,2804 ****
  style='mso-spacerun:yes'>  </span>The last version with support for Windows NT
  4.0 is 1.2.10.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417040"></a><a
! name="_Toc115416102"><span style='mso-bookmark:_Toc115417040'>2.2 Disk Space</span></a></h2>
  
  <p class=MsoNormal>Up to 60mb required for the OpenAFS binaries plus 100MB for
  the default AFSCache file.<span style='mso-spacerun:yes'>   </span>(The size of
  the AFSCache file may be adjusted via the Registry after installation.)</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417041"></a><a
! name="_Toc115416103"><span style='mso-bookmark:_Toc115417041'>2.3 Additional
! Software</span></a></h2>
  
  <p class=MsoNormal><a href="http://web.mit.edu/kerberos/dist/index.html">MIT
! Kerberos for Windows</a> 2.6.x if Kerberos 5 authentication support is desired.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417111"></a><a
! name="_Toc115417042"></a><a name="_Toc115416104"><span style='mso-bookmark:
! _Toc115417042'><span style='mso-bookmark:_Toc115417111'>3. Operational Notes</span></span></a></h1>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417043"></a><a
! name="_Toc115416105"><span style='mso-bookmark:_Toc115417043'>3.1. Requirements
! for Kerberos 5 Authentication</span></a></h2>
  
  <p class=MsoNormal>The Kerberos 4 infrastructure on which the OpenAFS 1.2
  series is reliant is no longer secure.<span style='mso-spacerun:yes'> 
--- 3569,3599 ----
  style='mso-spacerun:yes'>  </span>The last version with support for Windows NT
  4.0 is 1.2.10.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872167"></a><a
! name="_Toc115417040"></a><a name="_Toc115416102"><span style='mso-bookmark:
! _Toc115417040'><span style='mso-bookmark:_Toc126872167'>2.2 Disk Space</span></span></a></h2>
  
  <p class=MsoNormal>Up to 60mb required for the OpenAFS binaries plus 100MB for
  the default AFSCache file.<span style='mso-spacerun:yes'>   </span>(The size of
  the AFSCache file may be adjusted via the Registry after installation.)</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872168"></a><a
! name="_Toc115417041"></a><a name="_Toc115416103"><span style='mso-bookmark:
! _Toc115417041'><span style='mso-bookmark:_Toc126872168'>2.3 Additional Software</span></span></a></h2>
  
  <p class=MsoNormal><a href="http://web.mit.edu/kerberos/dist/index.html">MIT
! Kerberos for Windows</a> 2.6.x or 3.x.x if Kerberos 5 authentication support is
! desired.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872169"></a><a
! name="_Toc115417111"></a><a name="_Toc115417042"></a><a name="_Toc115416104"><span
! style='mso-bookmark:_Toc115417042'><span style='mso-bookmark:_Toc115417111'><span
! style='mso-bookmark:_Toc126872169'>3. Operational Notes</span></span></span></a></h1>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872170"></a><a
! name="_Toc115417043"></a><a name="_Toc115416105"><span style='mso-bookmark:
! _Toc115417043'><span style='mso-bookmark:_Toc126872170'>3.1. Requirements for
! Kerberos 5 Authentication</span></span></a></h2>
  
  <p class=MsoNormal>The Kerberos 4 infrastructure on which the OpenAFS 1.2
  series is reliant is no longer secure.<span style='mso-spacerun:yes'> 
***************
*** 2821,2828 ****
  style='mso-element:field-begin'></span> XE &quot;Kerberos 5&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416106">3.1.1.
! Active Directory</a></h3>
  
  <p class=MsoNormal>There are two things to consider when using a Microsoft
  Windows Active Directory as the Kerberos realm that issues the AFS service
--- 3616,3624 ----
  style='mso-element:field-begin'></span> XE &quot;Kerberos 5&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872171"></a><a
! name="_Toc115416106"><span style='mso-bookmark:_Toc126872171'>3.1.1. Active
! Directory</span></a></h3>
  
  <p class=MsoNormal>There are two things to consider when using a Microsoft
  Windows Active Directory as the Kerberos realm that issues the AFS service
***************
*** 2843,2850 ****
  style='mso-spacerun:yes'> </span>XE &quot;DES enctypes&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416107">3.1.2.
! Using the krb524 service</a></h3>
  
  <p class=MsoNormal>Some organizations which have AFS cell names and Kerberos
  realm names which differ by more then just lower and upper case rely on a
--- 3639,3647 ----
  style='mso-spacerun:yes'> </span>XE &quot;DES enctypes&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872172"></a><a
! name="_Toc115416107"><span style='mso-bookmark:_Toc126872172'>3.1.2. Using the
! krb524 service</span></a></h3>
  
  <p class=MsoNormal>Some organizations which have AFS cell names and Kerberos
  realm names which differ by more then just lower and upper case rely on a
***************
*** 2871,2889 ****
  and the principal names placed into the ACL’s are not the principal names from
  the Kerberos 5 ticket.<span style='mso-spacerun:yes'>  </span>To support this
  transition, OpenAFS for Windows 1.4 adds a new registry value, <i><a
! href="#_Value___:_Use524">Use524</a></i>, to force the use of krb524d.<span
! style='mso-spacerun:yes'>  </span>However, the availability of this option
! should only be used by individuals until such time as their organizations can
! provide a more permanent solution.<!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;Kerberos 5&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
  style='mso-spacerun:yes'> </span>XE &quot;krb524&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417044"></a><a
! name="_Toc115416108"><span style='mso-bookmark:_Toc115417044'>3.2. Use of the
! Microsoft Loopback Adapter</span></a></h2>
  
  <p class=MsoNormal>By itself the OpenAFS Client Service does not provide robust
  behavior in a plug-n-play network environment.<span style='mso-spacerun:yes'> 
--- 3668,3687 ----
  and the principal names placed into the ACL’s are not the principal names from
  the Kerberos 5 ticket.<span style='mso-spacerun:yes'>  </span>To support this
  transition, OpenAFS for Windows 1.4 adds a new registry value, <i><a
! href="oafw-1-4-release-notes.doc#_Value___: Use524">Use524</a></i>, to force
! the use of krb524d.<span style='mso-spacerun:yes'>  </span>However, the
! availability of this option should only be used by individuals until such time
! as their organizations can provide a more permanent solution.<!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;Kerberos 5&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
  style='mso-spacerun:yes'> </span>XE &quot;krb524&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872173"></a><a
! name="_Toc115417044"></a><a name="_Toc115416108"><span style='mso-bookmark:
! _Toc115417044'><span style='mso-bookmark:_Toc126872173'>3.2. Use of the
! Microsoft Loopback Adapter</span></span></a></h2>
  
  <p class=MsoNormal>By itself the OpenAFS Client Service does not provide robust
  behavior in a plug-n-play network environment.<span style='mso-spacerun:yes'> 
***************
*** 2911,2924 ****
  message.<span style='mso-spacerun:yes'>  </span>To correct the problem:</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l3 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
  style='mso-spacerun:yes'> </span>stop the AFS Client Service</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l3 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
--- 3709,3722 ----
  message.<span style='mso-spacerun:yes'>  </span>To correct the problem:</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l13 level1 lfo4;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
  style='mso-spacerun:yes'> </span>stop the AFS Client Service</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l13 level1 lfo4;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
***************
*** 2926,2932 ****
  Networks&quot; to the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l3 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
--- 3724,3730 ----
  Networks&quot; to the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l13 level1 lfo4;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
***************
*** 2934,2947 ****
  Microsoft Networks&quot; from the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l3 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
  style='mso-spacerun:yes'> </span>Disable and then re-enable the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l3 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
--- 3732,3745 ----
  Microsoft Networks&quot; from the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l13 level1 lfo4;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
  style='mso-spacerun:yes'> </span>Disable and then re-enable the MLA</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l13 level1 lfo4;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]><span
***************
*** 2965,2973 ****
  style='mso-spacerun:yes'> </span>XE &quot;NETBIOS&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417045"></a><a
! name="_Toc115416109"><span style='mso-bookmark:_Toc115417045'>3.3. Using
! Freelance (Dynamic Root) Mode to Improve Mobility</span></a></h2>
  
  <p class=MsoNormal>Traditionally, when the OpenAFS Client Service starts it
  must be able to access the &quot;root.afs&quot; volume of the default
--- 3763,3772 ----
  style='mso-spacerun:yes'> </span>XE &quot;NETBIOS&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872174"></a><a
! name="_Toc115417045"></a><a name="_Toc115416109"><span style='mso-bookmark:
! _Toc115417045'><span style='mso-bookmark:_Toc126872174'>3.3. Using Freelance
! (Dynamic Root) Mode to Improve Mobility</span></span></a></h2>
  
  <p class=MsoNormal>Traditionally, when the OpenAFS Client Service starts it
  must be able to access the &quot;root.afs&quot; volume of the default
***************
*** 2994,3007 ****
  two mount points: a <i>regular path </i>and <i>read-write path </i>mount point
  used to access the &quot;root.cell&quot; volume of the default AFS cell.<span
  style='mso-spacerun:yes'>  </span>Any attempt to access a valid cell name will
! result in a new mount point being created in the fake &quot;root.afs&quot;
! volume.<span style='mso-spacerun:yes'>  </span>If the cellname begins with a
! &quot;.&quot; the mount point will be a <i>read-write path</i>; otherwise the
! mount point will be a <i>regular path</i>.<span style='mso-spacerun:yes'> 
! </span>These mount points are preserved in the registry at key:</p>
  
  <p class=PreformattedText style='margin-left:35.45pt'><a
! href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie">HKLM\SOFTWARE\OpenAFS\Client\Freelance</a></p>
  
  <p class=MsoNormal>Additional mount points may be manually created using the
  &quot;fs mkmount&quot; command.<span style='mso-spacerun:yes'>  </span>Mount
--- 3793,3806 ----
  two mount points: a <i>regular path </i>and <i>read-write path </i>mount point
  used to access the &quot;root.cell&quot; volume of the default AFS cell.<span
  style='mso-spacerun:yes'>  </span>Any attempt to access a valid cell name will
! result in a new mount point being created in the fake &quot;root.afs&quot; volume.<span
! style='mso-spacerun:yes'>  </span>If the cellname begins with a &quot;.&quot;
! the mount point will be a <i>read-write path</i>; otherwise the mount point
! will be a <i>regular path</i>.<span style='mso-spacerun:yes'>  </span>These
! mount points are preserved in the registry at key:</p>
  
  <p class=PreformattedText style='margin-left:35.45pt'><a
! href="oafw-1-4-release-notes.doc#_Regkey:_[HKLMSOFTWAREOpenAFSClie">HKLM\SOFTWARE\OpenAFS\Client\Freelance</a></p>
  
  <p class=MsoNormal>Additional mount points may be manually created using the
  &quot;fs mkmount&quot; command.<span style='mso-spacerun:yes'>  </span>Mount
***************
*** 3022,3029 ****
  <p class=MsoNormal>Symlinks may also be created within the Freelance “root.afs”
  volume.</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'>&gt;symlink make
! \\afs\link \\afs\athena.mit.edu\user\j\a\jaltman</p>
  
  <p class=PreformattedText><span style='mso-tab-count:1'>      </span>&gt;symlink
  list \\afs\link</p>
--- 3821,3828 ----
  <p class=MsoNormal>Symlinks may also be created within the Freelance “root.afs”
  volume.</p>
  
! <p class=PreformattedText style='margin-left:35.45pt'>&gt;symlink make \\afs\link
! \\afs\athena.mit.edu\user\j\a\jaltman</p>
  
  <p class=PreformattedText><span style='mso-tab-count:1'>      </span>&gt;symlink
  list \\afs\link</p>
***************
*** 3036,3042 ****
  <p class=MsoNormal>The symlinks are stored in the registry at:</p>
  
  <p class=PreformattedText style='margin-left:35.45pt'><a
! href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie_1">HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks</a><!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;Freelance Mode&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
--- 3835,3841 ----
  <p class=MsoNormal>The symlinks are stored in the registry at:</p>
  
  <p class=PreformattedText style='margin-left:35.45pt'><a
! href="oafw-1-4-release-notes.doc#_Regkey:_[HKLMSOFTWAREOpenAFSClie_1">HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks</a><!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;Freelance Mode&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
***************
*** 3053,3061 ****
  style='mso-element:field-end'></span><![endif]--><span
  style='mso-spacerun:yes'> </span></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417046"></a><a
! name="_Toc115416110"><span style='mso-bookmark:_Toc115417046'>3.4. Locating AFS
! Volume Database Servers</span></a> </h2>
  
  <p class=MsoNormal>The OpenAFS for Windows client will use DNS AFSDB records to
  discover the location of AFS Volume Database servers when entries are not
--- 3852,3861 ----
  style='mso-element:field-end'></span><![endif]--><span
  style='mso-spacerun:yes'> </span></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872175"></a><a
! name="_Toc115417046"></a><a name="_Toc115416110"><span style='mso-bookmark:
! _Toc115417046'><span style='mso-bookmark:_Toc126872175'>3.4. Locating AFS
! Volume Database Servers</span></span></a> </h2>
  
  <p class=MsoNormal>The OpenAFS for Windows client will use DNS AFSDB records to
  discover the location of AFS Volume Database servers when entries are not
***************
*** 3067,3075 ****
  style='mso-spacerun:yes'> </span>XE &quot;afsdb&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417047"></a><a
! name="_Toc115416111"><span style='mso-bookmark:_Toc115417047'>3.5. Obtaining
! AFS Tokens as a Part of Windows Logon</span></a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows installs a WinLogon Network Provider to
  provide Single Sign-on functionality (aka Integrated Logon.)<span
--- 3867,3876 ----
  style='mso-spacerun:yes'> </span>XE &quot;afsdb&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872176"></a><a
! name="_Toc115417047"></a><a name="_Toc115416111"><span style='mso-bookmark:
! _Toc115417047'><span style='mso-bookmark:_Toc126872176'>3.5. Obtaining AFS
! Tokens as a Part of Windows Logon</span></span></a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows installs a WinLogon Network Provider to
  provide Single Sign-on functionality (aka Integrated Logon.)<span
***************
*** 3095,3114 ****
  into the default ccache within the user logon session.</p>
  
  <p class=MsoNormal>Integrated Logon does not have the ability to cache the
! user's username and password for the purpose of obtaining tokens if the Kerberos
! KDC is inaccessible at logon time.</p>
  
  <p class=MsoNormal>Integrated Login supports the ability to obtain tokens for
  multiple cells.<span style='mso-spacerun:yes'>  </span>For further information
  on how to configure this feature read the <a
  href="relnotes.htm#_Value:_TheseCells">TheseCells</a> value in <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a>.<!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;integrated login&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417048"></a><a
! name="_Toc115416112"><span style='mso-bookmark:_Toc115417048'>3.6. AFS System
! Tray Command Line Options</span></a></h2>
  
  <p class=MsoNormal>The AFS System Tray tool (afscreds.exe) supports several
  command line options: </p>
--- 3896,3916 ----
  into the default ccache within the user logon session.</p>
  
  <p class=MsoNormal>Integrated Logon does not have the ability to cache the
! user's username and password for the purpose of obtaining tokens if the
! Kerberos KDC is inaccessible at logon time.</p>
  
  <p class=MsoNormal>Integrated Login supports the ability to obtain tokens for
  multiple cells.<span style='mso-spacerun:yes'>  </span>For further information
  on how to configure this feature read the <a
  href="relnotes.htm#_Value:_TheseCells">TheseCells</a> value in <a
! href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix A</a>.<!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;integrated login&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872177"></a><a
! name="_Toc115417048"></a><a name="_Toc115416112"><span style='mso-bookmark:
! _Toc115417048'><span style='mso-bookmark:_Toc126872177'>3.6. AFS System Tray
! Command Line Options</span></span></a></h2>
  
  <p class=MsoNormal>The AFS System Tray tool (afscreds.exe) supports several
  command line options: </p>
***************
*** 3125,3132 ****
  <p class=PreformattedText><span style='mso-spacerun:yes'>    </span>-M = renew
  drive maps </p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>    </span>-N = IP
! address change detection </p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>    </span>-Q = quiet
  mode.<span style='mso-spacerun:yes'>  </span>do not display start service
--- 3927,3934 ----
  <p class=PreformattedText><span style='mso-spacerun:yes'>    </span>-M = renew
  drive maps </p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>    </span>-N = IP address
! change detection </p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>    </span>-Q = quiet
  mode.<span style='mso-spacerun:yes'>  </span>do not display start service
***************
*** 3149,3160 ****
  
  <p class=MsoNormal>autoinit will result in automated attempts to acquire AFS
  tokens when afscreds.exe is started.<span style='mso-spacerun:yes'> 
! </span>afscreds.exe will attempt to utilize tickets stored in the MSLSA credentials
! cache; any existing CCAPI credentials cache; and finally display an Obtain
! Tokens dialog to the user.<span style='mso-spacerun:yes'>  </span>When used in
! combination with IP address change detection, afscreds.exe will attempt to
! acquire AFS tokens whenever the IP address list changes and the Kerberos KDC is
! accessible.</p>
  
  <p class=MsoNormal>The renew drive maps option is used to ensure that the user
  drive maps constructed via the OpenAFS tools (not NET USE) are re-constructed
--- 3951,3962 ----
  
  <p class=MsoNormal>autoinit will result in automated attempts to acquire AFS
  tokens when afscreds.exe is started.<span style='mso-spacerun:yes'> 
! </span>afscreds.exe will attempt to utilize tickets stored in the MSLSA
! credentials cache; any existing CCAPI credentials cache; and finally display an
! Obtain Tokens dialog to the user.<span style='mso-spacerun:yes'>  </span>When
! used in combination with IP address change detection, afscreds.exe will attempt
! to acquire AFS tokens whenever the IP address list changes and the Kerberos KDC
! is accessible.</p>
  
  <p class=MsoNormal>The renew drive maps option is used to ensure that the user
  drive maps constructed via the OpenAFS tools (not NET USE) are re-constructed
***************
*** 3166,3253 ****
  change this selection after install time although these options may be altered
  via the registry on either per machine or per user basis.<span
  style='mso-spacerun:yes'>  </span>See <span style='mso-bidi-font-style:italic'><a
! href="#_Value___:_AfscredsShortcutParams">AfscredsShortcutParams</a></span> in <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a>.<!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;afscreds.exe&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417049"></a><a
! name="_Toc115416113"><span style='mso-bookmark:_Toc115417049'>3.7. The “AFS
! Client Admins” Authorization Group</span></a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows 1.4 client supports a local Windows
  authorization group named &quot;AFS Client Admins&quot;.<span
! style='mso-spacerun:yes'>  </span>This group is used in place of the
! &quot;Administrators&quot; group to determine which users are allowed to modify
! the AFS Client Service configuration via the AFS Control Panel (afs_config.exe)
! or fs.exe command line tool.<span style='mso-spacerun:yes'>  </span>The
! following fs.exe commands are now restricted to members of the &quot;AFS Client
! Admins&quot; group:</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>checkservers
  with a non-zero timer value</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setcachesize</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>newcell</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>sysname
  with a new sysname list</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>exportafs</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setcell</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setserverprefs</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>storebehind</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setcrypt</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>cscpolicy</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l4 level1 lfo12;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>trace</p>
--- 3968,4055 ----
  change this selection after install time although these options may be altered
  via the registry on either per machine or per user basis.<span
  style='mso-spacerun:yes'>  </span>See <span style='mso-bidi-font-style:italic'><a
! href="oafw-1-4-release-notes.doc#_Value___: AfscredsShortcutParams">AfscredsShortcutParams</a></span>
! in <a href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix A</a>.<!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;afscreds.exe&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872178"></a><a
! name="_Toc115417049"></a><a name="_Toc115416113"><span style='mso-bookmark:
! _Toc115417049'><span style='mso-bookmark:_Toc126872178'>3.7. The “AFS Client
! Admins” Authorization Group</span></span></a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows 1.4 client supports a local Windows
  authorization group named &quot;AFS Client Admins&quot;.<span
! style='mso-spacerun:yes'>  </span>This group is used in place of the &quot;Administrators&quot;
! group to determine which users are allowed to modify the AFS Client Service
! configuration via the AFS Control Panel (afs_config.exe) or fs.exe command line
! tool.<span style='mso-spacerun:yes'>  </span>The following fs.exe commands are
! now restricted to members of the &quot;AFS Client Admins&quot; group:</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>checkservers
  with a non-zero timer value</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setcachesize</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>newcell</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>sysname
  with a new sysname list</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>exportafs</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setcell</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setserverprefs</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>storebehind</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setcrypt</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>cscpolicy</p>
  
  <p class=PreformattedText style='margin-left:49.6pt;text-indent:-14.15pt;
! mso-list:l14 level1 lfo5;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>trace</p>
***************
*** 3262,3284 ****
  user is added to the &quot;Administrators&quot; group after the creation of the
  &quot;AFS Client Admin&quot; group, that user will not be an AFS Client
  Administrator.<span style='mso-spacerun:yes'>  </span>Only users that are
! members of the &quot;AFS Client Admins&quot; group are AFS Client
! Administrators.<span style='mso-spacerun:yes'>  </span>The local
! &quot;SYSTEM&quot; account is an implicit member of the &quot;AFS Client
! Admins&quot; group.</p>
  
  <p class=MsoNormal>Setting the default sysname for a machine should be done via
! the <a href="#_Value_:_SysName">registry</a> and not via &quot;fs
! sysname&quot;.<!--[if supportFields]><span style='mso-element:field-begin'></span>
! XE &quot;AFS Client Admins&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
  style='mso-spacerun:yes'> </span>XE &quot;fs.exe&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417050"></a><a
! name="_Toc115416114"><span style='mso-bookmark:_Toc115417050'>3.8. OpenAFS
! support for UNC paths</span></a> </h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 client supports UNC paths everywhere.<span
  style='mso-spacerun:yes'>  </span>UNC paths provide a canonical name for
--- 4064,4086 ----
  user is added to the &quot;Administrators&quot; group after the creation of the
  &quot;AFS Client Admin&quot; group, that user will not be an AFS Client
  Administrator.<span style='mso-spacerun:yes'>  </span>Only users that are
! members of the &quot;AFS Client Admins&quot; group are AFS Client Administrators.<span
! style='mso-spacerun:yes'>  </span>The local &quot;SYSTEM&quot; account is an
! implicit member of the &quot;AFS Client Admins&quot; group.</p>
  
  <p class=MsoNormal>Setting the default sysname for a machine should be done via
! the <a href="oafw-1-4-release-notes.doc#_Value_:_SysName">registry</a> and not
! via &quot;fs sysname&quot;.<!--[if supportFields]><span style='mso-element:
! field-begin'></span> XE &quot;AFS Client Admins&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
  style='mso-spacerun:yes'> </span>XE &quot;fs.exe&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872179"></a><a
! name="_Toc115417050"></a><a name="_Toc115416114"><span style='mso-bookmark:
! _Toc115417050'><span style='mso-bookmark:_Toc126872179'>3.8. OpenAFS support
! for UNC paths</span></span></a> </h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 client supports UNC paths everywhere.<span
  style='mso-spacerun:yes'>  </span>UNC paths provide a canonical name for
***************
*** 3309,3317 ****
  style='mso-spacerun:yes'> </span>XE &quot;4nt.exe&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417051"></a><a
! name="_Toc115416115"><span style='mso-bookmark:_Toc115417051'>3.9. OpenAFS
! includes aklog.exe</span></a></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client ships with its own version of
  aklog.exe which should be used in preference to those obtained by third party
--- 4111,4120 ----
  style='mso-spacerun:yes'> </span>XE &quot;4nt.exe&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872180"></a><a
! name="_Toc115417051"></a><a name="_Toc115416115"><span style='mso-bookmark:
! _Toc115417051'><span style='mso-bookmark:_Toc126872180'>3.9. OpenAFS includes
! aklog.exe</span></span></a></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client ships with its own version of
  aklog.exe which should be used in preference to those obtained by third party
***************
*** 3321,3328 ****
  
  <p class=PreformattedText>Usage: aklog [-d] [[-cell | -c] cell [-k krb_realm]]</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>             </span>[[-p
! | -path] pathname]</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>            
  </span>[-noprdb] [-force]</p>
--- 4124,4131 ----
  
  <p class=PreformattedText>Usage: aklog [-d] [[-cell | -c] cell [-k krb_realm]]</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>            
! </span>[[-p | -path] pathname]</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>            
  </span>[-noprdb] [-force]</p>
***************
*** 3355,3363 ****
  style='mso-element:field-begin'></span> XE &quot;aklog.exe&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417052"></a><a
! name="_Toc115416116"><span style='mso-bookmark:_Toc115417052'>3.10. OpenAFS
! Servers on Windows are Unsupported</span></a></h2>
  
  <p class=MsoNormal>The AFS Server functionality provided with OpenAFS 1.4 might
  work but should be considered highly experimental.<span
--- 4158,4167 ----
  style='mso-element:field-begin'></span> XE &quot;aklog.exe&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872181"></a><a
! name="_Toc115417052"></a><a name="_Toc115416116"><span style='mso-bookmark:
! _Toc115417052'><span style='mso-bookmark:_Toc126872181'>3.10. OpenAFS Servers
! on Windows are Unsupported</span></span></a></h2>
  
  <p class=MsoNormal>The AFS Server functionality provided with OpenAFS 1.4 might
  work but should be considered highly experimental.<span
***************
*** 3369,3375 ****
  going to be used with the OpenAFS AFS Server:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l5 level1 lfo14;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>When
--- 4173,4179 ----
  going to be used with the OpenAFS AFS Server:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l15 level1 lfo6;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>When
***************
*** 3378,3384 ****
  manipulate the contents of the root.afs volume for the hosted cell.</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l5 level1 lfo14;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>The
--- 4182,4188 ----
  manipulate the contents of the root.afs volume for the hosted cell.</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l15 level1 lfo6;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>The
***************
*** 3388,3396 ****
  style='mso-element:field-begin'></span> XE &quot;AFS Servers&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417053"></a><a
! name="_Toc115416117"><span style='mso-bookmark:_Toc115417053'>3.11. OpenAFS
! Debugging Symbol files</span></a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows installers now include Debugging
  Symbol files which should be installed if you are experiencing problems and
--- 4192,4201 ----
  style='mso-element:field-begin'></span> XE &quot;AFS Servers&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872182"></a><a
! name="_Toc115417053"></a><a name="_Toc115416117"><span style='mso-bookmark:
! _Toc115417053'><span style='mso-bookmark:_Toc126872182'>3.11. OpenAFS Debugging
! Symbol files</span></span></a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows installers now include Debugging
  Symbol files which should be installed if you are experiencing problems and
***************
*** 3400,3420 ****
  versions are:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l6 level1 lfo16;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>whether
  or not the binaries were compiled with optimization</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l6 level1 lfo16;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>whether
  the debug symbols are installed by default</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l6 level1 lfo16;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>whether
--- 4205,4225 ----
  versions are:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l16 level1 lfo7;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>whether
  or not the binaries were compiled with optimization</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l16 level1 lfo7;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>whether
  the debug symbols are installed by default</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l16 level1 lfo7;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>whether
***************
*** 3422,3451 ****
  style='mso-element:field-begin'></span> XE &quot;Symbol files&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417054"></a><a
! name="_Toc115416118"><span style='mso-bookmark:_Toc115417054'>3.12. Maximum
! File Size is 2GB</span></a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows does not support files larger than
  2GB.<span style='mso-spacerun:yes'>  </span>The version of the SMB/CIFS
  protocol implemented imposes this limitation.<span style='mso-spacerun:yes'> 
! </span>Upgrading the SMB/CIFS implementation or replacing it with an Installable
! File System will allow larger files to be supported.<!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;large file support&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417055"></a><a
! name="_Toc115416119"><span style='mso-bookmark:_Toc115417055'>3.13. Encrypted
! AFS File Access</span></a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows installer by default activates a
! weak form of encrypted data transfer between the AFS client and the AFS servers.<span
! style='mso-spacerun:yes'>  </span>This is often referred to as
  &quot;fcrypt&quot; mode.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417056"></a><a
! name="_Toc115416120"><span style='mso-bookmark:_Toc115417056'>3.14.
! Authenticated Access to the OpenAFS Client Service</span></a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 supports authenticated SMB connections using
  either NTLM or GSS SPNEGO (NTLM).<span style='mso-spacerun:yes'>  </span>In
--- 4227,4259 ----
  style='mso-element:field-begin'></span> XE &quot;Symbol files&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872183"></a><a
! name="_Toc115417054"></a><a name="_Toc115416118"><span style='mso-bookmark:
! _Toc115417054'><span style='mso-bookmark:_Toc126872183'>3.12. Maximum File Size
! is 2GB</span></span></a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows does not support files larger than
  2GB.<span style='mso-spacerun:yes'>  </span>The version of the SMB/CIFS
  protocol implemented imposes this limitation.<span style='mso-spacerun:yes'> 
! </span>Upgrading the SMB/CIFS implementation or replacing it with an
! Installable File System will allow larger files to be supported.<!--[if supportFields]><span
  style='mso-element:field-begin'></span> XE &quot;large file support&quot; <![endif]--><!--[if supportFields]><span
  style='mso-element:field-end'></span><![endif]--></p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872184"></a><a
! name="_Toc115417055"></a><a name="_Toc115416119"><span style='mso-bookmark:
! _Toc115417055'><span style='mso-bookmark:_Toc126872184'>3.13. Encrypted AFS
! File Access</span></span></a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows installer by default activates a
! weak form of encrypted data transfer between the AFS client and the AFS
! servers.<span style='mso-spacerun:yes'>  </span>This is often referred to as
  &quot;fcrypt&quot; mode.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872185"></a><a
! name="_Toc115417056"></a><a name="_Toc115416120"><span style='mso-bookmark:
! _Toc115417056'><span style='mso-bookmark:_Toc126872185'>3.14. Authenticated
! Access to the OpenAFS Client Service</span></span></a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 supports authenticated SMB connections using
  either NTLM or GSS SPNEGO (NTLM).<span style='mso-spacerun:yes'>  </span>In
***************
*** 3466,3485 ****
  password.<span style='mso-spacerun:yes'>  </span>Instead, Windows will
  internally recognize the request as coming from a local logon session.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417057"></a><a
! name="_Toc115416121"><span style='mso-bookmark:_Toc115417057'>3.15. No More INI
! Files</span></a></h2>
  
  <p class=MsoNormal>Previous AFS clients for Windows stored configuration data
! in Windows .INI files.<span style='mso-spacerun:yes'>   </span>OpenAFS 1.4 does
  not use Windows .INI files for the storage of configuration data.<span
  style='mso-spacerun:yes'>   </span>All settings are now stored in the registry
! (see <a href="#_Appendix_A:_Registry_Values">Appendix A</a>).<span
! style='mso-spacerun:yes'>  </span>The CellServDB file is now stored in the
! %PROGRAMFILES%\OpenAFS\Client directory.<span style='mso-spacerun:yes'>  
! </span>The <i style='mso-bidi-font-style:normal'><a
! href="#_Value___:_CellServDBDir">CellServDBDir</a></i> registry value can be
! used to specify an alternative location.</p>
  
  <p class=MsoNormal>OpenAFS 1.4 will relocate the contents of the “afsdcell.ini”
  file to the new CellServDB file.<span style='mso-spacerun:yes'>  </span>OpenAFS
--- 4274,4293 ----
  password.<span style='mso-spacerun:yes'>  </span>Instead, Windows will
  internally recognize the request as coming from a local logon session.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872186"></a><a
! name="_Toc115417057"></a><a name="_Toc115416121"><span style='mso-bookmark:
! _Toc115417057'><span style='mso-bookmark:_Toc126872186'>3.15. No More INI Files</span></span></a></h2>
  
  <p class=MsoNormal>Previous AFS clients for Windows stored configuration data
! in Windows .INI files. <span style='mso-spacerun:yes'>  </span>OpenAFS 1.4 does
  not use Windows .INI files for the storage of configuration data.<span
  style='mso-spacerun:yes'>   </span>All settings are now stored in the registry
! (see <a href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix
! A</a>).<span style='mso-spacerun:yes'>  </span>The CellServDB file is now
! stored in the %PROGRAMFILES%\OpenAFS\Client directory.<span
! style='mso-spacerun:yes'>   </span>The <i style='mso-bidi-font-style:normal'><a
! href="oafw-1-4-release-notes.doc#_Value___: CellServDBDir">CellServDBDir</a></i>
! registry value can be used to specify an alternative location.</p>
  
  <p class=MsoNormal>OpenAFS 1.4 will relocate the contents of the “afsdcell.ini”
  file to the new CellServDB file.<span style='mso-spacerun:yes'>  </span>OpenAFS
***************
*** 3487,3495 ****
  Windows registry.<span style='mso-spacerun:yes'>   </span>OpenAFS 1.4 will not
  process the contents of the “afsddbmt.ini”.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417058"></a><a
! name="_Toc115416122"><span style='mso-bookmark:_Toc115417058'>3.16. Microsoft
! Windows Internet Connection Firewall</span></a></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client is compatible with the Internet
  Connection Firewall that debuted with Windows XP SP2 and Windows 2003 SP1.<span
--- 4295,4304 ----
  Windows registry.<span style='mso-spacerun:yes'>   </span>OpenAFS 1.4 will not
  process the contents of the “afsddbmt.ini”.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872187"></a><a
! name="_Toc115417058"></a><a name="_Toc115416122"><span style='mso-bookmark:
! _Toc115417058'><span style='mso-bookmark:_Toc126872187'>3.16. Microsoft Windows
! Internet Connection Firewall</span></span></a></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client is compatible with the Internet
  Connection Firewall that debuted with Windows XP SP2 and Windows 2003 SP1.<span
***************
*** 3499,3551 ****
  appropriate <i>Back Connection</i> registry entries are added to allow SMB
  authentication to be performed across the Microsoft Loopback Adapter.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417059"></a><a
! name="_Toc115416123"><span style='mso-bookmark:_Toc115417059'>3.17. Browsing AFS
! from the Explorer Shell and Office</span></a></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client Service implements the CIFS Remote
  Admin Protocol which allows Explorer to browse server and share information.
  This significantly enhances the interoperability of AFS volumes within the
  Explorer Shell and Microsoft Office applications.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417060"></a><a
! name="_Toc115416124"><span style='mso-bookmark:_Toc115417060'>3.18. No Support
! for </span></a><st2:place w:st="on"><st2:PlaceName w:st="on"><span
!   style='mso-bookmark:_Toc115417060'><span style='mso-bookmark:_Toc115416124'>Byte</span></span></st2:PlaceName><span
!  style='mso-bookmark:_Toc115417060'><span style='mso-bookmark:_Toc115416124'> <st2:PlaceType
!  w:st="on">Range</st2:PlaceType></span></span></st2:place><span
! style='mso-bookmark:_Toc115417060'><span style='mso-bookmark:_Toc115416124'>
! Locking</span></span></h2>
  
  <p class=MsoBodyText>Many applications on Windows (e.g. Microsoft Office)
  require the use of byte range locks applied to a file either to protect against
  simultaneous file access or as a signaling mechanism.<span
! style='mso-spacerun:yes'>   </span>OpenAFS does not currently support byte
! range locks.<span style='mso-spacerun:yes'>   </span>It is strongly recommended
! that files not be edited within AFS if they might be accessed by multiple users
! or multiple processes on a single machine.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417061"></a><a
! name="_Toc115416125"><span style='mso-bookmark:_Toc115417061'>3.19. Automatic
! Discarding of AFS Tokens at Logoff</span></a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 will automatically forget a user's tokens upon
  Logoff unless the user's profile was loaded from an AFS volume.<span
  style='mso-spacerun:yes'>  </span>In this situation there is no mechanism to
! determine when the profile has been successfully written back to the network.<span
! style='mso-spacerun:yes'>  </span>It is therefore unsafe to release the user's
! tokens.<span style='mso-spacerun:yes'>  </span>Whether or not the profile has
! been loaded from the registry can be determined for Local Accounts, Active
! Directory accounts and NT4 accounts.</p>
  
  <p class=MsoNormal>If there is a need to disable this functionality, the <span
! style='mso-bidi-font-style:italic'><a href="#_Value_:_LogoffPreserveTokens">LogoffPreserveTokens</a></span>
! registry value can be used. (see <a href="#_Appendix_A:_Registry_Values">Appendix
! A</a>.)</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417062"></a><a
! name="_Toc115416126"><span style='mso-bookmark:_Toc115417062'>3.20. Terminal
! Server installations</span></a></h2>
  
  <p class=MsoNormal>When installing the NSIS (.exe) installer under Terminal
  Server, you must execute it from within the Add/Remove Programs Control
--- 4308,4395 ----
  appropriate <i>Back Connection</i> registry entries are added to allow SMB
  authentication to be performed across the Microsoft Loopback Adapter.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872188"></a><a
! name="_Toc115417059"></a><a name="_Toc115416123"><span style='mso-bookmark:
! _Toc115417059'><span style='mso-bookmark:_Toc126872188'>3.17. Browsing AFS from
! the Explorer Shell and Office</span></span></a></h2>
  
  <p class=MsoNormal>The OpenAFS 1.4 Client Service implements the CIFS Remote
  Admin Protocol which allows Explorer to browse server and share information.
  This significantly enhances the interoperability of AFS volumes within the
  Explorer Shell and Microsoft Office applications.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872189"></a><a
! name="_Toc115417060"></a><a name="_Toc115416124"><span style='mso-bookmark:
! _Toc115417060'><span style='mso-bookmark:_Toc126872189'>3.18. </span></span></a><st2:place
! w:st="on"><st2:PlaceName w:st="on"><span style='mso-bookmark:_Toc126872189'><span
!   style='mso-bookmark:_Toc115417060'><span style='mso-bookmark:_Toc115416124'>Byte</span></span></span></st2:PlaceName><span
!  style='mso-bookmark:_Toc126872189'><span style='mso-bookmark:_Toc115417060'><span
!  style='mso-bookmark:_Toc115416124'> <st2:PlaceType w:st="on">Range</st2:PlaceType></span></span></span></st2:place><span
! style='mso-bookmark:_Toc126872189'><span style='mso-bookmark:_Toc115417060'><span
! style='mso-bookmark:_Toc115416124'> Locking</span></span></span></h2>
  
  <p class=MsoBodyText>Many applications on Windows (e.g. Microsoft Office)
  require the use of byte range locks applied to a file either to protect against
  simultaneous file access or as a signaling mechanism.<span
! style='mso-spacerun:yes'>   </span>OpenAFS implements byte range locking local
! to the machine.<span style='mso-spacerun:yes'>   </span>OpenAFS does not obtain
! file locks on the server.<span style='mso-spacerun:yes'>   </span>It is
! strongly recommended that files not be edited within AFS if they might be
! accessed by multiple users or multiple processes on more than one machine at
! the same time.</p>
! 
! <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Note:
! <span style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA'>In a future release, OpenAFS for Windows will utilize
! AFS' advisory locks to simulate Microsoft Windows mandatory locks.&nbsp;&nbsp;
! When an application opens a file, a lock will be placed in AFS indicating that
! the file is in use.&nbsp; If the lock is a write lock, the use of the file will
! be restricted to other applications running on the same machine as the first
! application to apply the lock.&nbsp;&nbsp; Applications running on other
! machines will see the full lock and will be unable to access the file.<o:p></o:p></span></p>
! 
! <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
! mso-pagination:widow-orphan;mso-hyphenate:auto'><span style='font-family:"Times New Roman";
! mso-fareast-font-family:"MS Mincho";mso-fareast-language:JA'>Most Windows
! applications and Windows itself opens files in shared read mode. When this is
! done, a read lock is applied to the file.&nbsp;&nbsp; This does not prevent
! shared read access across multiple machines but is used to ensure that no one
! writes to the file while it is in use.<o:p></o:p></span></p>
! 
! <p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
! mso-pagination:widow-orphan;mso-hyphenate:auto'><span style='mso-fareast-language:
! JA'>As locks are checked and applied during the file open operation, it is
! crucial that users have the locking 'k' privilege in all directories in which
! the user might read a file or execute an application unless the directory
! exists on a read only volume.&nbsp; A failure to assign the 'k' privilege will
! result in &quot;Access Denied&quot; errors during file open.</span> <span
! style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! mso-fareast-language:JA'><o:p></o:p></span></p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872190"></a><a
! name="_Toc115417061"></a><a name="_Toc115416125"><span style='mso-bookmark:
! _Toc115417061'><span style='mso-bookmark:_Toc126872190'>3.19. Automatic
! Discarding of AFS Tokens at Logoff</span></span></a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 will automatically forget a user's tokens upon
  Logoff unless the user's profile was loaded from an AFS volume.<span
  style='mso-spacerun:yes'>  </span>In this situation there is no mechanism to
! determine when the profile has been successfully written back to the
! network.<span style='mso-spacerun:yes'>  </span>It is therefore unsafe to
! release the user's tokens.<span style='mso-spacerun:yes'>  </span>Whether or
! not the profile has been loaded from the registry can be determined for Local
! Accounts, Active Directory accounts and NT4 accounts.</p>
  
  <p class=MsoNormal>If there is a need to disable this functionality, the <span
! style='mso-bidi-font-style:italic'><a
! href="oafw-1-4-release-notes.doc#_Value_:_LogoffPreserveTokens">LogoffPreserveTokens</a></span>
! registry value can be used. (see <a
! href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix A</a>.)</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872191"></a><a
! name="_Toc115417062"></a><a name="_Toc115416126"><span style='mso-bookmark:
! _Toc115417062'><span style='mso-bookmark:_Toc126872191'>3.20. Terminal Server
! installations</span></span></a></h2>
  
  <p class=MsoNormal>When installing the NSIS (.exe) installer under Terminal
  Server, you must execute it from within the Add/Remove Programs Control
***************
*** 3553,3561 ****
  AFS not running properly.<span style='mso-spacerun:yes'>  </span>The AFS Server
  should not be installed on a machine with Terminal Server installed.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417063"></a><a
! name="_Toc115416127"><span style='mso-bookmark:_Toc115417063'>3.21. Hidden Dot
! Files</span></a></h2>
  
  <p class=MsoNormal>AFS is a UNIX native file system.<span
  style='mso-spacerun:yes'>  </span>The OpenAFS client attempts to treat the
--- 4397,4405 ----
  AFS not running properly.<span style='mso-spacerun:yes'>  </span>The AFS Server
  should not be installed on a machine with Terminal Server installed.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872192"></a><a
! name="_Toc115417063"></a><a name="_Toc115416127"><span style='mso-bookmark:
! _Toc115417063'><span style='mso-bookmark:_Toc126872192'>3.21. Hidden Dot Files</span></span></a></h2>
  
  <p class=MsoNormal>AFS is a UNIX native file system.<span
  style='mso-spacerun:yes'>  </span>The OpenAFS client attempts to treat the
***************
*** 3564,3572 ****
  automatically given the Hidden attribute so they will not normally be
  displayed.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417064"></a><a
! name="_Toc115416128"><span style='mso-bookmark:_Toc115417064'>3.22. Status
! Cache Limits</span></a></h2>
  
  <p class=MsoNormal>The Status Cache (AFS Configuration Control Panel: Advanced
  Page) is defined to have a maximum number of entries.<span
--- 4408,4417 ----
  automatically given the Hidden attribute so they will not normally be
  displayed.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872193"></a><a
! name="_Toc115417064"></a><a name="_Toc115416128"><span style='mso-bookmark:
! _Toc115417064'><span style='mso-bookmark:_Toc126872193'>3.22. Status Cache
! Limits</span></span></a></h2>
  
  <p class=MsoNormal>The Status Cache (AFS Configuration Control Panel: Advanced
  Page) is defined to have a maximum number of entries.<span
***************
*** 3575,3602 ****
  style='mso-spacerun:yes'>  </span>When the maximum number of entries are
  allocated, entries will begin to be reused according to a least recently used
  (LRU) algorithm.<span style='mso-spacerun:yes'>  </span>If the number of files
! or directories being accessed repeatedly by your applications is greater then
! the maximum number of entries, your host will begin to experience thrashing of
! the Status Cache and all requests will result in network operations.</p>
  
  <p class=MsoNormal>If you are experiencing poor performance try increasing the
  maximum number of Status Cache entries.<span style='mso-spacerun:yes'> 
  </span>Each entry requires approximately 1.2K.<span style='mso-spacerun:yes'> 
  </span>In OpenAFS 1.4, the default number of Status Cache entries is 10,000.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417065"></a><a
! name="_Toc115416129"><span style='mso-bookmark:_Toc115417065'>3.23. NETBIOS
! over TCP/IP must be enabled</span></a></h2>
  
  <p class=MsoNormal>&quot;Netbios over TCP/IP&quot; must be active on the
  machine in order for communication with the AFS Client Service to succeed.<span
! style='mso-spacerun:yes'>  </span>If &quot;Netbios over TCP/IP&quot; is disabled
! on the machine, then communication with the AFS Client Service will be
  impossible.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417066"></a><a
! name="_Toc115416130"><span style='mso-bookmark:_Toc115417066'>3.24. OpenAFS
! binaries are digitally signed</span></a></h2>
  
  <p class=MsoNormal>The OpenAFS Client Service and related binaries distributed
  by OpenAFS.org are digitally signed by &quot;Secure Endpoints Inc.&quot;.<span
--- 4420,4449 ----
  style='mso-spacerun:yes'>  </span>When the maximum number of entries are
  allocated, entries will begin to be reused according to a least recently used
  (LRU) algorithm.<span style='mso-spacerun:yes'>  </span>If the number of files
! or directories being accessed repeatedly by your applications is greater then the
! maximum number of entries, your host will begin to experience thrashing of the
! Status Cache and all requests will result in network operations.</p>
  
  <p class=MsoNormal>If you are experiencing poor performance try increasing the
  maximum number of Status Cache entries.<span style='mso-spacerun:yes'> 
  </span>Each entry requires approximately 1.2K.<span style='mso-spacerun:yes'> 
  </span>In OpenAFS 1.4, the default number of Status Cache entries is 10,000.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872194"></a><a
! name="_Toc115417065"></a><a name="_Toc115416129"><span style='mso-bookmark:
! _Toc115417065'><span style='mso-bookmark:_Toc126872194'>3.23. NETBIOS over
! TCP/IP must be enabled</span></span></a></h2>
  
  <p class=MsoNormal>&quot;Netbios over TCP/IP&quot; must be active on the
  machine in order for communication with the AFS Client Service to succeed.<span
! style='mso-spacerun:yes'>  </span>If &quot;Netbios over TCP/IP&quot; is
! disabled on the machine, then communication with the AFS Client Service will be
  impossible.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872195"></a><a
! name="_Toc115417066"></a><a name="_Toc115416130"><span style='mso-bookmark:
! _Toc115417066'><span style='mso-bookmark:_Toc126872195'>3.24. OpenAFS binaries
! are digitally signed</span></span></a></h2>
  
  <p class=MsoNormal>The OpenAFS Client Service and related binaries distributed
  by OpenAFS.org are digitally signed by &quot;Secure Endpoints Inc.&quot;.<span
***************
*** 3610,3623 ****
  mixture of files from different releases.<span style='mso-spacerun:yes'> 
  </span></p>
  
! <p class=MsoNormal><a href="#_Appendix_A:_Registry_Values">Appendix A</a>
! documents the &quot;<a href="#_Value___:_VerifyServiceSignature">VerifyServiceSignature</a>&quot;
  registry value which can be used to disable the signature check.<span
  style='mso-spacerun:yes'>  </span>The file version check cannot be disabled.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417067"></a><a
! name="_Toc115416131"><span style='mso-bookmark:_Toc115417067'>3.25. Maximum
! Size of the AFSCache File</span></a></h2>
  
  <p class=MsoNormal>The maximum cache size is approximately 1.3GB.<span
  style='mso-spacerun:yes'>  </span>This is the largest contiguous block of
--- 4457,4473 ----
  mixture of files from different releases.<span style='mso-spacerun:yes'> 
  </span></p>
  
! <p class=MsoNormal><a
! href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix A</a>
! documents the &quot;<a
! href="oafw-1-4-release-notes.doc#_Value___: VerifyServiceSignature">VerifyServiceSignature</a>&quot;
  registry value which can be used to disable the signature check.<span
  style='mso-spacerun:yes'>  </span>The file version check cannot be disabled.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872196"></a><a
! name="_Toc115417067"></a><a name="_Toc115416131"><span style='mso-bookmark:
! _Toc115417067'><span style='mso-bookmark:_Toc126872196'>3.25. Maximum Size of
! the AFSCache File</span></span></a></h2>
  
  <p class=MsoNormal>The maximum cache size is approximately 1.3GB.<span
  style='mso-spacerun:yes'>  </span>This is the largest contiguous block of
***************
*** 3627,3635 ****
  signature verification code, any attempt to specify a cache size greater then
  700MB will result in the automatic disabling of the signature check.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417068"></a><a
! name="_Toc115416132"><span style='mso-bookmark:_Toc115417068'>3.26. Filename
! Character Sets</span></a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows implements an SMB server which is used
  as a gateway to the AFS filesystem.<span style='mso-spacerun:yes'> 
--- 4477,4486 ----
  signature verification code, any attempt to specify a cache size greater then
  700MB will result in the automatic disabling of the signature check.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872197"></a><a
! name="_Toc115417068"></a><a name="_Toc115416132"><span style='mso-bookmark:
! _Toc115417068'><span style='mso-bookmark:_Toc126872197'>3.26. Filename
! Character Sets</span></span></a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows implements an SMB server which is used
  as a gateway to the AFS filesystem.<span style='mso-spacerun:yes'> 
***************
*** 3818,3851 ****
  <p class=PreformattedText><o:p>&nbsp;</o:p></p>
  
  <p class=MsoNormal>OpenAFS 1.4 provides an optional registry value, <i><a
! href="#_Value___:_StoreAnsiFilenames">StoreAnsiFilenames</a></i>, that can be
! set to instruct OpenAFS to store filenames using the ANSI Code Page instead of
! the OEM Code Page.<span style='mso-spacerun:yes'>  </span>The ANSI Code Page is
! a compatible superset of Latin-1.<span style='mso-spacerun:yes'>  </span>This
! setting is not the default setting because making this change would prevent
! OpenAFS for Windows from being able to access filenames containing the above
! characters which were created without this setting.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417069"></a><a
! name="_Toc115416133"><span style='mso-bookmark:_Toc115417069'>3.27. Known
! Character Set Issues with Roaming Profiles</span></a></h2>
  
  <p class=MsoNormal>There is a known issue with storing Windows Roaming Profiles
! when the profile contains either directories or files with names which cannot be
! represented in the local OEM character set.<span style='mso-spacerun:yes'> 
  </span>In this case, attempts to write the profile back to AFS will fail.<span
  style='mso-spacerun:yes'>  </span>OpenAFS for Windows does not currently
  support UNICODE.<span style='mso-spacerun:yes'>  </span>To avoid this problem
  some sites run logoff scripts (assigned by group policy) which rename all files
  to use only the supported characters for the locale.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417070"></a><a
! name="_Toc115416134"><span style='mso-bookmark:_Toc115417070'>3.28. The
! AFSCache File</span></a></h2>
  
  <p class=MsoNormal>The AFS Cache file is stored by default at %TEMP%\AFSCache
! in a persistent file marked with the Hidden and System attributes.<span
! style='mso-spacerun:yes'>  </span>The persistent nature of the data stored in
  the cache file improves the performance of OpenAFS by reducing the number of
  times data must be read from the AFS file servers.<span
  style='mso-spacerun:yes'>  </span></p>
--- 4669,4703 ----
  <p class=PreformattedText><o:p>&nbsp;</o:p></p>
  
  <p class=MsoNormal>OpenAFS 1.4 provides an optional registry value, <i><a
! href="oafw-1-4-release-notes.doc#_Value___: StoreAnsiFilenames">StoreAnsiFilenames</a></i>,
! that can be set to instruct OpenAFS to store filenames using the ANSI Code Page
! instead of the OEM Code Page.<span style='mso-spacerun:yes'>  </span>The ANSI
! Code Page is a compatible superset of Latin-1.<span style='mso-spacerun:yes'> 
! </span>This setting is not the default setting because making this change would
! prevent OpenAFS for Windows from being able to access filenames containing the
! above characters which were created without this setting.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872198"></a><a
! name="_Toc115417069"></a><a name="_Toc115416133"><span style='mso-bookmark:
! _Toc115417069'><span style='mso-bookmark:_Toc126872198'>3.27. Known Character
! Set Issues with Roaming Profiles</span></span></a></h2>
  
  <p class=MsoNormal>There is a known issue with storing Windows Roaming Profiles
! when the profile contains either directories or files with names which cannot
! be represented in the local OEM character set.<span style='mso-spacerun:yes'> 
  </span>In this case, attempts to write the profile back to AFS will fail.<span
  style='mso-spacerun:yes'>  </span>OpenAFS for Windows does not currently
  support UNICODE.<span style='mso-spacerun:yes'>  </span>To avoid this problem
  some sites run logoff scripts (assigned by group policy) which rename all files
  to use only the supported characters for the locale.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872199"></a><a
! name="_Toc115417070"></a><a name="_Toc115416134"><span style='mso-bookmark:
! _Toc115417070'><span style='mso-bookmark:_Toc126872199'>3.28. The AFSCache File</span></span></a></h2>
  
  <p class=MsoNormal>The AFS Cache file is stored by default at %TEMP%\AFSCache
! in a persistent file marked with the Hidden and System attributes. <span
! style='mso-spacerun:yes'> </span>The persistent nature of the data stored in
  the cache file improves the performance of OpenAFS by reducing the number of
  times data must be read from the AFS file servers.<span
  style='mso-spacerun:yes'>  </span></p>
***************
*** 3858,3866 ****
  style='mso-spacerun:yes'>   </span>Significant performance gains can be
  achieved by defragmenting the AFSCache file with Sysinternal's Contig utility.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417071"></a><a
! name="_Toc115416135"><span style='mso-bookmark:_Toc115417071'>3.29. Restricting
! OpenAFS Client Service Start and Stop</span></a></h2>
  
  <p class=MsoNormal>A new command line tool, afsdacl.exe, can be used to
  restrict the ability to start and stop the OpenAFS Client Service.</p>
--- 4710,4719 ----
  style='mso-spacerun:yes'>   </span>Significant performance gains can be
  achieved by defragmenting the AFSCache file with Sysinternal's Contig utility.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872200"></a><a
! name="_Toc115417071"></a><a name="_Toc115416135"><span style='mso-bookmark:
! _Toc115417071'><span style='mso-bookmark:_Toc126872200'>3.29. Restricting
! OpenAFS Client Service Start and Stop</span></span></a></h2>
  
  <p class=MsoNormal>A new command line tool, afsdacl.exe, can be used to
  restrict the ability to start and stop the OpenAFS Client Service.</p>
***************
*** 3885,3893 ****
  <p class=PreformattedText><span style='mso-spacerun:yes'>         
  </span>-show<span style='mso-spacerun:yes'>  </span>: Show current DACL (SDSF)</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417072"></a><a
! name="_Toc115416136"><span style='mso-bookmark:_Toc115417072'>3.30. The @sys
! Name List</span></a></h2>
  
  <p class=MsoNormal>The default @sys name list in OpenAFS 1.4 is set to
  &quot;x86_win32 i386_w2k i386_nt40&quot; for 32-bit x86 systems.<span
--- 4738,4747 ----
  <p class=PreformattedText><span style='mso-spacerun:yes'>         
  </span>-show<span style='mso-spacerun:yes'>  </span>: Show current DACL (SDSF)</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872201"></a><a
! name="_Toc115417072"></a><a name="_Toc115416136"><span style='mso-bookmark:
! _Toc115417072'><span style='mso-bookmark:_Toc126872201'>3.30. The @sys Name
! List</span></span></a></h2>
  
  <p class=MsoNormal>The default @sys name list in OpenAFS 1.4 is set to
  &quot;x86_win32 i386_w2k i386_nt40&quot; for 32-bit x86 systems.<span
***************
*** 3895,3912 ****
  &quot;ia64_win64&quot; and &quot;amd64_win64&quot; for amd 64-bit processors
  when those platforms are supported.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417073"></a><a
! name="_Toc115416137"><span style='mso-bookmark:_Toc115417073'>3.31. Symlinks to
! AFS UNC paths</span></a></h2>
  
  <p class=MsoNormal>In OpenAFS 1.4, symlinks to AFS UNC paths, \\AFS[\all]\...,
  are treated the same as symlinks to /afs/...<span style='mso-spacerun:yes'> 
! </span>However, please use /afs/... as the Windows UNC form will not work on
! UNIX.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417074"></a><a
! name="_Toc115416138"><span style='mso-bookmark:_Toc115417074'>3.32. Cache
! Manager Debugging Now Supported</span></a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows 1.4 implements the Cache Manager
  Debugging RPC Interface.<span style='mso-spacerun:yes'>  </span>The CM debugger
--- 4749,4767 ----
  &quot;ia64_win64&quot; and &quot;amd64_win64&quot; for amd 64-bit processors
  when those platforms are supported.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872202"></a><a
! name="_Toc115417073"></a><a name="_Toc115416137"><span style='mso-bookmark:
! _Toc115417073'><span style='mso-bookmark:_Toc126872202'>3.31. Symlinks to AFS
! UNC paths</span></span></a></h2>
  
  <p class=MsoNormal>In OpenAFS 1.4, symlinks to AFS UNC paths, \\AFS[\all]\...,
  are treated the same as symlinks to /afs/...<span style='mso-spacerun:yes'> 
! </span>However, please use /afs/... as the Windows UNC form will not work on UNIX.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872203"></a><a
! name="_Toc115417074"></a><a name="_Toc115416138"><span style='mso-bookmark:
! _Toc115417074'><span style='mso-bookmark:_Toc126872203'>3.32. Cache Manager
! Debugging Now Supported</span></span></a></h2>
  
  <p class=MsoNormal>OpenAFS for Windows 1.4 implements the Cache Manager
  Debugging RPC Interface.<span style='mso-spacerun:yes'>  </span>The CM debugger
***************
*** 3928,3961 ****
  </span>-cache<span style='mso-spacerun:yes'>  </span>print only cache
  configuration</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417075"></a><a
! name="_Toc115416139"><span style='mso-bookmark:_Toc115417075'>3.33. Windows
! Logon Caching vs. Kerberos Logons</span></a></h2>
  
  <p class=MsoNormal>If you are a site which utilizes MIT/Heimdal Kerberos
  principals to logon to Windows via a cross-realm relationship with a
  multi-domain Windows forest, you must enable Windows logon caching unless the
  workstation is Windows Vista Beta 1 or later.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417076"></a><a
! name="_Toc115416140"><span style='mso-bookmark:_Toc115417076'>3.34. Initial
! Server Preferences</span></a></h2>
  
  <p class=MsoNormal>VLDB and File Server Preferences can now be provided initial
  values using registry keys.<span style='mso-spacerun:yes'>  </span>This is
  useful for managed machines in a Windows domain which are centrally located
  (e.g., in a computing lab.)<span style='mso-spacerun:yes'>  </span>See <a
! href="#_Appendix_A:_Registry_Values">Appendix A</a> for details on the &quot;<a
! href="#_Regkey:_[HKLMSOFTWAREOpenAFSClie_2">Server Preferences</a>&quot; keys.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417077"></a><a
! name="_Toc115416141"><span style='mso-bookmark:_Toc115417077'>3.35. File
! Timestamps</span></a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 reports timestamps on files stored in AFS in UTC
  all year round.<span style='mso-spacerun:yes'>  </span>In locales with daylight
  savings time, previous versions of AFS for Windows reported the time when DST
! is active as UTC+1. <span style='mso-spacerun:yes'> </span>This was done to
  preserve the relative local time for the user.<span style='mso-spacerun:yes'> 
  </span>A file stored at 11:00am EST in January would be reported as having been
  stored at 11:00am EDT in June.<span style='mso-spacerun:yes'> 
--- 4783,4820 ----
  </span>-cache<span style='mso-spacerun:yes'>  </span>print only cache
  configuration</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872204"></a><a
! name="_Toc115417075"></a><a name="_Toc115416139"><span style='mso-bookmark:
! _Toc115417075'><span style='mso-bookmark:_Toc126872204'>3.33. Windows Logon
! Caching vs. Kerberos Logons</span></span></a></h2>
  
  <p class=MsoNormal>If you are a site which utilizes MIT/Heimdal Kerberos
  principals to logon to Windows via a cross-realm relationship with a
  multi-domain Windows forest, you must enable Windows logon caching unless the
  workstation is Windows Vista Beta 1 or later.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872205"></a><a
! name="_Toc115417076"></a><a name="_Toc115416140"><span style='mso-bookmark:
! _Toc115417076'><span style='mso-bookmark:_Toc126872205'>3.34. Initial Server
! Preferences</span></span></a></h2>
  
  <p class=MsoNormal>VLDB and File Server Preferences can now be provided initial
  values using registry keys.<span style='mso-spacerun:yes'>  </span>This is
  useful for managed machines in a Windows domain which are centrally located
  (e.g., in a computing lab.)<span style='mso-spacerun:yes'>  </span>See <a
! href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix A</a>
! for details on the &quot;<a
! href="oafw-1-4-release-notes.doc#_Regkey:_[HKLMSOFTWAREOpenAFSClie_2">Server
! Preferences</a>&quot; keys.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872206"></a><a
! name="_Toc115417077"></a><a name="_Toc115416141"><span style='mso-bookmark:
! _Toc115417077'><span style='mso-bookmark:_Toc126872206'>3.35. File Timestamps</span></span></a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 reports timestamps on files stored in AFS in UTC
  all year round.<span style='mso-spacerun:yes'>  </span>In locales with daylight
  savings time, previous versions of AFS for Windows reported the time when DST
! is active as UTC+1.<span style='mso-spacerun:yes'>  </span>This was done to
  preserve the relative local time for the user.<span style='mso-spacerun:yes'> 
  </span>A file stored at 11:00am EST in January would be reported as having been
  stored at 11:00am EDT in June.<span style='mso-spacerun:yes'> 
***************
*** 3974,3982 ****
  </span>During DST, these two times will no longer agree even though they are in
  fact representing the same moment in time.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417078"></a><a
! name="_Toc115416142"><span style='mso-bookmark:_Toc115417078'>3.36. Windows RPC
! client support must be installed</span></a> </h2>
  
  <p class=MsoNormal>If the installer refuses to install and complains about an
  RPC configuration error, check to ensure that the following registry entries
--- 4833,4842 ----
  </span>During DST, these two times will no longer agree even though they are in
  fact representing the same moment in time.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872207"></a><a
! name="_Toc115417078"></a><a name="_Toc115416142"><span style='mso-bookmark:
! _Toc115417078'><span style='mso-bookmark:_Toc126872207'>3.36. Windows RPC
! client support must be installed</span></span></a> </h2>
  
  <p class=MsoNormal>If the installer refuses to install and complains about an
  RPC configuration error, check to ensure that the following registry entries
***************
*** 3994,4002 ****
  <p class=PreformattedText><span style='mso-spacerun:yes'>   </span>HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncacn_http&quot;</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417079"></a><a
! name="_Toc115416143"><span style='mso-bookmark:_Toc115417079'>3.37. Generating
! Minidumps of the OpenAFS Client Service</span></a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 adds a new command, &quot;fs
  minidump&quot;.<span style='mso-spacerun:yes'>  </span>This command can be used
--- 4854,4863 ----
  <p class=PreformattedText><span style='mso-spacerun:yes'>   </span>HKLM
  &quot;SOFTWARE\Microsoft\RPC\ClientProtocols&quot; &quot;ncacn_http&quot;</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872208"></a><a
! name="_Toc115417079"></a><a name="_Toc115416143"><span style='mso-bookmark:
! _Toc115417079'><span style='mso-bookmark:_Toc126872208'>3.37. Generating
! Minidumps of the OpenAFS Client Service</span></span></a></h2>
  
  <p class=MsoNormal>OpenAFS 1.4 adds a new command, &quot;fs
  minidump&quot;.<span style='mso-spacerun:yes'>  </span>This command can be used
***************
*** 4005,4013 ****
  can be very helpful when debugging the AFS Client Service when it is
  unresponsive to SMB/CIFS requests.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417080"></a><a
! name="_Toc115416144"><span style='mso-bookmark:_Toc115417080'>3.38. AFS Client
! Universally Unique Identifiers</span></a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows 1.4 client implements Universally
  Unique Identifiers (UUIDs).<span style='mso-spacerun:yes'>  </span>They are
--- 4866,4875 ----
  can be very helpful when debugging the AFS Client Service when it is
  unresponsive to SMB/CIFS requests.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872209"></a><a
! name="_Toc115417080"></a><a name="_Toc115416144"><span style='mso-bookmark:
! _Toc115417080'><span style='mso-bookmark:_Toc126872209'>3.38. AFS Client
! Universally Unique Identifiers</span></span></a></h2>
  
  <p class=MsoNormal>The OpenAFS for Windows 1.4 client implements Universally
  Unique Identifiers (UUIDs).<span style='mso-spacerun:yes'>  </span>They are
***************
*** 4020,4049 ****
  client installed, the AFSCache files must be deleted as part of the cloning
  process.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417112"></a><a
! name="_Toc115417081"></a><a name="_Toc115416145"><span style='mso-bookmark:
! _Toc115417081'><span style='mso-bookmark:_Toc115417112'>4. How to Debug Problems
! with OpenAFS for Windows:</span></span></a></h1>
  
  <p class=MsoNormal>OpenAFS for Windows provides a wide range of tools to assist
  you in debugging problems.<span style='mso-spacerun:yes'>  </span>The
  techniques available to you are varied because of the wide range of issues that
  have been discovered over the years.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417082"></a><a
! name="_Toc115416146"><span style='mso-bookmark:_Toc115417082'>4.1. pioctl debugging
! (</span></a><a href="#_Value___:_IoctlDebug"><span style='mso-bookmark:_Toc115416146'><span
! style='mso-bookmark:_Toc115417082'>IoctlDebug</span></span><span
! style='mso-bookmark:_Toc115416146'><span style='mso-bookmark:_Toc115417082'></span></span></a><span
! style='mso-bookmark:_Toc115416146'><span style='mso-bookmark:_Toc115417082'>
! registry key)</span></span></h2>
  
  <p class=MsoNormal>pioctl (path-based ioctl) calls are used by various tools to
  communicate with the AFS Client Service.<span style='mso-spacerun:yes'> 
  </span>Some of the operations performed include:</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l7 level1 lfo18;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
--- 4882,4914 ----
  client installed, the AFSCache files must be deleted as part of the cloning
  process.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872210"></a><a
! name="_Toc115417112"></a><a name="_Toc115417081"></a><a name="_Toc115416145"><span
! style='mso-bookmark:_Toc115417081'><span style='mso-bookmark:_Toc115417112'><span
! style='mso-bookmark:_Toc126872210'>4. How to Debug Problems with OpenAFS for
! Windows:</span></span></span></a></h1>
  
  <p class=MsoNormal>OpenAFS for Windows provides a wide range of tools to assist
  you in debugging problems.<span style='mso-spacerun:yes'>  </span>The
  techniques available to you are varied because of the wide range of issues that
  have been discovered over the years.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872211"></a><a
! name="_Toc115417082"></a><a name="_Toc115416146"><span style='mso-bookmark:
! _Toc115417082'><span style='mso-bookmark:_Toc126872211'>4.1. pioctl debugging (</span></span></a><a
! href="oafw-1-4-release-notes.doc#_Value___: IoctlDebug"><span style='mso-bookmark:
! _Toc115416146'><span style='mso-bookmark:_Toc115417082'><span style='mso-bookmark:
! _Toc126872211'>IoctlDebug</span></span></span><span style='mso-bookmark:_Toc115416146'><span
! style='mso-bookmark:_Toc115417082'><span style='mso-bookmark:_Toc126872211'></span></span></span></a><span
! style='mso-bookmark:_Toc115416146'><span style='mso-bookmark:_Toc115417082'><span
! style='mso-bookmark:_Toc126872211'> registry key)</span></span></span></h2>
  
  <p class=MsoNormal>pioctl (path-based ioctl) calls are used by various tools to
  communicate with the AFS Client Service.<span style='mso-spacerun:yes'> 
  </span>Some of the operations performed include:</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l17 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
***************
*** 4051,4099 ****
  afscreds.exe)</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l7 level1 lfo18;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
  ACLs </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l7 level1 lfo18;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
  cache parameters</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l7 level1 lfo18;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>flushing
  files or volumes</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l7 level1 lfo18;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
  server preferences</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l7 level1 lfo18;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>querying
  path location</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l7 level1 lfo18;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>checking
  the status of servers and volumes</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l7 level1 lfo18;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
--- 4916,4964 ----
  afscreds.exe)</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l17 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
  ACLs </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l17 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
  cache parameters</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l17 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>flushing
  files or volumes</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l17 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
  server preferences</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l17 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>querying
  path location</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l17 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>checking
  the status of servers and volumes</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l17 level1 lfo8;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>setting/querying
***************
*** 4124,4132 ****
  KnowledgeBase can be used as a reference to help you determine the
  configuration probem with your system.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417083"></a><a
! name="_Toc115416147"><span style='mso-bookmark:_Toc115417083'>4.2. afsd_service
! initialization log (%WinDir%\TEMP\afsd_init.log)</span></a></h2>
  
  <p class=MsoNormal>Every time the AFS Client Service starts it appends data
  about its progress and configuration to a file.<span style='mso-spacerun:yes'> 
--- 4989,4998 ----
  KnowledgeBase can be used as a reference to help you determine the
  configuration probem with your system.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872212"></a><a
! name="_Toc115417083"></a><a name="_Toc115416147"><span style='mso-bookmark:
! _Toc115417083'><span style='mso-bookmark:_Toc126872212'>4.2. afsd_service
! initialization log (%WinDir%\TEMP\afsd_init.log)</span></span></a></h2>
  
  <p class=MsoNormal>Every time the AFS Client Service starts it appends data
  about its progress and configuration to a file.<span style='mso-spacerun:yes'> 
***************
*** 4141,4156 ****
  code will quickly reveal the reason for the termination.</p>
  
  <p class=MsoNormal>The <i style='mso-bidi-font-style:normal'><a
! href="#_Value___:_MaxLogSize">MaxLogSize</a></i> registry value determines the
! maximum size of the %WINDIR%\TEMP\afsd_init.log file.<span
! style='mso-spacerun:yes'>  </span>If the file is larger than this value when
! OpenAFS Client Service starts, the file will be reset to 0 bytes.<span
! style='mso-spacerun:yes'>  </span>If value is set to 0, the file will be allowed
! to grow indefinitely.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417084"></a><a
! name="_Toc115416148"><span style='mso-bookmark:_Toc115417084'>4.3. afsd_service
! debug logs (fs trace {-on, -off, -dump} -&gt;%WinDir%\TEMP\afsd.log)</span></a></h2>
  
  <p class=MsoNormal>When attempting to debug the behavior of the SMB/CIFS Server
  and the Cache Manager it is often useful to examine a log of the operations
--- 5007,5023 ----
  code will quickly reveal the reason for the termination.</p>
  
  <p class=MsoNormal>The <i style='mso-bidi-font-style:normal'><a
! href="oafw-1-4-release-notes.doc#_Value___: MaxLogSize">MaxLogSize</a></i>
! registry value determines the maximum size of the %WINDIR%\TEMP\afsd_init.log
! file.<span style='mso-spacerun:yes'>  </span>If the file is larger than this
! value when OpenAFS Client Service starts, the file will be reset to 0 bytes.<span
! style='mso-spacerun:yes'>  </span>If value is set to 0, the file will be
! allowed to grow indefinitely.</p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872213"></a><a
! name="_Toc115417084"></a><a name="_Toc115416148"><span style='mso-bookmark:
! _Toc115417084'><span style='mso-bookmark:_Toc126872213'>4.3. afsd_service debug
! logs (fs trace {-on, -off, -dump} -&gt;%WinDir%\TEMP\afsd.log)</span></span></a></h2>
  
  <p class=MsoNormal>When attempting to debug the behavior of the SMB/CIFS Server
  and the Cache Manager it is often useful to examine a log of the operations
***************
*** 4158,4167 ****
  Client Service keeps an in memory log of many of its actions.<span
  style='mso-spacerun:yes'>   </span>The default number of actions preserved at
  any one time is 5000.<span style='mso-spacerun:yes'>  </span>This can be
! adjusted with the <a href="#_Value_:_TraceBufferSize">registry value</a>:</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'> </span><span
! style='mso-spacerun:yes'> </span>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'> 
  </span>REG_DWORD<span style='mso-spacerun:yes'>  </span>TraceBufferSize </p>
--- 5025,5035 ----
  Client Service keeps an in memory log of many of its actions.<span
  style='mso-spacerun:yes'>   </span>The default number of actions preserved at
  any one time is 5000.<span style='mso-spacerun:yes'>  </span>This can be
! adjusted with the <a href="oafw-1-4-release-notes.doc#_Value_:_TraceBufferSize">registry
! value</a>:</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'> 
! </span>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'> 
  </span>REG_DWORD<span style='mso-spacerun:yes'>  </span>TraceBufferSize </p>
***************
*** 4171,4189 ****
  to clear to the log and &quot;fs trace -dump&quot; to output the contents of
  the log to the file.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417085"></a><a
! name="_Toc115416149"><span style='mso-bookmark:_Toc115417085'>4.4. Using
! SysInternal’s DbgView and FileMon Tools</span></a></h2>
! 
! <p class=MsoNormal>An alternatve option to the use of &quot;fs trace
! -dump&quot; to capture internal OpenAFS Client Service events is to use a tool
! such as Sysinternal's DbgView to capture real-time debugging output.<span
! style='mso-spacerun:yes'>  </span>When the OpenAFS Client Service starts and
! Bit 2 of the <a href="#_Value__:_TraceOption">TraceOption</a> value in the
! registry is set, all trace log events are output using the Windows Debug
! Monitor interface (OutputDebugString).<span style='mso-spacerun:yes'>  </span></p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>  </span>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
  <p class=PreformattedText style='text-indent:12.0pt'>REG_DWORD<span
  style='mso-spacerun:yes'>   </span>TraceOption = 0x04</p>
--- 5039,5060 ----
  to clear to the log and &quot;fs trace -dump&quot; to output the contents of
  the log to the file.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872214"></a><a
! name="_Toc115417085"></a><a name="_Toc115416149"><span style='mso-bookmark:
! _Toc115417085'><span style='mso-bookmark:_Toc126872214'>4.4. Using
! SysInternal’s DbgView and FileMon Tools</span></span></a></h2>
! 
! <p class=MsoNormal>An alternatve option to the use of &quot;fs trace -dump&quot;
! to capture internal OpenAFS Client Service events is to use a tool such as
! Sysinternal's DbgView to capture real-time debugging output.<span
! style='mso-spacerun:yes'>  </span>When the OpenAFS Client Service starts and Bit
! 2 of the <a href="oafw-1-4-release-notes.doc#_Value__:_TraceOption">TraceOption</a>
! value in the registry is set, all trace log events are output using the Windows
! Debug Monitor interface (OutputDebugString).<span style='mso-spacerun:yes'> 
! </span></p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'> 
! </span>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
  
  <p class=PreformattedText style='text-indent:12.0pt'>REG_DWORD<span
  style='mso-spacerun:yes'>   </span>TraceOption = 0x04</p>
***************
*** 4203,4212 ****
  style='mso-spacerun:yes'>   </span>The captured data can be stored to files for
  inclusion in bug reports.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417086"></a><a
! name="_Toc115416150"><span style='mso-bookmark:_Toc115417086'>4.5. Microsoft
  MiniDumps <br>
! (fs minidump -&gt; %WinDir%\TEMP\afsd.dmp)</span></a></h2>
  
  <p class=MsoNormal>If the AFS Client Service become unresponsive to any form of
  communication there may be a serious error that can only be debugged by someone
--- 5074,5084 ----
  style='mso-spacerun:yes'>   </span>The captured data can be stored to files for
  inclusion in bug reports.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872215"></a><a
! name="_Toc115417086"></a><a name="_Toc115416150"><span style='mso-bookmark:
! _Toc115417086'><span style='mso-bookmark:_Toc126872215'>4.5. Microsoft
  MiniDumps <br>
! (fs minidump -&gt; %WinDir%\TEMP\afsd.dmp)</span></span></a></h2>
  
  <p class=MsoNormal>If the AFS Client Service become unresponsive to any form of
  communication there may be a serious error that can only be debugged by someone
***************
*** 4215,4228 ****
  of a MiniDump file containing the state of all of the threads in the AFS Client
  Service process.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417087"></a><a
! name="_Toc115416151"><span style='mso-bookmark:_Toc115417087'>4.6. Single
! Sign-on (Integrated Logon) debugging</span></a></h2>
  
  <p class=MsoNormal>If you are having trouble with the Integrated Logon
  operations it is often useful to be able to obtain a log of what it is
  attempting to do.<span style='mso-spacerun:yes'>   </span>Setting Bit 0 of the <a
! href="#_Value__:_TraceOption">TraceOption</a> registry value:</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'> 
  </span>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
--- 5087,5102 ----
  of a MiniDump file containing the state of all of the threads in the AFS Client
  Service process.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872216"></a><a
! name="_Toc115417087"></a><a name="_Toc115416151"><span style='mso-bookmark:
! _Toc115417087'><span style='mso-bookmark:_Toc126872216'>4.6. Single Sign-on (Integrated
! Logon) debugging</span></span></a></h2>
  
  <p class=MsoNormal>If you are having trouble with the Integrated Logon
  operations it is often useful to be able to obtain a log of what it is
  attempting to do.<span style='mso-spacerun:yes'>   </span>Setting Bit 0 of the <a
! href="oafw-1-4-release-notes.doc#_Value__:_TraceOption">TraceOption</a> registry
! value:</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'> 
  </span>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
***************
*** 4234,4242 ****
  Event Handlers to log information to the Windows Event Log: Application under
  the name “AFS Logon&quot;.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417088"></a><a
! name="_Toc115416152"><span style='mso-bookmark:_Toc115417088'>4.7. RX (AFS RPC)
! debugging (rxdebug)</span></a></h2>
  
  <p class=MsoNormal>The rxdebug.exe tool can be used to query a variety of
  information about the AFS services installed on a given machine.<span
--- 5108,5117 ----
  Event Handlers to log information to the Windows Event Log: Application under
  the name “AFS Logon&quot;.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872217"></a><a
! name="_Toc115417088"></a><a name="_Toc115416152"><span style='mso-bookmark:
! _Toc115417088'><span style='mso-bookmark:_Toc126872217'>4.7. RX (AFS RPC)
! debugging (rxdebug)</span></span></a></h2>
  
  <p class=MsoNormal>The rxdebug.exe tool can be used to query a variety of
  information about the AFS services installed on a given machine.<span
***************
*** 4293,4301 ****
  <p class=PreformattedText><span style='mso-spacerun:yes'>      
  </span>-peers<span style='mso-spacerun:yes'>           </span>show peers</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417089"></a><a
! name="_Toc115416153"><span style='mso-bookmark:_Toc115417089'>4.8. Cache
! Manager debugging (cmdebug)</span></a></h2>
  
  <p class=MsoNormal>The cmdebug.exe tool can be used to query the state of the
  AFS Cache Manager on a given machine.</p>
--- 5168,5177 ----
  <p class=PreformattedText><span style='mso-spacerun:yes'>      
  </span>-peers<span style='mso-spacerun:yes'>           </span>show peers</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872218"></a><a
! name="_Toc115417089"></a><a name="_Toc115416153"><span style='mso-bookmark:
! _Toc115417089'><span style='mso-bookmark:_Toc126872218'>4.8. Cache Manager
! debugging (cmdebug)</span></span></a></h2>
  
  <p class=MsoNormal>The cmdebug.exe tool can be used to query the state of the
  AFS Cache Manager on a given machine.</p>
***************
*** 4310,4318 ****
  <p class=PreformattedText>Where: -long<span style='mso-spacerun:yes'>      
  </span>print all info</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>  </span><span
! style='mso-spacerun:yes'>     </span>-refcounts<span style='mso-spacerun:yes'> 
! </span>print only cache entries with positive reference counts</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>      
  </span>-callbacks<span style='mso-spacerun:yes'>  </span>print only cache
--- 5186,5194 ----
  <p class=PreformattedText>Where: -long<span style='mso-spacerun:yes'>      
  </span>print all info</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>      
! </span>-refcounts<span style='mso-spacerun:yes'>  </span>print only cache entries
! with positive reference counts</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>      
  </span>-callbacks<span style='mso-spacerun:yes'>  </span>print only cache
***************
*** 4326,4346 ****
  </span>-cache<span style='mso-spacerun:yes'>      </span>print only cache
  configuration</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417090"></a><a
! name="_Toc115416154"><span style='mso-bookmark:_Toc115417090'>4.9. Persistent
! Cache consistency check</span></a></h2>
  
  <p class=MsoNormal>The persistent cache is stored in a Hidden System file at
  %WinDir%\TEMP\AFSCache.<span style='mso-spacerun:yes'>  </span>If there is a
  problem with the persistent cache that prevent the AFS Client Service from
  being able to start a validation check on the file can be performed.</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>  </span>afsd_service.exe
! --validate-cache &lt;cache-path&gt;</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417113"></a><a
! name="_Toc115417091"></a><a name="_Toc115416155"><span style='mso-bookmark:
! _Toc115417091'><span style='mso-bookmark:_Toc115417113'>5. Reporting Bugs:</span></span></a></h1>
  
  <p class=MsoNormal>Bug reports should be sent to <a
  href="mailto:openafs-bugs@openafs.org?subject=Bug%20Report">openafs-bugs@openafs.org</a>.<span
--- 5202,5224 ----
  </span>-cache<span style='mso-spacerun:yes'>      </span>print only cache
  configuration</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872219"></a><a
! name="_Toc115417090"></a><a name="_Toc115416154"><span style='mso-bookmark:
! _Toc115417090'><span style='mso-bookmark:_Toc126872219'>4.9. Persistent Cache
! consistency check</span></span></a></h2>
  
  <p class=MsoNormal>The persistent cache is stored in a Hidden System file at
  %WinDir%\TEMP\AFSCache.<span style='mso-spacerun:yes'>  </span>If there is a
  problem with the persistent cache that prevent the AFS Client Service from
  being able to start a validation check on the file can be performed.</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'> 
! </span>afsd_service.exe --validate-cache &lt;cache-path&gt;</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872220"></a><a
! name="_Toc115417113"></a><a name="_Toc115417091"></a><a name="_Toc115416155"><span
! style='mso-bookmark:_Toc115417091'><span style='mso-bookmark:_Toc115417113'><span
! style='mso-bookmark:_Toc126872220'>5. Reporting Bugs:</span></span></span></a></h1>
  
  <p class=MsoNormal>Bug reports should be sent to <a
  href="mailto:openafs-bugs@openafs.org?subject=Bug%20Report">openafs-bugs@openafs.org</a>.<span
***************
*** 4358,4364 ****
  <p class=MsoNormal>Configuring DrWatson to generate dump files for crashes:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l8 level1 lfo20;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Run
--- 5236,5242 ----
  <p class=MsoNormal>Configuring DrWatson to generate dump files for crashes:</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l18 level1 lfo9;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Run
***************
*** 4366,4442 ****
  are created: </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l9 level1 lfo22;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>click
  Start &gt; Run...<span style='mso-spacerun:yes'>  </span></p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l9 level1 lfo22;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>type
  drwtsn32 &lt;enter&gt;. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l9 level1 lfo22;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Select
  either a Crash Dump Type: Mini or Full. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l9 level1 lfo22;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Clear
  Dump Symbol Table</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l9 level1 lfo22;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Clear
  Append to Existing Log file. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l9 level1 lfo22;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Check
  Dump All Thread Contexts.</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l9 level1 lfo22;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Check
  Create Crash Dump File</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l9 level1 lfo22;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Next
  run the monitoring module of Dr. Watson: </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l10 level1 lfo24;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>click
  Start &gt; Run...</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l10 level1 lfo24;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>type
  drwatson &lt;enter&gt;. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l10 level1 lfo24;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Once
--- 5244,5320 ----
  are created: </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l19 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>click
  Start &gt; Run...<span style='mso-spacerun:yes'>  </span></p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l19 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>type
  drwtsn32 &lt;enter&gt;. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l19 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Select
  either a Crash Dump Type: Mini or Full. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l19 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Clear
  Dump Symbol Table</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l19 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Clear
  Append to Existing Log file. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l19 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Check
  Dump All Thread Contexts.</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l19 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Check
  Create Crash Dump File</p>
  
  <p class=MsoNormal style='margin-left:14.15pt;text-indent:-14.15pt;mso-list:
! l19 level1 lfo10;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Next
  run the monitoring module of Dr. Watson: </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l20 level1 lfo11;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>click
  Start &gt; Run...</p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l20 level1 lfo11;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>type
  drwatson &lt;enter&gt;. </p>
  
  <p class=MsoNormal style='margin-left:49.6pt;text-indent:-14.15pt;mso-list:
! l20 level1 lfo11;tab-stops:list 14.15pt'><![if !supportLists]><span
  style='font-size:9.0pt;font-family:Symbol;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; </span></span></span><![endif]>Once
***************
*** 4449,4477 ****
  <p class=MsoNormal>When reporting a error, please be sure to include the
  version of OpenAFS.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417114"></a><a
! name="_Toc115417092"></a><a name="_Toc115416156"><span style='mso-bookmark:
! _Toc115417092'><span style='mso-bookmark:_Toc115417114'>6. How to Contribute to
! the Development of OpenAFS for Windows</span></span></a></h1>
  
  <p class=MsoNormal>Contributions to the development of OpenAFS for Windows are
  continuously needed.<span style='mso-spacerun:yes'>  </span>Contributions may
  take many forms including cash donations, support contracts, donated developer
  time, and even donated tech writer time.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417093"></a><a
! name="_Toc115416157"><span style='mso-bookmark:_Toc115417093'>6.1. The USENIX
! OpenAFS Fund</span></a> </h2>
  
  <p class=MsoBodyText><a href="http://www.usenix.org/">USENIX</a>, a 501c3
  non-profit corporation, has formed the USENIX OpenAFS Fund in order to accept
  tax deductible donations on behalf of the OpenAFS Elders. The donated funds
! will be allocated by the OpenAFS Elders to fund OpenAFS development, documentation,
! project management, and maintaining openafs.org. </p>
  
  <div style='mso-element:frame;mso-element-frame-height:66.05pt;mso-element-wrap:
! no-wrap-beside;mso-element-anchor-vertical:page;mso-element-anchor-horizontal:
! column;mso-element-left:.05pt;mso-element-top:372.8pt;mso-height-rule:exactly'>
  
  <table cellspacing=0 cellpadding=0 hspace=0 vspace=0 width=540 height=88>
   <tr>
--- 5327,5357 ----
  <p class=MsoNormal>When reporting a error, please be sure to include the
  version of OpenAFS.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872221"></a><a
! name="_Toc115417114"></a><a name="_Toc115417092"></a><a name="_Toc115416156"><span
! style='mso-bookmark:_Toc115417092'><span style='mso-bookmark:_Toc115417114'><span
! style='mso-bookmark:_Toc126872221'>6. How to Contribute to the Development of
! OpenAFS for Windows</span></span></span></a></h1>
  
  <p class=MsoNormal>Contributions to the development of OpenAFS for Windows are
  continuously needed.<span style='mso-spacerun:yes'>  </span>Contributions may
  take many forms including cash donations, support contracts, donated developer
  time, and even donated tech writer time.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872222"></a><a
! name="_Toc115417093"></a><a name="_Toc115416157"><span style='mso-bookmark:
! _Toc115417093'><span style='mso-bookmark:_Toc126872222'>6.1. The USENIX OpenAFS
! Fund</span></span></a> </h2>
  
  <p class=MsoBodyText><a href="http://www.usenix.org/">USENIX</a>, a 501c3
  non-profit corporation, has formed the USENIX OpenAFS Fund in order to accept
  tax deductible donations on behalf of the OpenAFS Elders. The donated funds
! will be allocated by the OpenAFS Elders to fund OpenAFS development,
! documentation, project management, and maintaining openafs.org. </p>
  
  <div style='mso-element:frame;mso-element-frame-height:66.05pt;mso-element-wrap:
! no-wrap-beside;mso-element-anchor-vertical:page;mso-element-left:.05pt;
! mso-element-top:372.8pt'>
  
  <table cellspacing=0 cellpadding=0 hspace=0 vspace=0 width=540 height=88>
   <tr>
***************
*** 4479,4486 ****
    9.0pt;padding-bottom:0pt;padding-left:9.0pt'>
    <p class=MsoEnvelopeAddress style='mso-element:frame;mso-element-frame-height:
    66.05pt;mso-element-wrap:no-wrap-beside;mso-element-anchor-vertical:page;
!   mso-element-anchor-horizontal:column;mso-element-left:.05pt;mso-element-top:
!   372.8pt;mso-height-rule:exactly'>USENIX OpenAFS Fund<br>
    USENIX Association <br>
  <st2:address w:st="on"><st2:Street w:st="on">2560 Ninth St., Suite 215</st2:Street>
     <br>
--- 5359,5365 ----
    9.0pt;padding-bottom:0pt;padding-left:9.0pt'>
    <p class=MsoEnvelopeAddress style='mso-element:frame;mso-element-frame-height:
    66.05pt;mso-element-wrap:no-wrap-beside;mso-element-anchor-vertical:page;
!   mso-element-left:.05pt;mso-element-top:372.8pt'>USENIX OpenAFS Fund<br>
    USENIX Association <br>
  <st2:address w:st="on"><st2:Street w:st="on">2560 Ninth St., Suite 215</st2:Street>
     <br>
***************
*** 4499,4552 ****
  bank, made out to the USENIX OpenAFS Fund or by making a <a
  href="https://db.usenix.org/cgi-bin/openafs/openafs.cgi">donation online</a>.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417094">6.2. Secure
! Endpoints Inc.</a> </h2>
! 
! <p class=MsoBodyText><a href="http://www.secure-endpoints.com/">Secure
! Endpoints Inc.</a> provides development and support services for OpenAFS for
! Windows and MIT Kerberos for Windows.<span style='mso-spacerun:yes'> 
! </span>Donations provided to Secure Endpoints Inc. for the development of
! OpenAFS are used to cover the OpenAFS gatekeeper responsibilities; providing
! support to the OpenAFS community via the OpenAFS mailing lists; and furthering
! development of desired features that are either too small to be financed by
! development contracts.</p>
! 
! <p class=MsoBodyText>Secure Endpoints Inc. accepts software development
! agreements from organizations who wish to fund a well-defined set of bug fixes
! or new features. </p>
! 
! <p class=MsoBodyText>Secure Endpoints Inc. provides contract based support for
! the OpenAFS for Windows and the MIT Kerberos for Windows products. </p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417095">6.3. The
! MIT Kerberos Account</a> </h2>
  
  <p class=MsoNormal style='margin:0pt;margin-bottom:.0001pt;mso-pagination:widow-orphan;
  mso-hyphenate:auto;mso-layout-grid-align:none;text-autospace:none'><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! color:black'>Th</span><span class=BodyTextChar>e <a
! href="http://web.mit.edu/kerberos/">MIT Kerberos</a> development team accepts
! unrestricted grants.<span style='mso-spacerun:yes'>  </span>Grants are tax
! deductible and the full amount of the grant will be used to fund the
! development of Kerberos 5 and/or Kerberos for Windows.<span
! style='mso-spacerun:yes'>  </span>OpenAFS for Windows is dependent on MIT
! Kerberos for Windows for authentication and shares many of the same re</span><span
! style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! color:black'>quirements for credential management.<span
! style='mso-spacerun:yes'>  </span>Future releases of both products will share a
! common identity management user interface. <o:p></o:p></span></p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417096">6.4. Direct
! contributions of code and/or documentation</a> </h2>
! 
! <p class=MsoBodyText>Organizations that use OpenAFS in house and have
! development staffs are encouraged to contribute any code modifications they
! make to OpenAFS.org via <u><span style='color:blue'>openafs-bugs@openafs.org</span></u>.<span
! style='mso-spacerun:yes'>  </span>Contributions of documentation are highly
! desired. </p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417097">6.5.
! OpenAFS for Windows Mailing Lists</a></h2>
  
  <p class=MsoNormal>If you wish to participate in OpenAFS for Windows
  development please join the <i><a
--- 5378,5439 ----
  bank, made out to the USENIX OpenAFS Fund or by making a <a
  href="https://db.usenix.org/cgi-bin/openafs/openafs.cgi">donation online</a>.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872223"></a><a
! name="_Toc115417094"><span style='mso-bookmark:_Toc126872223'><span
! style='mso-fareast-language:JA'>6.2. Secure Endpoints Inc.</span></span></a><span
! style='mso-fareast-language:JA'> <o:p></o:p></span></h2>
! 
! <p class=MsoBodyText><span style='mso-fareast-language:JA'><a
! href="http://www.secure-endpoints.com/">Secure Endpoints Inc.</a> provides
! development and support services for OpenAFS for Windows and MIT Kerberos for
! Windows. <span style='mso-spacerun:yes'> </span>Donations provided to Secure
! Endpoints Inc. for the development of OpenAFS are used to cover the OpenAFS
! gatekeeper responsibilities; providing support to the OpenAFS community via the
! OpenAFS mailing lists; and furthering development of desired features that are
! either too small to be financed by development contracts.<o:p></o:p></span></p>
! 
! <p class=MsoBodyText><span style='mso-fareast-language:JA'>Secure Endpoints
! Inc. accepts software development agreements from organizations who wish to
! fund a well-defined set of bug fixes or new features. <o:p></o:p></span></p>
! 
! <p class=MsoBodyText><span style='mso-fareast-language:JA'>Secure Endpoints
! Inc. provides contract based support for the OpenAFS for Windows and the MIT
! Kerberos for Windows products. <o:p></o:p></span></p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872224"></a><a
! name="_Toc115417095"><span style='mso-bookmark:_Toc126872224'><span
! style='mso-fareast-language:JA'>6.3. The MIT Kerberos Account</span></span></a><span
! style='mso-fareast-language:JA'> <o:p></o:p></span></h2>
  
  <p class=MsoNormal style='margin:0pt;margin-bottom:.0001pt;mso-pagination:widow-orphan;
  mso-hyphenate:auto;mso-layout-grid-align:none;text-autospace:none'><span
  style='font-family:"Times New Roman";mso-fareast-font-family:"MS Mincho";
! color:black;mso-fareast-language:JA'>Th</span><span class=BodyTextChar><span
! style='mso-fareast-language:JA'>e <a href="http://web.mit.edu/kerberos/">MIT
! Kerberos</a> development team accepts unrestricted grants. <span
! style='mso-spacerun:yes'> </span>Grants are tax deductible and the full amount
! of the grant will be used to fund the development of Kerberos 5 and/or Kerberos
! for Windows. <span style='mso-spacerun:yes'> </span>OpenAFS for Windows is
! dependent on MIT Kerberos for Windows for authentication and shares many of the
! same re</span></span><span style='font-family:"Times New Roman";mso-fareast-font-family:
! "MS Mincho";color:black;mso-fareast-language:JA'>quirements for credential
! management. <span style='mso-spacerun:yes'> </span>Future releases of both
! products will share a common identity management user interface. <o:p></o:p></span></p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872225"></a><a
! name="_Toc115417096"><span style='mso-bookmark:_Toc126872225'><span
! style='mso-fareast-language:JA'>6.4. Direct contributions of code and/or
! documentation</span></span></a><span style='mso-fareast-language:JA'> <o:p></o:p></span></h2>
! 
! <p class=MsoBodyText><span style='mso-fareast-language:JA'>Organizations that
! use OpenAFS in house and have development staffs are encouraged to contribute
! any code modifications they make to OpenAFS.org via <u><span style='color:blue'>openafs-bugs@openafs.org</span></u>.
! <span style='mso-spacerun:yes'> </span>Contributions of documentation are
! highly desired. <o:p></o:p></span></p>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872226"></a><a
! name="_Toc115417097"><span style='mso-bookmark:_Toc126872226'>6.5. OpenAFS for
! Windows Mailing Lists</span></a></h2>
  
  <p class=MsoNormal>If you wish to participate in OpenAFS for Windows
  development please join the <i><a
***************
*** 4564,4589 ****
  <p class=MsoNormal>You must join the mailing lists if you wish to post to the
  list without incurring a moderation delay.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417115"></a><a
! name="_Toc115417098"></a><a name="_Toc115416158"></a><a
  name="_MSI_Deployment_Guide"></a><![if !supportLists]><span style='mso-bookmark:
! _Toc115417115'><span style='mso-bookmark:_Toc115417098'><span style='mso-bookmark:
! _Toc115416158'></span></span></span><![endif]><span style='mso-bookmark:_Toc115417115'><span
! style='mso-bookmark:_Toc115417098'><span style='mso-bookmark:_Toc115416158'>7.
! MSI Deployment Guide</span></span></span></h1>
  
  </div>
  
  <b><span style='font-size:16.0pt;font-family:Albany;mso-fareast-font-family:
  "MS Mincho";mso-bidi-font-family:Tahoma;mso-ansi-language:EN-US;mso-fareast-language:
! JA;mso-bidi-language:AR-SA'><br clear=all style='page-break-before:always;
  mso-break-type:section-break'>
  </span></b>
  
  <div class=Section2>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417099"></a><a
! name="_Toc115416159"><span style='mso-bookmark:_Toc115417099'>7.1. Introduction</span></a></h2>
  
  <p class=MsoNormal>A MSI installer option is available for those who wish to
  use Windows Installer for installing OpenAFS and for organizations that wish to
--- 5451,5478 ----
  <p class=MsoNormal>You must join the mailing lists if you wish to post to the
  list without incurring a moderation delay.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872227"></a><a
! name="_Toc115417115"></a><a name="_Toc115417098"></a><a name="_Toc115416158"></a><a
  name="_MSI_Deployment_Guide"></a><![if !supportLists]><span style='mso-bookmark:
! _Toc126872227'><span style='mso-bookmark:_Toc115417115'><span style='mso-bookmark:
! _Toc115417098'><span style='mso-bookmark:_Toc115416158'></span></span></span></span><![endif]><span
! style='mso-bookmark:_Toc126872227'><span style='mso-bookmark:_Toc115417115'><span
! style='mso-bookmark:_Toc115417098'><span style='mso-bookmark:_Toc115416158'>7. MSI
! Deployment Guide</span></span></span></span></h1>
  
  </div>
  
  <b><span style='font-size:16.0pt;font-family:Albany;mso-fareast-font-family:
  "MS Mincho";mso-bidi-font-family:Tahoma;mso-ansi-language:EN-US;mso-fareast-language:
! #00FF;mso-bidi-language:AR-SA'><br clear=all style='page-break-before:always;
  mso-break-type:section-break'>
  </span></b>
  
  <div class=Section2>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872228"></a><a
! name="_Toc115417099"></a><a name="_Toc115416159"><span style='mso-bookmark:
! _Toc115417099'><span style='mso-bookmark:_Toc126872228'>7.1. Introduction</span></span></a></h2>
  
  <p class=MsoNormal>A MSI installer option is available for those who wish to
  use Windows Installer for installing OpenAFS and for organizations that wish to
***************
*** 4598,4617 ****
  files through group policy and/or startup scripts so that machines where
  OpenAFS for Windows is already installed will pick up these customizations.</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416160">7.1.1
! Requirements</a></h3>
  
  <p class=MsoNormal>The information in this document applies to MSI packages
  distributed with OpenAFS for Windows releases from 1.3.65 and onwards or MSI
! packages built from corresponding source releases.<span
! style='mso-spacerun:yes'>  </span>Not all releases support all the
! configuration options documented here.</p>
  
  <p class=MsoNormal>Authoring a &quot;Windows Installer&quot; transform requires
  additional software for editing the MSI database tables and generating the
  transform from the modified MSI package.<span style='mso-spacerun:yes'> 
! </span>ORCA.EXE and MSITRAN.EXE which are included in the Windows Platform SDK
! (&quot;Windows Installer&quot; SDK) can be used for this purpose.</p>
  
  <p class=MsoNormal>For reference, the schema for the MSI package is based on
  SCHEMA.MSI distributed with the Platform SDK.</p>
--- 5487,5507 ----
  files through group policy and/or startup scripts so that machines where
  OpenAFS for Windows is already installed will pick up these customizations.</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872229"></a><a
! name="_Toc115416160"><span style='mso-bookmark:_Toc126872229'>7.1.1
! Requirements</span></a></h3>
  
  <p class=MsoNormal>The information in this document applies to MSI packages
  distributed with OpenAFS for Windows releases from 1.3.65 and onwards or MSI
! packages built from corresponding source releases. <span
! style='mso-spacerun:yes'> </span>Not all releases support all the configuration
! options documented here.</p>
  
  <p class=MsoNormal>Authoring a &quot;Windows Installer&quot; transform requires
  additional software for editing the MSI database tables and generating the
  transform from the modified MSI package.<span style='mso-spacerun:yes'> 
! </span>ORCA.EXE and MSITRAN.EXE which are included in the Windows Platform SDK (&quot;Windows
! Installer&quot; SDK) can be used for this purpose.</p>
  
  <p class=MsoNormal>For reference, the schema for the MSI package is based on
  SCHEMA.MSI distributed with the Platform SDK.</p>
***************
*** 4638,4645 ****
  <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><a
  href="http://msdn.microsoft.com/library/en-us/msi/setup/a_customization_transform_example.asp">http://msdn.microsoft.com/library/en-us/msi/setup/a_customization_transform_example.asp</a></p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416161">7.1.2
! Authoring a Transform</a></h3>
  
  <p class=MsoNormal>Transforms describe a set of modifications to be performed
  on an existing MSI for the purpose of customizing it.<span
--- 5528,5536 ----
  <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><a
  href="http://msdn.microsoft.com/library/en-us/msi/setup/a_customization_transform_example.asp">http://msdn.microsoft.com/library/en-us/msi/setup/a_customization_transform_example.asp</a></p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872230"></a><a
! name="_Toc115416161"><span style='mso-bookmark:_Toc126872230'>7.1.2 Authoring a
! Transform</span></a></h3>
  
  <p class=MsoNormal>Transforms describe a set of modifications to be performed
  on an existing MSI for the purpose of customizing it.<span
***************
*** 4649,4689 ****
  example:</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l17 level1 lfo26;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>copy openafs.msi openafs-modified.msi</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l17 level1 lfo26;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>(edit the openafs-modified.msi to include the necessary
  changes)</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l17 level1 lfo26;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>msitran -g openafs.msi openafs-modified.msi
  openafs-transform.mst</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l17 level1 lfo26;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>(generates openafs-transform.mst, which is the
  transform)</p>
  
  <p class=MsoNormal>Transforms have an extension of .mst.<span
! style='mso-spacerun:yes'>  </span>'msitran' is a tool distributed as part of
! the &quot;Windows Installer&quot; SDK (part of the Windows Platform SDK).</p>
  
  <p class=MsoNormal>You can test a transform by:</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l16 level1 lfo28;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>copy openafs.msi openafs-test.msi</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l16 level1 lfo28;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>msitran -a openafs-transform.mst openafs-test.msi</p>
  
--- 5540,5580 ----
  example:</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l35 level1 lfo14;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>copy openafs.msi openafs-modified.msi</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l35 level1 lfo14;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>(edit the openafs-modified.msi to include the necessary
  changes)</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l35 level1 lfo14;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>msitran -g openafs.msi openafs-modified.msi
  openafs-transform.mst</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l35 level1 lfo14;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>4.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>(generates openafs-transform.mst, which is the
  transform)</p>
  
  <p class=MsoNormal>Transforms have an extension of .mst.<span
! style='mso-spacerun:yes'>  </span>'msitran' is a tool distributed as part of the
! &quot;Windows Installer&quot; SDK (part of the Windows Platform SDK).</p>
  
  <p class=MsoNormal>You can test a transform by:</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l34 level1 lfo16;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>copy openafs.msi openafs-test.msi</p>
  
  <p class=PreformattedText style='margin-left:36.0pt;text-indent:-18.0pt;
! mso-list:l34 level1 lfo16;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;
  </span></span><![endif]>msitran -a openafs-transform.mst openafs-test.msi</p>
  
***************
*** 4696,4716 ****
  the MSI databases directly when editing openafs-modified.msi.<span
  style='mso-spacerun:yes'>  </span>More details are given below.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417100"></a><a
! name="_Toc115416162"><span style='mso-bookmark:_Toc115417100'>7.2.
! Configuration Options</span></a></h2>
  
  <p class=MsoNormal>The logic necessary to implement many of the settings
! described in <a href="#_Appendix_A:_Registry_Values">Appendix A</a> are present
! in the MSI.<span style='mso-spacerun:yes'>  </span>Most of these can be
! controlled by setting the corresponding properties to the desired value.<span
! style='mso-spacerun:yes'>  </span>Some settings may require modifying existing
! registry entries (though not recommended) or adding new resources (like files
! or registry keys).<span style='mso-spacerun:yes'>  </span>Instructions for
! performing these tasks are below.</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416163">7.2.1
! Configurable Properties</a></h3>
  
  <p class=MsoNormal>Most configurable properties correspond to registry keys or
  values.<span style='mso-spacerun:yes'>  </span>Due to the logic invoked based
--- 5587,5609 ----
  the MSI databases directly when editing openafs-modified.msi.<span
  style='mso-spacerun:yes'>  </span>More details are given below.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872231"></a><a
! name="_Toc115417100"></a><a name="_Toc115416162"><span style='mso-bookmark:
! _Toc115417100'><span style='mso-bookmark:_Toc126872231'>7.2. Configuration
! Options</span></span></a></h2>
  
  <p class=MsoNormal>The logic necessary to implement many of the settings
! described in <a href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix
! A</a> are present in the MSI.<span style='mso-spacerun:yes'>  </span>Most of
! these can be controlled by setting the corresponding properties to the desired
! value.<span style='mso-spacerun:yes'>  </span>Some settings may require
! modifying existing registry entries (though not recommended) or adding new
! resources (like files or registry keys).<span style='mso-spacerun:yes'> 
! </span>Instructions for performing these tasks are below.</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872232"></a><a
! name="_Toc115416163"><span style='mso-bookmark:_Toc126872232'>7.2.1
! Configurable Properties</span></a></h3>
  
  <p class=MsoNormal>Most configurable properties correspond to registry keys or
  values.<span style='mso-spacerun:yes'>  </span>Due to the logic invoked based
***************
*** 4725,4736 ****
  
  <p class=MsoNormal>When one of the configurable properties is set, the
  installer will use the property value to set the corresponding setting in the
! HKEY_LOCAL_MACHINE registry hive.<span style='mso-spacerun:yes'>  </span>The
! HKEY_CURRENT_USER hive is not touched by the installer.</p>
  
  <p class=MsoNormal>For each property, the associated registry setting is
! referenced by the same text used in <a href="#_Appendix_A:_Registry_Values">Appendix
! A</a>.</p>
  
  <p class=MsoNormal>Strings are quoted using single quotes (e.g. 'a string'). An
  empty string is denoted as ''.<span style='mso-spacerun:yes'>  </span>Note that
--- 5618,5629 ----
  
  <p class=MsoNormal>When one of the configurable properties is set, the
  installer will use the property value to set the corresponding setting in the
! HKEY_LOCAL_MACHINE registry hive.<span style='mso-spacerun:yes'>  </span>The HKEY_CURRENT_USER
! hive is not touched by the installer.</p>
  
  <p class=MsoNormal>For each property, the associated registry setting is
! referenced by the same text used in <a
! href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix A</a>.</p>
  
  <p class=MsoNormal>Strings are quoted using single quotes (e.g. 'a string'). An
  empty string is denoted as ''.<span style='mso-spacerun:yes'>  </span>Note that
***************
*** 4738,4764 ****
  
  <p class=MsoNormal>Numeric values should be authored as decimal strings.</p>
  
! <h4><a name="_Toc115416164">7.2.1.1 Setting Properties</a></h4>
  
  <p class=MsoNormal>In order to set a property,</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l14 level1 lfo30;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>Open the MSI in ORCA.EXE</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l14 level1 lfo30;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span></span><![endif]>Select the 'Property' table from the list of tables
! on the left.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l14 level1 lfo30;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
--- 5631,5658 ----
  
  <p class=MsoNormal>Numeric values should be authored as decimal strings.</p>
  
! <h4><a name="_Toc126872233"></a><a name="_Toc115416164"><span style='mso-bookmark:
! _Toc126872233'>7.2.1.1 Setting Properties</span></a></h4>
  
  <p class=MsoNormal>In order to set a property,</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l32 level1 lfo18;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>Open the MSI in ORCA.EXE</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l32 level1 lfo18;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span></span><![endif]>Select the 'Property' table from the list of
! tables on the left.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l32 level1 lfo18;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
***************
*** 4766,4772 ****
  the right, double click the value and type the new value.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l14 level1 lfo30;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>4.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
--- 5660,5666 ----
  the right, double click the value and type the new value.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l32 level1 lfo18;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='font-size:9.0pt;mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>4.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
***************
*** 4774,4809 ****
  list, right click the list and select 'Add Row', type the property name and the
  desired value.</p>
  
! <h4><a name="_Toc115416165">7.2.1.2 OpenAFS for Windows Properties</a></h4>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
   mso-border-insideh:.75pt outset windowtext;mso-border-insidev:.75pt outset windowtext'>
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416166"></a><a
!   name="_(Service_parameters):"></a><span style='mso-bookmark:_Toc115416166'>(Service
!   parameters):</span></h5>
!   <p class=ListContents style='margin-left:0pt;mso-yfti-cnfc:1'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5><a name="_Toc115416167"></a><a name="_(Network_provider):"></a><span
!   style='mso-bookmark:_Toc115416167'>(Network provider):</span></h5>
    <p class=ListContents style='margin-left:0pt'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5><a name="_Toc115416168"></a><a name="_(OpenAFS_Client):"></a><span
!   style='mso-bookmark:_Toc115416168'>(OpenAFS Client):</span></h5>
!   <p class=ListContents style='margin-left:0pt'>[HKLM\SOFTWARE\OpenAFS\Client]</p>
    </td>
   </tr>
  </table>
  
! <h5><a name="_Toc115416169">7.2.1.2.1 Registry Properties</a></h5>
  
  <p class=MsoNormal>These properties are used to set the values of registry
  entries associated with OpenAFS for Windows.</p>
--- 5668,5712 ----
  list, right click the list and select 'Add Row', type the property name and the
  desired value.</p>
  
! <h4><a name="_Toc126872234"></a><a name="_Toc115416165"><span style='mso-bookmark:
! _Toc126872234'>7.2.1.2 OpenAFS for Windows Properties</span></a></h4>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
   mso-border-insideh:.75pt outset windowtext;mso-border-insidev:.75pt outset windowtext'>
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872235"></a><a
!   name="_Toc115416166"></a><a name="_(Service_parameters):"></a><span
!   style='mso-bookmark:_Toc126872235'><span style='mso-bookmark:_Toc115416166'>(Service
!   parameters):</span></span></h5>
!   <p class=ListContents style='margin-left:0pt;mso-yfti-cnfc:1'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]<span
!   style='mso-bidi-language:#00FF'><o:p></o:p></span></p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872236"></a><a
!   name="_Toc115416167"></a><a name="_(Network_provider):"></a><span
!   style='mso-bookmark:_Toc126872236'><span style='mso-bookmark:_Toc115416167'>(Network
!   provider):</span></span></h5>
    <p class=ListContents style='margin-left:0pt'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872237"></a><a
!   name="_Toc115416168"></a><a name="_(OpenAFS_Client):"></a><span
!   style='mso-bookmark:_Toc126872237'><span style='mso-bookmark:_Toc115416168'>(OpenAFS
!   Client):</span></span></h5>
!   <p class=ListContents style='margin-left:0pt'>[HKLM\SOFTWARE\OpenAFS\Client]<span
!   style='mso-bidi-language:#00FF'><o:p></o:p></span></p>
    </td>
   </tr>
  </table>
  
! <h5><a name="_Toc126872238"></a><a name="_Toc115416169"><span style='mso-bookmark:
! _Toc126872238'>7.2.1.2.1 Registry Properties</span></a></h5>
  
  <p class=MsoNormal>These properties are used to set the values of registry
  entries associated with OpenAFS for Windows.</p>
***************
*** 4813,4983 ****
   mso-border-insideh:.75pt outset windowtext;mso-border-insidev:.75pt outset windowtext'>
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-yfti-cnfc:1'><a name="_Toc115416170">AFSCACHEPATH</a></h6>
    <p class=MsoList style='mso-yfti-cnfc:1'>Registry key<span
!   style='mso-spacerun:yes'>    </span>: <a href="#_(Service_parameters):">(Service
!   parameters)</a></p>
    <p class=MsoList style='mso-yfti-cnfc:1'>Registry value : <a
!   href="#_Value_:_CachePath">CachePath</a></p>
    <p class=MsoList style='mso-yfti-cnfc:1'>Valid values<span
    style='mso-spacerun:yes'>    </span>: string .</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416171">AFSCACHESIZE</a></h6>
    <p class=MsoList>Registry key<span style='mso-spacerun:yes'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a href="#_Value___:_CacheSize">CacheSize</a></p>
    <p class=MsoList>Valid values<span style='mso-spacerun:yes'>    </span>:
    numeric</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:1'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416172">AFSCELLNAME</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value_:_Cell">Cell</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    string</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:2'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416173">FREELANCEMODE</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value_:_FreelanceClient">FreelanceClient</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:3'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416174">HIDEDOTFILES</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value_:_HideDotFiles">HideDotFiles</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:4'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416175">LOGONOPTIONS</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Network_provider):">(Network provider)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value___:_LogonOptions">LogonOptions</a></p>
!   <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '0',
!   '1' or '3'</p>
!   <p class=MsoNormal>See <a href="#_Appendix_A:_Registry_Values">Appendix A</a>
!   <a href="#_A.2.1_Domain_specific_configuration">section 2.1 (Domain specific
!   configuration keys for Network Provider)</a> for more details.</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:5'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416176">MOUNTROOT</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value_:_Mountroot">Mountroot</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    string</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:6'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416177">NETBIOSNAME</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value___:_NetbiosName">NetbiosName</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    string (at most 15 characters)</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:7'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416178">NOFINDLANABYNAME</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value___:_NoFindLanaByName">NoFindLanaByName</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:8'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416179">RXMAXMTU</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value_:_RxMaxMTU">RxMaxMTU</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    numeric</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:9'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416180">SECURITYLEVEL</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value_:_SecurityLevel">SecurityLevel</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:10'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416181">SMBAUTHTYPE</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value___:_smbAuthType">SMBAuthType</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    '0','1' or '2'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:11'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416182">STOREANSIFILENAMES</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(OpenAFS_Client):">(OpenAFS Client)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value___:_StoreAnsiFilenames">StoreAnsiFilenames</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '0'
    or '1'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:12;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416183">USEDNS</a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="#_Value_:_UseDNS">UseDNS</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
  </table>
  
! <h5><a name="_Toc115416184"></a><a name="_7.2.1.2.2_AFSCreds.exe_Properties"></a><span
! style='mso-bookmark:_Toc115416184'>7.2.1.2.2 AFSCreds.exe Properties</span></h5>
  
  <p class=MsoNormal>These properties are combined to add a command line option
  to the shortcut that will be created in the Start:Programs:OpenAFS and
  Start:Programs:Startup folders (see CREDSSTARTUP).<span
! style='mso-spacerun:yes'>  </span>The method of specifying the option was chosen
! for easy integration with the Windows Installer user interface.<span
  style='mso-spacerun:yes'>  </span>Although other methods can be used to specify
  options to AFSCREDS.EXE, it is advised that they be avoided as transforms
  including such options may not apply to future releases of OpenAFS.</p>
--- 5716,5904 ----
   mso-border-insideh:.75pt outset windowtext;mso-border-insidev:.75pt outset windowtext'>
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6;mso-yfti-cnfc:1'><a name="_Toc126872239"></a><a
!   name="_Toc115416170"><span style='mso-bookmark:_Toc126872239'>AFSCACHEPATH</span></a></h6>
    <p class=MsoList style='mso-yfti-cnfc:1'>Registry key<span
!   style='mso-spacerun:yes'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList style='mso-yfti-cnfc:1'>Registry value : <a
!   href="oafw-1-4-release-notes.doc#_Value_:_CachePath">CachePath</a></p>
    <p class=MsoList style='mso-yfti-cnfc:1'>Valid values<span
    style='mso-spacerun:yes'>    </span>: string .</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872240"></a><a
!   name="_Toc115416171"><span style='mso-bookmark:_Toc126872240'>AFSCACHESIZE</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-spacerun:yes'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
!   <p class=MsoList>Registry value : <a
!   href="oafw-1-4-release-notes.doc#_Value___: CacheSize">CacheSize</a></p>
    <p class=MsoList>Valid values<span style='mso-spacerun:yes'>    </span>:
    numeric</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:1'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872241"></a><a
!   name="_Toc115416172"><span style='mso-bookmark:_Toc126872241'>AFSCELLNAME</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value_:_Cell">Cell</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    string</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:2'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872242"></a><a
!   name="_Toc115416173"><span style='mso-bookmark:_Toc126872242'>FREELANCEMODE</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value_:_FreelanceClient">FreelanceClient</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:3'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872243"></a><a
!   name="_Toc115416174"><span style='mso-bookmark:_Toc126872243'>HIDEDOTFILES</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value_:_HideDotFiles">HideDotFiles</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:4'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872244"></a><a
!   name="_Toc115416175"><span style='mso-bookmark:_Toc126872244'>LOGONOPTIONS</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Network_provider):">(Network provider)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value___: LogonOptions">LogonOptions</a></p>
!   <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '0', '1'
!   or '3'</p>
!   <p class=MsoNormal>See <a
!   href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix A</a>
!   <a href="oafw-1-4-release-notes.doc#_A.2.1_Domain_specific_configuration">section
!   2.1 (Domain specific configuration keys for Network Provider)</a> for more
!   details.</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:5'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872245"></a><a
!   name="_Toc115416176"><span style='mso-bookmark:_Toc126872245'>MOUNTROOT</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value_:_Mountroot">Mountroot</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    string</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:6'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872246"></a><a
!   name="_Toc115416177"><span style='mso-bookmark:_Toc126872246'>NETBIOSNAME</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value___: NetbiosName">NetbiosName</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    string (at most 15 characters)</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:7'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872247"></a><a
!   name="_Toc115416178"><span style='mso-bookmark:_Toc126872247'>NOFINDLANABYNAME</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value___: NoFindLanaByName">NoFindLanaByName</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:8'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872248"></a><a
!   name="_Toc115416179"><span style='mso-bookmark:_Toc126872248'>RXMAXMTU</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value_:_RxMaxMTU">RxMaxMTU</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    numeric</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:9'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872249"></a><a
!   name="_Toc115416180"><span style='mso-bookmark:_Toc126872249'>SECURITYLEVEL</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value_:_SecurityLevel">SecurityLevel</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:10'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872250"></a><a
!   name="_Toc115416181"><span style='mso-bookmark:_Toc126872250'>SMBAUTHTYPE</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value___: smbAuthType">SMBAuthType</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>:
    '0','1' or '2'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:11'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872251"></a><a
!   name="_Toc115416182"><span style='mso-bookmark:_Toc126872251'>STOREANSIFILENAMES</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(OpenAFS_Client):">(OpenAFS Client)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value___: StoreAnsiFilenames">StoreAnsiFilenames</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '0'
    or '1'</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:12;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872252"></a><a
!   name="_Toc115416183"><span style='mso-bookmark:_Toc126872252'>USEDNS</span></a></h6>
    <p class=MsoList>Registry key<span style='mso-tab-count:1'>    </span>: <a
!   href="oafw-1-4-release-notes.doc#_(Service_parameters):">(Service parameters)</a></p>
    <p class=MsoList>Registry value<span style='mso-tab-count:1'> </span>: <a
!   href="oafw-1-4-release-notes.doc#_Value_:_UseDNS">UseDNS</a></p>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '1'
    or '0'</p>
    </td>
   </tr>
  </table>
  
! <h5><a name="_Toc126872253"></a><a name="_Toc115416184"></a><a
! name="_7.2.1.2.2_AFSCreds.exe_Properties"></a><span style='mso-bookmark:_Toc126872253'><span
! style='mso-bookmark:_Toc115416184'>7.2.1.2.2 AFSCreds.exe Properties</span></span></h5>
  
  <p class=MsoNormal>These properties are combined to add a command line option
  to the shortcut that will be created in the Start:Programs:OpenAFS and
  Start:Programs:Startup folders (see CREDSSTARTUP).<span
! style='mso-spacerun:yes'>  </span>The method of specifying the option was
! chosen for easy integration with the Windows Installer user interface.<span
  style='mso-spacerun:yes'>  </span>Although other methods can be used to specify
  options to AFSCREDS.EXE, it is advised that they be avoided as transforms
  including such options may not apply to future releases of OpenAFS.</p>
***************
*** 4987,5005 ****
   mso-border-insideh:.75pt outset windowtext;mso-border-insidev:.75pt outset windowtext'>
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-yfti-cnfc:1'><a name="_Toc115416185">CREDSSTARTUP</a></h6>
    <p class=MsoList style='mso-yfti-cnfc:1'>Valid values<span
    style='mso-spacerun:yes'>    </span>: '1' or '0'</p>
    <p class=MsoList style='mso-yfti-cnfc:1'>Controls whether AFSCreds.exe starts
    up automatically when the user logs on.<span style='mso-spacerun:yes'> 
!   </span>When CREDSSTARTUP is '1' a shortcut is added to the 'Startup' folder in
!   the 'Program menu' which starts AFSCREDS.EXE with the options that are
    determined by the other CREDS* properties.</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416186">CREDSAUTOINIT</a></h6>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '-a'
    or ''</p>
    <p class=MsoList>Enables automatic initialization.</p>
--- 5908,5928 ----
   mso-border-insideh:.75pt outset windowtext;mso-border-insidev:.75pt outset windowtext'>
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6;mso-yfti-cnfc:1'><a name="_Toc126872254"></a><a
!   name="_Toc115416185"><span style='mso-bookmark:_Toc126872254'>CREDSSTARTUP</span></a></h6>
    <p class=MsoList style='mso-yfti-cnfc:1'>Valid values<span
    style='mso-spacerun:yes'>    </span>: '1' or '0'</p>
    <p class=MsoList style='mso-yfti-cnfc:1'>Controls whether AFSCreds.exe starts
    up automatically when the user logs on.<span style='mso-spacerun:yes'> 
!   </span>When CREDSSTARTUP is '1' a shortcut is added to the 'Startup' folder
!   in the 'Program menu' which starts AFSCREDS.EXE with the options that are
    determined by the other CREDS* properties.</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872255"></a><a
!   name="_Toc115416186"><span style='mso-bookmark:_Toc126872255'>CREDSAUTOINIT</span></a></h6>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '-a'
    or ''</p>
    <p class=MsoList>Enables automatic initialization.</p>
***************
*** 5007,5013 ****
   </tr>
   <tr style='mso-yfti-irow:1'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416187">CREDSIPCHDET</a></h6>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '-n'
    or ''</p>
    <p class=MsoList>Enables IP address change detection.</p>
--- 5930,5937 ----
   </tr>
   <tr style='mso-yfti-irow:1'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872256"></a><a
!   name="_Toc115416187"><span style='mso-bookmark:_Toc126872256'>CREDSIPCHDET</span></a></h6>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '-n'
    or ''</p>
    <p class=MsoList>Enables IP address change detection.</p>
***************
*** 5015,5021 ****
   </tr>
   <tr style='mso-yfti-irow:2'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416188">CREDSQUIET</a></h6>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '-q'
    or ''</p>
    <p class=MsoList>Enables quiet mode.</p>
--- 5939,5946 ----
   </tr>
   <tr style='mso-yfti-irow:2'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872257"></a><a
!   name="_Toc115416188"><span style='mso-bookmark:_Toc126872257'>CREDSQUIET</span></a></h6>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '-q'
    or ''</p>
    <p class=MsoList>Enables quiet mode.</p>
***************
*** 5023,5029 ****
   </tr>
   <tr style='mso-yfti-irow:3'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416189">CREDSRENEWDRMAP</a></h6>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '-m'
    or '’</p>
    <p class=MsoList>Enables renewing drive map at startup.</p>
--- 5948,5955 ----
   </tr>
   <tr style='mso-yfti-irow:3'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872258"></a><a
!   name="_Toc115416189"><span style='mso-bookmark:_Toc126872258'>CREDSRENEWDRMAP</span></a></h6>
    <p class=MsoList>Valid values<span style='mso-tab-count:1'>    </span>: '-m'
    or '’</p>
    <p class=MsoList>Enables renewing drive map at startup.</p>
***************
*** 5031,5037 ****
   </tr>
   <tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6><a name="_Toc115416190">CREDSSHOW</a></h6>
    <p class=MsoList>Valid values<span style='mso-spacerun:yes'>    </span>: '-s'
    or ''</p>
    <p class=MsoList>Enables displaying the credential manager window when
--- 5957,5964 ----
   </tr>
   <tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h6 style='mso-outline-level:6'><a name="_Toc126872259"></a><a
!   name="_Toc115416190"><span style='mso-bookmark:_Toc126872259'>CREDSSHOW</span></a></h6>
    <p class=MsoList>Valid values<span style='mso-spacerun:yes'>    </span>: '-s'
    or ''</p>
    <p class=MsoList>Enables displaying the credential manager window when
***************
*** 5040,5047 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416191">7.2.2
! Existing Registry Entries</a></h3>
  
  <p class=MsoNormal>You can change existing registry values subject to the
  restrictions mentioned in the Windows Platform SDK.<span
--- 5967,5975 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872260"></a><a
! name="_Toc115416191"><span style='mso-bookmark:_Toc126872260'>7.2.2 Existing
! Registry Entries</span></a></h3>
  
  <p class=MsoNormal>You can change existing registry values subject to the
  restrictions mentioned in the Windows Platform SDK.<span
***************
*** 5050,5057 ****
  style='mso-spacerun:yes'>  </span>If you want to add additional registry keys
  please refer to section 3 (Additional resources).</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416192">7.2.3
! Replacing Configuration Files</a></h3>
  
  <p class=MsoNormal>The OpenAFS configuration files (CellServDB) can be replaced
  by your own configuration files.<span style='mso-spacerun:yes'>  </span>These
--- 5978,5986 ----
  style='mso-spacerun:yes'>  </span>If you want to add additional registry keys
  please refer to section 3 (Additional resources).</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872261"></a><a
! name="_Toc115416192"><span style='mso-bookmark:_Toc126872261'>7.2.3 Replacing
! Configuration Files</span></a></h3>
  
  <p class=MsoNormal>The OpenAFS configuration files (CellServDB) can be replaced
  by your own configuration files.<span style='mso-spacerun:yes'>  </span>These
***************
*** 5071,5109 ****
  <p class=MsoNormal>The walkthrough below is to add a custom 'CellServDB' file.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo32;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Disable
  the component that contains the configuration file that you want to replace.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;tab-stops:
  list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Locate
  and select the 'Component' table in the 'Tables' list.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;tab-stops:
  list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>In
  the Component table, locate the component you need to change ( Ctrl-F invokes
  the 'Find' dialog).<span style='mso-spacerun:yes'>  </span>The component names
! are listed below in section <a href="#_2.3.1_Components_for_Configuration_">7.2.3.1</a>.<span
  style='mso-spacerun:yes'>  </span>For this example, the component name is
  'elf_CellServDB'.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;tab-stops:
  list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.3.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Go
  to the 'Condition' column of the component.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;tab-stops:
  list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.4.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Enter
--- 6000,6039 ----
  <p class=MsoNormal>The walkthrough below is to add a custom 'CellServDB' file.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:18.0pt;text-indent:-18.0pt;mso-list:l23 level1 lfo32;tab-stops:
  list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Disable
  the component that contains the configuration file that you want to replace.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;tab-stops:
  list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Locate
  and select the 'Component' table in the 'Tables' list.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;tab-stops:
  list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>In
  the Component table, locate the component you need to change ( Ctrl-F invokes
  the 'Find' dialog).<span style='mso-spacerun:yes'>  </span>The component names
! are listed below in section <a
! href="oafw-1-4-release-notes.doc#_2.3.1_Components_for_Configuration ">7.2.3.1</a>.<span
  style='mso-spacerun:yes'>  </span>For this example, the component name is
  'elf_CellServDB'.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;tab-stops:
  list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.3.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Go
  to the 'Condition' column of the component.</p>
  
  <p class=MsoNormal style='margin-top:4.3pt;margin-right:0pt;margin-bottom:4.3pt;
! margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;tab-stops:
  list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:Thorndale;
  mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1.4.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Enter
***************
*** 5113,5137 ****
  <p class=MsoNormal>Note that you can also use this step to disable other
  configuration files without providing replacements.</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Add
  a new component containing the new configuration file.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'Component' table in the 'Tables' list.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  'Tables'-&gt;'Add Row' (Ctrl-R).</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.3.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Enter
--- 6043,6067 ----
  <p class=MsoNormal>Note that you can also use this step to disable other
  configuration files without providing replacements.</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l23 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Add
  a new component containing the new configuration file.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'Component' table in the 'Tables' list.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  'Tables'-&gt;'Add Row' (Ctrl-R).</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2.3.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Enter
***************
*** 5219,5227 ****
   </tr>
  </table>
  
! <p class=MsoNormal style='margin-left:35.45pt'>Note that the ComponentId is an uppercase
! GUID.<span style='mso-spacerun:yes'>  </span>You can generate one using
! GUIDGEN.EXE or UUIDGEN.EXE, both of which are included in the Platform SDK.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>The Attributes value of 144 is a
  sum of msidbComponentAttributesPermanent (16) and
--- 6149,6158 ----
   </tr>
  </table>
  
! <p class=MsoNormal style='margin-left:35.45pt'>Note that the ComponentId is an
! uppercase GUID.<span style='mso-spacerun:yes'>  </span>You can generate one
! using GUIDGEN.EXE or UUIDGEN.EXE, both of which are included in the Platform
! SDK.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>The Attributes value of 144 is a
  sum of msidbComponentAttributesPermanent (16) and
***************
*** 5233,5251 ****
  <p class=MsoNormal><span style='mso-tab-count:1'>            </span>'fil_my_CellServDB'
  is a key into the 'File' table which we will fill later.</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Add
  a new feature to hold the new component.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'Feature' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Add
--- 6164,6182 ----
  <p class=MsoNormal><span style='mso-tab-count:1'>            </span>'fil_my_CellServDB'
  is a key into the 'File' table which we will fill later.</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l23 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Add
  a new feature to hold the new component.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'Feature' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Add
***************
*** 5360,5391 ****
  </table>
  
  <p class=MsoNormal style='margin-left:35.45pt'>It is important to create the
! new feature under the 'feaClient' feature, which will ensure that the
! configuration file will be installed when the client binaries are installed.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Setting 'Display' to 0 will hide
! this feature from the feature selection dialog during an interactive
! installation.<span style='mso-spacerun:yes'>  </span>A value of 30 for 'Level'
! allows this feature to be installed by default (on a 'Typical' installation).</p>
  
! <p class=MsoNormal style='margin-left:35.45pt'>The 'Attributes' value is
! msidbFeatureAttributesDisallowAdvertise (8), which is set on all features in
! the OpenAFS MSI.<span style='mso-spacerun:yes'>  </span>The OpenAFS MSI is not
! designed for an advertised installation.</p>
! 
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>4.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Join
  the component and the feature.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>4.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'FeatureComponents' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>4.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Add
--- 6291,6322 ----
  </table>
  
  <p class=MsoNormal style='margin-left:35.45pt'>It is important to create the
! new feature under the 'feaClient' feature, which will ensure that the configuration
! file will be installed when the client binaries are installed.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Setting 'Display' to 0 will hide
! this feature from the feature selection dialog during an interactive installation.<span
! style='mso-spacerun:yes'>  </span>A value of 30 for 'Level' allows this feature
! to be installed by default (on a 'Typical' installation).</p>
! 
! <p class=MsoNormal style='margin-left:35.45pt'>The 'Attributes' value is msidbFeatureAttributesDisallowAdvertise
! (8), which is set on all features in the OpenAFS MSI.<span
! style='mso-spacerun:yes'>  </span>The OpenAFS MSI is not designed for an
! advertised installation.</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l23 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>4.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Join
  the component and the feature.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>4.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'FeatureComponents' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>4.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Add
***************
*** 5421,5439 ****
   </tr>
  </table>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>5.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Add
  an entry to the 'File' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>5.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'File' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>5.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Add
--- 6352,6370 ----
   </tr>
  </table>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l23 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>5.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Add
  an entry to the 'File' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>5.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'File' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>5.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Add
***************
*** 5532,5553 ****
  cabinet streams.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Finally, the 'Sequence' value of
! 1000 will be used later to distinguish the file as being in a separate source
! location than the other files in the MSI.</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l13 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>6.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Set
  a media source for the file.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>6.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'Media' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l13 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>6.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Add
--- 6463,6484 ----
  cabinet streams.</p>
  
  <p class=MsoNormal style='margin-left:35.45pt'>Finally, the 'Sequence' value of
! 1000 will be used later to distinguish the file as being in a separate source location
! than the other files in the MSI.</p>
  
! <p class=MsoNormal style='margin-left:18.0pt;text-indent:-18.0pt;mso-list:l23 level1 lfo32;
  tab-stops:list 18.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>6.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>Set
  a media source for the file.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>6.1.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Select
  the 'Media' table.</p>
  
! <p class=MsoNormal style='margin-left:39.6pt;text-indent:-21.6pt;mso-list:l23 level2 lfo32;
  tab-stops:list 39.6pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>6.2.<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp; </span></span></span><![endif]>Add
***************
*** 5586,5615 ****
  <p class=MsoNormal><span style='mso-tab-count:1'>            </span><span
  style='mso-spacerun:yes'>    </span>(leave other fields blank)</p>
  
! <p class=MsoNormal style='margin-left:35.45pt'>The sequence number of 1000
! designates this as the media source for the newly added file.</p>
  
! <h4><a name="_Toc115416193"></a><a name="_2.3.1_Components_for_Configuration_"></a><span
! style='mso-bookmark:_Toc115416193'>7.2.3.1 Components for Configuration Files</span></h4>
  
  <p class=PreformattedText style='text-indent:35.45pt'>CellServDB:
  'cpf_CellServDB' (ID {D5BA4C15-DBEC-4292-91FC-B54C30F24F2A})</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416194">7.2.4
! Adding Domain Specific Registry Keys</a></h3>
  
  <p class=MsoNormal>Following is an example for adding domain specific registry
  keys.</p>
  
  <p class=MsoNormal style='tab-stops:204.0pt'><span style='mso-spacerun:yes'>   
! </span>Refer to <a href="#_Appendix_A:_Registry_Values">Appendix A</a> section
  2.1 for more information.</p>
  
  <p class=MsoNormal><span style='mso-spacerun:yes'>    </span>Columns that are
  unspecified should be left empty.</p>
  
! <p class=MsoNormal><span style='mso-spacerun:yes'>    </span>We create a new feature
! and component to hold the new registry keys.</p>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 6517,6549 ----
  <p class=MsoNormal><span style='mso-tab-count:1'>            </span><span
  style='mso-spacerun:yes'>    </span>(leave other fields blank)</p>
  
! <p class=MsoNormal style='margin-left:35.45pt'>The sequence number of 1000 designates
! this as the media source for the newly added file.</p>
  
! <h4><a name="_Toc126872262"></a><a name="_Toc115416193"></a><a
! name="_2.3.1_Components_for_Configuration "></a><span style='mso-bookmark:_Toc126872262'><span
! style='mso-bookmark:_Toc115416193'>7.2.3.1 Components for Configuration Files</span></span></h4>
  
  <p class=PreformattedText style='text-indent:35.45pt'>CellServDB:
  'cpf_CellServDB' (ID {D5BA4C15-DBEC-4292-91FC-B54C30F24F2A})</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872263"></a><a
! name="_Toc115416194"><span style='mso-bookmark:_Toc126872263'>7.2.4 Adding
! Domain Specific Registry Keys</span></a></h3>
  
  <p class=MsoNormal>Following is an example for adding domain specific registry
  keys.</p>
  
  <p class=MsoNormal style='tab-stops:204.0pt'><span style='mso-spacerun:yes'>   
! </span>Refer to <a
! href="oafw-1-4-release-notes.doc#_Appendix_A:_Registry_Values">Appendix A</a> section
  2.1 for more information.</p>
  
  <p class=MsoNormal><span style='mso-spacerun:yes'>    </span>Columns that are
  unspecified should be left empty.</p>
  
! <p class=MsoNormal><span style='mso-spacerun:yes'>    </span>We create a new
! feature and component to hold the new registry keys.</p>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 5623,5629 ****
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>      </span>(new row)<br>
    <span style='mso-tab-count:1'>            </span>Feature<span
    style='mso-tab-count:1'>            </span>: 'feaDomainKeys'<br>
    <span style='mso-tab-count:1'>            </span>Feature Parent<span
--- 6557,6563 ----
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>        </span>(new row)<br>
    <span style='mso-tab-count:1'>            </span>Feature<span
    style='mso-tab-count:1'>            </span>: 'feaDomainKeys'<br>
    <span style='mso-tab-count:1'>            </span>Feature Parent<span
***************
*** 5645,5652 ****
   <tr style='mso-yfti-irow:2'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>      </span>(new row)<br>
!   <span style='mso-spacerun:yes'>    </span><span style='mso-tab-count:1'>      </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_DomainKeys'<br>
    <span style='mso-tab-count:1'>            </span>ComponentId<span
    style='mso-tab-count:1'>  </span>: '{4E3FCBF4-8BE7-40B2-A108-C47CF743C627}'<br>
--- 6579,6586 ----
   <tr style='mso-yfti-irow:2'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>        </span>(new row)<br>
!   <span style='mso-spacerun:yes'>    </span><span style='mso-tab-count:1'>        </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_DomainKeys'<br>
    <span style='mso-tab-count:1'>            </span>ComponentId<span
    style='mso-tab-count:1'>  </span>: '{4E3FCBF4-8BE7-40B2-A108-C47CF743C627}'<br>
***************
*** 5667,5673 ****
   <tr style='mso-yfti-irow:4'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>      </span>(new row)<br>
    <span style='mso-tab-count:1'>            </span>Feature<span
    style='mso-tab-count:1'>            </span>: 'feaDomainKeys'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
--- 6601,6607 ----
   <tr style='mso-yfti-irow:4'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>        </span>(new row)<br>
    <span style='mso-tab-count:1'>            </span>Feature<span
    style='mso-tab-count:1'>            </span>: 'feaDomainKeys'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
***************
*** 5676,5683 ****
   </tr>
   <tr style='mso-yfti-irow:5'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal><span style='mso-spacerun:yes'>   </span><span
!   style='mso-spacerun:yes'> </span>'Registry' table:</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:6'>
--- 6610,6617 ----
   </tr>
   <tr style='mso-yfti-irow:5'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=MsoNormal><span style='mso-spacerun:yes'>    </span>'Registry'
!   table:</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:6'>
***************
*** 5702,5708 ****
    <span style='mso-tab-count:1'>            </span>Root<span style='mso-tab-count:
    2'>                </span>: 2<br>
    <span style='mso-tab-count:1'>            </span>Key<span style='mso-tab-count:
!   2'>                 </span>: 'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '*'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
--- 6636,6643 ----
    <span style='mso-tab-count:1'>            </span>Root<span style='mso-tab-count:
    2'>                </span>: 2<br>
    <span style='mso-tab-count:1'>            </span>Key<span style='mso-tab-count:
!   2'>                 </span>:
!   'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '*'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
***************
*** 5751,5758 ****
    <span style='mso-tab-count:1'>            </span>Root<span style='mso-tab-count:
    2'>                </span>: 2<br>
    <span style='mso-tab-count:1'>            </span>Key<span style='mso-tab-count:
!   2'>                 </span>:
!   SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '*'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
--- 6686,6692 ----
    <span style='mso-tab-count:1'>            </span>Root<span style='mso-tab-count:
    2'>                </span>: 2<br>
    <span style='mso-tab-count:1'>            </span>Key<span style='mso-tab-count:
!   2'>                 </span>: SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '*'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
***************
*** 5785,5791 ****
    <span style='mso-tab-count:1'>            </span>Root<span style='mso-tab-count:
    2'>                </span>: 2<br>
    <span style='mso-tab-count:1'>            </span>Key<span style='mso-tab-count:
!   2'>                 </span>: 'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: 'FailLoginsSilently'<br>
    <span style='mso-tab-count:1'>            </span>Value<span style='mso-tab-count:
--- 6719,6726 ----
    <span style='mso-tab-count:1'>            </span>Root<span style='mso-tab-count:
    2'>                </span>: 2<br>
    <span style='mso-tab-count:1'>            </span>Key<span style='mso-tab-count:
!   2'>                 </span>:
!   'SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: 'FailLoginsSilently'<br>
    <span style='mso-tab-count:1'>            </span>Value<span style='mso-tab-count:
***************
*** 5801,5812 ****
  
  <p class=MsoNormal><o:p>&nbsp;</o:p></p>
  
! <p class=MsoNormal>The example adds domain specific keys for 'ATHENA.MIT.EDU' (enable
! integrated logon) and 'LOCALHOST' (disable integrated logon and fail logins
! silently).</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416195">7.2.5
! Adding Site Specific Freelance Registry Keys</a></h3>
  
  <p class=MsoNormal>Following is an example for adding site specific Freelance
  registry keys to pre-populate the Mountpoints and Symlinks in the fake root.afs
--- 6736,6748 ----
  
  <p class=MsoNormal><o:p>&nbsp;</o:p></p>
  
! <p class=MsoNormal>The example adds domain specific keys for 'ATHENA.MIT.EDU'
! (enable integrated logon) and 'LOCALHOST' (disable integrated logon and fail
! logins silently).</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872264"></a><a
! name="_Toc115416195"><span style='mso-bookmark:_Toc126872264'>7.2.5 Adding Site
! Specific Freelance Registry Keys</span></a></h3>
  
  <p class=MsoNormal>Following is an example for adding site specific Freelance
  registry keys to pre-populate the Mountpoints and Symlinks in the fake root.afs
***************
*** 5830,5836 ****
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>      </span>(new row)<br>
    <span style='mso-tab-count:1'>            </span>Feature<span
    style='mso-tab-count:1'>            </span>: 'feaFreelanceKeys'<br>
    <span style='mso-tab-count:1'>            </span>Feature Parent<span
--- 6766,6772 ----
   <tr style='mso-yfti-irow:0'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>        </span>(new row)<br>
    <span style='mso-tab-count:1'>            </span>Feature<span
    style='mso-tab-count:1'>            </span>: 'feaFreelanceKeys'<br>
    <span style='mso-tab-count:1'>            </span>Feature Parent<span
***************
*** 5852,5859 ****
   <tr style='mso-yfti-irow:2'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>      </span>(new row)<br>
!   <span style='mso-spacerun:yes'>    </span><span style='mso-tab-count:1'>      </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'<br>
    <span style='mso-tab-count:1'>            </span>ComponentId<span
    style='mso-tab-count:1'>  </span>: '{4E3B3CBF4-9AE7-40C3-7B09-C48CF842C583}'<br>
--- 6788,6795 ----
   <tr style='mso-yfti-irow:2'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>        </span>(new row)<br>
!   <span style='mso-spacerun:yes'>    </span><span style='mso-tab-count:1'>        </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'<br>
    <span style='mso-tab-count:1'>            </span>ComponentId<span
    style='mso-tab-count:1'>  </span>: '{4E3B3CBF4-9AE7-40C3-7B09-C48CF842C583}'<br>
***************
*** 5874,5880 ****
   <tr style='mso-yfti-irow:4'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>      </span>(new row)<br>
    <span style='mso-tab-count:1'>            </span>Feature<span
    style='mso-tab-count:1'>            </span>: 'feaFreelanceKeys'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
--- 6810,6816 ----
   <tr style='mso-yfti-irow:4'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
    <p class=MsoNormal><span style='mso-spacerun:yes'>    </span><span
!   style='mso-tab-count:1'>        </span>(new row)<br>
    <span style='mso-tab-count:1'>            </span>Feature<span
    style='mso-tab-count:1'>            </span>: 'feaFreelanceKeys'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
***************
*** 5911,5918 ****
    2'>                 </span>: 'SOFTWARE\OpenAFS\Client\Freelance'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '0'<br>
!   <span style='mso-spacerun:yes'>  </span><span style='mso-tab-count:1'>         </span>Value<span
!   style='mso-spacerun:yes'>           </span><span style='mso-tab-count:1'>         </span>:
    'athena.mit.edu#athena.mit.edu:root.cell.'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'</p>
--- 6847,6854 ----
    2'>                 </span>: 'SOFTWARE\OpenAFS\Client\Freelance'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '0'<br>
!   <span style='mso-spacerun:yes'>  </span><span style='mso-tab-count:1'>          </span>Value<span
!   style='mso-spacerun:yes'>           </span><span style='mso-tab-count:1'>   </span>:
    'athena.mit.edu#athena.mit.edu:root.cell.'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'</p>
***************
*** 5929,5936 ****
    2'>                 </span>: 'SOFTWARE\OpenAFS\Client\Freelance'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '1'<br>
!   <span style='mso-spacerun:yes'>   </span><span style='mso-tab-count:1'>       </span>Value<span
!   style='mso-spacerun:yes'>           </span><span style='mso-tab-count:1'>         </span>:
    '.athena.mit.edu%athena.mit.edu:root.cell.'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'</p>
--- 6865,6872 ----
    2'>                 </span>: 'SOFTWARE\OpenAFS\Client\Freelance'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '1'<br>
!   <span style='mso-spacerun:yes'>   </span><span style='mso-tab-count:1'>         </span>Value<span
!   style='mso-spacerun:yes'>           </span><span style='mso-tab-count:1'>   </span>:
    '.athena.mit.edu%athena.mit.edu:root.cell.'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'</p>
***************
*** 5960,5967 ****
    2'>                 </span>: 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '0'<br>
!   <span style='mso-spacerun:yes'> </span><span style='mso-tab-count:1'>          </span>Value<span
!   style='mso-spacerun:yes'>           </span><span style='mso-tab-count:1'>         </span>:
    '<st1:GivenName w:st="on">athena</st1:GivenName>:athena.mit.edu.'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'</p>
--- 6896,6903 ----
    2'>                 </span>: 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '0'<br>
!   <span style='mso-spacerun:yes'> </span><span style='mso-tab-count:1'>           </span>Value<span
!   style='mso-spacerun:yes'>           </span><span style='mso-tab-count:1'>   </span>:
    '<st1:GivenName w:st="on">athena</st1:GivenName>:athena.mit.edu.'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'</p>
***************
*** 5978,5985 ****
    2'>                 </span>: 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '1'<br>
!   <span style='mso-spacerun:yes'>   </span><span style='mso-tab-count:1'>       </span>Value<span
!   style='mso-spacerun:yes'>           </span><span style='mso-tab-count:1'>         </span>:
    '.athena:.athena.mit.edu.'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'</p>
--- 6914,6921 ----
    2'>                 </span>: 'SOFTWARE\OpenAFS\Client\Freelance\Symlinks'<br>
    <span style='mso-tab-count:1'>            </span>Name<span style='mso-tab-count:
    2'>              </span>: '1'<br>
!   <span style='mso-spacerun:yes'>   </span><span style='mso-tab-count:1'>         </span>Value<span
!   style='mso-spacerun:yes'>           </span><span style='mso-tab-count:1'>   </span>:
    '.athena:.athena.mit.edu.'<br>
    <span style='mso-tab-count:1'>            </span>Component<span
    style='mso-tab-count:1'>     </span>: 'rcm_FreelanceKeys'</p>
***************
*** 5991,6000 ****
  athena.mit.edu cell's root.afs volume as well as a read-write mountpoint.<span
  style='mso-spacerun:yes'>  </span>Aliases are also provided using symlinks.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417101"></a><a
! name="_Toc115416196"></a><a name="_Ref115275867"><span style='mso-bookmark:
! _Toc115416196'><span style='mso-bookmark:_Toc115417101'>7.3 Additional
! Resources</span></span></a></h2>
  
  <p class=MsoNormal>If you want to add registry keys or files you need to create
  new components and features for those.<span style='mso-spacerun:yes'> 
--- 6927,6936 ----
  athena.mit.edu cell's root.afs volume as well as a read-write mountpoint.<span
  style='mso-spacerun:yes'>  </span>Aliases are also provided using symlinks.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872265"></a><a
! name="_Toc115417101"></a><a name="_Toc115416196"></a><a name="_Ref115275867"><span
! style='mso-bookmark:_Toc115416196'><span style='mso-bookmark:_Toc115417101'><span
! style='mso-bookmark:_Toc126872265'>7.3 Additional Resources</span></span></span></a></h2>
  
  <p class=MsoNormal>If you want to add registry keys or files you need to create
  new components and features for those.<span style='mso-spacerun:yes'> 
***************
*** 6002,6025 ****
  
  <p class=MsoNormal>It is beyond the scope of this document to provide a
  comprehensive overview of how to add new resources through a transform.<span
! style='mso-spacerun:yes'>  </span>Please refer to the &quot;Windows
! Installer&quot; documentation for details.<span style='mso-spacerun:yes'> 
! </span>The relevant section is at :</p>
  
  <p class=MsoNormal>http://msdn.microsoft.com/library/en-us/msi/setup/using_transforms_to_add_resources.asp</p>
  
  <p class=MsoNormal>A sample walkthrough of adding a new configuration file is
  in section 2.3.</p>
  
! <p class=MsoNormal>Add new features under the 'feaClient' or 'feaServer' as
! appropriate and set the 'Level' column for those features to equal the 'Level'
! for their parent features for consistency.<span style='mso-spacerun:yes'> 
! </span>Note that none of the features in the OpenAFS for Windows MSI package
! are designed to be installed to run from 'source' or 'advertised'.<span
  style='mso-spacerun:yes'>  </span>It is recommended that you set
  'msidbFeatureAttributesFavorLocal' (0), 'msidbFeatureAttributesFollowParent'
! (2) and 'msidbFeatureAttributesDisallowAdvertise' (8) attributes for new
! features.</p>
  
  <p class=MsoNormal>If you are creating new components, retain the same
  component GUID when creating new transforms against new releases of the OpenAFS
--- 6938,6960 ----
  
  <p class=MsoNormal>It is beyond the scope of this document to provide a
  comprehensive overview of how to add new resources through a transform.<span
! style='mso-spacerun:yes'>  </span>Please refer to the &quot;Windows Installer&quot;
! documentation for details.<span style='mso-spacerun:yes'>  </span>The relevant
! section is at :</p>
  
  <p class=MsoNormal>http://msdn.microsoft.com/library/en-us/msi/setup/using_transforms_to_add_resources.asp</p>
  
  <p class=MsoNormal>A sample walkthrough of adding a new configuration file is
  in section 2.3.</p>
  
! <p class=MsoNormal>Add new features under the 'feaClient' or 'feaServer' as appropriate
! and set the 'Level' column for those features to equal the 'Level' for their
! parent features for consistency.<span style='mso-spacerun:yes'>  </span>Note
! that none of the features in the OpenAFS for Windows MSI package are designed
! to be installed to run from 'source' or 'advertised'.<span
  style='mso-spacerun:yes'>  </span>It is recommended that you set
  'msidbFeatureAttributesFavorLocal' (0), 'msidbFeatureAttributesFollowParent'
! (2) and 'msidbFeatureAttributesDisallowAdvertise' (8) attributes for new features.</p>
  
  <p class=MsoNormal>If you are creating new components, retain the same
  component GUID when creating new transforms against new releases of the OpenAFS
***************
*** 6038,6075 ****
  <p class=MsoNormal>See the Platform SDK documentation for information on
  command line options for MSITRAN.EXE.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417102"></a><a
! name="_Toc115416197"><span style='mso-bookmark:_Toc115417102'>7.4. Upgrades</span></a></h2>
  
! <p class=MsoNormal>The MSI package is designed to replace (or uninstall)
! previous versions of OpenAFS for Windows during installation.<span
! style='mso-spacerun:yes'>  </span>Previous versions are installations that used
! the NSIS (.EXE) installer or an MSI that has a known Upgrade Code and a
! different Product Code.<span style='mso-spacerun:yes'>  </span>The MSI does not
! directly upgrade an existing installation.<span style='mso-spacerun:yes'> 
! </span>This is intentional and ensures that development releases which do not
! have strictly increasing version numbers are properly upgraded.</p>
  
! <p class=MsoNormal>Versions of OpenAFS that are upgraded by the MSI package
! are:</p>
! 
! <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l12 level1 lfo34;
  tab-stops:list 36.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1)<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>OpenAFS
  MSI package<br>
  Upgrade code {6823EEDD-84FC-4204-ABB3-A80D25779833}<br>
! All versions regardless of Product Code</p>
  
! <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l12 level1 lfo34;
  tab-stops:list 36.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2)<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>MIT's
  Transarc AFS MSI package<br>
  Upgrade code {5332B94F-DE38-4927-9EAB-51F4A64193A7}<br>
! All versions up to 3.6.2</p>
  
! <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l12 level1 lfo34;
  tab-stops:list 36.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3)<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>OpenAFS
--- 6973,7008 ----
  <p class=MsoNormal>See the Platform SDK documentation for information on
  command line options for MSITRAN.EXE.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872266"></a><a
! name="_Toc115417102"></a><a name="_Toc115416197"><span style='mso-bookmark:
! _Toc115417102'><span style='mso-bookmark:_Toc126872266'>7.4. Upgrades</span></span></a></h2>
! 
! <p class=MsoNormal>The MSI package is designed to uninstall previous versions
! of OpenAFS for Windows during installation.<span style='mso-spacerun:yes'> 
! </span>Note that it doesn't directly upgrade an existing installation.<span
! style='mso-spacerun:yes'>  </span>This is intentional and ensures that
! development releases which do not have strictly increasing version numbers are
! properly upgraded.</p>
  
! <p class=MsoNormal>Versions of OpenAFS that are upgraded by the MSI package are:</p>
  
! <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l22 level1 lfo31;
  tab-stops:list 36.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>1)<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>OpenAFS
  MSI package<br>
  Upgrade code {6823EEDD-84FC-4204-ABB3-A80D25779833}<br>
! Up to current release</p>
  
! <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l22 level1 lfo31;
  tab-stops:list 36.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>2)<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>MIT's
  Transarc AFS MSI package<br>
  Upgrade code {5332B94F-DE38-4927-9EAB-51F4A64193A7}<br>
! Up to version 3.6.2</p>
  
! <p class=MsoNormal style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:l22 level1 lfo31;
  tab-stops:list 36.0pt'><![if !supportLists]><span style='mso-fareast-font-family:
  Thorndale;mso-bidi-font-family:Thorndale'><span style='mso-list:Ignore'>3)<span
  style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><![endif]>OpenAFS
***************
*** 6084,6140 ****
  deployments will fail on machines that have the OpenAFS NSIS package installed.</p>
  
  <p class=MsoNormal>If you have used a different MSI package to install OpenAFS
! and wish to upgrade it you can author rows into the 'Upgrade' table as
! described in the Platform SDK.</p>
  
  <p class=MsoNormal>When performing an upgrade with msiexec.exe execute the MSI
  with the repair options &quot;vomus&quot;.</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'>7.4.1. OpenAFS MSI Product Codes</h3>
! 
! <h4>Release 1.3</h4>
! 
! <table class=MsoTableGrid border=1 cellspacing=0 cellpadding=0
!  style='border-collapse:collapse;border:none;mso-border-alt:solid windowtext .5pt;
!  mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;mso-border-insideh:
!  .5pt solid windowtext;mso-border-insidev:.5pt solid windowtext'>
!  <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
!   <td width=118 valign=top style='width:88.55pt;border:solid windowtext 1.0pt;
!   mso-border-alt:solid windowtext .5pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>i386_w2k<span style='mso-spacerun:yes'>   </span></p>
!   </td>
!   <td width=481 valign=top style='width:361.05pt;border:solid windowtext 1.0pt;
!   border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
!   solid windowtext .5pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <p class=PreformattedText>{CCAF9E14-976E-46C0-8A1B-A218EAB7ADC5}</p>
!   </td>
!  </tr>
! </table>
! 
! <h4>Release 1.4 and later</h4>
! 
! <p class=MsoNormal>Each build of the installation package will have a randomly
! assigned Product Code assigned to it.<span style='mso-spacerun:yes'>  </span>As
! each release of OpenAFS is shipped using a unique file name the Product IDs
! must be unique as well.</p>
! 
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417116"></a><a
! name="_Toc115417103"></a><a name="_Toc115416198"></a><a
  name="_Appendix_A:_Registry_Values"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc115417116'><span style='mso-bookmark:_Toc115417103'><span
! style='mso-bookmark:_Toc115416198'></span></span></span><![endif]><span
! style='mso-bookmark:_Toc115417116'><span style='mso-bookmark:_Toc115417103'><span
! style='mso-bookmark:_Toc115416198'>Appendix A: Registry Values</span></span></span></h1>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417104"></a><a
! name="_Toc115416199"><span style='mso-bookmark:_Toc115417104'>A.1. Service
! parameters</span></a></h2>
  
  <p class=MsoBodyText>The service parameters primarily affect the behavior of
  the AFS client service (afsd_service.exe).</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416200">Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7017,7047 ----
  deployments will fail on machines that have the OpenAFS NSIS package installed.</p>
  
  <p class=MsoNormal>If you have used a different MSI package to install OpenAFS
! and wish to upgrade it you can author rows into the 'Upgrade' table as described
! in the Platform SDK.</p>
  
  <p class=MsoNormal>When performing an upgrade with msiexec.exe execute the MSI
  with the repair options &quot;vomus&quot;.</p>
  
! <h1 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872267"></a><a
! name="_Toc115417116"></a><a name="_Toc115417103"></a><a name="_Toc115416198"></a><a
  name="_Appendix_A:_Registry_Values"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc126872267'><span style='mso-bookmark:_Toc115417116'><span
! style='mso-bookmark:_Toc115417103'><span style='mso-bookmark:_Toc115416198'></span></span></span></span><![endif]><span
! style='mso-bookmark:_Toc126872267'><span style='mso-bookmark:_Toc115417116'><span
! style='mso-bookmark:_Toc115417103'><span style='mso-bookmark:_Toc115416198'>Appendix
! A: Registry Values</span></span></span></span></h1>
! 
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872268"></a><a
! name="_Toc115417104"></a><a name="_Toc115416199"><span style='mso-bookmark:
! _Toc115417104'><span style='mso-bookmark:_Toc126872268'>A.1. Service parameters</span></span></a></h2>
  
  <p class=MsoBodyText>The service parameters primarily affect the behavior of
  the AFS client service (afsd_service.exe).</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872269"></a><a
! name="_Toc115416200"><span style='mso-bookmark:_Toc126872269'>Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6142,6148 ****
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416201">Value: LANadapter</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD<br>
    Default: -1<br>
    Variable: LANadapter</p>
--- 7049,7057 ----
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872270"></a><a
!   name="_Toc115416201"><span style='mso-bookmark:_Toc126872270'>Value:
!   LANadapter</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD<br>
    Default: -1<br>
    Variable: LANadapter</p>
***************
*** 6161,6168 ****
   <tr style='mso-yfti-irow:0;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416202"></a><a name="_Value___:_CacheSize"></a><span
!   style='mso-bookmark:_Toc115416202'>Value: CacheSize</span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 98304 (CM_CONFIGDEFAULT_CACHESIZE)<br>
    Variable: cm_initParams.cacheSize</p>
--- 7070,7079 ----
   <tr style='mso-yfti-irow:0;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872271"></a><a
!   name="_Toc115416202"></a><a name="_Value___: CacheSize"></a><span
!   style='mso-bookmark:_Toc126872271'><span style='mso-bookmark:_Toc115416202'>Value:
!   CacheSize</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 98304 (CM_CONFIGDEFAULT_CACHESIZE)<br>
    Variable: cm_initParams.cacheSize</p>
***************
*** 6172,6178 ****
   <tr style='mso-yfti-irow:1;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416203">Value: ChunkSize</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 17 (CM_CONFIGDEFAULT_CHUNKSIZE)<br>
    Variable: cm_logChunkSize (cm_chunkSize = 1 &lt;&lt; cm_logChunkSize)</p>
--- 7083,7091 ----
   <tr style='mso-yfti-irow:1;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872272"></a><a
!   name="_Toc115416203"><span style='mso-bookmark:_Toc126872272'>Value:
!   ChunkSize</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 17 (CM_CONFIGDEFAULT_CHUNKSIZE)<br>
    Variable: cm_logChunkSize (cm_chunkSize = 1 &lt;&lt; cm_logChunkSize)</p>
***************
*** 6183,6189 ****
   <tr style='mso-yfti-irow:2;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416204">Value: Daemons</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 2 (CM_CONFIGDEFAULT_DAEMONS)<br>
    Variable: numBkgD</p>
--- 7096,7103 ----
   <tr style='mso-yfti-irow:2;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872273"></a><a
!   name="_Toc115416204"><span style='mso-bookmark:_Toc126872273'>Value: Daemons</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 2 (CM_CONFIGDEFAULT_DAEMONS)<br>
    Variable: numBkgD</p>
***************
*** 6194,6211 ****
   <tr style='mso-yfti-irow:3;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416205">Value: ServerThreads</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 25 (CM_CONFIGDEFAULT_SVTHREADS)<br>
    Variable: numSvThreads</p>
!   <p class=MsoBodyText>Number of SMB server threads (number of threads of smb_Server).
!   (see smb_Server in smb.c).</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:4;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416206">Value: Stats</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 10000 (CM_CONFIGDEFAULT_STATS)<br>
    Variable: cm_initParams.nStatCaches</p>
--- 7108,7128 ----
   <tr style='mso-yfti-irow:3;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872274"></a><a
!   name="_Toc115416205"><span style='mso-bookmark:_Toc126872274'>Value:
!   ServerThreads</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 25 (CM_CONFIGDEFAULT_SVTHREADS)<br>
    Variable: numSvThreads</p>
!   <p class=MsoBodyText>Number of SMB server threads (number of threads of
!   smb_Server). (see smb_Server in smb.c).</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:4;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872275"></a><a
!   name="_Toc115416206"><span style='mso-bookmark:_Toc126872275'>Value: Stats</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 10000 (CM_CONFIGDEFAULT_STATS)<br>
    Variable: cm_initParams.nStatCaches</p>
***************
*** 6215,6222 ****
   <tr style='mso-yfti-irow:5;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5><a name="_Toc115416207"></a><a name="_Value_:_LogoffPreserveTokens"></a><span
!   style='mso-bookmark:_Toc115416207'>Value: LogoffPreserveTokens</span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default : 0</p>
    <p class=MsoBodyText>If enabled (set to 1), the Logoff Event handler will not
--- 7132,7141 ----
   <tr style='mso-yfti-irow:5;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872276"></a><a
!   name="_Toc115416207"></a><a name="_Value_:_LogoffPreserveTokens"></a><span
!   style='mso-bookmark:_Toc126872276'><span style='mso-bookmark:_Toc115416207'>Value:
!   LogoffPreserveTokens</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default : 0</p>
    <p class=MsoBodyText>If enabled (set to 1), the Logoff Event handler will not
***************
*** 6227,6233 ****
   <tr style='mso-yfti-irow:6;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416208">Value: RootVolume</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;root.afs&quot;<br>
    Variable: cm_rootVolumeName</p>
--- 7146,7154 ----
   <tr style='mso-yfti-irow:6;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872277"></a><a
!   name="_Toc115416208"><span style='mso-bookmark:_Toc126872277'>Value:
!   RootVolume</span></a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;root.afs&quot;<br>
    Variable: cm_rootVolumeName</p>
***************
*** 6237,6251 ****
   <tr style='mso-yfti-irow:7;height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
!   <h5><a name="_Toc115416209"></a><a name="_Value_:_Mountroot"></a><span
!   style='mso-bookmark:_Toc115416209'>Value: Mountroot</span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;/afs&quot;<br>
    Variable: cm_mountRoot</p>
    <p class=MsoBodyText>Name of root mount point.<span
    style='mso-spacerun:yes'>  </span>In symlinks, if a path starts with
!   cm_mountRoot, it is assumed that the path is absolute (as opposed to relative)
!   and is adjusted accordingly. Eg: if a path is specified as
    /afs/athena.mit.edu/foo/bar/baz and cm_mountRoot is &quot;/afs&quot;, then
    the path is interpreted as \\afs\all\athena.mit.edu\foo\bar\baz.<span
    style='mso-spacerun:yes'>  </span>If a path does not start with with
--- 7158,7174 ----
   <tr style='mso-yfti-irow:7;height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872278"></a><a
!   name="_Toc115416209"></a><a name="_Value_:_Mountroot"></a><span
!   style='mso-bookmark:_Toc126872278'><span style='mso-bookmark:_Toc115416209'>Value:
!   Mountroot</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;/afs&quot;<br>
    Variable: cm_mountRoot</p>
    <p class=MsoBodyText>Name of root mount point.<span
    style='mso-spacerun:yes'>  </span>In symlinks, if a path starts with
!   cm_mountRoot, it is assumed that the path is absolute (as opposed to
!   relative) and is adjusted accordingly. Eg: if a path is specified as
    /afs/athena.mit.edu/foo/bar/baz and cm_mountRoot is &quot;/afs&quot;, then
    the path is interpreted as \\afs\all\athena.mit.edu\foo\bar\baz.<span
    style='mso-spacerun:yes'>  </span>If a path does not start with with
***************
*** 6256,6263 ****
   <tr style='mso-yfti-irow:8;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416210"></a><a name="_Value_:_CachePath"></a><span
!   style='mso-bookmark:_Toc115416210'>Value: CachePath</span></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: &quot;%TEMP%\AFSCache&quot;<br>
    Variable: cm_CachePath</p>
--- 7179,7188 ----
   <tr style='mso-yfti-irow:8;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872279"></a><a
!   name="_Toc115416210"></a><a name="_Value_:_CachePath"></a><span
!   style='mso-bookmark:_Toc126872279'><span style='mso-bookmark:_Toc115416210'>Value:
!   CachePath</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: &quot;%TEMP%\AFSCache&quot;<br>
    Variable: cm_CachePath</p>
***************
*** 6270,6276 ****
   <tr style='mso-yfti-irow:9;height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5><a name="_Toc115416211">Value: NonPersistentCaching</a></h5>
    <p class=MsoBodyText>Type: DWORD [0..1]<br>
    Default: 0<br>
    Variable: buf_CacheType</p>
--- 7195,7203 ----
   <tr style='mso-yfti-irow:9;height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872280"></a><a
!   name="_Toc115416211"><span style='mso-bookmark:_Toc126872280'>Value:
!   NonPersistentCaching</span></a></h5>
    <p class=MsoBodyText>Type: DWORD [0..1]<br>
    Default: 0<br>
    Variable: buf_CacheType</p>
***************
*** 6284,6290 ****
   <tr style='mso-yfti-irow:10;height:125.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:125.5pt'>
!   <h5><a name="_Toc115416212">Value: ValidateCache</a></h5>
    <p class=MsoBodyText>Type: DWORD [0..2]<br>
    Default: 1<br>
    Variable: buf_CacheType</p>
--- 7211,7219 ----
   <tr style='mso-yfti-irow:10;height:125.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:125.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872281"></a><a
!   name="_Toc115416212"><span style='mso-bookmark:_Toc126872281'>Value:
!   ValidateCache</span></a></h5>
    <p class=MsoBodyText>Type: DWORD [0..2]<br>
    Default: 1<br>
    Variable: buf_CacheType</p>
***************
*** 6298,6304 ****
   <tr style='mso-yfti-irow:11;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416213">Value: TrapOnPanic</a></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: traceOnPanic</p>
--- 7227,7235 ----
   <tr style='mso-yfti-irow:11;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872282"></a><a
!   name="_Toc115416213"><span style='mso-bookmark:_Toc126872282'>Value:
!   TrapOnPanic</span></a></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: traceOnPanic</p>
***************
*** 6309,6316 ****
   <tr style='mso-yfti-irow:12;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416214"></a><a name="_Value___:_NetbiosName"></a><span
!   style='mso-bookmark:_Toc115416214'>Value: NetbiosName</span></h5>
    <p class=MsoBodyText>Type: REG_EXPAND_SZ<br>
    Default: &quot;AFS&quot;<br>
    Variable: cm_NetbiosName</p>
--- 7240,7249 ----
   <tr style='mso-yfti-irow:12;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872283"></a><a
!   name="_Toc115416214"></a><a name="_Value___: NetbiosName"></a><span
!   style='mso-bookmark:_Toc126872283'><span style='mso-bookmark:_Toc115416214'>Value:
!   NetbiosName</span></span></h5>
    <p class=MsoBodyText>Type: REG_EXPAND_SZ<br>
    Default: &quot;AFS&quot;<br>
    Variable: cm_NetbiosName</p>
***************
*** 6323,6329 ****
   <tr style='mso-yfti-irow:13;height:152.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:152.0pt'>
!   <h5><a name="_Toc115416215">Value: IsGateway</a></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: isGateway</p>
--- 7256,7264 ----
   <tr style='mso-yfti-irow:13;height:152.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:152.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872284"></a><a
!   name="_Toc115416215"><span style='mso-bookmark:_Toc126872284'>Value:
!   IsGateway</span></a></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: isGateway</p>
***************
*** 6341,6347 ****
   <tr style='mso-yfti-irow:14;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416216">Value: ReportSessionStartups</a></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: reportSessionStartups</p>
--- 7276,7284 ----
   <tr style='mso-yfti-irow:14;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872285"></a><a
!   name="_Toc115416216"><span style='mso-bookmark:_Toc126872285'>Value:
!   ReportSessionStartups</span></a></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: reportSessionStartups</p>
***************
*** 6354,6361 ****
   <tr style='mso-yfti-irow:15;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416217"></a><a name="_Value_:_TraceBufferSize"></a><span
!   style='mso-bookmark:_Toc115416217'>Value: TraceBufferSize</span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5000 (CM_CONFIGDEFAULT_TRACEBUFSIZE)<br>
    Variable: traceBufSize</p>
--- 7291,7300 ----
   <tr style='mso-yfti-irow:15;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872286"></a><a
!   name="_Toc115416217"></a><a name="_Value_:_TraceBufferSize"></a><span
!   style='mso-bookmark:_Toc126872286'><span style='mso-bookmark:_Toc115416217'>Value:
!   TraceBufferSize</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5000 (CM_CONFIGDEFAULT_TRACEBUFSIZE)<br>
    Variable: traceBufSize</p>
***************
*** 6365,6372 ****
   <tr style='mso-yfti-irow:16;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416218"></a><a name="_Value_:_SysName"></a><span
!   style='mso-bookmark:_Toc115416218'>Value: SysName</span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;i386_nt40&quot;<br>
    Variable: cm_sysName</p>
--- 7304,7313 ----
   <tr style='mso-yfti-irow:16;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872287"></a><a
!   name="_Toc115416218"></a><a name="_Value_:_SysName"></a><span
!   style='mso-bookmark:_Toc126872287'><span style='mso-bookmark:_Toc115416218'>Value:
!   SysName</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;i386_nt40&quot;<br>
    Variable: cm_sysName</p>
***************
*** 6379,6386 ****
   <tr style='mso-yfti-irow:17;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416219"></a><a name="_Value_:_SecurityLevel"></a><span
!   style='mso-bookmark:_Toc115416219'>Value: SecurityLevel</span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: cryptall</p>
--- 7320,7329 ----
   <tr style='mso-yfti-irow:17;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872288"></a><a
!   name="_Toc115416219"></a><a name="_Value_:_SecurityLevel"></a><span
!   style='mso-bookmark:_Toc126872288'><span style='mso-bookmark:_Toc115416219'>Value:
!   SecurityLevel</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: cryptall</p>
***************
*** 6390,6397 ****
   <tr style='mso-yfti-irow:18;height:112.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:112.25pt'>
!   <h5><a name="_Toc115416220"></a><a name="_Value_:_UseDNS"></a><span
!   style='mso-bookmark:_Toc115416220'>Value: UseDNS</span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
    Variable: cm_dnsEnabled</p>
--- 7333,7342 ----
   <tr style='mso-yfti-irow:18;height:112.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:112.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872289"></a><a
!   name="_Toc115416220"></a><a name="_Value_:_UseDNS"></a><span
!   style='mso-bookmark:_Toc126872289'><span style='mso-bookmark:_Toc115416220'>Value:
!   UseDNS</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
    Variable: cm_dnsEnabled</p>
***************
*** 6404,6411 ****
   <tr style='mso-yfti-irow:19;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416221"></a><a name="_Value_:_FreelanceClient"></a><span
!   style='mso-bookmark:_Toc115416221'>Value: FreelanceClient</span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: cm_freelanceEnabled</p>
--- 7349,7358 ----
   <tr style='mso-yfti-irow:19;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872290"></a><a
!   name="_Toc115416221"></a><a name="_Value_:_FreelanceClient"></a><span
!   style='mso-bookmark:_Toc126872290'><span style='mso-bookmark:_Toc115416221'>Value:
!   FreelanceClient</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 0<br>
    Variable: cm_freelanceEnabled</p>
***************
*** 6415,6422 ****
   <tr style='mso-yfti-irow:20;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416222"></a><a name="_Value_:_HideDotFiles"></a><span
!   style='mso-bookmark:_Toc115416222'>Value: HideDotFiles</span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
    Variable: smb_hideDotFiles</p>
--- 7362,7371 ----
   <tr style='mso-yfti-irow:20;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872291"></a><a
!   name="_Toc115416222"></a><a name="_Value_:_HideDotFiles"></a><span
!   style='mso-bookmark:_Toc126872291'><span style='mso-bookmark:_Toc115416222'>Value:
!   HideDotFiles</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {1,0}<br>
    Default: 1<br>
    Variable: smb_hideDotFiles</p>
***************
*** 6428,6434 ****
   <tr style='mso-yfti-irow:21;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416223">Value: MaxMpxRequests</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 50<br>
    Variable: smb_maxMpxRequests</p>
--- 7377,7385 ----
   <tr style='mso-yfti-irow:21;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872292"></a><a
!   name="_Toc115416223"><span style='mso-bookmark:_Toc126872292'>Value:
!   MaxMpxRequests</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 50<br>
    Variable: smb_maxMpxRequests</p>
***************
*** 6439,6445 ****
   <tr style='mso-yfti-irow:22;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416224">Value: MaxVCPerServer</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 100<br>
    Variable: smb_maxVCPerServer</p>
--- 7390,7398 ----
   <tr style='mso-yfti-irow:22;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872293"></a><a
!   name="_Toc115416224"><span style='mso-bookmark:_Toc126872293'>Value:
!   MaxVCPerServer</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 100<br>
    Variable: smb_maxVCPerServer</p>
***************
*** 6449,6456 ****
   <tr style='mso-yfti-irow:23;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416225"></a><a name="_Value_:_Cell"></a><span
!   style='mso-bookmark:_Toc115416225'>Value: Cell</span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Variable: rootCellName</p>
--- 7402,7410 ----
   <tr style='mso-yfti-irow:23;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872294"></a><a
!   name="_Toc115416225"></a><a name="_Value_:_Cell"></a><span style='mso-bookmark:
!   _Toc126872294'><span style='mso-bookmark:_Toc115416225'>Value: Cell</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Variable: rootCellName</p>
***************
*** 6461,6467 ****
   <tr style='mso-yfti-irow:24;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416226">Value: RxNoJumbo</a></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 0<br>
    Variable: rx_nojumbo</p>
--- 7415,7423 ----
   <tr style='mso-yfti-irow:24;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872295"></a><a
!   name="_Toc115416226"><span style='mso-bookmark:_Toc126872295'>Value:
!   RxNoJumbo</span></a></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 0<br>
    Variable: rx_nojumbo</p>
***************
*** 6472,6479 ****
   <tr style='mso-yfti-irow:25;height:124.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:124.75pt'>
!   <h5><a name="_Toc115416227"></a><a name="_Value_:_RxMaxMTU"></a><span
!   style='mso-bookmark:_Toc115416227'>Value: RxMaxMTU</span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
    Variable: rx_mtu</p>
--- 7428,7437 ----
   <tr style='mso-yfti-irow:25;height:124.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:124.75pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872296"></a><a
!   name="_Toc115416227"></a><a name="_Value_:_RxMaxMTU"></a><span
!   style='mso-bookmark:_Toc126872296'><span style='mso-bookmark:_Toc115416227'>Value:
!   RxMaxMTU</span></span></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: -1<br>
    Variable: rx_mtu</p>
***************
*** 6486,6492 ****
   <tr style='mso-yfti-irow:26;height:151.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:151.75pt'>
!   <h5><a name="_Toc115416228">Value: ConnDeadTimeout</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 60 (seconds)<br>
    Variable: ConnDeadtimeout</p>
--- 7444,7452 ----
   <tr style='mso-yfti-irow:26;height:151.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:151.75pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872297"></a><a
!   name="_Toc115416228"><span style='mso-bookmark:_Toc126872297'>Value:
!   ConnDeadTimeout</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 60 (seconds)<br>
    Variable: ConnDeadtimeout</p>
***************
*** 6502,6508 ****
   <tr style='mso-yfti-irow:27;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416229">Value: HardDeadTimeout</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 120 (seconds)<br>
    Variable: HardDeadtimeout</p>
--- 7462,7470 ----
   <tr style='mso-yfti-irow:27;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872298"></a><a
!   name="_Toc115416229"><span style='mso-bookmark:_Toc126872298'>Value:
!   HardDeadTimeout</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 120 (seconds)<br>
    Variable: HardDeadtimeout</p>
***************
*** 6514,6521 ****
   <tr style='mso-yfti-irow:28;height:158.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:158.5pt'>
!   <h5><a name="_Toc115416230"></a><a name="_Value__:_TraceOption"></a><span
!   style='mso-bookmark:_Toc115416230'>Value: TraceOption</span></h5>
    <p class=MsoBodyText>Type: DWORD {0-15}<br>
    Default: 0</p>
    <p class=MsoBodyText>Enables logging of debug output to the Windows Event
--- 7476,7485 ----
   <tr style='mso-yfti-irow:28;height:158.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:158.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872299"></a><a
!   name="_Toc115416230"></a><a name="_Value__:_TraceOption"></a><span
!   style='mso-bookmark:_Toc126872299'><span style='mso-bookmark:_Toc115416230'>Value:
!   TraceOption</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0-15}<br>
    Default: 0</p>
    <p class=MsoBodyText>Enables logging of debug output to the Windows Event
***************
*** 6533,6539 ****
   <tr style='mso-yfti-irow:29;height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5><a name="_Toc115416231">Value: AllSubmount</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1</p>
    <p class=MsoBodyText>Variable: allSubmount (smb.c)</p>
--- 7497,7505 ----
   <tr style='mso-yfti-irow:29;height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872300"></a><a
!   name="_Toc115416231"><span style='mso-bookmark:_Toc126872300'>Value:
!   AllSubmount</span></a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1</p>
    <p class=MsoBodyText>Variable: allSubmount (smb.c)</p>
***************
*** 6546,6553 ****
   <tr style='mso-yfti-irow:30;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5><a name="_Toc115416232"></a><a name="_Value___:_NoFindLanaByName"></a><span
!   style='mso-bookmark:_Toc115416232'>Value: NoFindLanaByName</span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoBodyText>Disables the attempt to identity the network adapter to
--- 7512,7521 ----
   <tr style='mso-yfti-irow:30;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872301"></a><a
!   name="_Toc115416232"></a><a name="_Value___: NoFindLanaByName"></a><span
!   style='mso-bookmark:_Toc126872301'><span style='mso-bookmark:_Toc115416232'>Value:
!   NoFindLanaByName</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0</p>
    <p class=MsoBodyText>Disables the attempt to identity the network adapter to
***************
*** 6557,6563 ****
   <tr style='mso-yfti-irow:31;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5><a name="_Toc115416233">Value: MaxCPUs</a></h5>
    <p class=MsoBodyText>Type: DWORD {1..32} or {1..64} depending on the
    architecture<br>
    Default: &lt;no default&gt;</p>
--- 7525,7532 ----
   <tr style='mso-yfti-irow:31;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872302"></a><a
!   name="_Toc115416233"><span style='mso-bookmark:_Toc126872302'>Value: MaxCPUs</span></a></h5>
    <p class=MsoBodyText>Type: DWORD {1..32} or {1..64} depending on the
    architecture<br>
    Default: &lt;no default&gt;</p>
***************
*** 6570,6577 ****
   <tr style='mso-yfti-irow:32;height:151.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:151.75pt'>
!   <h5><a name="_Toc115416234"></a><a name="_Value___:_smbAuthType"></a><span
!   style='mso-bookmark:_Toc115416234'>Value: smbAuthType</span></h5>
    <p class=MsoBodyText>Type: DWORD {0..2}<br>
    Default: 2</p>
    <p class=MsoBodyText>If this value is specified, it defines the type of SMB
--- 7539,7548 ----
   <tr style='mso-yfti-irow:32;height:151.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:151.75pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872303"></a><a
!   name="_Toc115416234"></a><a name="_Value___: smbAuthType"></a><span
!   style='mso-bookmark:_Toc126872303'><span style='mso-bookmark:_Toc115416234'>Value:
!   smbAuthType</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0..2}<br>
    Default: 2</p>
    <p class=MsoBodyText>If this value is specified, it defines the type of SMB
***************
*** 6587,6640 ****
   <tr style='mso-yfti-irow:33;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416235"></a><a name="_Value___:_MaxLogSize"></a><span
!   style='mso-bookmark:_Toc115416235'>Value: MaxLogSize</span></h5>
    <p class=MsoBodyText>Type: DWORD {0 .. MAXDWORD}<br>
    Default: 100K</p>
    <p class=MsoBodyText>This entry determines the maximum size of the
!   %WINDIR%\TEMP\afsd_init.log file.<span style='mso-spacerun:yes'>  </span>If the
!   file is larger than this value when afsd_service.exe starts the file will be
!   reset to 0 bytes.<span style='mso-spacerun:yes'>  </span>If this value is 0,
!   it means the file should be allowed to grow indefinitely.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:34;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416236">Value: FlushOnHibernate</a></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 1</p>
    <p class=MsoBodyText>If set, flushes all volumes before the machine goes on
    hibernate or stand-by.</p>
    </td>
   </tr>
-  <tr style='mso-yfti-irow:35;height:65.75pt'>
-   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
-   height:65.75pt'>
-   <h5>Value: RxEnablePeerStats</h5>
-   <p class=MsoBodyText>Type: REG_DWORD<br>
-   Default: 0x0</p>
-   <p class=MsoBodyText>This value will enable the gathering of RX Statistics
-   for connections with the Cache Manager’s Peers.<span
-   style='mso-spacerun:yes'>  </span>This functionality can be adjusted at runtime
-   with the “fs rxstatpeer” command.</p>
-   </td>
-  </tr>
-  <tr style='mso-yfti-irow:36;mso-yfti-lastrow:yes;height:65.75pt'>
-   <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
-   height:65.75pt'>
-   <h5>Value: RxEnableProcessStats</h5>
-   <p class=MsoBodyText>Type: REG_DWORD<br>
-   Default: 0x0</p>
-   <p class=MsoBodyText>This value will enable the gathering of RX Statistics
-   for the Cache Manager’s Process.<span style='mso-spacerun:yes'>  </span>This functionality
-   can be adjusted at runtime with the “fs rxstatproc” command.</p>
-   </td>
-  </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416237">Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7558,7593 ----
   <tr style='mso-yfti-irow:33;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872304"></a><a
!   name="_Toc115416235"></a><a name="_Value___: MaxLogSize"></a><span
!   style='mso-bookmark:_Toc126872304'><span style='mso-bookmark:_Toc115416235'>Value:
!   MaxLogSize</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0 .. MAXDWORD}<br>
    Default: 100K</p>
    <p class=MsoBodyText>This entry determines the maximum size of the
!   %WINDIR%\TEMP\afsd_init.log file.<span style='mso-spacerun:yes'>  </span>If
!   the file is larger than this value when afsd_service.exe starts the file will
!   be reset to 0 bytes.<span style='mso-spacerun:yes'>  </span>If this value is
!   0, it means the file should be allowed to grow indefinitely.</p>
    </td>
   </tr>
!  <tr style='mso-yfti-irow:34;mso-yfti-lastrow:yes;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872305"></a><a
!   name="_Toc115416236"><span style='mso-bookmark:_Toc126872305'>Value:
!   FlushOnHibernate</span></a></h5>
    <p class=MsoBodyText>Type: DWORD {0,1}<br>
    Default: 1</p>
    <p class=MsoBodyText>If set, flushes all volumes before the machine goes on
    hibernate or stand-by.</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872306"></a><a
! name="_Toc115416237"><span style='mso-bookmark:_Toc126872306'>Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6643,6650 ****
    height:65.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.0pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416238">Value: &lt;Drive
!   Letter:&gt; for example &quot;G:&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Specifies the submount name to
    be mapped by afsd_service.exe at startup to the provided drive letter.</p>
--- 7596,7604 ----
    height:65.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.0pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872307"></a><a
!   name="_Toc115416238"><span style='mso-bookmark:_Toc126872307'>Value: &lt;Drive
!   Letter:&gt; for example &quot;G:&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Specifies the submount name to
    be mapped by afsd_service.exe at startup to the provided drive letter.</p>
***************
*** 6652,6659 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416239">Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7606,7614 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872308"></a><a
! name="_Toc115416239"><span style='mso-bookmark:_Toc126872308'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6661,6669 ****
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416240"></a><a
!   name="_Value___:_CellServDBDir"></a><span style='mso-bookmark:_Toc115416240'>Value:
!   CellServDBDir</span></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;not defined&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Specifies the directory
--- 7616,7625 ----
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872309"></a><a
!   name="_Toc115416240"></a><a name="_Value___: CellServDBDir"></a><span
!   style='mso-bookmark:_Toc126872309'><span style='mso-bookmark:_Toc115416240'>Value:
!   CellServDBDir</span></span></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;not defined&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Specifies the directory
***************
*** 6674,6681 ****
   <tr style='mso-yfti-irow:0;height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
!   <h5><a name="_Toc115416241"></a><a name="_Value___:_VerifyServiceSignature"></a><span
!   style='mso-bookmark:_Toc115416241'>Value: VerifyServiceSignature</span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x1</p>
    <p class=MsoBodyText>This value can be used to disable the runtime
--- 7630,7639 ----
   <tr style='mso-yfti-irow:0;height:145.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872310"></a><a
!   name="_Toc115416241"></a><a name="_Value___: VerifyServiceSignature"></a><span
!   style='mso-bookmark:_Toc126872310'><span style='mso-bookmark:_Toc115416241'>Value:
!   VerifyServiceSignature</span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x1</p>
    <p class=MsoBodyText>This value can be used to disable the runtime
***************
*** 6684,6701 ****
    performed to verify that<span style='mso-spacerun:yes'>   </span>the DLLs
    which are loaded by afsd_service.exe are from the same distribution as
    afsd_service.exe.<span style='mso-spacerun:yes'>  </span>This is to prevent
!   random errors caused when DLLs from one distribution of AFS are loaded by
!   another one.<span style='mso-spacerun:yes'>  </span>This is not a security
!   test.<span style='mso-spacerun:yes'>  </span>The reason for disabling this
!   test is to free up additional memory which can be used for a large cache
!   size.</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:1;height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5><a name="_Toc115416242"></a><a name="_Value___:_IoctlDebug"></a><span
!   style='mso-bookmark:_Toc115416242'>Value: IoctlDebug</span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
    <p class=MsoBodyText>This value can be used to debug the cause of pioctl()
--- 7642,7660 ----
    performed to verify that<span style='mso-spacerun:yes'>   </span>the DLLs
    which are loaded by afsd_service.exe are from the same distribution as
    afsd_service.exe.<span style='mso-spacerun:yes'>  </span>This is to prevent
!   random errors caused when DLLs from one distribution of AFS are loaded by another
!   one.<span style='mso-spacerun:yes'>  </span>This is not a security test.<span
!   style='mso-spacerun:yes'>  </span>The reason for disabling this test is to
!   free up additional memory which can be used for a large cache size.</p>
    </td>
   </tr>
   <tr style='mso-yfti-irow:1;height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872311"></a><a
!   name="_Toc115416242"></a><a name="_Value___: IoctlDebug"></a><span
!   style='mso-bookmark:_Toc126872311'><span style='mso-bookmark:_Toc115416242'>Value:
!   IoctlDebug</span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
    <p class=MsoBodyText>This value can be used to debug the cause of pioctl()
***************
*** 6709,6715 ****
   <tr style='mso-yfti-irow:2;height:330.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:330.75pt'>
!   <h5><a name="_Toc115416243">Value: MiniDumpType</a></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0 (MiniDumpNormal)</p>
    <p class=MsoBodyText>This value is used to specify the type of minidump
--- 7668,7676 ----
   <tr style='mso-yfti-irow:2;height:330.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:330.75pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872312"></a><a
!   name="_Toc115416243"><span style='mso-bookmark:_Toc126872312'>Value:
!   MiniDumpType</span></a></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0 (MiniDumpNormal)</p>
    <p class=MsoBodyText>This value is used to specify the type of minidump
***************
*** 6739,6746 ****
   <tr style='mso-yfti-irow:3;mso-yfti-lastrow:yes;height:138.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:138.25pt'>
!   <h5><a name="_Toc115416244"></a><a name="_Value___:_StoreAnsiFilenames"></a><span
!   style='mso-bookmark:_Toc115416244'>Value: StoreAnsiFilenames</span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
    <p class=MsoBodyText>This value can be used to force the AFS Client Service
--- 7700,7709 ----
   <tr style='mso-yfti-irow:3;mso-yfti-lastrow:yes;height:138.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:138.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872313"></a><a
!   name="_Toc115416244"></a><a name="_Value___: StoreAnsiFilenames"></a><span
!   style='mso-bookmark:_Toc126872313'><span style='mso-bookmark:_Toc115416244'>Value:
!   StoreAnsiFilenames</span></span></h5>
    <p class=MsoBodyText>Type: REG_DWORD<br>
    Default: 0x0</p>
    <p class=MsoBodyText>This value can be used to force the AFS Client Service
***************
*** 6750,6763 ****
    <p class=MsoBodyText>Note: The use of ANSI characters will render access to
    files with 8-bit OEM file names unaccessible from Windows.<span
    style='mso-spacerun:yes'>  </span>This option is of use primarily when you
!   wish to allow file names produced on Windows to be accessible from Latin-1
!   UNIX systems and vice versa.</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416245">Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7713,7727 ----
    <p class=MsoBodyText>Note: The use of ANSI characters will render access to
    files with 8-bit OEM file names unaccessible from Windows.<span
    style='mso-spacerun:yes'>  </span>This option is of use primarily when you
!   wish to allow file names produced on Windows to be accessible from Latin-1 UNIX
!   systems and vice versa.</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872314"></a><a
! name="_Toc115416245"><span style='mso-bookmark:_Toc126872314'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6766,6773 ****
    height:112.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:112.0pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416246">Value: &quot;smb/cifs
!   share name&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to map SMB/CIFS
--- 7730,7738 ----
    height:112.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:112.0pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872315"></a><a
!   name="_Toc115416246"><span style='mso-bookmark:_Toc126872315'>Value:
!   &quot;smb/cifs share name&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to map SMB/CIFS
***************
*** 6781,6791 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416247"></a><a
! name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc115416247'></span><![endif]><span style='mso-bookmark:
! _Toc115416247'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</span></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7746,7756 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872316"></a><a
! name="_Toc115416247"></a><a name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc126872316'><span style='mso-bookmark:_Toc115416247'></span></span><![endif]><span
! style='mso-bookmark:_Toc126872316'><span style='mso-bookmark:_Toc115416247'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</span></span></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6794,6801 ****
    height:138.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:138.5pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416248">Value: &quot;numeric
!   value&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to store dot
--- 7759,7767 ----
    height:138.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:138.5pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872317"></a><a
!   name="_Toc115416248"><span style='mso-bookmark:_Toc126872317'>Value:
!   &quot;numeric value&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to store dot
***************
*** 6809,6819 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416249"></a><a
! name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_1"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc115416249'></span><![endif]><span style='mso-bookmark:
! _Toc115416249'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</span></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7775,7785 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872318"></a><a
! name="_Toc115416249"></a><a name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_1"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc126872318'><span style='mso-bookmark:_Toc115416249'></span></span><![endif]><span
! style='mso-bookmark:_Toc126872318'><span style='mso-bookmark:_Toc115416249'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks]</span></span></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6822,6829 ****
    height:145.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.0pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416250">Value: &quot;numeric
!   value&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to store a dot
--- 7788,7796 ----
    height:145.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:145.0pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872319"></a><a
!   name="_Toc115416250"><span style='mso-bookmark:_Toc126872319'>Value:
!   &quot;numeric value&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to store a dot
***************
*** 6837,6844 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416251">Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7804,7812 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872320"></a><a
! name="_Toc115416251"><span style='mso-bookmark:_Toc126872320'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6847,6854 ****
    height:171.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:171.75pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416252">Value: &quot;submount
!   name&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_EXPAND_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to store
--- 7815,7823 ----
    height:171.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:171.75pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872321"></a><a
!   name="_Toc115416252"><span style='mso-bookmark:_Toc126872321'>Value:
!   &quot;submount name&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_EXPAND_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to store
***************
*** 6866,6876 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416253"></a><a
! name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_2"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc115416253'></span><![endif]><span style='mso-bookmark:
! _Toc115416253'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\VLDB]</span></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7835,7845 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872322"></a><a
! name="_Toc115416253"></a><a name="_Regkey:_[HKLM\SOFTWARE\OpenAFS\Clie_2"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc126872322'><span style='mso-bookmark:_Toc115416253'></span></span><![endif]><span
! style='mso-bookmark:_Toc126872322'><span style='mso-bookmark:_Toc115416253'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\VLDB]</span></span></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6879,6886 ****
    height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416254">Value: &quot;hostname or
!   ip address&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to specify a
--- 7848,7856 ----
    height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872323"></a><a
!   name="_Toc115416254"><span style='mso-bookmark:_Toc126872323'>Value:
!   &quot;hostname or ip address&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to specify a
***************
*** 6893,6900 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416255">Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\File]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7863,7871 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872324"></a><a
! name="_Toc115416255"><span style='mso-bookmark:_Toc126872324'>Regkey:<br>
! [HKLM\SOFTWARE\OpenAFS\Client\Server Preferences\File]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6903,6910 ****
    height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416256">Value: &quot;hostname or
!   ip address&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to specify a
--- 7874,7882 ----
    height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872325"></a><a
!   name="_Toc115416256"><span style='mso-bookmark:_Toc126872325'>Value:
!   &quot;hostname or ip address&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_DWORD<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This key is used to specify a
***************
*** 6917,6930 ****
   </tr>
  </table>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417105"></a><a
! name="_Toc115416257"><span style='mso-bookmark:_Toc115417105'>A.2. Integrated
! Logon Network provider parameters</span></a></h2>
  
  <p class=MsoBodyText>Affects the network provider (afslogon.dll).</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416258">Regkey:
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7889,7903 ----
   </tr>
  </table>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872326"></a><a
! name="_Toc115417105"></a><a name="_Toc115416257"><span style='mso-bookmark:
! _Toc115417105'><span style='mso-bookmark:_Toc126872326'>A.2. Integrated Logon Network
! provider parameters</span></span></a></h2>
  
  <p class=MsoBodyText>Affects the network provider (afslogon.dll).</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872327"></a><a
! name="_Toc115416258"><span style='mso-bookmark:_Toc126872327'>Regkey: [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6933,6939 ****
    height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416259">Value: FailLoginsSilently</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD<br>
    Default: 0</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Do not display message boxes if
--- 7906,7914 ----
    height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872328"></a><a
!   name="_Toc115416259"><span style='mso-bookmark:_Toc126872328'>Value:
!   FailLoginsSilently</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD<br>
    Default: 0</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Do not display message boxes if
***************
*** 6942,6949 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416260">Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 7917,7925 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872329"></a><a
! name="_Toc115416260"><span style='mso-bookmark:_Toc126872329'>Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 6951,6957 ****
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416261">Value: NoWarnings</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD<br>
    Default: 0</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Disables visible warnings during
--- 7927,7934 ----
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872330"></a><a
!   name="_Toc115416261"><span style='mso-bookmark:_Toc126872330'>Value: NoWarnings</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD<br>
    Default: 0</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Disables visible warnings during
***************
*** 6961,6967 ****
   <tr style='mso-yfti-irow:0;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416262">Value: AuthentProviderPath</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
    <p class=MsoBodyText>Specifies the install location of the authentication
--- 7938,7946 ----
   <tr style='mso-yfti-irow:0;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872331"></a><a
!   name="_Toc115416262"><span style='mso-bookmark:_Toc126872331'>Value:
!   AuthentProviderPath</span></a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
    <p class=MsoBodyText>Specifies the install location of the authentication
***************
*** 6971,6977 ****
   <tr style='mso-yfti-irow:1;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416263">Value: Class</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    NSIS: 0x02</p>
    <p class=MsoBodyText>Specifies the class of network provider</p>
--- 7950,7957 ----
   <tr style='mso-yfti-irow:1;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872332"></a><a
!   name="_Toc115416263"><span style='mso-bookmark:_Toc126872332'>Value: Class</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    NSIS: 0x02</p>
    <p class=MsoBodyText>Specifies the class of network provider</p>
***************
*** 6980,6986 ****
   <tr style='mso-yfti-irow:2;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416264">Value: DependOnGroup</a></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: PNP_TDI</p>
    <p class=MsoBodyText>Specifies the service groups upon which the AFS Client
--- 7960,7968 ----
   <tr style='mso-yfti-irow:2;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872333"></a><a
!   name="_Toc115416264"><span style='mso-bookmark:_Toc126872333'>Value:
!   DependOnGroup</span></a></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: PNP_TDI</p>
    <p class=MsoBodyText>Specifies the service groups upon which the AFS Client
***************
*** 6992,6998 ****
   <tr style='mso-yfti-irow:3;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416265">Value: DependOnService</a></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: Tcpip NETBIOS RpcSs</p>
    <p class=MsoBodyText>Specifies a list of services upon which the AFS Client
--- 7974,7982 ----
   <tr style='mso-yfti-irow:3;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872334"></a><a
!   name="_Toc115416265"><span style='mso-bookmark:_Toc126872334'>Value:
!   DependOnService</span></a></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: Tcpip NETBIOS RpcSs</p>
    <p class=MsoBodyText>Specifies a list of services upon which the AFS Client
***************
*** 7004,7010 ****
   <tr style='mso-yfti-irow:4;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416266">Value: Name</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: &quot;OpenAFSDaemon&quot;</p>
    <p class=MsoBodyText>Specifies the display name of the AFS Client Service</p>
--- 7988,7995 ----
   <tr style='mso-yfti-irow:4;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872335"></a><a
!   name="_Toc115416266"><span style='mso-bookmark:_Toc126872335'>Value: Name</span></a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: &quot;OpenAFSDaemon&quot;</p>
    <p class=MsoBodyText>Specifies the display name of the AFS Client Service</p>
***************
*** 7013,7019 ****
   <tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5><a name="_Toc115416267">Value: ProviderPath</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
    <p class=MsoBodyText>Specifies the DLL to use for the network provider</p>
--- 7998,8006 ----
   <tr style='mso-yfti-irow:5;mso-yfti-lastrow:yes;height:65.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:65.75pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872336"></a><a
!   name="_Toc115416267"><span style='mso-bookmark:_Toc126872336'>Value:
!   ProviderPath</span></a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    NSIS: %WINDIR%\SYSTEM32\afslogon.dll</p>
    <p class=MsoBodyText>Specifies the DLL to use for the network provider</p>
***************
*** 7021,7062 ****
   </tr>
  </table>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417106"></a><a
! name="_Toc115416268"></a><a name="_A.2.1_Domain_specific_configuration"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc115417106'><span style='mso-bookmark:_Toc115416268'></span></span><![endif]><span
! style='mso-bookmark:_Toc115417106'><span style='mso-bookmark:_Toc115416268'>A.2.1
! Domain specific configuration keys for the Network Provider</span></span></h2>
  
  <p class=MsoBodyText>The network provider can be configured to have different
  behavior depending on the domain that the user logs into.<span
  style='mso-spacerun:yes'>  </span>These settings are only relevant when using
! integrated login.<span style='mso-spacerun:yes'>  </span>A domain refers to an
! Active Directory (AD) domain, a trusted Kerberos (non-AD) realm or the local
! machine (i.e. local account logins).<span style='mso-spacerun:yes'>  </span>The
! domain name that is used for selecting the domain would be the domain that is
! passed into the NPLogonNotify function of the network provider.</p>
  
  <p class=MsoBodyText>Domain specific registry keys are:</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416269">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></h3>
  
  <p class=MsoBodyText><span style='mso-spacerun:yes'>  </span>(NP key)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416270">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</a></h3>
  
  <p class=MsoBodyText><span style='mso-spacerun:yes'>  </span>(Domains key)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416271">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
! name&quot;]</a></h3>
  
  <p class=MsoBodyText><span style='mso-spacerun:yes'>  </span>(Specific domain
  key. One per domain.)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416272">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></h3>
  
  <p class=MsoBodyText><span style='mso-spacerun:yes'>  </span>(Localhost key)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416273">Example:</a></h3>
  
  <p class=PreformattedText><span
  style='mso-spacerun:yes'> </span>HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider</p>
--- 8008,8057 ----
   </tr>
  </table>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872337"></a><a
! name="_Toc115417106"></a><a name="_Toc115416268"></a><a
! name="_A.2.1_Domain_specific_configuration"></a><![if !supportLists]><span
! style='mso-bookmark:_Toc126872337'><span style='mso-bookmark:_Toc115417106'><span
! style='mso-bookmark:_Toc115416268'></span></span></span><![endif]><span
! style='mso-bookmark:_Toc126872337'><span style='mso-bookmark:_Toc115417106'><span
! style='mso-bookmark:_Toc115416268'>A.2.1 Domain specific configuration keys for
! the Network Provider</span></span></span></h2>
  
  <p class=MsoBodyText>The network provider can be configured to have different
  behavior depending on the domain that the user logs into.<span
  style='mso-spacerun:yes'>  </span>These settings are only relevant when using
! integrated login.<span style='mso-spacerun:yes'>  </span>A domain refers to an Active
! Directory (AD) domain, a trusted Kerberos (non-AD) realm or the local machine
! (i.e. local account logins).<span style='mso-spacerun:yes'>  </span>The domain
! name that is used for selecting the domain would be the domain that is passed
! into the NPLogonNotify function of the network provider.</p>
  
  <p class=MsoBodyText>Domain specific registry keys are:</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872338"></a><a
! name="_Toc115416269"><span style='mso-bookmark:_Toc126872338'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</span></a></h3>
  
  <p class=MsoBodyText><span style='mso-spacerun:yes'>  </span>(NP key)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872339"></a><a
! name="_Toc115416270"><span style='mso-bookmark:_Toc126872339'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</span></a></h3>
  
  <p class=MsoBodyText><span style='mso-spacerun:yes'>  </span>(Domains key)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872340"></a><a
! name="_Toc115416271"><span style='mso-bookmark:_Toc126872340'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
! name&quot;]</span></a></h3>
  
  <p class=MsoBodyText><span style='mso-spacerun:yes'>  </span>(Specific domain
  key. One per domain.)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872341"></a><a
! name="_Toc115416272"><span style='mso-bookmark:_Toc126872341'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</span></a></h3>
  
  <p class=MsoBodyText><span style='mso-spacerun:yes'>  </span>(Localhost key)</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872342"></a><a
! name="_Toc115416273"><span style='mso-bookmark:_Toc126872342'>Example:</span></a></h3>
  
  <p class=PreformattedText><span
  style='mso-spacerun:yes'> </span>HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider</p>
***************
*** 7065,7072 ****
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>  </span>+- Domain</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>    
! </span>+-AD1.EXAMPLE.COM</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>    
  </span>+-AD2.EXAMPLE.NET</p>
--- 8060,8066 ----
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>  </span>+- Domain</p>
  
! <p class=PreformattedText><span style='mso-spacerun:yes'>     </span>+-AD1.EXAMPLE.COM</p>
  
  <p class=PreformattedText><span style='mso-spacerun:yes'>    
  </span>+-AD2.EXAMPLE.NET</p>
***************
*** 7078,7091 ****
  values described in 2.1.1.<span style='mso-spacerun:yes'>  </span>The effective
  values are chosen as described in 2.1.2.</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416274">A.2.1.1
! Domain specific configuration values</a></h3>
  
! <h4><a name="_Toc115416275">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
  name&quot;]<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></h4>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 8072,8087 ----
  values described in 2.1.1.<span style='mso-spacerun:yes'>  </span>The effective
  values are chosen as described in 2.1.2.</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872343"></a><a
! name="_Toc115416274"><span style='mso-bookmark:_Toc126872343'>A.2.1.1 Domain
! specific configuration values</span></a></h3>
  
! <h4><a name="_Toc126872344"></a><a name="_Toc115416275"><span style='mso-bookmark:
! _Toc126872344'>[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]<br>
  [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\&quot;domain
  name&quot;]<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</span></a></h4>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 7093,7101 ****
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:191.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:191.0pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416276"></a><a
!   name="_Value___:_LogonOptions"></a><span style='mso-bookmark:_Toc115416276'>Value:
!   LogonOptions</span></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD<br>
    Default: 0x01</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>NSIS/WiX: depends on user
--- 8089,8098 ----
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:191.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:191.0pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872345"></a><a
!   name="_Toc115416276"></a><a name="_Value___: LogonOptions"></a><span
!   style='mso-bookmark:_Toc126872345'><span style='mso-bookmark:_Toc115416276'>Value:
!   LogonOptions</span></span></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD<br>
    Default: 0x01</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>NSIS/WiX: depends on user
***************
*** 7118,7124 ****
   <tr style='mso-yfti-irow:0;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416277">Value: FailLoginsSilentl</a></h5>
    <p class=MsoBodyText>Type: DWORD (1|0)<br>
    Default: 0<br>
    NSIS/WiX: (not set)</p>
--- 8115,8123 ----
   <tr style='mso-yfti-irow:0;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872346"></a><a
!   name="_Toc115416277"><span style='mso-bookmark:_Toc126872346'>Value:
!   FailLoginsSilentl</span></a></h5>
    <p class=MsoBodyText>Type: DWORD (1|0)<br>
    Default: 0<br>
    NSIS/WiX: (not set)</p>
***************
*** 7129,7142 ****
   <tr style='mso-yfti-irow:1;height:139.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:139.0pt'>
!   <h5><a name="_Toc115416278">Value: LogonScript</a></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: (null)<br>
    NSIS/WiX: (only value under NP key) &lt;install path&gt;\afscreds.exe -:%s -x
    -a -m -n -q</p>
!   <p class=MsoBodyText>A logon script that will be scheduled to be run after
!   the profile load is complete.<span style='mso-spacerun:yes'>  </span>If using
!   the REG_EXPAND_SZ type, you can use any system environment variable as
    &quot;%varname%&quot; which would be expanded at the time the network
    provider is run.<span style='mso-spacerun:yes'>  </span>Optionally using a
    &quot;%s&quot; in the value would result in it being expanded into the AFS
--- 8128,8143 ----
   <tr style='mso-yfti-irow:1;height:139.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:139.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872347"></a><a
!   name="_Toc115416278"><span style='mso-bookmark:_Toc126872347'>Value:
!   LogonScript</span></a></h5>
    <p class=MsoBodyText>Type: REG_SZ or REG_EXPAND_SZ<br>
    Default: (null)<br>
    NSIS/WiX: (only value under NP key) &lt;install path&gt;\afscreds.exe -:%s -x
    -a -m -n -q</p>
!   <p class=MsoBodyText>A logon script that will be scheduled to be run after the
!   profile load is complete.<span style='mso-spacerun:yes'>  </span>If using the
!   REG_EXPAND_SZ type, you can use any system environment variable as
    &quot;%varname%&quot; which would be expanded at the time the network
    provider is run.<span style='mso-spacerun:yes'>  </span>Optionally using a
    &quot;%s&quot; in the value would result in it being expanded into the AFS
***************
*** 7146,7152 ****
   <tr style='mso-yfti-irow:2;height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5><a name="_Toc115416279">Value: LoginRetryInterval</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 30<br>
    NSIS/WiX: (not set)</p>
--- 8147,8154 ----
   <tr style='mso-yfti-irow:2;height:105.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:105.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872348"></a><a
!   name="_Toc115416279"><span style='mso-bookmark:_Toc126872348'>Value: LoginRetryInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 30<br>
    NSIS/WiX: (not set)</p>
***************
*** 7159,7165 ****
   <tr style='mso-yfti-irow:3;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5><a name="_Toc115416280">Value: LoginSleepInterval</a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5<br>
    NSIS/WiX: (not set)</p>
--- 8161,8169 ----
   <tr style='mso-yfti-irow:3;height:79.25pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:79.25pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872349"></a><a
!   name="_Toc115416280"><span style='mso-bookmark:_Toc126872349'>Value:
!   LoginSleepInterval</span></a></h5>
    <p class=MsoBodyText>Type: DWORD<br>
    Default: 5<br>
    NSIS/WiX: (not set)</p>
***************
*** 7169,7176 ****
   <tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5><a name="_Toc115416281"></a><a name="_Value:_TheseCells"></a><span
!   style='mso-bookmark:_Toc115416281'>Value: TheseCells</span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: &lt;not set&gt;</p>
    <p class=MsoBodyText>When Kerberos 5 is being used, TheseCells provides a
--- 8173,8182 ----
   <tr style='mso-yfti-irow:4;mso-yfti-lastrow:yes;height:78.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:78.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872350"></a><a
!   name="_Toc115416281"></a><a name="_Value:_TheseCells"></a><span
!   style='mso-bookmark:_Toc126872350'><span style='mso-bookmark:_Toc115416281'>Value:
!   TheseCells</span></span></h5>
    <p class=MsoBodyText>Type: REG_MULTI_SZ<br>
    NSIS: &lt;not set&gt;</p>
    <p class=MsoBodyText>When Kerberos 5 is being used, TheseCells provides a
***************
*** 7180,7209 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416282">A.2.1.2<span
  style='mso-spacerun:yes'>  </span>Selection of effective values for domain
! specific configuration</a></h3>
  
  <p class=MsoBodyText>During login to domain X, where X is the domain passed
! into NPLogonNotify as lpAuthentInfo-&gt;LogonDomainName or the string
! 'LOCALHOST' if lpAuthentInfo-&gt;LogonDomainName equals the name of the
! computer, the following keys will be looked up.</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:
! l15 level1 lfo36;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span></span><![endif]>NP key.
! (&quot;HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider&quot;)</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:
! l15 level1 lfo36;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>Domains key. (NP key\&quot;Domain&quot;)</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:
! l15 level1 lfo36;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>Specific domain key. (Domains key\X)</p>
--- 8186,8215 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872351"></a><a
! name="_Toc115416282"><span style='mso-bookmark:_Toc126872351'>A.2.1.2<span
  style='mso-spacerun:yes'>  </span>Selection of effective values for domain
! specific configuration</span></a></h3>
  
  <p class=MsoBodyText>During login to domain X, where X is the domain passed
! into NPLogonNotify as lpAuthentInfo-&gt;LogonDomainName or the string 'LOCALHOST'
! if lpAuthentInfo-&gt;LogonDomainName equals the name of the computer, the
! following keys will be looked up.</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:
! l33 level1 lfo13;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>1.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
! </span></span></span><![endif]>NP key. (&quot;HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider&quot;)</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:
! l33 level1 lfo13;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>2.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>Domains key. (NP key\&quot;Domain&quot;)</p>
  
  <p class=MsoBodyText style='margin-left:36.0pt;text-indent:-18.0pt;mso-list:
! l33 level1 lfo13;tab-stops:list 36.0pt'><![if !supportLists]><span
  style='mso-fareast-font-family:Thorndale;mso-bidi-font-family:Thorndale'><span
  style='mso-list:Ignore'>3.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span></span></span><![endif]>Specific domain key. (Domains key\X)</p>
***************
*** 7213,7243 ****
  configuration information in this case will come from the NP key.</p>
  
  <p class=MsoBodyText>If the specific domain key exists, then for each of the
! values metioned in (2), they will be looked up in the specific domain key,
! domains key and the NP key successively until the value is found. The first
! instance of the value found this way will be the effective for the login
! session.<span style='mso-spacerun:yes'>  </span>If no such instance can be
! found, the default will be used.<span style='mso-spacerun:yes'>  </span>To
! re-iterate, a value in a more specific key supercedes a value in a less
! specific key.<span style='mso-spacerun:yes'>  </span>The exceptions to this
! rule are stated below.</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416283">A.2.1.3
! Exceptions to A.2.1.2</a></h3>
  
  <p class=MsoBodyText>To retain backwards compatibility, the following
  exceptions are made to 2.1.2.</p>
  
! <h4><a name="_Toc115416284">2.1.3.1 'FailLoginsSilently'</a></h4>
  
! <p class=MsoBodyText>Historically, the 'FailLoginsSilently' value was in
! HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters key and not
! in the NP key.<span style='mso-spacerun:yes'>  </span>Therefore, for backwards
! compatibility, the value in the Parameters key will supercede all instances of
! this value in other keys.<span style='mso-spacerun:yes'>  </span>In the absence
! of this value in the Parameters key, normal scope rules apply.</p>
  
! <h4><a name="_Toc115416285">2.1.3.2 'LogonScript'</a></h4>
  
  <p class=MsoBodyText>If a 'LogonScript' is not specified in the specific domain
  key nor in the domains key, the value in the NP key will only be checked if the
--- 8219,8251 ----
  configuration information in this case will come from the NP key.</p>
  
  <p class=MsoBodyText>If the specific domain key exists, then for each of the
! values metioned in (2), they will be looked up in the specific domain key, domains
! key and the NP key successively until the value is found. The first instance of
! the value found this way will be the effective for the login session.<span
! style='mso-spacerun:yes'>  </span>If no such instance can be found, the default
! will be used.<span style='mso-spacerun:yes'>  </span>To re-iterate, a value in
! a more specific key supercedes a value in a less specific key.<span
! style='mso-spacerun:yes'>  </span>The exceptions to this rule are stated below.</p>
! 
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872352"></a><a
! name="_Toc115416283"><span style='mso-bookmark:_Toc126872352'>A.2.1.3 Exceptions
! to A.2.1.2</span></a></h3>
  
  <p class=MsoBodyText>To retain backwards compatibility, the following
  exceptions are made to 2.1.2.</p>
  
! <h4><a name="_Toc126872353"></a><a name="_Toc115416284"><span style='mso-bookmark:
! _Toc126872353'>2.1.3.1 'FailLoginsSilently'</span></a></h4>
  
! <p class=MsoBodyText>Historically, the 'FailLoginsSilently' value was in HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
! key and not in the NP key.<span style='mso-spacerun:yes'>  </span>Therefore, for
! backwards compatibility, the value in the Parameters key will supercede all
! instances of this value in other keys.<span style='mso-spacerun:yes'> 
! </span>In the absence of this value in the Parameters key, normal scope rules
! apply.</p>
  
! <h4><a name="_Toc126872354"></a><a name="_Toc115416285"><span style='mso-bookmark:
! _Toc126872354'>2.1.3.2 'LogonScript'</span></a></h4>
  
  <p class=MsoBodyText>If a 'LogonScript' is not specified in the specific domain
  key nor in the domains key, the value in the NP key will only be checked if the
***************
*** 7247,7260 ****
  security setting.<span style='mso-spacerun:yes'>  </span>Please be aware of
  this when setting this value.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417107"></a><a
! name="_Toc115416286"><span style='mso-bookmark:_Toc115417107'>A.3. AFS
! Credentials System Tray Tool parameters</span></a></h2>
  
  <p class=MsoBodyText>Affects the behavior of afscreds.exe</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416287">Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 8255,8270 ----
  security setting.<span style='mso-spacerun:yes'>  </span>Please be aware of
  this when setting this value.</p>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872355"></a><a
! name="_Toc115417107"></a><a name="_Toc115416286"><span style='mso-bookmark:
! _Toc115417107'><span style='mso-bookmark:_Toc126872355'>A.3. AFS Credentials
! System Tray Tool parameters</span></span></a></h2>
  
  <p class=MsoBodyText>Affects the behavior of afscreds.exe</p>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872356"></a><a
! name="_Toc115416287"><span style='mso-bookmark:_Toc126872356'>Regkey:<br>
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 7262,7268 ****
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416288">Value: Gateway</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &quot;&quot;<br>
    Function: GetGatewayName()</p>
--- 8272,8279 ----
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872357"></a><a
!   name="_Toc115416288"><span style='mso-bookmark:_Toc126872357'>Value: Gateway</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &quot;&quot;<br>
    Function: GetGatewayName()</p>
***************
*** 7274,7292 ****
   <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5><a name="_Toc115416289">Value: Cell</a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Variable: IsServiceConfigured()</p>
!   <p class=MsoBodyText>The value Cell is used to determine if the AFS Client Service
!   has been properly configured or not.</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416290">Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client]<br>
! [HKCU\SOFTWARE\OpenAFS\Client]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 8285,8305 ----
   <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes;height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872358"></a><a
!   name="_Toc115416289"><span style='mso-bookmark:_Toc126872358'>Value: Cell</span></a></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Variable: IsServiceConfigured()</p>
!   <p class=MsoBodyText>The value Cell is used to determine if the AFS Client
!   Service has been properly configured or not.</p>
    </td>
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872359"></a><a
! name="_Toc115416290"><span style='mso-bookmark:_Toc126872359'>Regkey:<br>
  [HKLM\SOFTWARE\OpenAFS\Client]<br>
! [HKCU\SOFTWARE\OpenAFS\Client]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 7294,7305 ****
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:157.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:157.5pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416291">Value: ShowTrayIcon</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: InitApp(), Main_OnCheckTerminate()</p>
!   <p class=MsoBodyText style='mso-yfti-cnfc:1'>This value is used to determine whether
!   or not a shortcut should be maintained in the user's Start
    Menu-&gt;Programs-&gt;Startup folder. </p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This value used to be stored at
    [HKLM\Software\TransarcCorporation\AFS Client\AfsCreds].</p>
--- 8307,8320 ----
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;height:157.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:157.5pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872360"></a><a
!   name="_Toc115416291"><span style='mso-bookmark:_Toc126872360'>Value:
!   ShowTrayIcon</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: InitApp(), Main_OnCheckTerminate()</p>
!   <p class=MsoBodyText style='mso-yfti-cnfc:1'>This value is used to determine
!   whether or not a shortcut should be maintained in the user's Start
    Menu-&gt;Programs-&gt;Startup folder. </p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>This value used to be stored at
    [HKLM\Software\TransarcCorporation\AFS Client\AfsCreds].</p>
***************
*** 7310,7316 ****
   <tr style='mso-yfti-irow:0;height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5><a name="_Toc115416292">Value: EnableKFW</a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: KFW_is_available()</p>
--- 8325,8333 ----
   <tr style='mso-yfti-irow:0;height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872361"></a><a
!   name="_Toc115416292"><span style='mso-bookmark:_Toc126872361'>Value:
!   EnableKFW</span></a></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 1<br>
    Function: KFW_is_available()</p>
***************
*** 7325,7332 ****
   <tr style='mso-yfti-irow:1;height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5><a name="_Toc115416293"></a><a name="_Value___:_Use524"></a><span
!   style='mso-bookmark:_Toc115416293'>Value: Use524</span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0<br>
    Function: KFW_use_krb524()</p>
--- 8342,8351 ----
   <tr style='mso-yfti-irow:1;height:119.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:119.0pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872362"></a><a
!   name="_Toc115416293"></a><a name="_Value___: Use524"></a><span
!   style='mso-bookmark:_Toc126872362'><span style='mso-bookmark:_Toc115416293'>Value:
!   Use524</span></span></h5>
    <p class=MsoBodyText>Type: DWORD {0, 1}<br>
    Default: 0<br>
    Function: KFW_use_krb524()</p>
***************
*** 7341,7353 ****
   <tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes;height:251.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:251.5pt'>
!   <h5><a name="_Toc115416294"></a><a name="_Value___:_AfscredsShortcutParams"></a><span
!   style='mso-bookmark:_Toc115416294'>Value: AfscredsShortcutParams</span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;-A -M -N -Q&quot;<br>
    Function: Shortcut_FixStartup</p>
!   <p class=MsoBodyText>This value specifies the command line options which should
!   be set as part of the shortcut to afscreds.exe.<span
    style='mso-spacerun:yes'>  </span>afscreds.exe rewrites the shortcut each
    time it exits so as to ensure that the shortcut points to the latest version
    of the program.<span style='mso-spacerun:yes'>  </span>This value is used to
--- 8360,8374 ----
   <tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes;height:251.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:251.5pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872363"></a><a
!   name="_Toc115416294"></a><a name="_Value___: AfscredsShortcutParams"></a><span
!   style='mso-bookmark:_Toc126872363'><span style='mso-bookmark:_Toc115416294'>Value:
!   AfscredsShortcutParams</span></span></h5>
    <p class=MsoBodyText>Type: REG_SZ<br>
    Default: &quot;-A -M -N -Q&quot;<br>
    Function: Shortcut_FixStartup</p>
!   <p class=MsoBodyText>This value specifies the command line options which
!   should be set as part of the shortcut to afscreds.exe.<span
    style='mso-spacerun:yes'>  </span>afscreds.exe rewrites the shortcut each
    time it exits so as to ensure that the shortcut points to the latest version
    of the program.<span style='mso-spacerun:yes'>  </span>This value is used to
***************
*** 7367,7374 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416295">Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 8388,8396 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872364"></a><a
! name="_Toc115416295"><span style='mso-bookmark:_Toc126872364'>Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 7377,7384 ****
    height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416296">Value: Authentication
!   Cell</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Function: Afscreds.exe GetDefaultCell()</p>
--- 8399,8407 ----
    height:92.0pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:92.0pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872365"></a><a
!   name="_Toc115416296"><span style='mso-bookmark:_Toc126872365'>Value:
!   Authentication Cell</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;<br>
    Function: Afscreds.exe GetDefaultCell()</p>
***************
*** 7389,7396 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416297">Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 8412,8420 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872366"></a><a
! name="_Toc115416297"><span style='mso-bookmark:_Toc126872366'>Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 7399,7406 ****
    height:124.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:124.75pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416298">Value: &quot;afs cell
!   name&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;<br>
    Function: LoadRemind(), SaveRemind()</p>
--- 8423,8431 ----
    height:124.75pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:124.75pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872367"></a><a
!   name="_Toc115416298"><span style='mso-bookmark:_Toc126872367'>Value:
!   &quot;afs cell name&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;<br>
    Function: LoadRemind(), SaveRemind()</p>
***************
*** 7413,7420 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416299">Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 8438,8446 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872368"></a><a
! name="_Toc115416299"><span style='mso-bookmark:_Toc126872368'>Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Active Maps]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 7423,7434 ****
    height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416300">Value: &quot;upper case
!   drive letter&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;</p>
!   <p class=MsoBodyText style='mso-yfti-cnfc:1'>These values are used to store the
!   persistence state of the AFS drive mappings as listed in the
    [...\Client\Mappings] key.</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>These values used to be stored
    in the afsdsbmt.ini file</p>
--- 8449,8461 ----
    height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872369"></a><a
!   name="_Toc115416300"><span style='mso-bookmark:_Toc126872369'>Value:
!   &quot;upper case drive letter&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: DWORD {0, 1}<br>
    Default: &lt;none&gt;</p>
!   <p class=MsoBodyText style='mso-yfti-cnfc:1'>These values are used to store
!   the persistence state of the AFS drive mappings as listed in the
    [...\Client\Mappings] key.</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>These values used to be stored
    in the afsdsbmt.ini file</p>
***************
*** 7436,7443 ****
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115416301">Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
--- 8463,8471 ----
   </tr>
  </table>
  
! <h3 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872370"></a><a
! name="_Toc115416301"><span style='mso-bookmark:_Toc126872370'>Regkey:<br>
! [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</span></a></h3>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
***************
*** 7446,7453 ****
    height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416302">Value: &quot;upper case
!   drive letter&quot;</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>These values are used to store
--- 8474,8482 ----
    height:98.5pt'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt;
    height:98.5pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872371"></a><a
!   name="_Toc115416302"><span style='mso-bookmark:_Toc126872371'>Value:
!   &quot;upper case drive letter&quot;</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Type: REG_SZ<br>
    Default: &lt;none&gt;</p>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>These values are used to store
***************
*** 7458,7473 ****
   </tr>
  </table>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc115417108"></a><a
! name="_Toc115416303"><span style='mso-bookmark:_Toc115417108'>A.4 OpenAFS
! Client Service Environment Variables</span></a></h2>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
   mso-border-insideh:.75pt outset windowtext;mso-border-insidev:.75pt outset windowtext'>
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5 style='mso-yfti-cnfc:1'><a name="_Toc115416304">Variable: AFS_RPC_ENCRYPT</a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Values:<span
    style='mso-spacerun:yes'>   </span>&quot;OFF&quot; disables the use of RPC
    encryption any other value allows RPC encryption to be used<br>
--- 8487,8505 ----
   </tr>
  </table>
  
! <h2 style='margin-left:0pt;text-indent:0pt'><a name="_Toc126872372"></a><a
! name="_Toc115417108"></a><a name="_Toc115416303"><span style='mso-bookmark:
! _Toc115417108'><span style='mso-bookmark:_Toc126872372'>A.4 OpenAFS Client
! Service Environment Variables</span></span></a></h2>
  
  <table class=MsoTableWeb1 border=1 cellspacing=3 cellpadding=0
   style='mso-cellspacing:2.0pt;mso-yfti-tbllook:480;mso-padding-alt:0pt 5.4pt 0pt 5.4pt;
   mso-border-insideh:.75pt outset windowtext;mso-border-insidev:.75pt outset windowtext'>
   <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5 style='mso-outline-level:5;mso-yfti-cnfc:1'><a name="_Toc126872373"></a><a
!   name="_Toc115416304"><span style='mso-bookmark:_Toc126872373'>Variable:
!   AFS_RPC_ENCRYPT</span></a></h5>
    <p class=MsoBodyText style='mso-yfti-cnfc:1'>Values:<span
    style='mso-spacerun:yes'>   </span>&quot;OFF&quot; disables the use of RPC
    encryption any other value allows RPC encryption to be used<br>
***************
*** 7476,7487 ****
   </tr>
   <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5><a name="_Toc115416305">Variable: AFS_RPC_PROTSEQ</a></h5>
    <p class=MsoBodyText>Values:<span style='mso-tab-count:1'>            </span>&quot;ncalrpc&quot;<span
    style='mso-spacerun:yes'>  </span>- local RPC<br>
!   <span style='mso-spacerun:yes'> </span><span style='mso-tab-count:2'>                      </span>&quot;ncacn_np&quot;
    - named pipes<br>
!   <span style='mso-spacerun:yes'> </span><span style='mso-tab-count:2'>                      </span>&quot;ncacn_ip_tcp&quot;
    - tcp/ip<br>
    Default:<span style='mso-spacerun:yes'>  </span>local RPC</p>
    </td>
--- 8508,8521 ----
   </tr>
   <tr style='mso-yfti-irow:0;mso-yfti-lastrow:yes'>
    <td width=590 valign=top style='width:442.8pt;padding:0pt 5.4pt 0pt 5.4pt'>
!   <h5 style='mso-outline-level:5'><a name="_Toc126872374"></a><a
!   name="_Toc115416305"><span style='mso-bookmark:_Toc126872374'>Variable:
!   AFS_RPC_PROTSEQ</span></a></h5>
    <p class=MsoBodyText>Values:<span style='mso-tab-count:1'>            </span>&quot;ncalrpc&quot;<span
    style='mso-spacerun:yes'>  </span>- local RPC<br>
!   <span style='mso-spacerun:yes'> </span><span style='mso-tab-count:2'>                       </span>&quot;ncacn_np&quot;
    - named pipes<br>
!   <span style='mso-spacerun:yes'> </span><span style='mso-tab-count:2'>                       </span>&quot;ncacn_ip_tcp&quot;
    - tcp/ip<br>
    Default:<span style='mso-spacerun:yes'>  </span>local RPC</p>
    </td>
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.2.2 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.2.5
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm:1.2.2.2	Sun Sep 25 21:07:05 2005
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/toc.htm	Sun Feb  5 03:14:18 2006
***************
*** 16,32 ****
    <o:Author>Jeffrey Altman</o:Author>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
    <o:Revision>1</o:Revision>
!   <o:TotalTime>0</o:TotalTime>
!   <o:Created>2005-09-25T20:11:00Z</o:Created>
!   <o:LastSaved>2005-09-25T20:11:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
!   <o:Words>2362</o:Words>
!   <o:Characters>13466</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
!   <o:Lines>112</o:Lines>
!   <o:Paragraphs>31</o:Paragraphs>
!   <o:CharactersWithSpaces>15797</o:CharactersWithSpaces>
!   <o:Version>11.6408</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
--- 16,32 ----
    <o:Author>Jeffrey Altman</o:Author>
    <o:LastAuthor>Jeffrey Altman</o:LastAuthor>
    <o:Revision>1</o:Revision>
!   <o:TotalTime>9</o:TotalTime>
!   <o:Created>2005-09-25T21:11:00Z</o:Created>
!   <o:LastSaved>2005-09-25T21:11:00Z</o:LastSaved>
    <o:Pages>1</o:Pages>
!   <o:Words>4476</o:Words>
!   <o:Characters>25515</o:Characters>
    <o:Company>Secure Endpoints Inc.</o:Company>
!   <o:Lines>212</o:Lines>
!   <o:Paragraphs>59</o:Paragraphs>
!   <o:CharactersWithSpaces>29932</o:CharactersWithSpaces>
!   <o:Version>11.6568</o:Version>
   </o:DocumentProperties>
  </xml><![endif]--><!--[if gte mso 9]><xml>
   <w:WordDocument>
***************
*** 200,1484 ****
  <div class=Section1>
  
  <p class=MsoNormal><!--[if supportFields]><span style='mso-element:field-begin'></span><span
! style='mso-spacerun:yes'> </span>RD &quot;oafw-1-4-release-notes.doc&quot; \f <![endif]--><!--[if supportFields]><span
! style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
! style='mso-spacerun:yes'> </span>TOC \o &quot;1-2&quot; \h \z \u <span
! style='mso-element:field-separator'></span><![endif]--><span style='mso-no-proof:
! yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417037">1.
! Installer Options<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417037 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417038">2.
! System Requirements<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417038 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417039">2.1
! Supported Operating Systems<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417039 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417040">2.2
! Disk Space<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417040 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417041">2.3
! Additional Software<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417041 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
! <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417042">3.
! Operational Notes<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417042 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417043">3.1.
! Requirements for Kerberos 5 Authentication<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417043 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417044">3.2.
! Use of the Microsoft Loopback Adapter<span style='color:windowtext;display:
! none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417044 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417045">3.3.
! Using Freelance (Dynamic Root) Mode to Improve Mobility<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417045 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417046">3.4.
! Locating AFS Volume Database Servers<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417046 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417047">3.5.
! Obtaining AFS Tokens as a Part of Windows Logon<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417047 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417048">3.6.
! AFS System Tray Command Line Options<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417048 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417049">3.7.
! The “AFS Client Admins” Authorization Group<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417049 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417050">3.8.
! OpenAFS support for UNC paths<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417050 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417051">3.9.
! OpenAFS includes aklog.exe<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417051 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417052">3.10.
! OpenAFS Servers on Windows are Unsupported<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417052 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417053">3.11.
! OpenAFS Debugging Symbol files<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417053 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417054">3.12.
! Maximum File Size is 2GB<span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-tab-count:
! 1 dotted'>.. </span></span><!--[if supportFields]><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-begin'></span></span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'> PAGEREF
! _Toc115417054 \h </span><span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417055">3.13.
! Encrypted AFS File Access<span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-tab-count:
! 1 dotted'>. </span></span><!--[if supportFields]><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-begin'></span></span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'> PAGEREF
! _Toc115417055 \h </span><span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417056">3.14.
! Authenticated Access to the OpenAFS Client Service<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417056 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417057">3.15.
! No More INI Files<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417057 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417058">3.16.
! Microsoft Windows Internet Connection Firewall<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417058 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417059">3.17.
! Browsing AFS from the Explorer Shell and Office<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417059 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417060">3.18.
! No Support for Byte Range Locking<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417060 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417061">3.19.
! Automatic Discarding of AFS Tokens at Logoff<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417061 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417062">3.20.
! Terminal Server installations<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417062 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417063">3.21.
! Hidden Dot Files<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417063 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417064">3.22.
! Status Cache Limits<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417064 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417065">3.23.
! NETBIOS over TCP/IP must be enabled<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417065 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417066">3.24.
! OpenAFS binaries are digitally signed<span style='color:windowtext;display:
! none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417066 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417067">3.25.
! Maximum Size of the AFSCache File<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417067 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417068">3.26.
! Filename Character Sets<span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-tab-count:
! 1 dotted'>. </span></span><!--[if supportFields]><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-begin'></span></span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'> PAGEREF
! _Toc115417068 \h </span><span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417069">3.27.
! Known Character Set Issues with Roaming Profiles<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417069 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417070">3.28.
! The AFSCache File<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417070 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417071">3.29.
! Restricting OpenAFS Client Service Start and Stop<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417071 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417072">3.30.
! The @sys Name List<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417072 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417073">3.31.
! Symlinks to AFS UNC paths<span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-tab-count:
! 1 dotted'>. </span></span><!--[if supportFields]><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-begin'></span></span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'> PAGEREF
! _Toc115417073 \h </span><span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417074">3.32.
! Cache Manager Debugging Now Supported<span style='color:windowtext;display:
! none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417074 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417075">3.33.
! Windows Logon Caching vs. Kerberos Logons<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417075 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417076">3.34.
! Initial Server Preferences<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417076 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417077">3.35.
! File Timestamps<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417077 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417078">3.36.
! Windows RPC client support must be installed<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417078 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417079">3.37.
! Generating Minidumps of the OpenAFS Client Service<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417079 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417080">3.38.
! AFS Client Universally Unique Identifiers<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417080 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417081">4.
! How to Debug Problems with OpenAFS for Windows:<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417081 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417082">4.1.
! pioctl debugging (IoctlDebug registry key)<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417082 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417083">4.2.
! afsd_service initialization log (%WinDir%\TEMP\afsd_init.log)<span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417083 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417084">4.3.
! afsd_service debug logs (fs trace {-on, -off, -dump}
! -&gt;%WinDir%\TEMP\afsd.log)<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417084 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417085">4.4.
! Using SysInternal’s DbgView and FileMon Tools<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417085 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417086">4.5.
! Microsoft MiniDumps<span style='mso-spacerun:yes'>  </span>(fs minidump -&gt;
! %WinDir%\TEMP\afsd.dmp)<span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-tab-count:
! 1 dotted'> </span></span><!--[if supportFields]><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-begin'></span></span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'> PAGEREF
! _Toc115417086 \h </span><span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417087">4.6.
! Single Sign-on (Integrated Logon) debugging<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417087 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417088">4.7.
! RX (AFS RPC) debugging (rxdebug)<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417088 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417089">4.8.
! Cache Manager debugging (cmdebug)<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417089 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417090">4.9.
! Persistent Cache consistency check<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417090 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417091">5.
! Reporting Bugs:<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417091 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417092">6.
! How to Contribute to the Development of OpenAFS for Windows<span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417092 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417093">6.1.
! The USENIX OpenAFS Fund<span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-tab-count:
! 1 dotted'>. </span></span><!--[if supportFields]><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-begin'></span></span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'> PAGEREF
! _Toc115417093 \h </span><span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417094">6.2.
! Secure Endpoints Inc.<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417094 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417095">6.3.
! The MIT Kerberos Account<span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-tab-count:
! 1 dotted'> </span></span><!--[if supportFields]><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-begin'></span></span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'> PAGEREF
! _Toc115417095 \h </span><span style='color:windowtext;display:none;mso-hide:
! screen;text-decoration:none;text-underline:none'><span style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417096">6.4.
! Direct contributions of code and/or documentation<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417096 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417097">6.5.
! OpenAFS for Windows Mailing Lists<span style='color:windowtext;display:none;
! mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417097 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417098">7.
! MSI Deployment Guide<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417098 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417099">7.1.
! Introduction<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417099 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417100">7.2.
! Configuration Options<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417100 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417101">7.3
! Additional Resources<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417101 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417102">7.4.
! Upgrades<span style='color:windowtext;display:none;mso-hide:screen;text-decoration:
! none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417102 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417103">Appendix
! A: Registry Values<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417103 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417104">A.1.
! Service parameters<span style='color:windowtext;display:none;mso-hide:screen;
! text-decoration:none;text-underline:none'><span style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417104 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417105">A.2.
! Integrated Logon Network provider parameters<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417105 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417106">A.2.1
! Domain specific configuration keys for the Network Provider<span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-tab-count:1 dotted'> </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417106 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417107">A.3.
! AFS Credentials System Tray Tool parameters<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417107 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc115417108">A.4
! OpenAFS Client Service Environment Variables<span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-tab-count:1 dotted'>. </span></span><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-begin'></span></span><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'> PAGEREF _Toc115417108 \h </span><span style='color:windowtext;
! display:none;mso-hide:screen;text-decoration:none;text-underline:none'><span
! style='mso-element:field-separator'></span></span><![endif]--><b><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'>Error! Bookmark not defined.</span></b><!--[if supportFields]><span
! style='color:windowtext;display:none;mso-hide:screen;text-decoration:none;
! text-underline:none'><span style='mso-element:field-end'></span></span><![endif]--></a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
! <p class=MsoNormal><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><o:p>&nbsp;</o:p></p>
  
  </div>
  
--- 200,1291 ----
  <div class=Section1>
  
  <p class=MsoNormal><!--[if supportFields]><span style='mso-element:field-begin'></span><span
! style='mso-spacerun:yes'> </span>RD
! &quot;C:\\src\\openafs\\openafs-1-4-branch\\doc\\txt\\winnotes\\relnotes.htm&quot;
! \f <![endif]--><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><!--[if supportFields]><span
  style='mso-element:field-begin'></span><span
! style='mso-spacerun:yes'> </span>TOC \h \z \n \u <span style='mso-element:field-separator'></span><![endif]--><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872163">1. Installer Options</a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872164">2. System Requirements</a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872165">2.1 Supported Operating Systems</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872166">2.1.1 Unsupported Operating Systems</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872167">2.2 Disk Space</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872168">2.3 Additional Software</a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872169">3. Operational Notes</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872170">3.1. Requirements for Kerberos 5
! Authentication</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872171">3.1.1. Active Directory</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872172">3.1.2. Using the krb524 service</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872173">3.2. Use of the Microsoft Loopback Adapter</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872174">3.3. Using Freelance (Dynamic Root) Mode to
! Improve Mobility</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872175">3.4. Locating AFS Volume Database Servers</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872176">3.5. Obtaining AFS Tokens as a Part of
! Windows Logon</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872177">3.6. AFS System Tray Command Line Options</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872178">3.7. The “AFS Client Admins” Authorization
! Group</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872179">3.8. OpenAFS support for UNC paths</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872180">3.9. OpenAFS includes aklog.exe</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872181">3.10. OpenAFS Servers on Windows are
! Unsupported</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872182">3.11. OpenAFS Debugging Symbol files</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872183">3.12. Maximum File Size is 2GB</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872184">3.13. Encrypted AFS File Access</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872185">3.14. Authenticated Access to the OpenAFS Client
! Service</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872186">3.15. No More INI Files</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872187">3.16. Microsoft Windows Internet Connection
! Firewall</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872188">3.17. Browsing AFS from the Explorer Shell
! and Office</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872189">3.18. Byte Range Locking</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872190">3.19. Automatic Discarding of AFS Tokens at
! Logoff</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872191">3.20. Terminal Server installations</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872192">3.21. Hidden Dot Files</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872193">3.22. Status Cache Limits</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872194">3.23. NETBIOS over TCP/IP must be enabled</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872195">3.24. OpenAFS binaries are digitally signed</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872196">3.25. Maximum Size of the AFSCache File</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872197">3.26. Filename Character Sets</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872198">3.27. Known Character Set Issues with Roaming
! Profiles</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872199">3.28. The AFSCache File</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872200">3.29. Restricting OpenAFS Client Service
! Start and Stop</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872201">3.30. The @sys Name List</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872202">3.31. Symlinks to AFS UNC paths</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872203">3.32. Cache Manager Debugging Now Supported</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872204">3.33. Windows Logon Caching vs. Kerberos
! Logons</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872205">3.34. Initial Server Preferences</a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
+ <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
+ class=MsoHyperlink><span style='mso-no-proof:yes'><a
+ href="relnotes.htm#_Toc126872206">3.35. File Timestamps</a></span></span><span
+ style='mso-no-proof:yes'><o:p></o:p></span></p>
+ 
+ <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
+ class=MsoHyperlink><span style='mso-no-proof:yes'><a
+ href="relnotes.htm#_Toc126872207">3.36. Windows RPC client support must be
+ installed</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
+ 
+ <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
+ class=MsoHyperlink><span style='mso-no-proof:yes'><a
+ href="relnotes.htm#_Toc126872208">3.37. Generating Minidumps of the OpenAFS
+ Client Service</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
+ 
+ <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
+ class=MsoHyperlink><span style='mso-no-proof:yes'><a
+ href="relnotes.htm#_Toc126872209">3.38. AFS Client Universally Unique
+ Identifiers</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
+ 
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872210">4. How to Debug Problems with OpenAFS for
! Windows:</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872211">4.1. pioctl debugging (IoctlDebug registry
! key)</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872212">4.2. afsd_service initialization log
! (%WinDir%\TEMP\afsd_init.log)</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872213">4.3. afsd_service debug logs (fs trace {-on,
! -off, -dump} -&gt;%WinDir%\TEMP\afsd.log)</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872214">4.4. Using SysInternal’s DbgView and FileMon
! Tools</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872215">4.5. Microsoft MiniDumps<span
! style='mso-spacerun:yes'>  </span>(fs minidump -&gt; %WinDir%\TEMP\afsd.dmp)</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872216">4.6. Single Sign-on (Integrated Logon)
! debugging</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872217">4.7. RX (AFS RPC) debugging (rxdebug)</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872218">4.8. Cache Manager debugging (cmdebug)</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872219">4.9. Persistent Cache consistency check</a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872220">5. Reporting Bugs:</a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872221">6. How to Contribute to the Development of
! OpenAFS for Windows</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872222">6.1. The USENIX OpenAFS Fund</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872223">6.2. Secure Endpoints Inc.</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872224">6.3. The MIT Kerberos Account</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872225">6.4. Direct contributions of code and/or
! documentation</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872226">6.5. OpenAFS for Windows Mailing Lists</a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
  <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
  class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872227">7. MSI Deployment Guide</a></span></span><span
  style='mso-no-proof:yes'><o:p></o:p></span></p>
  
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872228">7.1. Introduction</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872229">7.1.1 Requirements</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872230">7.1.2 Authoring a Transform</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872231">7.2. Configuration Options</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872232">7.2.1 Configurable Properties</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872233">7.2.1.1 Setting Properties</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872234">7.2.1.2 OpenAFS for Windows Properties</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872235">(Service parameters):</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872236">(Network provider):</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872237">(OpenAFS Client):</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872238">7.2.1.2.1 Registry Properties</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872239">AFSCACHEPATH</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872240">AFSCACHESIZE</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872241">AFSCELLNAME</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872242">FREELANCEMODE</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872243">HIDEDOTFILES</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872244">LOGONOPTIONS</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872245">MOUNTROOT</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872246">NETBIOSNAME</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872247">NOFINDLANABYNAME</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872248">RXMAXMTU</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872249">SECURITYLEVEL</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872250">SMBAUTHTYPE</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872251">STOREANSIFILENAMES</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872252">USEDNS</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872253">7.2.1.2.2 AFSCreds.exe Properties</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872254">CREDSSTARTUP</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872255">CREDSAUTOINIT</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872256">CREDSIPCHDET</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872257">CREDSQUIET</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872258">CREDSRENEWDRMAP</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc6 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872259">CREDSSHOW</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872260">7.2.2 Existing Registry Entries</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872261">7.2.3 Replacing Configuration Files</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872262">7.2.3.1 Components for Configuration Files</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872263">7.2.4 Adding Domain Specific Registry Keys</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872264">7.2.5 Adding Site Specific Freelance Registry
! Keys</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872265">7.3 Additional Resources</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872266">7.4. Upgrades</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc1 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872267">Appendix A: Registry Values</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872268">A.1. Service parameters</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872269">Regkey:
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872270">Value: LANadapter</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872271">Value: CacheSize</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872272">Value: ChunkSize</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872273">Value: Daemons</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872274">Value: ServerThreads</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872275">Value: Stats</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872276">Value: LogoffPreserveTokens</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872277">Value: RootVolume</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872278">Value: Mountroot</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872279">Value: CachePath</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872280">Value: NonPersistentCaching</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872281">Value: ValidateCache</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872282">Value: TrapOnPanic</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872283">Value: NetbiosName</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872284">Value: IsGateway</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872285">Value: ReportSessionStartups</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872286">Value: TraceBufferSize</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872287">Value: SysName</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872288">Value: SecurityLevel</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872289">Value: UseDNS</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872290">Value: FreelanceClient</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872291">Value: HideDotFiles</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872292">Value: MaxMpxRequests</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872293">Value: MaxVCPerServer</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872294">Value: Cell</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872295">Value: RxNoJumbo</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872296">Value: RxMaxMTU</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872297">Value: ConnDeadTimeout</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872298">Value: HardDeadTimeout</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872299">Value: TraceOption</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872300">Value: AllSubmount</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872301">Value: NoFindLanaByName</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872302">Value: MaxCPUs</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872303">Value: smbAuthType</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872304">Value: MaxLogSize</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872305">Value: FlushOnHibernate</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872306">Regkey: [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters\GlobalAutoMapper]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872307">Value: &lt;Drive Letter:&gt; for example
! &quot;G:&quot;</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872308">Regkey: [HKLM\SOFTWARE\OpenAFS\Client]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872309">Value: CellServDBDir</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872310">Value: VerifyServiceSignature</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872311">Value: IoctlDebug</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872312">Value: MiniDumpType</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872313">Value: StoreAnsiFilenames</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872314">Regkey:
! [HKLM\SOFTWARE\OpenAFS\Client\CSCPolicy]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872315">Value: &quot;smb/cifs share name&quot;</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872316">Regkey:
! [HKLM\SOFTWARE\OpenAFS\Client\Freelance]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872317">Value: &quot;numeric value&quot;</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872318">Regkey:
! [HKLM\SOFTWARE\OpenAFS\Client\Freelance\Symlinks</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872319">Value: &quot;numeric value&quot;</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872320">Regkey:
! [HKLM\SOFTWARE\OpenAFS\Client\Submounts]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872321">Value: &quot;submount name&quot;</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872322">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Server
! Preferences\VLDB]</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872323">Value: &quot;hostname or ip address&quot;</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872324">Regkey: [HKLM\SOFTWARE\OpenAFS\Client\Server
! Preferences\File]</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872325">Value: &quot;hostname or ip address&quot;</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872326">A.2. Integrated Logon Network provider
! parameters</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872327">Regkey: [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872328">Value: FailLoginsSilently</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872329">Regkey:
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872330">Value: NoWarnings</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872331">Value: AuthentProviderPath</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872332">Value: Class</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872333">Value: DependOnGroup</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872334">Value: DependOnService</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872335">Value: Name</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872336">Value: ProviderPath</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872337">A.2.1 Domain specific configuration keys for
! the Network Provider</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872338">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872339">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872340">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain&quot;domain
! name&quot;]</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872341">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872342">Example:</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872343">A.2.1.1 Domain specific configuration values</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872344">[HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider]
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain]
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain&quot;domain
! name&quot;]
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider\Domain\LOCALHOST]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872345">Value: LogonOptions</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872346">Value: FailLoginsSilentl</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872347">Value: LogonScript</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872348">Value: LoginRetryInterval</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872349">Value: LoginSleepInterval</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872350">Value: TheseCells</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872351">A.2.1.2<span style='mso-spacerun:yes'> 
! </span>Selection of effective values for domain specific configuration</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872352">A.2.1.3 Exceptions to A.2.1.2</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872353">2.1.3.1 'FailLoginsSilently'</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc4 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872354">2.1.3.2 'LogonScript'</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872355">A.3. AFS Credentials System Tray Tool
! parameters</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872356">Regkey:
! [HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872357">Value: Gateway</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872358">Value: Cell</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872359">Regkey: [HKLM\SOFTWARE\OpenAFS\Client]
! [HKCU\SOFTWARE\OpenAFS\Client]</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872360">Value: ShowTrayIcon</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872361">Value: EnableKFW</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872362">Value: Use524</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872363">Value: AfscredsShortcutParams</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872364">Regkey: [HKCU\SOFTWARE\OpenAFS\Client]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872365">Value: Authentication Cell</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872366">Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client\Reminders]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872367">Value: &quot;afs cell name&quot;</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872368">Regkey: [HKCU\SOFTWARE\OpenAFS\Client\Active
! Maps]</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872369">Value: &quot;upper case drive letter&quot;</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc3 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872370">Regkey:
! [HKCU\SOFTWARE\OpenAFS\Client\Mappings]</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872371">Value: &quot;upper case drive letter&quot;</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc2 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872372">A.4 OpenAFS Client Service Environment
! Variables</a></span></span><span style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872373">Variable: AFS_RPC_ENCRYPT</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoToc5 style='tab-stops:right dotted 431.5pt'><span
! class=MsoHyperlink><span style='mso-no-proof:yes'><a
! href="relnotes.htm#_Toc126872374">Variable: AFS_RPC_PROTSEQ</a></span></span><span
! style='mso-no-proof:yes'><o:p></o:p></span></p>
! 
! <p class=MsoNormal><!--[if supportFields]><span style='mso-element:field-end'></span><![endif]--><o:p>&nbsp;</o:p></p>
! 
! <p class=MsoNormal><o:p>&nbsp;</o:p></p>
  
  </div>
  
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes_files/header.htm
diff -c openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes_files/header.htm:1.1.2.3 openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes_files/header.htm:1.1.2.4
*** openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes_files/header.htm:1.1.2.3	Mon Sep 26 20:44:40 2005
--- openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes_files/header.htm	Mon Jan  9 00:29:30 2006
***************
*** 1,8 ****
  <html xmlns:v="urn:schemas-microsoft-com:vml"
  xmlns:o="urn:schemas-microsoft-com:office:office"
! xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas:contacts"
  xmlns:st2="urn:schemas-microsoft-com:office:smarttags"
! xmlns="http://www.w3.org/TR/REC-html40">
  
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
--- 1,8 ----
  <html xmlns:v="urn:schemas-microsoft-com:vml"
  xmlns:o="urn:schemas-microsoft-com:office:office"
! xmlns:w="urn:schemas-microsoft-com:office:word"
  xmlns:st2="urn:schemas-microsoft-com:office:smarttags"
! xmlns:st1="urn:schemas:contacts" xmlns="http://www.w3.org/TR/REC-html40">
  
  <head>
  <meta http-equiv=Content-Type content="text/html; charset=windows-1252">
***************
*** 10,18 ****
  <meta name=Generator content="Microsoft Word 11">
  <meta name=Originator content="Microsoft Word 11">
  <link id=Main-File rel=Main-File href="../relnotes.htm">
- <o:SmartTagType namespaceuri="urn:schemas:contacts" name="GivenName"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="address"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="PostalCode"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
--- 10,17 ----
  <meta name=Generator content="Microsoft Word 11">
  <meta name=Originator content="Microsoft Word 11">
  <link id=Main-File rel=Main-File href="../relnotes.htm">
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="Street"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="PostalCode"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
***************
*** 20,34 ****
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="City"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="Street"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="country-region"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PlaceType"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="PlaceName"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="place"/>
  </head>
  
  <body lang=EN-US link=navy vlink=maroon>
--- 19,34 ----
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="City"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="address"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="country-region"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="place"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
   name="PlaceName"/>
  <o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
!  name="PlaceType"/>
! <o:SmartTagType namespaceuri="urn:schemas:contacts" name="GivenName"/>
  </head>
  
  <body lang=EN-US link=navy vlink=maroon>
Index: openafs/src/WINNT/doc/install/Documentation/en_US/html/ReleaseNotes/relnotes_files/preview.wmf
Index: openafs/src/WINNT/install/wix/openafs.wxs
diff -c openafs/src/WINNT/install/wix/openafs.wxs:1.6.2.3.4.1 openafs/src/WINNT/install/wix/openafs.wxs:1.6.2.5
*** openafs/src/WINNT/install/wix/openafs.wxs:1.6.2.3.4.1	Wed Oct  5 10:00:36 2005
--- openafs/src/WINNT/install/wix/openafs.wxs	Fri Dec 30 17:41:49 2005
***************
*** 92,103 ****
--- 92,105 ----
           BinaryKey="BIN_afsLoopback"
           DllEntry="uninstallLoopbackMSI"
           Execute="deferred" 
+          Impersonate="no"
           />
          <CustomAction
           Id="RollbackLoopback"
           BinaryKey="BIN_afsLoopback"
           DllEntry="uninstallLoopbackMSI"
           Execute="deferred" 
+          Impersonate="no"
           />
  	<?endif?>
  	<?else?>
***************
*** 129,141 ****
           Id="InstallNetProvider" 
           BinaryKey="BIN_afsCustom" 
           DllEntry="InstallNetProvider"
!          Execute="oncePerProcess" />
  		<CustomAction 
  		 Id="RemoveNetProvider" 
  		 BinaryKey="BIN_afsCustom"
  		 DllEntry="UninstallNetProvider"
  		 Return="ignore"
! 		 Execute="oncePerProcess" />
  		<CustomAction 
  		 Id="RollbackNetProvider" 
  		 BinaryKey="BIN_afsCustom"
--- 131,147 ----
           Id="InstallNetProvider" 
           BinaryKey="BIN_afsCustom" 
           DllEntry="InstallNetProvider"
!          Execute="deferred" 
!          Impersonate="no"
!         />
  		<CustomAction 
  		 Id="RemoveNetProvider" 
  		 BinaryKey="BIN_afsCustom"
  		 DllEntry="UninstallNetProvider"
  		 Return="ignore"
! 		 Execute="deferred" 
!                  Impersonate="no"
!                 />
  		<CustomAction 
  		 Id="RollbackNetProvider" 
  		 BinaryKey="BIN_afsCustom"
Index: openafs/src/WINNT/install/wix/lang/en_US/ui.wxi
diff -c openafs/src/WINNT/install/wix/lang/en_US/ui.wxi:1.6.2.3 openafs/src/WINNT/install/wix/lang/en_US/ui.wxi:1.6.2.4
*** openafs/src/WINNT/install/wix/lang/en_US/ui.wxi:1.6.2.3	Sun Jun 12 21:07:39 2005
--- openafs/src/WINNT/install/wix/lang/en_US/ui.wxi	Mon Nov 21 10:53:12 2005
***************
*** 760,779 ****
          <Control Id="DNSSel" Type="RadioButtonGroup"			X="150"	Y="160"	Width="120" Height="20" Property="USEDNS" />
        </Dialog>
        <RadioGroup Property="SECURITYLEVEL">
! 		<RadioButton X="5" Y="0" Width="55" Height="15" Text="Disable">0</RadioButton>
! 		<RadioButton X="65" Y="0" Width="55" Height="15" Text="Enable">1</RadioButton>
        </RadioGroup>
        <RadioGroup Property="FREELANCEMODE">
! 		<RadioButton X="5" Y="0" Width="55" Height="15" Text="Disable">0</RadioButton>
! 		<RadioButton X="65" Y="0" Width="55" Height="15" Text="Enable">1</RadioButton>
        </RadioGroup>
        <RadioGroup Property="USEDNS">
! 		<RadioButton X="5" Y="0" Width="55" Height="15" Text="Disable">0</RadioButton>
! 		<RadioButton X="65" Y="0" Width="55" Height="15" Text="Enable">1</RadioButton>
        </RadioGroup>
        <RadioGroup Property="LOGONOPTIONS">
! 		<RadioButton X="5" Y="0" Width="55" Height="15" Text="Disable">0</RadioButton>
! 		<RadioButton X="65" Y="0" Width="55" Height="15" Text="Enable">1</RadioButton>
        </RadioGroup>
  
        <Dialog Id="ConfigCredsDlg" Width="370" Height="270" Title="[ProductName] [Setup]" NoMinimize="yes">
--- 760,779 ----
          <Control Id="DNSSel" Type="RadioButtonGroup"			X="150"	Y="160"	Width="120" Height="20" Property="USEDNS" />
        </Dialog>
        <RadioGroup Property="SECURITYLEVEL">
! 		<RadioButton X="5" Y="0" Width="55" Height="15" Text="Disable" Value="0"></RadioButton>
! 		<RadioButton X="65" Y="0" Width="55" Height="15" Text="Enable" Value="1"></RadioButton>
        </RadioGroup>
        <RadioGroup Property="FREELANCEMODE">
! 		<RadioButton X="5" Y="0" Width="55" Height="15" Text="Disable" Value="0"></RadioButton>
! 		<RadioButton X="65" Y="0" Width="55" Height="15" Text="Enable" Value="1"></RadioButton>
        </RadioGroup>
        <RadioGroup Property="USEDNS">
! 		<RadioButton X="5" Y="0" Width="55" Height="15" Text="Disable" Value="0"></RadioButton>
! 		<RadioButton X="65" Y="0" Width="55" Height="15" Text="Enable" Value="1"></RadioButton>
        </RadioGroup>
        <RadioGroup Property="LOGONOPTIONS">
! 		<RadioButton X="5" Y="0" Width="55" Height="15" Text="Disable" Value="0"></RadioButton>
! 		<RadioButton X="65" Y="0" Width="55" Height="15" Text="Enable" Value="1"></RadioButton>
        </RadioGroup>
  
        <Dialog Id="ConfigCredsDlg" Width="370" Height="270" Title="[ProductName] [Setup]" NoMinimize="yes">
***************
*** 970,977 ****
          </Control>
        </Dialog>
        <RadioGroup Property="IAgree">
!         <RadioButton Text="{\DlgFont8}I &amp;accept the terms in the License Agreement" X="5" Y="0" Width="250" Height="15">yes</RadioButton>
!         <RadioButton Text="{\DlgFont8}I &amp;do not accept the terms in the License Agreement" X="5" Y="20" Width="250" Height="15">no</RadioButton>
        </RadioGroup>
        <TextStyle Id="DlgFont8" FaceName="Tahoma" Size="8" />
        <TextStyle Id="DlgFontBold8" FaceName="Tahoma" Size="8" Bold="yes" />
--- 970,977 ----
          </Control>
        </Dialog>
        <RadioGroup Property="IAgree">
!         <RadioButton Text="{\DlgFont8}I &amp;accept the terms in the License Agreement" X="5" Y="0" Width="250" Height="15" Value="yes"></RadioButton>
!         <RadioButton Text="{\DlgFont8}I &amp;do not accept the terms in the License Agreement" X="5" Y="20" Width="250" Height="15" Value="no"></RadioButton>
        </RadioGroup>
        <TextStyle Id="DlgFont8" FaceName="Tahoma" Size="8" />
        <TextStyle Id="DlgFontBold8" FaceName="Tahoma" Size="8" Bold="yes" />
Index: openafs/src/WINNT/talocale/tal_string.cpp
diff -c openafs/src/WINNT/talocale/tal_string.cpp:1.6.2.1 openafs/src/WINNT/talocale/tal_string.cpp:1.6.2.2
*** openafs/src/WINNT/talocale/tal_string.cpp:1.6.2.1	Wed Jul  6 20:29:17 2005
--- openafs/src/WINNT/talocale/tal_string.cpp	Mon Nov 21 19:32:41 2005
***************
*** 823,843 ****
        }
     else
        {
!       GetTimeFormat (LOCALE_USER_DEFAULT, 0,              &lt, NULL, szTime, cchRESOURCE);
!       GetDateFormat (LOCALE_USER_DEFAULT, DATE_SHORTDATE, &lt, NULL, szDate, cchRESOURCE);
  
        if (fShowTime && fShowDate)
           {
!          lstrcat (szTime, TEXT(" "));
!          lstrcat (szTime, szDate);
           }
!       else if (fShowDate && !fShowTime)
           {
!          lstrcpy (szTime, szDate);
           }
        }
  
!    wsprintf (pszTarget, FixFormatString (pszFormatUser), szTime);
     return rc;
  }
  
--- 823,843 ----
        }
     else
        {
!       GetTimeFormat (LOCALE_USER_DEFAULT, 0, &lt, "HH:mm:ss", szTime, cchRESOURCE);
!       GetDateFormat (LOCALE_USER_DEFAULT, 0, &lt, "yyyy-MM-dd", szDate, cchRESOURCE);
  
        if (fShowTime && fShowDate)
           {
!          lstrcat (szDate, TEXT(" "));
!          lstrcat (szDate, szTime);
           }
!       else if (!fShowDate && fShowTime)
           {
!          lstrcpy (szDate, szTime);
           }
        }
  
!    wsprintf (pszTarget, FixFormatString (pszFormatUser), szDate);
     return rc;
  }
  
Index: openafs/src/WINNT/tests/winflock/README.txt
diff -c /dev/null openafs/src/WINNT/tests/winflock/README.txt:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:26 2006
--- openafs/src/WINNT/tests/winflock/README.txt	Mon Oct 31 17:17:02 2005
***************
*** 0 ****
--- 1,17 ----
+ 
+ To run winflock.exe:
+ 
+ C:\> winflock.exe -d (dir) > verbose.log
+ 
+ By default, there a lot of logging generated to stdout while the actual test 
+ results are reported to stderr.  Redirecting stdout to a log file cleans out
+ the output.
+ 
+ The directory specified by (dir) must exist.  This is where the test files
+ will be created and tests run against.
+ 
+ Eg:
+ 
+    winflock.exe -d \\afs\athena.mit.edu\user\a\s\asanka\test > verbose.log
+ 
+ 
Index: openafs/src/WINNT/tests/winflock/main.cpp
diff -c /dev/null openafs/src/WINNT/tests/winflock/main.cpp:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:26 2006
--- openafs/src/WINNT/tests/winflock/main.cpp	Mon Oct 31 17:17:02 2005
***************
*** 0 ****
--- 1,240 ----
+ #include "winflock.h"
+ 
+ BOOL isChild = FALSE;
+ HANDLE h_child = NULL;
+ HANDLE event_child = NULL;
+ HANDLE event_parent = NULL;
+ HANDLE mutex_logfile = NULL;
+ 
+ BOOL tst_read_write = TRUE;
+ BOOL tst_pause = FALSE;
+ 
+ int show_usage(_TCHAR * pname)
+ {
+     cerr << pname << " : WIN32 File Locking Test\n";
+     cerr <<
+         "Options:\n"
+         "    -d <dir>: sets the directory where the test files are to be\n"
+         "              created.\n"
+         "    -nr     : disable read/write tests\n"
+         "    -p      : Pause during the test with the test file locked\n"
+         ;
+     return 1;
+ }
+ 
+ int parse_cmd_line(int argc, _TCHAR * argv[])
+ {
+     int i;
+ 
+     if(argc == 1) {
+         return show_usage(argv[0]);
+     }
+ 
+     for(i=1; i<argc; i++) {
+         if(!_tcscmp(argv[i], _T("-d"))) {
+             if(++i < argc && _tcslen(argv[i]) < MAX_PATH) {
+                 size_t len;
+                 StringCbCopy(test_dir, sizeof(test_dir), argv[i]);
+                 StringCbLength(test_dir, sizeof(test_dir), &len);
+                 if(len > 0 && test_dir[len-1] != _T('\\'))
+                     StringCbCat(test_dir, sizeof(test_dir), _T("\\"));
+             } else {
+                 return show_usage(argv[0]);
+             }
+         } else if (!_tcscmp(argv[i], _T("-nr"))) {
+             tst_read_write = FALSE;        
+         } else if(!_tcscmp(argv[i], _T("-child"))) {
+             isChild = TRUE;
+         } else if(!_tcscmp(argv[i], _T("-p"))) {
+             tst_pause = TRUE;
+         } else {
+             cerr << "Invalid option : " << argv[i] << "\n";
+             return show_usage(argv[0]);
+         }
+     }
+     return 0;
+ }
+ 
+ int spawn_kids(int argc, _TCHAR *argv[])
+ {
+     PROCESS_INFORMATION procinfo;
+     STARTUPINFO startinfo;
+     TCHAR cmd_line[MAX_PATH];
+     size_t len;
+ 
+     StringCbCopy(cmd_line, sizeof(cmd_line), _T("\""));
+     StringCbCat(cmd_line, sizeof(cmd_line), argv[0]);
+     StringCbCat(cmd_line, sizeof(cmd_line), _T("\""));
+     StringCbCat(cmd_line, sizeof(cmd_line), _T(" -child"));
+     if(!tst_read_write)
+         StringCbCat(cmd_line, sizeof(cmd_line), _T(" -nr"));
+     StringCbLength(test_dir, sizeof(test_dir), &len);
+     if(len > 0) {
+         StringCbCat(cmd_line, sizeof(cmd_line), _T(" -d "));
+         StringCbCat(cmd_line, sizeof(cmd_line), test_dir);
+         //_tcscat(cmd_line, _T("\""));
+     }
+ 
+     startinfo.cb = sizeof(startinfo);
+     startinfo.lpReserved = NULL;
+     startinfo.lpDesktop = NULL;
+     startinfo.lpTitle = NULL;
+     startinfo.dwFlags = 0;
+     startinfo.cbReserved2 = 0;
+     
+     cerr << "PARENT: Process ID:" << GetCurrentProcessId() << "\n";
+     cerr << "PARENT: Spawning child process: " << cmd_line << "\n";
+ 
+     if(!CreateProcess(
+         NULL,
+         cmd_line,
+         NULL,
+         NULL,
+         FALSE,
+         0,
+         NULL,
+         NULL,
+         &startinfo,
+         &procinfo))
+         return 1;
+ 
+     h_child = procinfo.hProcess;
+ 
+     if(procinfo.hThread)
+         CloseHandle(procinfo.hThread);
+ 
+     cerr << "PARENT: Waiting for child process...\n";
+     cerr.flush();
+ 
+     WaitForSingleObject(event_parent, INFINITE);
+ 
+     cerr << "PARENT: Done.\n";
+     cerr << "PARENT: Created child process ID: " << procinfo.dwProcessId << "\n";
+     cerr.flush();
+ 
+     return 0;
+ }
+ 
+ int run_tests(void)
+ {
+     int rv = 0;
+     int rvt = 0;
+ 
+ #define PC_CALL(f)      \
+     if(!isChild) {      \
+         BEGINLOG();     \
+         rvt = f;        \
+         ENDLOG();       \
+         SetEvent(event_child);                          \
+         WaitForSingleObject(event_parent, INFINITE);    \
+     } else {                                            \
+         WaitForSingleObject(event_child, INFINITE);     \
+         BEGINLOG();     \
+         rvt = f;        \
+         ENDLOG();       \
+         SetEvent(event_parent);                         \
+     }                   \
+     rv = (rv | rvt)
+ 
+ #define PCINT_CALL(f)   \
+     rvt = f;            \
+     rv = (rv | rvt)
+     
+     PC_CALL(begin_tests());
+ 
+     PC_CALL(test_create());
+     
+     if(tst_read_write)
+         PC_CALL(test_lock_prep());
+ 
+     PCINT_CALL(testint_lock_excl_beof());
+ 
+     if(tst_read_write)
+         PCINT_CALL(testint_lock_excl_rw_beof());
+ 
+     if(tst_read_write)
+         PCINT_CALL(testint_lock_excl_eeof());
+ 
+     if(tst_pause) {
+         TCHAR c;
+         cin >> c;
+     }
+ 
+     PCINT_CALL(testint_unlock());
+ 
+     PCINT_CALL(testint_lock_escalation());
+ 
+     PC_CALL(end_tests());
+ 
+ #undef PC_CALL
+ #undef PCINT_CALL
+ 
+     return rv;
+ }
+ 
+ void cleanup(void)
+ {
+     if(h_child)
+         CloseHandle(h_child);
+ }
+ 
+ void create_sync_objects(void)
+ {
+     event_child = CreateEvent(
+         NULL,
+         FALSE,
+         FALSE,
+         _T("Local\\WinFLockChildEvent"));
+ 
+     assert(event_child != NULL);
+ 
+     event_parent = CreateEvent(
+         NULL,
+         FALSE,
+         FALSE,
+         _T("Local\\WinFLockParentEvent"));
+ 
+     assert(event_parent != NULL);
+ 
+     mutex_logfile = CreateMutex(
+         NULL,
+         FALSE,
+         _T("Local\\WinFLockLogFileMutex"));
+ 
+     assert(mutex_logfile != NULL);
+ }
+ 
+ void free_sync_objects(void)
+ {
+     if(event_child)
+         CloseHandle(event_child);
+     if(event_parent)
+         CloseHandle(event_parent);
+     if(mutex_logfile)
+         CloseHandle(mutex_logfile);
+ }
+ 
+ int _tmain(int argc, _TCHAR * argv[])
+ {
+     int rv;
+ 
+     rv = parse_cmd_line(argc, argv);
+     if(rv != 0)
+         return rv;
+ 
+     create_sync_objects();
+ 
+     if(!isChild) {
+         if(spawn_kids(argc, argv))
+             return 1;
+     } else {
+         SetEvent(event_parent);
+     }
+ 
+     rv = run_tests();
+ 
+     free_sync_objects();
+ 
+     cleanup();
+     return rv;
+ }
Index: openafs/src/WINNT/tests/winflock/sync.cpp
diff -c /dev/null openafs/src/WINNT/tests/winflock/sync.cpp:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:26 2006
--- openafs/src/WINNT/tests/winflock/sync.cpp	Mon Oct 31 17:17:02 2005
***************
*** 0 ****
--- 1,50 ----
+ #include "winflock.h"
+ 
+ void _begin_log(void) 
+ {
+     WaitForSingleObject(mutex_logfile, INFINITE);
+     logfile << (isChild?"CHILD {\n":"PARENT {\n");
+ }
+ 
+ void _end_log(void) 
+ {
+     logfile << "}\n";
+     logfile.flush();
+     ReleaseMutex(mutex_logfile);
+ }
+ 
+ void _sync_begin_parent(void)
+ {
+     if(!isChild) {
+         BEGINLOG();
+     } else {
+         WaitForSingleObject(event_child, INFINITE);
+     }
+ }
+ 
+ void _sync_end_parent(void)
+ {
+     if(!isChild) {
+         ENDLOG();
+         SetEvent(event_child);
+     } else {
+     }
+ }
+ 
+ void _sync_begin_child(void)
+ {
+     if(!isChild) {
+         WaitForSingleObject(event_parent, INFINITE);
+     } else {
+         BEGINLOG();
+     }
+ }
+ 
+ void _sync_end_child(void)
+ {
+     if(!isChild) {
+     } else {
+         ENDLOG();
+         SetEvent(event_parent);
+     }
+ }
Index: openafs/src/WINNT/tests/winflock/tests.cpp
diff -c /dev/null openafs/src/WINNT/tests/winflock/tests.cpp:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:26 2006
--- openafs/src/WINNT/tests/winflock/tests.cpp	Mon Oct 31 17:17:02 2005
***************
*** 0 ****
--- 1,953 ----
+ #include "winflock.h"
+ 
+ TCHAR test_dir[MAX_PATH] = _T("");
+ TCHAR fn_base[MAX_PATH] = _T("");
+ TCHAR fn_aux[MAX_PATH] = _T("");
+ 
+ HANDLE h_file_base = NULL;
+ HANDLE h_file_aux = NULL;
+ 
+ void log_last_error(void)
+ {
+     logfile << "GetLastError() == " << GetLastError() << "\n";
+ }
+ 
+ int begin_tests()
+ {
+     TCHAR file_name[MAX_PATH];
+ 
+     if(!isChild)
+     logfile << "-------Starting tests-----------------------------\n";
+ 
+     StringCbCopy(file_name, sizeof(file_name), test_dir);
+     StringCbCat(file_name, sizeof(file_name), _T("FLTST000"));
+     StringCbCopy(fn_base, sizeof(fn_base), file_name);
+ 
+     logfile << "h_file_base = CreateFile(" << file_name << ") shared\n";
+ 
+     h_file_base = CreateFile(
+         file_name,
+         GENERIC_READ | GENERIC_WRITE,
+         FILE_SHARE_READ | FILE_SHARE_WRITE,
+         NULL,
+         CREATE_ALWAYS,
+         0,
+         NULL);
+ 
+     if(h_file_base == INVALID_HANDLE_VALUE) {
+         log_last_error();
+         return 1;
+     }
+ 
+     StringCbCopy(file_name, sizeof(file_name), test_dir);
+     StringCbCat(file_name, sizeof(file_name), _T("FLTST001"));
+     StringCbCopy(fn_aux, sizeof(fn_aux), file_name);
+ 
+     if(!isChild) {
+ 
+         logfile << "h_file_aux = CreateFile(" << file_name << ") exclusive\n";
+ 
+         h_file_aux = CreateFile(
+             file_name,
+             GENERIC_READ | GENERIC_WRITE,
+             0,
+             NULL,
+             CREATE_ALWAYS,
+             0,
+             NULL);
+ 
+         if(h_file_aux == INVALID_HANDLE_VALUE) {
+             log_last_error();
+             return 1;
+         }
+     }
+ 
+     return 0;
+ }
+ 
+ /*  CreateFile:
+    - Requesting a sharing mode that conflicts with the access mode specified in a previous
+      open reqeuest whose handle is still open should be an error (should return ERROR_SHARING_VIOLATION)
+    - If sharing mode is 0, the file cannot be opened again until the handle is closed.
+    - Sharing modes should be tested:
+      - FILE_SHARE_DELETE
+      - FILE_SHARE_READ
+      - FILE_SHARE_WRITE
+ */
+ int test_create(void)
+ {
+     HANDLE h;
+ 
+     if(isChild) {
+         logfile << "----Begin CreateFile tests ----\n";
+ 
+         cerr << 
+             "TEST:CREATE:001 Requesting a sharing mode that conflicts with the access mode "
+             "specified in a previous open requestion whose handle is still open should be an error.\n";
+ 
+         cerr <<
+             "TEST:CREATE:001:01 Attempt exclusive open of a file which is already opened exclusively\n";
+ 
+         logfile << "CreateFile(" << fn_aux << ")... exclusive\n";
+         h = CreateFile(
+             fn_aux,
+             GENERIC_READ | GENERIC_WRITE,
+             0,
+             NULL,
+             CREATE_ALWAYS,
+             0,
+             NULL);
+ 
+         if(h != INVALID_HANDLE_VALUE) {
+             logfile << "BAD : CreateFile(" << fn_aux << ") should have failed but didn't\n";
+             cerr << "TEST:CREATE:001:01 ***FAILED***\n";
+             CloseHandle(h);
+         } else {
+             logfile << "good: CreateFile(" << fn_aux << ") failed\n";
+             cerr << "TEST:CREATE:001:01 PASS (LastError=" << GetLastError() << ")\n";
+             if(GetLastError() != ERROR_SHARING_VIOLATION)
+                 cerr << "TEST:CREATE:001:01 **WARN** LastError != ERROR_SHARING_VIOLATION\n";
+         }
+ 
+         cerr <<
+             "TEST:CREATE:001:02 Attempt to open a file with shared read which is already opened exclusively\n";
+ 
+         logfile << "CreateFile(" << fn_aux << ")... share read\n";
+ 
+         h = CreateFile(
+             fn_aux,
+             GENERIC_READ | GENERIC_WRITE,
+             FILE_SHARE_READ,
+             NULL,
+             CREATE_ALWAYS,
+             0,
+             NULL);
+ 
+         if(h != INVALID_HANDLE_VALUE) {
+             logfile << "BAD : CreateFile(" << fn_aux << ") should have failed but didn't\n";
+             cerr << "TEST:CREATE:001:02 ***FAILED***\n";
+             CloseHandle(h);
+         } else {
+             logfile << "good\n";
+             cerr << "TEST:CREATE:001:02 PASS (LastError=" << GetLastError() << ")\n";
+             if(GetLastError() != ERROR_SHARING_VIOLATION)
+                 cerr << "TEST:CREATE:001:02 **WARN** LastError != ERROR_SHARING_VIOLATION\n";
+         }
+ 
+         cerr <<
+             "TEST:CREATE:001:03 Attempt to open a file exclusively which is already opened shared\n";
+ 
+         logfile << "CreateFile(" << fn_base << ")... exclusive\n";
+ 
+         h = CreateFile(
+             fn_base,
+             GENERIC_READ | GENERIC_WRITE,
+             0,
+             NULL,
+             CREATE_ALWAYS,
+             0,
+             NULL);
+ 
+         if(h != INVALID_HANDLE_VALUE) {
+             logfile << "BAD : CreateFile(" << fn_base << ") should have failed but didn't\n";
+             cerr << "TEST:CREATE:001:03 ***FAILED***\n";
+             CloseHandle(h);
+         } else {
+             logfile << "good\n";
+             cerr << "TEST:CREATE:001:03 PASS (LastError=" << GetLastError() << ")\n";
+             if(GetLastError() != ERROR_SHARING_VIOLATION)
+                 cerr << "TEST:CREATE:001:03 **WARN** LastError != ERROR_SHARING_VIOLATION\n";
+         }
+ 
+         cerr <<
+             "TEST:CREATE:001:04 Attempt to open a file shared write which is already opened shared r/w\n";
+ 
+         logfile << "CreateFile(" << fn_base << ")... share write\n";
+ 
+         h = CreateFile(
+             fn_base,
+             GENERIC_READ | GENERIC_WRITE,
+             FILE_SHARE_WRITE,
+             NULL,
+             CREATE_ALWAYS,
+             0,
+             NULL);
+ 
+         if(h != INVALID_HANDLE_VALUE) {
+             logfile << "BAD : CreateFile(" << fn_base << ") should have failed but didn't\n";
+             cerr << "TEST:CREATE:001:04 ***FAILED***\n";
+             CloseHandle(h);
+         } else {
+             logfile << "good\n";
+             cerr << "TEST:CREATE:001:04 PASS (LastError=" << GetLastError() << ")\n";
+             if(GetLastError() != ERROR_SHARING_VIOLATION)
+                 cerr << "TEST:CREATE:001:04 **WARN** LastError != ERROR_SHARING_VIOLATION\n";
+         }
+ 
+         cerr <<
+             "TEST:CREATE:001:05 Attempt to open a file shared r/w which is already opened shared r/w\n";
+ 
+         logfile << "CreateFile(" << fn_base << ")... share r/w\n";
+ 
+         h = CreateFile(
+             fn_base,
+             GENERIC_READ | GENERIC_WRITE,
+             FILE_SHARE_WRITE | FILE_SHARE_READ,
+             NULL,
+             CREATE_ALWAYS,
+             0,
+             NULL);
+ 
+         if(h != INVALID_HANDLE_VALUE) {
+             logfile << "good\n";
+             cerr << "TEST:CREATE:001:05 PASS\n";
+             CloseHandle(h);
+         } else {
+             logfile << "BAD : CreateFile(" << fn_base << ") failed!\n";
+             cerr << "TEST:CREATE:001:05 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         }
+ 
+         logfile << "----End CreateFile tests ----\n";
+     }
+ 
+     return 0;
+ }
+ 
+ /* prepare the test file by filling it in with the test pattern */
+ int test_lock_prep(void)
+ {
+     int i,j;
+     DWORD * buffer;
+     DWORD nb;
+     if(!isChild) {
+         logfile << "----Preparing test file----\n";
+         /* buffer is 4k */
+         buffer = (DWORD *) malloc(sizeof(DWORD) * 1024);
+ 
+         assert(buffer != NULL);
+         logfile << "SetFilePointer(h_file_base, 0, NULL, FILE_BEGIN)\n";
+         SetFilePointer(h_file_base, 0, NULL, FILE_BEGIN);
+         for(j=0; j<256; j++) {
+             for(i=0; i<1024; i++) {
+                 buffer[i] = j;
+             }
+ 
+             logfile << "WriteFile(h_file_base, (LPCVOID) buffer, sizeof(DWORD) * 1024, &nb, NULL)\n";
+ 
+             if(!WriteFile(h_file_base, (LPCVOID) buffer, sizeof(DWORD) * 1024, &nb, NULL)) {
+                 logfile << "WARNING**: WriteFile error=" << GetLastError() << "\n";
+             } else if(nb != sizeof(DWORD) * 1024) {
+                 logfile << "WARNING**: WriteFile underrun (j=" << j << ",nb=" << nb << ")\n";
+             }
+         }
+ 
+         free(buffer);
+ 
+         SetEndOfFile(h_file_base);
+         FlushFileBuffers(h_file_base);
+ 
+         logfile << "----End Preparing test file---\n";
+     }
+ 
+     return 0;
+ }
+ 
+ /* Test exclusive locks below EOF
+ 
+    testint_* functions manage their own cross process synchronization
+ */
+ int testint_lock_excl_beof(void)
+ {
+     /* at this point, test_lock_prep() has already run, and the length
+        of h_file_base is set at 1M */
+     SYNC_BEGIN_PARENT {
+         logfile << "----Begin Lock Test Exclusive BEOF----\n";
+ 
+         cerr << "TEST:LOCK:001 Exclusive byte-range locks below EOF\n";
+ 
+         /* parent takes three non-overlapping locks */
+         logfile << "LockFile(h_file_base, PAGE_BEGIN(10), 0, PAGE_LEN(10), 0)\n";
+         if(!LockFile(h_file_base, PAGE_BEGIN(10), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: LockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:001 ***ERROR*** Setup failed!\n";
+         }
+ 
+         logfile << "LockFile(h_file_base, 4096 * 30, 0, 4096 * 10, 0)\n";
+         if(!LockFile(h_file_base, PAGE_BEGIN(30), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: LockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:001 ***ERROR*** Setup failed!\n";
+         }
+ 
+         logfile << "LockFile(h_file_base, 4096 * 62, 0, 4096 * 1, 0)\n";
+         if(!LockFile(h_file_base, PAGE_BEGIN(62), 0, PAGE_LEN(1), 0)) {
+             logfile << "ERROR**: LockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:001 ***ERROR*** Setup failed!\n";
+         }
+     } SYNC_END_PARENT;
+ 
+     SYNC_BEGIN_PARENT {
+         logfile << "--Test using same handle, same process--\n";
+         cerr <<
+             "TEST:LOCK:001:01 Test overlapping locks within same process (complete overlap)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(15), 0, PAGE_LEN(3), 0)) {
+             cerr << "TEST:LOCK:001:01 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:001:01 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(15), 0, PAGE_LEN(3), 0))
+                 cerr << "TEST:LOCK:001:01 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:001:02 Test overlapping locks within same process (partial overlap A)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(15), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:001:02 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:001:02 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(15), 0, PAGE_LEN(10), 0))
+                 cerr << "TEST:LOCK:001:02 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:001:03 Test overlapping locks within same process (partial overlap B)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(25), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:001:03 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:001:03 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(25), 0, PAGE_LEN(10), 0))
+                 cerr << "TEST:LOCK:001:03 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:001:04 Test non-overlapping locks with same process\n";
+         cerr <<
+             "TEST:LOCK:001:04 PASS (iff Setup succeeded)\n";
+ 
+     } SYNC_END_PARENT;
+ 
+     SYNC_BEGIN_CHILD {
+         logfile << "--Test using child process--\n";
+         cerr <<
+             "TEST:LOCK:001:05 Test overlapping locks with different process (complete overlap)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(15), 0, PAGE_LEN(3), 0)) {
+             cerr << "TEST:LOCK:001:05 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:001:05 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(15), 0, PAGE_LEN(3), 0))
+                 cerr << "TEST:LOCK:001:05 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:001:06 Test overlapping locks with different process (partial overlap A)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(15), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:001:06 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:001:06 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(15), 0, PAGE_LEN(10), 0))
+                 cerr << "TEST:LOCK:001:06 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:001:07 Test overlapping locks with different process (partial overlap B)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(25), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:001:07 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:001:07 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(25), 0, PAGE_LEN(10), 0))
+                 cerr << "TEST:LOCK:001:07 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:001:08 Test non-overlapping lock with different process\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(50), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:001:08 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:001:08 PASS\n";
+             /* leave lock held */
+         }
+     } SYNC_END_CHILD;
+ 
+     return 0;
+ }
+ 
+ /* by now we have the following exclusive locks:
+ 
+ pages 10-19 : exclusive by parent
+ pages 30-39 : exclusive by parent
+ pages 50-59 : exclusive by child
+ pages 0-9   : free-for-all
+ pages 20-29 : free-for-all
+ pages 40-49 : free-for-all
+ pages 60-61 : free-for-all
+ page  62    : exclusive by parent
+ pages 63-255: free-for-all
+ pages 256-  : non-existent
+ */
+ 
+ 
+ int testint_lock_excl_rw_beof(void)
+ {
+     DWORD * read_buf;
+     DWORD * write_buf;
+     DWORD nbytes;
+ 
+     /* each of read_buf and write_buf are 10 pages long */
+     read_buf = (DWORD *) malloc(sizeof(DWORD) * 10240);
+     assert(read_buf != NULL);
+ 
+     write_buf = (DWORD *) malloc(sizeof(DWORD) * 10240);
+     assert(write_buf != NULL);
+ 
+     SYNC_BEGIN_PARENT {
+         logfile << "----Test writes and reads on exclusive locks----\n";
+         logfile << "--Read tests--\n";
+ 
+         cerr << "TEST:LOCK:002 Read tests in the presence of locks\n";
+ 
+         cerr << "TEST:LOCK:002:01 Read in unlocked area\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(42), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(42), NULL, FILE_BEGIN) != PAGE_BEGIN(42)) {
+             cerr << "TEST:LOCK:002:01 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!ReadFile(h_file_base, (LPVOID) read_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:002:01 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:002:01 PASS\n";
+         }
+         
+         cerr << "TEST:LOCK:002:02 Read in partially locked area (A)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(27), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(27), NULL, FILE_BEGIN) != PAGE_BEGIN(27)) {
+             cerr << "TEST:LOCK:002:02 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!ReadFile(h_file_base, (LPVOID) read_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:002:02 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:002:02 PASS\n";
+         }
+         
+         cerr << "TEST:LOCK:002:03 Read in locked area\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(32), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(32), NULL, FILE_BEGIN) != PAGE_BEGIN(32)) {
+             cerr << "TEST:LOCK:002:03 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!ReadFile(h_file_base, (LPVOID) read_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:002:03 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:002:03 PASS\n";
+         }
+         
+         cerr << "TEST:LOCK:002:04 Read in partially locked area (B)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(37), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(37), NULL, FILE_BEGIN) != PAGE_BEGIN(37)) {
+             cerr << "TEST:LOCK:002:04 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!ReadFile(h_file_base, (LPVOID) read_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:002:04 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:002:04 PASS\n";
+         }
+          
+         cerr << "TEST:LOCK:002:05 Read in partially unowned area (A)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(47), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(47), NULL, FILE_BEGIN) != PAGE_BEGIN(47)) {
+             cerr << "TEST:LOCK:002:05 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!ReadFile(h_file_base, (LPVOID) read_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:002:05 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:002:05 ***FAILED***\n";
+         }
+         
+         cerr << "TEST:LOCK:002:06 Read in fully unowned area\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(52), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(52), NULL, FILE_BEGIN) != PAGE_BEGIN(52)) {
+             cerr << "TEST:LOCK:002:06 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!ReadFile(h_file_base, (LPVOID) read_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:002:06 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:002:06 ***FAILED***\n";
+         }
+         
+         cerr << "TEST:LOCK:002:07 Read in partially unowned area (B)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(56), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(56), NULL, FILE_BEGIN) != PAGE_BEGIN(56)) {
+             cerr << "TEST:LOCK:002:07 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!ReadFile(h_file_base, (LPVOID) read_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:002:07 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:002:07 ***FAILED***\n";
+         }
+ 
+         cerr << "TEST:LOCK:002:08 Read in partially unowned area (C)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(59), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(59), NULL, FILE_BEGIN) != PAGE_BEGIN(59)) {
+             cerr << "TEST:LOCK:002:08 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!ReadFile(h_file_base, (LPVOID) read_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:002:08 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:002:08 ***FAILED***\n";
+         }
+     } SYNC_END_PARENT;
+ 
+     SYNC_BEGIN_CHILD {
+         int i;
+         int j;
+ 
+         for(j=0; j<10; j++) {
+             for(i=0; i<1024; i++) {
+                 write_buf[j*1024 + i] = 0x0d0d0d0d;
+             }
+         }
+ 
+         cerr << "TEST:LOCK:003 Write tests in the presence of locks\n";
+         logfile << "--Write tests--\n";
+ 
+         cerr << "TEST:LOCK:003:01 Write in unlocked area\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(42), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(42), NULL, FILE_BEGIN) != PAGE_BEGIN(42)) {
+             cerr << "TEST:LOCK:003:01 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!WriteFile(h_file_base, (LPCVOID) write_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:003:01 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:003:01 PASS\n";
+         }
+ 
+         cerr << "TEST:LOCK:003:02 Write in partially owned area (A)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(47), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(47), NULL, FILE_BEGIN) != PAGE_BEGIN(47)) {
+             cerr << "TEST:LOCK:003:02 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!WriteFile(h_file_base, (LPCVOID) write_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:003:02 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:003:02 PASS\n";
+         }
+ 
+         cerr << "TEST:LOCK:003:03 Write in fully owned area\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(52), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(52), NULL, FILE_BEGIN) != PAGE_BEGIN(52)) {
+             cerr << "TEST:LOCK:003:03 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!WriteFile(h_file_base, (LPCVOID) write_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:003:03 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:003:03 PASS\n";
+         }
+ 
+         cerr << "TEST:LOCK:003:04 Write in partially owned area (B)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(56), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(56), NULL, FILE_BEGIN) != PAGE_BEGIN(56)) {
+             cerr << "TEST:LOCK:003:04 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!WriteFile(h_file_base, (LPCVOID) write_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:003:04 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:003:04 PASS\n";
+         }
+ 
+         cerr << "TEST:LOCK:003:05 Write in partially unowned area (A)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(27), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(27), NULL, FILE_BEGIN) != PAGE_BEGIN(27)) {
+             cerr << "TEST:LOCK:003:05 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!WriteFile(h_file_base, (LPCVOID) write_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:003:05 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:003:05 ***FAILED***\n";
+         }
+ 
+         cerr << "TEST:LOCK:003:06 Write in fully unowned area\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(32), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(32), NULL, FILE_BEGIN) != PAGE_BEGIN(32)) {
+             cerr << "TEST:LOCK:003:06 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!WriteFile(h_file_base, (LPCVOID) write_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:003:06 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:003:06 ***FAILED***\n";
+         }
+ 
+         cerr << "TEST:LOCK:003:07 Write in partially unowned area (B)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(37), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(37), NULL, FILE_BEGIN) != PAGE_BEGIN(37)) {
+             cerr << "TEST:LOCK:003:07 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!WriteFile(h_file_base, (LPCVOID) write_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:003:07 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:003:07 ***FAILED***\n";
+         }
+ 
+         cerr << "TEST:LOCK:003:08 Write in partially unowned area (C)\n";
+ 
+         logfile << "SetFilePointer(h_file_base, PAGE_BEGIN(59), NULL, FILE_BEGIN)\n";
+         if(SetFilePointer(h_file_base, PAGE_BEGIN(59), NULL, FILE_BEGIN) != PAGE_BEGIN(59)) {
+             cerr << "TEST:LOCK:003:08 ERROR** Setup Failed!\n";
+             logfile << "**ERROR** Last error=" << GetLastError() << "\n";
+         }
+         if(!WriteFile(h_file_base, (LPCVOID) write_buf, PAGE_LEN(5), &nbytes, NULL)) {
+             cerr << "TEST:LOCK:003:08 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:003:08 ***FAILED***\n";
+         }
+ 
+         FlushFileBuffers(h_file_base);
+ 
+     } SYNC_END_CHILD;
+ 
+     free(write_buf);
+     free(read_buf);
+ 
+     return 0;
+ }
+ 
+ int testint_lock_excl_eeof(void)
+ {
+     /* at this point, test_lock_prep() has already run, and the length
+        of h_file_base is set at 1M */
+     SYNC_BEGIN_PARENT {
+         logfile << "----Begin Lock Test Exclusive EEOF----\n";
+ 
+         cerr << "TEST:LOCK:004 Exclusive byte-range locks above EOF\n";
+ 
+         /* parent takes three non-overlapping locks */
+         logfile << "LockFile(h_file_base, PAGE_BEGIN(256+10), 0, PAGE_LEN(10), 0)\n";
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+10), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: LockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:004 ***ERROR*** Setup failed!\n";
+         }
+ 
+         logfile << "LockFile(h_file_base, PAGE_BEGIN(256+30), 0, 4096 * 10, 0)\n";
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+30), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: LockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:004 ***ERROR*** Setup failed!\n";
+         }
+ 
+         logfile << "LockFile(h_file_base, PAGE_BEGIN(256+62), 0, 4096 * 1, 0)\n";
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+62), 0, PAGE_LEN(1), 0)) {
+             logfile << "ERROR**: LockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:004 ***ERROR*** Setup failed!\n";
+         }
+     } SYNC_END_PARENT;
+ 
+     SYNC_BEGIN_PARENT {
+         logfile << "--Test using same handle, same process--\n";
+         cerr <<
+             "TEST:LOCK:004:01 Test overlapping locks within same process (complete overlap)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+15), 0, PAGE_LEN(3), 0)) {
+             cerr << "TEST:LOCK:004:01 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:004:01 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(256+15), 0, PAGE_LEN(3), 0))
+                 cerr << "TEST:LOCK:004:01 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:004:02 Test overlapping locks within same process (partial overlap A)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+15), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:004:02 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:004:02 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(256+15), 0, PAGE_LEN(10), 0))
+                 cerr << "TEST:LOCK:004:02 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:004:03 Test overlapping locks within same process (partial overlap B)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+25), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:004:03 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:004:03 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(256+25), 0, PAGE_LEN(10), 0))
+                 cerr << "TEST:LOCK:004:03 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:004:04 Test non-overlapping locks with same process\n";
+         cerr <<
+             "TEST:LOCK:004:04 PASS (iff Setup succeeded)\n";
+ 
+     } SYNC_END_PARENT;
+ 
+     SYNC_BEGIN_CHILD {
+         logfile << "--Test using child process--\n";
+         cerr <<
+             "TEST:LOCK:004:05 Test overlapping locks with different process (complete overlap)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+15), 0, PAGE_LEN(3), 0)) {
+             cerr << "TEST:LOCK:004:05 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:004:05 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(256+15), 0, PAGE_LEN(3), 0))
+                 cerr << "TEST:LOCK:004:05 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:004:06 Test overlapping locks with different process (partial overlap A)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+15), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:004:06 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:004:06 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(256+15), 0, PAGE_LEN(10), 0))
+                 cerr << "TEST:LOCK:004:06 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:004:07 Test overlapping locks with different process (partial overlap B)\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+25), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:004:07 PASS (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:004:07 ***FAILED***\n";
+             if(!UnlockFile(h_file_base, PAGE_BEGIN(256+25), 0, PAGE_LEN(10), 0))
+                 cerr << "TEST:LOCK:004:07 ****BADNESS**** UnlockFile failed with " << GetLastError() << "\n";
+         }
+ 
+         cerr <<
+             "TEST:LOCK:004:08 Test non-overlapping lock with different process\n";
+ 
+         if(!LockFile(h_file_base, PAGE_BEGIN(256+50), 0, PAGE_LEN(10), 0)) {
+             cerr << "TEST:LOCK:004:08 ***FAILED*** (LastError=" << GetLastError() << ")\n";
+         } else {
+             cerr << "TEST:LOCK:004:08 PASS\n";
+             /* leave lock held */
+         }
+     } SYNC_END_CHILD;
+ 
+     return 0;
+ }
+ 
+ /* not necessary */
+ int testint_lock_excl_rw_eeof(void)
+ {
+     return 0;
+ }
+ 
+ /* unlock all the remaining locks */
+ int testint_unlock(void)
+ {
+     SYNC_BEGIN_PARENT {
+         logfile << "----Begin Unlock test----\n";
+ 
+         cerr << "TEST:LOCK:005 Unlocks\n";
+ 
+         cerr << "TEST:LOCK:005:01 Unlock parent locks\n";
+ 
+         logfile << "UnlockFile(h_file_base, PAGE_BEGIN(10), 0, PAGE_LEN(10), 0)\n";
+         if(!UnlockFile(h_file_base, PAGE_BEGIN(10), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: UnockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:005:01 ***ERROR*** Unlock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:005:01 PASS\n";
+ 
+         logfile << "UnlockFile(h_file_base, PAGE_BEGIN(30), 0, PAGE_LEN(10), 0)\n";
+         if(!UnlockFile(h_file_base, PAGE_BEGIN(30), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: UnockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:005:02 ***ERROR*** Unlock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:005:02 PASS\n";
+ 
+ 
+         logfile << "UnlockFile(h_file_base, PAGE_BEGIN(62), 0, PAGE_LEN(1), 0)\n";
+         if(!UnlockFile(h_file_base, PAGE_BEGIN(62), 0, PAGE_LEN(1), 0)) {
+             logfile << "ERROR**: UnockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:005:03 ***ERROR*** Unlock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:005:03 PASS\n";
+ 
+ 
+         logfile << "UnlockFile(h_file_base, PAGE_BEGIN(256+10), 0, PAGE_LEN(10), 0)\n";
+         if(!UnlockFile(h_file_base, PAGE_BEGIN(256+10), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: UnockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:005:04 ***ERROR*** Unlock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:005:04 PASS\n";
+ 
+ 
+         logfile << "UnlockFile(h_file_base, PAGE_BEGIN(256+30), 0, PAGE_LEN(10), 0)\n";
+         if(!UnlockFile(h_file_base, PAGE_BEGIN(256+30), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: UnockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:005:05 ***ERROR*** Unlock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:005:05 PASS\n";
+ 
+ 
+         logfile << "UnlockFile(h_file_base, PAGE_BEGIN(256+62), 0, PAGE_LEN(1), 0)\n";
+         if(!UnlockFile(h_file_base, PAGE_BEGIN(256+62), 0, PAGE_LEN(1), 0)) {
+             logfile << "ERROR**: UnockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:005:06 ***ERROR*** Unlock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:005:06 PASS\n";
+ 
+     } SYNC_END_PARENT;
+ 
+     SYNC_BEGIN_CHILD {
+         cerr << "TEST:LOCK:005:02 Unlock parent locks\n";
+ 
+         logfile << "UnlockFile(h_file_base, PAGE_BEGIN(50), 0, PAGE_LEN(10), 0)\n";
+         if(!UnlockFile(h_file_base, PAGE_BEGIN(50), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: UnockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:005:07 ***ERROR*** Unlock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:005:07 PASS\n";
+ 
+ 
+         logfile << "UnlockFile(h_file_base, PAGE_BEGIN(256+50), 0, PAGE_LEN(10), 0)\n";
+         if(!UnlockFile(h_file_base, PAGE_BEGIN(256+50), 0, PAGE_LEN(10), 0)) {
+             logfile << "ERROR**: UnockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:005:08 ***ERROR*** Unlock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:005:08 PASS\n";
+ 
+     } SYNC_END_CHILD;
+ 
+     SYNC_BEGIN_PARENT {
+         cerr << "TEST:LOCK:006 Check if unlocked really worked\n";
+ 
+         logfile << "LockFile(h_file_base, PAGE_BEGIN(0), 0, PAGE_LEN(256+60), 0)\n";
+         if(!LockFile(h_file_base, PAGE_BEGIN(0), 0, PAGE_LEN(256+60), 0)) {
+             logfile << "ERROR**: LockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:006:01 ***ERROR*** Lock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:006:01 PASS\n";
+ 
+         logfile << "UnlockFile(h_file_base, PAGE_BEGIN(0), 0, PAGE_LEN(256+60), 0)\n";
+         if(!UnlockFile(h_file_base, PAGE_BEGIN(0), 0, PAGE_LEN(256+60), 0)) {
+             logfile << "ERROR**: UnockFile Failed (last error=" << GetLastError() << ")\n";
+             cerr << "TEST:LOCK:005:08 ***ERROR*** Unlock Failed! Error=" << GetLastError() << "\n";
+         } else
+             cerr << "TEST:LOCK:005:08 PASS\n";
+     } SYNC_END_PARENT;
+ 
+     return 0;
+ }
+ 
+ int testint_lock_escalation(void)
+ {
+     OVERLAPPED ov;
+ 
+     ZeroMemory(&ov, sizeof(ov));
+ 
+     SYNC_BEGIN_PARENT {
+         cerr << "TEST:LOCK:006 Lock Escalation\n";
+         logfile << "-----------Lock escalation------\n";
+ 
+         ov.Offset = PAGE_BEGIN(10);
+         ov.OffsetHigh = 0;
+         if(!LockFileEx(h_file_base, LOCKFILE_FAIL_IMMEDIATELY, 0, PAGE_LEN(10), 0, &ov)) {
+             logfile << "ERROR**: Last error = " << GetLastError() << "\n";
+             cerr << "TEST:LOCK:006:01 ***FAILED*** Error=" << GetLastError() << "\n";
+         } else {
+             cerr << "TEST:LOCK:006:01 PASS\n";
+         }
+ 
+         ov.Offset = PAGE_BEGIN(30);
+         ov.OffsetHigh = 0;
+         if(!LockFileEx(h_file_base, LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY, 0, PAGE_LEN(10), 0, &ov)) {
+             logfile << "ERROR**: Last error = " << GetLastError() << "\n";
+             cerr << "TEST:LOCK:006:02 ***FAILED*** Error=" << GetLastError() << "\n";
+         } else {
+             cerr << "TEST:LOCK:006:02 PASS\n";
+         }
+ 
+         ov.Offset = PAGE_BEGIN(50);
+         ov.OffsetHigh = 0;
+         if(!LockFileEx(h_file_base, LOCKFILE_FAIL_IMMEDIATELY, 0, PAGE_LEN(10), 0, &ov)) {
+             logfile << "ERROR**: Last error = " << GetLastError() << "\n";
+             cerr << "TEST:LOCK:006:03 ***FAILED*** Error=" << GetLastError() << "\n";
+         } else {
+             cerr << "TEST:LOCK:006:03 PASS\n";
+         }
+ 
+         ov.Offset = PAGE_BEGIN(50);
+         ov.OffsetHigh = 0;
+         if(!UnlockFileEx(h_file_base, 0, PAGE_LEN(10), 0, &ov)) {
+             logfile << "ERROR**: Last error = " << GetLastError() << "\n";
+             cerr << "TEST:LOCK:006:04 ***FAILED*** Error=" << GetLastError() << "\n";
+         } else {
+             cerr << "TEST:LOCK:006:04 PASS\n";
+         }
+ 
+         ov.Offset = PAGE_BEGIN(30);
+         ov.OffsetHigh = 0;
+         if(!UnlockFileEx(h_file_base, 0, PAGE_LEN(10), 0, &ov)) {
+             logfile << "ERROR**: Last error = " << GetLastError() << "\n";
+             cerr << "TEST:LOCK:006:05 ***FAILED*** Error=" << GetLastError() << "\n";
+         } else {
+             cerr << "TEST:LOCK:006:05 PASS\n";
+         }
+ 
+         ov.Offset = PAGE_BEGIN(10);
+         ov.OffsetHigh = 0;
+         if(!UnlockFileEx(h_file_base, 0, PAGE_LEN(10), 0, &ov)) {
+             logfile << "ERROR**: Last error = " << GetLastError() << "\n";
+             cerr << "TEST:LOCK:006:06 ***FAILED*** Error=" << GetLastError() << "\n";
+         } else {
+             cerr << "TEST:LOCK:006:06 PASS\n";
+         }
+ 
+     } SYNC_END_PARENT;
+ 
+     return 0;
+ }
+ 
+ int end_tests()
+ {
+     if(h_file_base != NULL) {
+         logfile << "Closing h_file_base\n";
+         CloseHandle(h_file_base);
+     }
+     if(h_file_aux != NULL) {
+         logfile << "Closing h_file_aux\n";
+         CloseHandle(h_file_aux);
+     }
+ 
+     logfile << "--------Ending tests\n";
+ 
+     return 0;
+ }
Index: openafs/src/WINNT/tests/winflock/winflock.h
diff -c /dev/null openafs/src/WINNT/tests/winflock/winflock.h:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:26 2006
--- openafs/src/WINNT/tests/winflock/winflock.h	Mon Oct 31 17:17:02 2005
***************
*** 0 ****
--- 1,69 ----
+ #pragma once
+ 
+ #include<windows.h>
+ #include<tchar.h>
+ #include<iostream>
+ #include<cassert>
+ 
+ #include<strsafe.h>
+ 
+ using namespace std;
+ 
+ extern _TCHAR test_dir[MAX_PATH];
+ extern BOOL isChild;
+ extern HANDLE h_child;
+ extern HANDLE event_child;
+ extern HANDLE event_parent;
+ extern HANDLE mutex_logfile;
+ 
+ #define logfile cout
+ 
+ void _begin_log(void);
+ void _end_log(void);
+ void _sync_begin_parent(void);
+ void _sync_end_parent(void);
+ void _sync_begin_child(void);
+ void _sync_end_child(void);
+ 
+ #define BEGINLOG()  _begin_log()
+ #define ENDLOG()    _end_log()
+ 
+ /*
+ SYNC_BEGIN_PARENT {
+     ... parent code here ...
+ } SYNC_END_PARENT;
+ */
+ 
+ #define SYNC_BEGIN_PARENT   \
+     _sync_begin_parent();   \
+     if(!isChild)
+ 
+ #define SYNC_END_PARENT   \
+     _sync_end_parent()
+ 
+ /*
+ SYNC_BEGIN_CHILD {
+     ... child code here ...
+ } SYNC_END_CHILD;
+ */
+ #define SYNC_BEGIN_CHILD    \
+     _sync_begin_child();    \
+     if(isChild)
+ 
+ #define SYNC_END_CHILD      \
+     _sync_end_child()
+ 
+ int begin_tests(void);
+ 
+ int test_create(void);
+ int test_lock_prep(void);
+ int testint_lock_excl_beof(void);
+ int testint_lock_excl_rw_beof(void);
+ int testint_lock_excl_eeof(void);
+ int testint_unlock(void);
+ int testint_lock_escalation(void);
+ 
+ int end_tests(void);
+ 
+ #define PAGE_BEGIN(x) ((x) * 4096)
+ #define PAGE_LEN(x)   ((x) * 4096)
\ No newline at end of file
Index: openafs/src/WINNT/tests/winflock/winflock.sln
diff -c /dev/null openafs/src/WINNT/tests/winflock/winflock.sln:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:26 2006
--- openafs/src/WINNT/tests/winflock/winflock.sln	Mon Oct 31 17:17:02 2005
***************
*** 0 ****
--- 1,21 ----
+ Microsoft Visual Studio Solution File, Format Version 8.00
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winflock", "winflock.vcproj", "{60F4E436-B15A-48B3-A627-7C62A6C97C03}"
+ 	ProjectSection(ProjectDependencies) = postProject
+ 	EndProjectSection
+ EndProject
+ Global
+ 	GlobalSection(SolutionConfiguration) = preSolution
+ 		Debug = Debug
+ 		Release = Release
+ 	EndGlobalSection
+ 	GlobalSection(ProjectConfiguration) = postSolution
+ 		{60F4E436-B15A-48B3-A627-7C62A6C97C03}.Debug.ActiveCfg = Debug|Win32
+ 		{60F4E436-B15A-48B3-A627-7C62A6C97C03}.Debug.Build.0 = Debug|Win32
+ 		{60F4E436-B15A-48B3-A627-7C62A6C97C03}.Release.ActiveCfg = Release|Win32
+ 		{60F4E436-B15A-48B3-A627-7C62A6C97C03}.Release.Build.0 = Release|Win32
+ 	EndGlobalSection
+ 	GlobalSection(ExtensibilityGlobals) = postSolution
+ 	EndGlobalSection
+ 	GlobalSection(ExtensibilityAddIns) = postSolution
+ 	EndGlobalSection
+ EndGlobal
Index: openafs/src/WINNT/tests/winflock/winflock.vcproj
diff -c /dev/null openafs/src/WINNT/tests/winflock/winflock.vcproj:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:26 2006
--- openafs/src/WINNT/tests/winflock/winflock.vcproj	Mon Oct 31 17:17:02 2005
***************
*** 0 ****
--- 1,144 ----
+ <?xml version="1.0" encoding="Windows-1252"?>
+ <VisualStudioProject
+ 	ProjectType="Visual C++"
+ 	Version="7.10"
+ 	Name="winflock"
+ 	ProjectGUID="{60F4E436-B15A-48B3-A627-7C62A6C97C03}"
+ 	Keyword="Win32Proj">
+ 	<Platforms>
+ 		<Platform
+ 			Name="Win32"/>
+ 	</Platforms>
+ 	<Configurations>
+ 		<Configuration
+ 			Name="Debug|Win32"
+ 			OutputDirectory="Debug"
+ 			IntermediateDirectory="Debug"
+ 			ConfigurationType="1"
+ 			CharacterSet="2">
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+ 				Optimization="0"
+ 				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ 				MinimalRebuild="TRUE"
+ 				BasicRuntimeChecks="3"
+ 				RuntimeLibrary="5"
+ 				UsePrecompiledHeader="0"
+ 				WarningLevel="3"
+ 				Detect64BitPortabilityProblems="TRUE"
+ 				DebugInformationFormat="4"/>
+ 			<Tool
+ 				Name="VCCustomBuildTool"/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+ 				OutputFile="$(OutDir)/winflock.exe"
+ 				LinkIncremental="1"
+ 				GenerateDebugInformation="TRUE"
+ 				ProgramDatabaseFile="$(OutDir)/winflock.pdb"
+ 				SubSystem="1"
+ 				TargetMachine="1"/>
+ 			<Tool
+ 				Name="VCMIDLTool"/>
+ 			<Tool
+ 				Name="VCPostBuildEventTool"/>
+ 			<Tool
+ 				Name="VCPreBuildEventTool"/>
+ 			<Tool
+ 				Name="VCPreLinkEventTool"/>
+ 			<Tool
+ 				Name="VCResourceCompilerTool"/>
+ 			<Tool
+ 				Name="VCWebServiceProxyGeneratorTool"/>
+ 			<Tool
+ 				Name="VCXMLDataGeneratorTool"/>
+ 			<Tool
+ 				Name="VCWebDeploymentTool"/>
+ 			<Tool
+ 				Name="VCManagedWrapperGeneratorTool"/>
+ 			<Tool
+ 				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ 		</Configuration>
+ 		<Configuration
+ 			Name="Release|Win32"
+ 			OutputDirectory="Release"
+ 			IntermediateDirectory="Release"
+ 			ConfigurationType="1"
+ 			CharacterSet="2">
+ 			<Tool
+ 				Name="VCCLCompilerTool"
+ 				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ 				RuntimeLibrary="4"
+ 				UsePrecompiledHeader="0"
+ 				WarningLevel="3"
+ 				Detect64BitPortabilityProblems="TRUE"
+ 				DebugInformationFormat="3"/>
+ 			<Tool
+ 				Name="VCCustomBuildTool"/>
+ 			<Tool
+ 				Name="VCLinkerTool"
+ 				OutputFile="$(OutDir)/winflock.exe"
+ 				LinkIncremental="1"
+ 				GenerateDebugInformation="TRUE"
+ 				SubSystem="1"
+ 				OptimizeReferences="2"
+ 				EnableCOMDATFolding="2"
+ 				TargetMachine="1"/>
+ 			<Tool
+ 				Name="VCMIDLTool"/>
+ 			<Tool
+ 				Name="VCPostBuildEventTool"/>
+ 			<Tool
+ 				Name="VCPreBuildEventTool"/>
+ 			<Tool
+ 				Name="VCPreLinkEventTool"/>
+ 			<Tool
+ 				Name="VCResourceCompilerTool"/>
+ 			<Tool
+ 				Name="VCWebServiceProxyGeneratorTool"/>
+ 			<Tool
+ 				Name="VCXMLDataGeneratorTool"/>
+ 			<Tool
+ 				Name="VCWebDeploymentTool"/>
+ 			<Tool
+ 				Name="VCManagedWrapperGeneratorTool"/>
+ 			<Tool
+ 				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ 		</Configuration>
+ 	</Configurations>
+ 	<References>
+ 	</References>
+ 	<Files>
+ 		<Filter
+ 			Name="Source Files"
+ 			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+ 			<File
+ 				RelativePath=".\main.cpp">
+ 			</File>
+ 			<File
+ 				RelativePath=".\sync.cpp">
+ 			</File>
+ 			<File
+ 				RelativePath=".\tests.cpp">
+ 			</File>
+ 		</Filter>
+ 		<Filter
+ 			Name="Header Files"
+ 			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ 			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+ 			<File
+ 				RelativePath=".\winflock.h">
+ 			</File>
+ 		</Filter>
+ 		<Filter
+ 			Name="Resource Files"
+ 			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+ 			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+ 		</Filter>
+ 		<File
+ 			RelativePath=".\README.txt">
+ 		</File>
+ 	</Files>
+ 	<Globals>
+ 	</Globals>
+ </VisualStudioProject>
Index: openafs/src/afs/NTMakefile
diff -c openafs/src/afs/NTMakefile:1.3 openafs/src/afs/NTMakefile:1.3.2.1
*** openafs/src/afs/NTMakefile:1.3	Fri Nov 21 03:00:16 2003
--- openafs/src/afs/NTMakefile	Sun Mar  5 22:16:40 2006
***************
*** 12,21 ****
  ################################################
  # compile_et to get unified_afs.h
  
! $(DESTDIR)\include\afs\unified_afs.c $(DESTDIR)\include\afs\unified_afs.h:   unified_afs.et  unified_afs.p.h
     $(DEL) unified_afs.c unified_afs.h
     $(COMPILE_ET) unified_afs -h unified_afs
     $(COPY) unified_afs.h $(DESTDIR)\include\afs
  
! install: $(DESTDIR)\include\afs\unified_afs.c 
  
--- 12,23 ----
  ################################################
  # compile_et to get unified_afs.h
  
! INCDIR=$(DESTDIR)\include\
! 
! $(INCDIR)\afs\unified_afs.c $(INCDIR)\afs\unified_afs.h:   unified_afs.et  unified_afs.p.h
     $(DEL) unified_afs.c unified_afs.h
     $(COMPILE_ET) unified_afs -h unified_afs
     $(COPY) unified_afs.h $(DESTDIR)\include\afs
  
! install: $(INCDIR)\afs\unified_afs.c $(INCDIR)\afs\afs_stats.h
  
Index: openafs/src/afs/afs.h
diff -c openafs/src/afs/afs.h:1.48.2.21 openafs/src/afs/afs.h:1.48.2.28
*** openafs/src/afs/afs.h:1.48.2.21	Mon Jul 11 15:29:55 2005
--- openafs/src/afs/afs.h	Fri Feb 17 16:58:33 2006
***************
*** 315,321 ****
  #define	QInit(q)    ((q)->prev = (q)->next = (q))
  #define	QAdd(q,e)   ((e)->next = (q)->next, (e)->prev = (q), \
  			(q)->next->prev = (e), (q)->next = (e))
! #define	QRemove(e)  ((e)->next->prev = (e)->prev, (e)->prev->next = (e)->next)
  #define	QNext(e)    ((e)->next)
  #define QPrev(e)    ((e)->prev)
  #define QEmpty(q)   ((q)->prev == (q))
--- 315,321 ----
  #define	QInit(q)    ((q)->prev = (q)->next = (q))
  #define	QAdd(q,e)   ((e)->next = (q)->next, (e)->prev = (q), \
  			(q)->next->prev = (e), (q)->next = (e))
! #define	QRemove(e)  ((e)->next->prev = (e)->prev, (e)->prev->next = (e)->next, (e)->prev = NULL, (e)->next = NULL)
  #define	QNext(e)    ((e)->next)
  #define QPrev(e)    ((e)->prev)
  #define QEmpty(q)   ((q)->prev == (q))
***************
*** 329,334 ****
--- 329,335 ----
   */
  #define	QTOV(e)	    ((struct vcache *)(((char *) (e)) - (((char *)(&(((struct vcache *)(e))->vlruq))) - ((char *)(e)))))
  #define	QTOC(e)	    ((struct cell *)((char *) (e)))
+ #define	QTOVH(e)   ((struct vcache *)(((char *) (e)) - (((char *)(&(((struct vcache *)(e))->vhashq))) - ((char *)(e)))))
  
  #define	SRVADDR_MH	1
  #define	SRVADDR_ISDOWN	0x20	/* same as SRVR_ISDOWN */
***************
*** 526,537 ****
--- 527,542 ----
  #ifdef	AFS_OSF_ENV
  #define CWired		0x00000800	/* OSF hack only */
  #else
+ #ifdef AFS_DARWIN80_ENV
+ #define CDeadVnode        0x00000800
+ #else
  #ifdef AFS_DARWIN_ENV
  #define CUBCinit        0x00000800
  #else
  #define CWRITE_IGN	0x00000800	/* Next OS hack only */
  #endif
  #endif
+ #endif
  #define CUnique		0x00001000	/* vc's uniquifier - latest unifiquier for fid */
  #define CForeign	0x00002000	/* this is a non-afs vcache */
  #define CUnlinked	0x00010000
***************
*** 545,550 ****
--- 550,556 ----
  #define CDCLock		0x02000000	/* Vnode lock held over call to GetDownD */
  #define CBulkFetching	0x04000000	/* stats are being fetched by bulk stat */
  #define CExtendedFile	0x08000000	/* extended file via ftruncate call. */
+ #define CVInit          0x10000000      /* being initialized */
  
  /* vcache vstate bits */
  #define VRevokeWait   0x1
***************
*** 557,569 ****
  #define vrefCount   v.v_count
  #endif /* AFS_XBSD_ENV */
  
! #if defined(AFS_LINUX24_ENV)
  #define VREFCOUNT(v)		atomic_read(&(AFSTOV(v)->v_count))
  #define VREFCOUNT_SET(v, c)	atomic_set(&(AFSTOV(v)->v_count), c)
  #define VREFCOUNT_DEC(v)	atomic_dec(&(AFSTOV(v)->v_count))
  #define VREFCOUNT_INC(v)	atomic_inc(&(AFSTOV(v)->v_count))
  #else
  #define VREFCOUNT(v)		((v)->vrefCount)
  #define VREFCOUNT_SET(v, c)	(v)->vrefCount = c;
  #define VREFCOUNT_DEC(v)	(v)->vrefCount--;
  #define VREFCOUNT_INC(v)	(v)->vrefCount++;
--- 563,582 ----
  #define vrefCount   v.v_count
  #endif /* AFS_XBSD_ENV */
  
! #if defined(AFS_DARWIN80_ENV)
! #define VREFCOUNT_GT(v, y)    vnode_isinuse(AFSTOV(v), (y))
! #elif defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV)
! #define VREFCOUNT(v)          ((v)->vrefCount)
! #define VREFCOUNT_GT(v, y)    (AFSTOV(v)->v_usecount > (y))
! #elif defined(AFS_LINUX24_ENV)
  #define VREFCOUNT(v)		atomic_read(&(AFSTOV(v)->v_count))
+ #define VREFCOUNT_GT(v, y)      (VREFCOUNT(v)>y)
  #define VREFCOUNT_SET(v, c)	atomic_set(&(AFSTOV(v)->v_count), c)
  #define VREFCOUNT_DEC(v)	atomic_dec(&(AFSTOV(v)->v_count))
  #define VREFCOUNT_INC(v)	atomic_inc(&(AFSTOV(v)->v_count))
  #else
  #define VREFCOUNT(v)		((v)->vrefCount)
+ #define VREFCOUNT_GT(v,y)     ((v)->vrefCount > (y))
  #define VREFCOUNT_SET(v, c)	(v)->vrefCount = c;
  #define VREFCOUNT_DEC(v)	(v)->vrefCount--;
  #define VREFCOUNT_INC(v)	(v)->vrefCount++;
***************
*** 580,586 ****
  
  extern afs_int32 vmPageHog;	/* counter for # of vnodes which are page hogs. */
  
! #if defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV) || (defined(AFS_LINUX22_ENV) && !defined(STRUCT_SUPER_HAS_ALLOC_INODE))
  #define VTOAFS(v) ((struct vcache *)(v)->v_data)
  #define AFSTOV(vc) ((vc)->v)
  #else
--- 593,602 ----
  
  extern afs_int32 vmPageHog;	/* counter for # of vnodes which are page hogs. */
  
! #if defined(AFS_DARWIN80_ENV)
! #define VTOAFS(v) ((struct vcache *)vnode_fsnode((v)))
! #define AFSTOV(vc) ((vc)->v)
! #elif defined(AFS_XBSD_ENV) || defined(AFS_DARWIN_ENV) || (defined(AFS_LINUX22_ENV) && !defined(STRUCT_SUPER_HAS_ALLOC_INODE))
  #define VTOAFS(v) ((struct vcache *)(v)->v_data)
  #define AFSTOV(vc) ((vc)->v)
  #else
***************
*** 603,609 ****
      struct vcache *nextfree;	/* next on free list (if free) */
  #endif
      struct vcache *hnext;	/* Hash next */
!     struct vcache *vhnext;	/* vol hash next */
      struct VenusFid fid;
      struct mstat {
  	afs_size_t Length;
--- 619,625 ----
      struct vcache *nextfree;	/* next on free list (if free) */
  #endif
      struct vcache *hnext;	/* Hash next */
!     struct afs_q vhashq;	/* Hashed per-volume list */
      struct VenusFid fid;
      struct mstat {
  	afs_size_t Length;
***************
*** 613,619 ****
--- 629,639 ----
  	afs_uint32 Group;
  	afs_uint16 Mode;	/* XXXX Should be afs_int32 XXXX */
  	afs_uint16 LinkCount;
+ #ifdef AFS_DARWIN80_ENV
+         afs_uint16 Type;
+ #else
  	/* vnode type is in v.v_type */
+ #endif
      } m;
      afs_rwlock_t lock;		/* The lock on the vcache contents. */
  #if	defined(AFS_SUN5_ENV)
***************
*** 641,647 ****
  #ifdef AFS_AIX_ENV
      int ownslock;		/* pid of owner of excl lock, else 0 - defect 3083 */
  #endif
! #ifdef AFS_DARWIN_ENV
      struct lock__bsd__ rwlock;
  #endif
  #ifdef AFS_XBSD_ENV
--- 661,669 ----
  #ifdef AFS_AIX_ENV
      int ownslock;		/* pid of owner of excl lock, else 0 - defect 3083 */
  #endif
! #ifdef AFS_DARWIN80_ENV
!     lck_mtx_t *rwlock;
! #elif defined(AFS_DARWIN_ENV)
      struct lock__bsd__ rwlock;
  #endif
  #ifdef AFS_XBSD_ENV
***************
*** 898,904 ****
    char lockers;
    char dirty;
    char hashIndex;
! #if AFS_USEBUFFERS
    struct buf *bufp;
  #endif
    afs_rwlock_t lock;          /* the lock for this structure */
--- 920,926 ----
    char lockers;
    char dirty;
    char hashIndex;
! #if defined(AFS_USEBUFFERS)
    struct buf *bufp;
  #endif
    afs_rwlock_t lock;          /* the lock for this structure */
***************
*** 1042,1048 ****
  extern afs_int32 afs_cacheBlocks;	/*1K blocks in cache */
  extern afs_int32 afs_cacheStats;	/*Stat entries in cache */
  extern struct vcache *afs_vhashT[VCSIZE];	/*Stat cache hash table */
! extern struct vcache *afs_vhashTV[VCSIZE]; /* cache hash table on volume */
  extern afs_int32 afs_initState;	/*Initialization state */
  extern afs_int32 afs_termState;	/* Termination state */
  extern struct VenusFid afs_rootFid;	/*Root for whole file system */
--- 1064,1070 ----
  extern afs_int32 afs_cacheBlocks;	/*1K blocks in cache */
  extern afs_int32 afs_cacheStats;	/*Stat entries in cache */
  extern struct vcache *afs_vhashT[VCSIZE];	/*Stat cache hash table */
! extern struct afs_q afs_vhashTV[VCSIZE]; /* cache hash table on volume */
  extern afs_int32 afs_initState;	/*Initialization state */
  extern afs_int32 afs_termState;	/* Termination state */
  extern struct VenusFid afs_rootFid;	/*Root for whole file system */
***************
*** 1074,1079 ****
--- 1096,1103 ----
  
  #define DO_STATS 1		/* bits used by FindVCache */
  #define DO_VLRU 2
+ #define IS_SLOCK 4
+ #define IS_WLOCK 8
  
  /* values for flag param of afs_CheckVolumeNames */
  #define AFS_VOLCHECK_EXPIRED	0x1	/* volumes whose callbacks have expired */
***************
*** 1112,1122 ****
  #define CM_CACHESIZEDRAINEDPCT	95	/* wakeup processes when down to here. */
  #define CM_WAITFORDRAINPCT	98	/* sleep if cache is this full. */
  
  #define afs_CacheIsTooFull() \
      (afs_blocksUsed - afs_blocksDiscarded > \
! 	(CM_DCACHECOUNTFREEPCT*afs_cacheBlocks)/100 || \
       afs_freeDCCount - afs_discardDCCount < \
! 	((100-CM_DCACHECOUNTFREEPCT)*afs_cacheFiles)/100)
  
  /* Handy max length of a numeric string. */
  #define	CVBS	12		/* max afs_int32 is 2^32 ~ 4*10^9, +1 for NULL, +luck */
--- 1136,1150 ----
  #define CM_CACHESIZEDRAINEDPCT	95	/* wakeup processes when down to here. */
  #define CM_WAITFORDRAINPCT	98	/* sleep if cache is this full. */
  
+ /* when afs_cacheBlocks is large, settle for slightly decreased precision */
+ #define PERCENT(p, v) \
+     ((afs_cacheBlocks & 0xffe00000) ? ((v) / 100 * (p)) : ((p) * (v) / 100))
+ 
  #define afs_CacheIsTooFull() \
      (afs_blocksUsed - afs_blocksDiscarded > \
! 	PERCENT(CM_DCACHECOUNTFREEPCT, afs_cacheBlocks) || \
       afs_freeDCCount - afs_discardDCCount < \
! 	PERCENT(100 - CM_DCACHECOUNTFREEPCT, afs_cacheFiles))
  
  /* Handy max length of a numeric string. */
  #define	CVBS	12		/* max afs_int32 is 2^32 ~ 4*10^9, +1 for NULL, +luck */
Index: openafs/src/afs/afs_buffer.c
diff -c openafs/src/afs/afs_buffer.c:1.16.2.5 openafs/src/afs/afs_buffer.c:1.16.2.6
*** openafs/src/afs/afs_buffer.c:1.16.2.5	Thu Jul 28 17:33:57 2005
--- openafs/src/afs/afs_buffer.c	Tue Jan 24 12:41:20 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_buffer.c,v 1.16.2.5 2005/07/28 21:33:57 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_buffer.c,v 1.16.2.6 2006/01/24 17:41:20 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 98,104 ****
      /* Initialize the venus buffer system. */
      register int i;
      register struct buffer *tb;
! #if AFS_USEBUFFERS
      struct buf *tub;		/* unix buffer for allocation */
  #endif
  
--- 98,104 ----
      /* Initialize the venus buffer system. */
      register int i;
      register struct buffer *tb;
! #if defined(AFS_USEBUFFERS)
      struct buf *tub;		/* unix buffer for allocation */
  #endif
  
***************
*** 106,119 ****
      if (dinit_flag)
  	return;
      dinit_flag = 1;
! #if AFS_USEBUFFERS
      /* round up to next multiple of NPB, since we allocate multiple pages per chunk */
      abuffers = ((abuffers - 1) | (NPB - 1)) + 1;
  #endif
      LOCK_INIT(&afs_bufferLock, "afs_bufferLock");
      Buffers =
  	(struct buffer *)afs_osi_Alloc(abuffers * sizeof(struct buffer));
! #if !AFS_USEBUFFERS
      BufferData = (char *)afs_osi_Alloc(abuffers * AFS_BUFFER_PAGESIZE);
  #endif
      timecounter = 1;
--- 106,119 ----
      if (dinit_flag)
  	return;
      dinit_flag = 1;
! #if defined(AFS_USEBUFFERS)
      /* round up to next multiple of NPB, since we allocate multiple pages per chunk */
      abuffers = ((abuffers - 1) | (NPB - 1)) + 1;
  #endif
      LOCK_INIT(&afs_bufferLock, "afs_bufferLock");
      Buffers =
  	(struct buffer *)afs_osi_Alloc(abuffers * sizeof(struct buffer));
! #if !defined(AFS_USEBUFFERS)
      BufferData = (char *)afs_osi_Alloc(abuffers * AFS_BUFFER_PAGESIZE);
  #endif
      timecounter = 1;
***************
*** 121,127 ****
      for (i = 0; i < PHSIZE; i++)
  	phTable[i] = 0;
      for (i = 0; i < abuffers; i++) {
! #if AFS_USEBUFFERS
  	if ((i & (NPB - 1)) == 0) {
  	    /* time to allocate a fresh buffer */
  	    tub = geteblk(AFS_BUFFER_PAGESIZE * NPB);
--- 121,127 ----
      for (i = 0; i < PHSIZE; i++)
  	phTable[i] = 0;
      for (i = 0; i < abuffers; i++) {
! #if defined(AFS_USEBUFFERS)
  	if ((i & (NPB - 1)) == 0) {
  	    /* time to allocate a fresh buffer */
  	    tub = geteblk(AFS_BUFFER_PAGESIZE * NPB);
***************
*** 134,140 ****
  	tb->inode = 0;
  	tb->accesstime = 0;
  	tb->lockers = 0;
! #if AFS_USEBUFFERS
  	if ((i & (NPB - 1)) == 0)
  	    tb->bufp = tub;
  	else
--- 134,140 ----
  	tb->inode = 0;
  	tb->accesstime = 0;
  	tb->lockers = 0;
! #if defined(AFS_USEBUFFERS)
  	if ((i & (NPB - 1)) == 0)
  	    tb->bufp = tub;
  	else
***************
*** 368,381 ****
      /* Release a buffer, specifying whether or not the buffer has been
       * modified by the locker. */
      register int index;
! #if AFS_USEBUFFERS
      register struct buffer *tp;
  #endif
  
      AFS_STATCNT(DRelease);
      if (!bp)
  	return;
! #if AFS_USEBUFFERS
      /* look for buffer by scanning Unix buffers for appropriate address */
      tp = Buffers;
      for (index = 0; index < nbuffers; index += NPB, tp += NPB) {
--- 368,381 ----
      /* Release a buffer, specifying whether or not the buffer has been
       * modified by the locker. */
      register int index;
! #if defined(AFS_USEBUFFERS)
      register struct buffer *tp;
  #endif
  
      AFS_STATCNT(DRelease);
      if (!bp)
  	return;
! #if defined(AFS_USEBUFFERS)
      /* look for buffer by scanning Unix buffers for appropriate address */
      tp = Buffers;
      for (index = 0; index < nbuffers; index += NPB, tp += NPB) {
***************
*** 404,415 ****
      /* Return the byte within a file represented by a buffer pointer. */
      register struct buffer *bp;
      register int index;
! #if AFS_USEBUFFERS
      register struct buffer *tp;
  #endif
      AFS_STATCNT(DVOffset);
      bp = ap;
! #if AFS_USEBUFFERS
      /* look for buffer by scanning Unix buffers for appropriate address */
      tp = Buffers;
      for (index = 0; index < nbuffers; index += NPB, tp += NPB) {
--- 404,415 ----
      /* Return the byte within a file represented by a buffer pointer. */
      register struct buffer *bp;
      register int index;
! #if defined(AFS_USEBUFFERS)
      register struct buffer *tp;
  #endif
      AFS_STATCNT(DVOffset);
      bp = ap;
! #if defined(AFS_USEBUFFERS)
      /* look for buffer by scanning Unix buffers for appropriate address */
      tp = Buffers;
      for (index = 0; index < nbuffers; index += NPB, tp += NPB) {
***************
*** 530,536 ****
  void
  shutdown_bufferpackage(void)
  {
! #if AFS_USEBUFFERS
      register struct buffer *tp;
  #endif
      int i;
--- 530,536 ----
  void
  shutdown_bufferpackage(void)
  {
! #if defined(AFS_USEBUFFERS)
      register struct buffer *tp;
  #endif
      int i;
***************
*** 541,547 ****
      DFlush();
      if (afs_cold_shutdown) {
  	dinit_flag = 0;
! #if !AFS_USEBUFFERS
  	afs_osi_Free(BufferData, nbuffers * AFS_BUFFER_PAGESIZE);
  #else
  	tp = Buffers;
--- 541,547 ----
      DFlush();
      if (afs_cold_shutdown) {
  	dinit_flag = 0;
! #if !defined(AFS_USEBUFFERS)
  	afs_osi_Free(BufferData, nbuffers * AFS_BUFFER_PAGESIZE);
  #else
  	tp = Buffers;
Index: openafs/src/afs/afs_call.c
diff -c openafs/src/afs/afs_call.c:1.74.2.10 openafs/src/afs/afs_call.c:1.74.2.12
*** openafs/src/afs/afs_call.c:1.74.2.10	Tue Jun 21 16:13:48 2005
--- openafs/src/afs/afs_call.c	Tue Jan 17 12:09:47 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_call.c,v 1.74.2.10 2005/06/21 20:13:48 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.12 2006/01/17 17:09:47 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 61,69 ****
  simple_lock_data_t afs_global_lock;
  #endif
  
! #if defined(AFS_DARWIN_ENV)
  struct lock__bsd__ afs_global_lock;
  #endif
  
  #if defined(AFS_XBSD_ENV) && !defined(AFS_FBSD50_ENV)
  struct lock afs_global_lock;
--- 61,73 ----
  simple_lock_data_t afs_global_lock;
  #endif
  
! #if defined(AFS_DARWIN_ENV) 
! #ifdef AFS_DARWIN80_ENV
! lck_mtx_t  *afs_global_lock;
! #else
  struct lock__bsd__ afs_global_lock;
  #endif
+ #endif
  
  #if defined(AFS_XBSD_ENV) && !defined(AFS_FBSD50_ENV)
  struct lock afs_global_lock;
***************
*** 146,151 ****
--- 150,282 ----
  
      return code;
  }
+ #if defined(AFS_DARWIN80_ENV)
+ struct afsd_thread_info {
+     unsigned long parm;
+ };
+ static int
+ afsd_thread(int *rock)
+ {
+     struct afsd_thread_info *arg = (struct afsd_thread_info *)rock;
+     unsigned long parm = arg->parm;
+ 
+     switch (parm) {
+     case AFSOP_START_RXCALLBACK:
+ 	AFS_GLOCK();
+ 	wakeup(arg);
+ 	afs_CB_Running = 1;
+ 	while (afs_RX_Running != 2)
+ 	    afs_osi_Sleep(&afs_RX_Running);
+ 	afs_RXCallBackServer();
+ 	AFS_GUNLOCK();
+ 	thread_terminate(current_thread());
+ 	break;
+     case AFSOP_START_AFS:
+ 	AFS_GLOCK();
+ 	wakeup(arg);
+ 	AFS_Running = 1;
+ 	while (afs_initState < AFSOP_START_AFS)
+ 	    afs_osi_Sleep(&afs_initState);
+ 	afs_initState = AFSOP_START_BKG;
+ 	afs_osi_Wakeup(&afs_initState);
+ 	afs_Daemon();
+ 	AFS_GUNLOCK();
+ 	thread_terminate(current_thread());
+ 	break;
+     case AFSOP_START_BKG:
+ 	AFS_GLOCK();
+ 	wakeup(arg);
+ 	while (afs_initState < AFSOP_START_BKG)
+ 	    afs_osi_Sleep(&afs_initState);
+ 	if (afs_initState < AFSOP_GO) {
+ 	    afs_initState = AFSOP_GO;
+ 	    afs_osi_Wakeup(&afs_initState);
+ 	}
+ 	afs_BackgroundDaemon();
+ 	AFS_GUNLOCK();
+ 	thread_terminate(current_thread());
+ 	break;
+     case AFSOP_START_TRUNCDAEMON:
+ 	AFS_GLOCK();
+ 	wakeup(arg);
+ 	while (afs_initState < AFSOP_GO)
+ 	    afs_osi_Sleep(&afs_initState);
+ 	afs_CacheTruncateDaemon();
+ 	AFS_GUNLOCK();
+ 	thread_terminate(current_thread());
+ 	break;
+     case AFSOP_START_CS:
+ 	AFS_GLOCK();
+ 	wakeup(arg);
+ 	afs_CheckServerDaemon();
+ 	AFS_GUNLOCK();
+ 	thread_terminate(current_thread());
+ 	break;
+     case AFSOP_RXEVENT_DAEMON:
+ 	AFS_GLOCK();
+ 	wakeup(arg);
+ 	while (afs_initState < AFSOP_START_BKG)
+ 	    afs_osi_Sleep(&afs_initState);
+ 	afs_rxevent_daemon();
+ 	AFS_GUNLOCK();
+ 	thread_terminate(current_thread());
+ 	break;
+     case AFSOP_RXLISTENER_DAEMON:
+ 	AFS_GLOCK();
+ 	wakeup(arg);
+ 	afs_initState = AFSOP_START_AFS;
+ 	afs_osi_Wakeup(&afs_initState);
+ 	afs_RX_Running = 2;
+ 	afs_osi_Wakeup(&afs_RX_Running);
+ 	afs_osi_RxkRegister();
+ 	rxk_Listener();
+ 	AFS_GUNLOCK();
+ 	thread_terminate(current_thread());
+ 	break;
+     default:
+ 	printf("Unknown op %ld in StartDaemon()\n", (long)parm);
+ 	break;
+     }
+ }
+ 
+ void
+ afs_DaemonOp(long parm, long parm2, long parm3, long parm4, long parm5,
+ 	     long parm6)
+ {
+     int code;
+     struct afsd_thread_info info;
+     thread_t thread;
+ 
+     if (parm == AFSOP_START_RXCALLBACK) {
+ 	if (afs_CB_Running)
+ 	    return;
+     } else if (parm == AFSOP_RXLISTENER_DAEMON) {
+ 	if (afs_RX_Running)
+ 	    return;
+ 	afs_RX_Running = 1;
+ 	code = afs_InitSetup(parm2);
+ 	if (parm3) {
+ 	    rx_enablePeerRPCStats();
+ 	}
+ 	if (parm4) {
+ 	    rx_enableProcessRPCStats();
+ 	}
+ 	if (code)
+ 	    return;
+     } else if (parm == AFSOP_START_AFS) {
+ 	if (AFS_Running)
+ 	    return;
+     }				/* other functions don't need setup in the parent */
+     info.parm = parm;
+     kernel_thread_start((thread_continue_t)afsd_thread, &info, &thread);
+     AFS_GUNLOCK();
+     /* we need to wait cause we passed stack pointers around.... */
+     msleep(&info, NULL, PVFS, "afs_DaemonOp", NULL);
+     AFS_GLOCK();
+     thread_deallocate(thread);
+ }
+ #endif
+ 
  
  #if defined(AFS_LINUX24_ENV) && defined(COMPLETION_H_EXISTS)
  struct afsd_thread_info {
***************
*** 374,380 ****
  #endif
      }
      AFS_GLOCK();
! #if defined(AFS_LINUX24_ENV) && defined(COMPLETION_H_EXISTS) && !defined(UKERNEL)
      if (parm < AFSOP_ADDCELL || parm == AFSOP_RXEVENT_DAEMON
  	|| parm == AFSOP_RXLISTENER_DAEMON) {
  	afs_DaemonOp(parm, parm2, parm3, parm4, parm5, parm6);
--- 505,514 ----
  #endif
      }
      AFS_GLOCK();
! #ifdef AFS_DARWIN80_ENV
!     put_vfs_context();
! #endif
! #if ((defined(AFS_LINUX24_ENV) && defined(COMPLETION_H_EXISTS)) || defined(AFS_DARWIN80_ENV)) && !defined(UKERNEL)
      if (parm < AFSOP_ADDCELL || parm == AFSOP_RXEVENT_DAEMON
  	|| parm == AFSOP_RXLISTENER_DAEMON) {
  	afs_DaemonOp(parm, parm2, parm3, parm4, parm5, parm6);
***************
*** 642,652 ****
--- 776,792 ----
  	while (afs_initState < AFSOP_START_BKG)
  	    afs_osi_Sleep(&afs_initState);
  
+ #ifdef AFS_DARWIN80_ENV
+     get_vfs_context();
+ #endif
  	/* do it by inode */
  #ifdef AFS_SGI62_ENV
  	ainode = (ainode << 32) | (parm3 & 0xffffffff);
  #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)
***************
*** 673,678 ****
--- 813,821 ----
  	if (!code) {
  	    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)
***************
*** 681,686 ****
--- 824,832 ----
  		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) {
***************
*** 821,830 ****
  	i = rxi_Findcbi(parm2);
  	mtu = ((i == -1) ? htonl(1500) : afs_cb_interface.mtu[i]);
  #else /* AFS_USERSPACE_IP_ADDR */
! 	struct ifnet *tifnp;
  
  	tifnp = rxi_FindIfnet(parm2, NULL);	/*  make iterative */
! 	mtu = (tifnp ? tifnp->if_mtu : htonl(1500));
  #endif /* else AFS_USERSPACE_IP_ADDR */
  #endif /* !AFS_SUN5_ENV */
  	if (!code)
--- 967,976 ----
  	i = rxi_Findcbi(parm2);
  	mtu = ((i == -1) ? htonl(1500) : afs_cb_interface.mtu[i]);
  #else /* AFS_USERSPACE_IP_ADDR */
! 	AFS_IFNET_T tifnp;
  
  	tifnp = rxi_FindIfnet(parm2, NULL);	/*  make iterative */
! 	mtu = (tifnp ? ifnet_mtu(tifnp) : htonl(1500));
  #endif /* else AFS_USERSPACE_IP_ADDR */
  #endif /* !AFS_SUN5_ENV */
  	if (!code)
***************
*** 858,864 ****
  	    code = -1;
  	}
  #else /* AFS_USERSPACE_IP_ADDR */
! 	struct ifnet *tifnp;
  
  	tifnp = rxi_FindIfnet(parm2, &mask);	/* make iterative */
  	if (!tifnp)
--- 1004,1010 ----
  	    code = -1;
  	}
  #else /* AFS_USERSPACE_IP_ADDR */
! 	AFS_IFNET_T tifnp;
  
  	tifnp = rxi_FindIfnet(parm2, &mask);	/* make iterative */
  	if (!tifnp)
***************
*** 911,916 ****
--- 1057,1065 ----
  	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;
***************
*** 1229,1235 ****
       struct proc *p;
  #endif
       void *args;
!      int *retval;
  {
      register struct a {
  	long syscall;
--- 1378,1384 ----
       struct proc *p;
  #endif
       void *args;
!      long *retval;
  {
      register struct a {
  	long syscall;
***************
*** 1351,1357 ****
  	uap->parm6 = 0;
      }
  #endif
! 
  #if defined(AFS_HPUX_ENV)
      /*
       * There used to be code here (duplicated from osi_Init()) for
--- 1500,1509 ----
  	uap->parm6 = 0;
      }
  #endif
! #if defined(AFS_DARWIN80_ENV)
!     get_vfs_context();
!     osi_Assert(*retval == 0);
! #endif
  #if defined(AFS_HPUX_ENV)
      /*
       * There used to be code here (duplicated from osi_Init()) for
***************
*** 1398,1403 ****
--- 1550,1559 ----
  	code =
  	    afs_syscall_pioctl(uap->parm1, uap->parm2, uap->parm3, uap->parm4,
  			       p->td_ucred);
+ #elif defined(AFS_DARWIN80_ENV)
+ 	code =
+ 	    afs_syscall_pioctl(uap->parm1, uap->parm2, uap->parm3, uap->parm4,
+ 			       kauth_cred_get());
  #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
  	code =
  	    afs_syscall_pioctl(uap->parm1, uap->parm2, uap->parm3, uap->parm4,
***************
*** 1486,1491 ****
--- 1642,1650 ----
  #endif
      }
  
+ #if defined(AFS_DARWIN80_ENV)
+     put_vfs_context();
+ #endif
  #ifdef AFS_LINUX20_ENV
      code = -code;
      unlock_kernel();
Index: openafs/src/afs/afs_callback.c
diff -c openafs/src/afs/afs_callback.c:1.27.2.2 openafs/src/afs/afs_callback.c:1.27.2.6
*** openafs/src/afs/afs_callback.c:1.27.2.2	Mon May 30 00:05:40 2005
--- openafs/src/afs/afs_callback.c	Thu Mar  2 01:44:05 2006
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_callback.c,v 1.27.2.2 2005/05/30 04:05:40 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/afs_callback.c,v 1.27.2.6 2006/03/02 06:44:05 shadow Exp $");
  
  #include "afs/sysincludes.h"	/*Standard vendor system headers */
  #include "afsincludes.h"	/*AFS-based standard headers */
***************
*** 59,65 ****
      "afs_xosi", (char *)&afs_xosi},
  #endif
      {
!     "afs_xsrvAddr", (char *)&afs_xsrvAddr}
  };
  unsigned long lastCallBack_vnode;
  unsigned int lastCallBack_dv;
--- 59,67 ----
      "afs_xosi", (char *)&afs_xosi},
  #endif
      {
!       "afs_xsrvAddr", (char *)&afs_xsrvAddr},
!     {
!     "afs_xvreclaim", (char *)&afs_xvreclaim}
  };
  unsigned long lastCallBack_vnode;
  unsigned int lastCallBack_dv;
***************
*** 151,157 ****
--- 153,167 ----
      a_result->DataVersion = hgetlo(tvc->m.DataVersion);
      a_result->callback = afs_data_pointer_to_int32(tvc->callback);	/* XXXX Now a pointer; change it XXXX */
      a_result->cbExpires = tvc->cbExpires;
+     if (tvc->states & CVInit) {
+         a_result->refCount = 1;
+     } else {
+ #ifdef AFS_DARWIN80_ENV
+     a_result->refCount = vnode_isinuse(AFSTOV(tvc),0)?1:0; /* XXX fix */
+ #else
      a_result->refCount = VREFCOUNT(tvc);
+ #endif
+     }
      a_result->opens = tvc->opens;
      a_result->writers = tvc->execsOrWriters;
      a_result->mvstat = tvc->mvstat;
***************
*** 230,236 ****
--- 240,254 ----
      a_result->DataVersion = hgetlo(tvc->m.DataVersion);
      a_result->callback = afs_data_pointer_to_int32(tvc->callback);	/* XXXX Now a pointer; change it XXXX */
      a_result->cbExpires = tvc->cbExpires;
+     if (tvc->states & CVInit) {
+         a_result->refCount = 1;
+     } else {
+ #ifdef AFS_DARWIN80_ENV
+     a_result->refCount = vnode_isinuse(AFSTOV(tvc),0)?1:0; /* XXX fix */
+ #else
      a_result->refCount = VREFCOUNT(tvc);
+ #endif
+     }
      a_result->opens = tvc->opens;
      a_result->writers = tvc->execsOrWriters;
      a_result->mvstat = tvc->mvstat;
***************
*** 366,371 ****
--- 384,392 ----
      register int i;
      struct VenusFid localFid;
      struct volume *tv;
+ #ifdef AFS_DARWIN80_ENV
+     vnode_t vp;
+ #endif
  
      AFS_STATCNT(ClearCallBack);
  
***************
*** 384,400 ****
       */
      if (a_fid->Volume != 0) {
  	if (a_fid->Vnode == 0) {
  	    /*
  	     * Clear callback for the whole volume.  Zip through the
  	     * hash chain, nullifying entries whose volume ID matches.
  	     */
  		i = VCHashV(&localFid);
! 		for (tvc = afs_vhashTV[i]; tvc; tvc = tvc->vhnext) {
  		    if (tvc->fid.Fid.Volume == a_fid->Volume) {
  			tvc->callback = NULL;
  			if (!localFid.Cell)
  			    localFid.Cell = tvc->fid.Cell;
  			tvc->dchint = NULL;	/* invalidate hints */
  			ObtainWriteLock(&afs_xcbhash, 449);
  			afs_DequeueCallback(tvc);
  			tvc->states &= ~(CStatd | CUnique | CBulkFetching);
--- 405,460 ----
       */
      if (a_fid->Volume != 0) {
  	if (a_fid->Vnode == 0) {
+ 		struct afs_q *tq, *uq;
  	    /*
  	     * Clear callback for the whole volume.  Zip through the
  	     * hash chain, nullifying entries whose volume ID matches.
  	     */
+ loop1:
+ 		ObtainReadLock(&afs_xvcache);
  		i = VCHashV(&localFid);
! 		for (tq = afs_vhashTV[i].prev; tq != &afs_vhashTV[i]; tq = uq) {
! 		    uq = QPrev(tq);
! 		    tvc = QTOVH(tq);      
  		    if (tvc->fid.Fid.Volume == a_fid->Volume) {
  			tvc->callback = NULL;
  			if (!localFid.Cell)
  			    localFid.Cell = tvc->fid.Cell;
  			tvc->dchint = NULL;	/* invalidate hints */
+ 			if (tvc->states & CVInit) {
+ 			    ReleaseReadLock(&afs_xvcache);
+ 			    afs_osi_Sleep(&tvc->states);
+ 			    goto loop1;
+ 			}
+ #ifdef AFS_DARWIN80_ENV
+ 			if (tvc->states & CDeadVnode) {
+ 			    ReleaseReadLock(&afs_xvcache);
+ 			    afs_osi_Sleep(&tvc->states);
+ 			    goto loop1;
+ 			}
+ #endif
+ #if     defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV)  || defined(AFS_SUN5_ENV)  || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV)
+ 			VN_HOLD(AFSTOV(tvc));
+ #else
+ #ifdef AFS_DARWIN80_ENV
+ 			vp = AFSTOV(tvc);
+ 			if (vnode_get(vp))
+ 			    continue;
+ 			if (vnode_ref(vp)) {
+ 			    AFS_GUNLOCK();
+ 			    vnode_put(vp);
+ 			    AFS_GLOCK();
+ 			    continue;
+ 			}
+ #else
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+ 			osi_vnhold(tvc, 0);
+ #else
+ 			VREFCOUNT_INC(tvc); /* AIX, apparently */
+ #endif
+ #endif
+ #endif
+ 			ReleaseReadLock(&afs_xvcache);
  			ObtainWriteLock(&afs_xcbhash, 449);
  			afs_DequeueCallback(tvc);
  			tvc->states &= ~(CStatd | CUnique | CBulkFetching);
***************
*** 404,415 ****
  			else
  			    afs_evenCBs++;
  			ReleaseWriteLock(&afs_xcbhash);
! 			if (tvc->fid.Fid.Vnode & 1 || (vType(tvc) == VDIR))
  			    osi_dnlc_purgedp(tvc);
  			afs_Trace3(afs_iclSetp, CM_TRACE_CALLBACK,
  				   ICL_TYPE_POINTER, tvc, ICL_TYPE_INT32,
  				   tvc->states, ICL_TYPE_INT32,
  				   a_fid->Volume);
  		    } else if ((tvc->states & CMValid)
  			       && (tvc->mvid->Fid.Volume == a_fid->Volume)) {
  			tvc->states &= ~CMValid;
--- 464,481 ----
  			else
  			    afs_evenCBs++;
  			ReleaseWriteLock(&afs_xcbhash);
! 			if ((tvc->fid.Fid.Vnode & 1 || (vType(tvc) == VDIR)))
  			    osi_dnlc_purgedp(tvc);
  			afs_Trace3(afs_iclSetp, CM_TRACE_CALLBACK,
  				   ICL_TYPE_POINTER, tvc, ICL_TYPE_INT32,
  				   tvc->states, ICL_TYPE_INT32,
  				   a_fid->Volume);
+ #ifdef AFS_DARWIN80_ENV
+ 			vnode_put(AFSTOV(tvc));
+ #endif
+ 			ObtainReadLock(&afs_xvcache);
+ 			uq = QPrev(tq);
+ 			AFS_FAST_RELE(tvc);
  		    } else if ((tvc->states & CMValid)
  			       && (tvc->mvid->Fid.Volume == a_fid->Volume)) {
  			tvc->states &= ~CMValid;
***************
*** 417,422 ****
--- 483,489 ----
  			    localFid.Cell = tvc->mvid->Cell;
  		    }
  		}
+ 		ReleaseReadLock(&afs_xvcache);
  
  	    /*
  	     * XXXX Don't hold any locks here XXXX
***************
*** 432,454 ****
  	    /*
  	     * Clear callbacks just for the one file.
  	     */
  	    afs_allCBs++;
  	    if (a_fid->Vnode & 1)
  		afs_oddCBs++;	/*Could do this on volume basis, too */
  	    else
  		afs_evenCBs++;	/*A particular fid was specified */
  	    i = VCHash(&localFid);
! 	    for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
  		if (tvc->fid.Fid.Vnode == a_fid->Vnode
  		    && tvc->fid.Fid.Volume == a_fid->Volume
  		    && tvc->fid.Fid.Unique == a_fid->Unique) {
  		    tvc->callback = NULL;
  		    tvc->dchint = NULL;	/* invalidate hints */
  		    ObtainWriteLock(&afs_xcbhash, 450);
  		    afs_DequeueCallback(tvc);
  		    tvc->states &= ~(CStatd | CUnique | CBulkFetching);
  		    ReleaseWriteLock(&afs_xcbhash);
! 		    if (a_fid->Vnode & 1 || (vType(tvc) == VDIR))
  			osi_dnlc_purgedp(tvc);
  		    afs_Trace3(afs_iclSetp, CM_TRACE_CALLBACK,
  			       ICL_TYPE_POINTER, tvc, ICL_TYPE_INT32,
--- 499,559 ----
  	    /*
  	     * Clear callbacks just for the one file.
  	     */
+ 	    struct vcache *uvc;
  	    afs_allCBs++;
  	    if (a_fid->Vnode & 1)
  		afs_oddCBs++;	/*Could do this on volume basis, too */
  	    else
  		afs_evenCBs++;	/*A particular fid was specified */
+ loop2:
+ 	    ObtainReadLock(&afs_xvcache);
  	    i = VCHash(&localFid);
! 	    for (tvc = afs_vhashT[i]; tvc; tvc = uvc) {
! 		uvc = tvc->hnext;
  		if (tvc->fid.Fid.Vnode == a_fid->Vnode
  		    && tvc->fid.Fid.Volume == a_fid->Volume
  		    && tvc->fid.Fid.Unique == a_fid->Unique) {
  		    tvc->callback = NULL;
  		    tvc->dchint = NULL;	/* invalidate hints */
+ 		    if (tvc->states & CVInit) {
+ 			ReleaseReadLock(&afs_xvcache);
+ 			afs_osi_Sleep(&tvc->states);
+ 			goto loop2;
+ 		    }
+ #ifdef AFS_DARWIN80_ENV
+ 		    if (tvc->states & CDeadVnode) {
+ 			ReleaseReadLock(&afs_xvcache);
+ 			afs_osi_Sleep(&tvc->states);
+ 			goto loop2;
+ 		    }
+ #endif
+ #if     defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV)  || defined(AFS_SUN5_ENV)  || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV)
+ 		    VN_HOLD(AFSTOV(tvc));
+ #else
+ #ifdef AFS_DARWIN80_ENV
+ 		    vp = AFSTOV(tvc);
+ 		    if (vnode_get(vp))
+ 			continue;
+ 		    if (vnode_ref(vp)) {
+ 			AFS_GUNLOCK();
+ 			vnode_put(vp);
+ 			AFS_GLOCK();
+ 			continue;
+ 		    }
+ #else
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+ 		    osi_vnhold(tvc, 0);
+ #else
+ 		    VREFCOUNT_INC(tvc); /* AIX, apparently */
+ #endif
+ #endif
+ #endif
+ 		    ReleaseReadLock(&afs_xvcache);
  		    ObtainWriteLock(&afs_xcbhash, 450);
  		    afs_DequeueCallback(tvc);
  		    tvc->states &= ~(CStatd | CUnique | CBulkFetching);
  		    ReleaseWriteLock(&afs_xcbhash);
! 		    if ((tvc->fid.Fid.Vnode & 1 || (vType(tvc) == VDIR)))
  			osi_dnlc_purgedp(tvc);
  		    afs_Trace3(afs_iclSetp, CM_TRACE_CALLBACK,
  			       ICL_TYPE_POINTER, tvc, ICL_TYPE_INT32,
***************
*** 458,465 ****
--- 563,577 ----
  		    lastCallBack_dv = tvc->mstat.DataVersion.low;
  		    osi_GetuTime(&lastCallBack_time);
  #endif /* CBDEBUG */
+ #ifdef AFS_DARWIN80_ENV
+ 		    vnode_put(AFSTOV(tvc));
+ #endif
+ 		    ObtainReadLock(&afs_xvcache);
+ 		    uvc = tvc->hnext;
+ 		    AFS_FAST_RELE(tvc);
  		}
  	    }			/*Walk through hash table */
+ 	    ReleaseReadLock(&afs_xvcache);
  	}			/*Clear callbacks for one file */
      }
  
Index: openafs/src/afs/afs_cbqueue.c
diff -c openafs/src/afs/afs_cbqueue.c:1.9.2.1 openafs/src/afs/afs_cbqueue.c:1.9.2.4
*** openafs/src/afs/afs_cbqueue.c:1.9.2.1	Mon May 30 00:05:40 2005
--- openafs/src/afs/afs_cbqueue.c	Thu Mar  2 01:44:05 2006
***************
*** 75,81 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_cbqueue.c,v 1.9.2.1 2005/05/30 04:05:40 shadow Exp $");
  
  #include "afs/sysincludes.h"	/*Standard vendor system headers */
  #include "afsincludes.h"	/*AFS-based standard headers */
--- 75,81 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_cbqueue.c,v 1.9.2.4 2006/03/02 06:44:05 shadow Exp $");
  
  #include "afs/sysincludes.h"	/*Standard vendor system headers */
  #include "afsincludes.h"	/*AFS-based standard headers */
***************
*** 141,147 ****
      debugvc = avc;
      if (avc->callsort.prev) {
  	QRemove(&(avc->callsort));
- 	avc->callsort.prev = avc->callsort.next = NULL;
      } else;			/* must have got dequeued in a race */
  
      return;
--- 141,146 ----
***************
*** 220,229 ****
  			    /* What about locking xvcache or vrefcount++ or
  			     * write locking tvc? */
  			    QRemove(tq);
- 			    tq->prev = tq->next = NULL;
  			    tvc->states &= ~(CStatd | CMValid | CUnique);
! 			    if ((tvc->fid.Fid.Vnode & 1)
! 				|| (vType(tvc) == VDIR))
  				osi_dnlc_purgedp(tvc);
  			    tvc->dchint = NULL;	/*invalidate em */
  			    afs_ResetVolumeInfo(tvp);
--- 219,228 ----
  			    /* What about locking xvcache or vrefcount++ or
  			     * write locking tvc? */
  			    QRemove(tq);
  			    tvc->states &= ~(CStatd | CMValid | CUnique);
!                             if (!(tvc->states & (CVInit|CVFlushed)) &&
!                                 (tvc->fid.Fid.Vnode & 1 ||
!                                  (vType(tvc) == VDIR)))
  				osi_dnlc_purgedp(tvc);
  			    tvc->dchint = NULL;	/*invalidate em */
  			    afs_ResetVolumeInfo(tvp);
***************
*** 237,245 ****
  		 * What about locking xvcache or vrefcount++ or write locking tvc?
  		 */
  		QRemove(tq);
- 		tq->prev = tq->next = NULL;
  		tvc->states &= ~(CStatd | CMValid | CUnique);
! 		if ((tvc->fid.Fid.Vnode & 1) || (vType(tvc) == VDIR))
  		    osi_dnlc_purgedp(tvc);
  	    }
  	}
--- 236,244 ----
  		 * What about locking xvcache or vrefcount++ or write locking tvc?
  		 */
  		QRemove(tq);
  		tvc->states &= ~(CStatd | CMValid | CUnique);
!                 if (!(tvc->states & (CVInit|CVFlushed)) &&
!                     (tvc->fid.Fid.Vnode & 1 || (vType(tvc) == VDIR)))
  		    osi_dnlc_purgedp(tvc);
  	    }
  	}
***************
*** 309,317 ****
  	    tvc->callback = 0;
  	    tvc->dchint = NULL;	/* invalidate hints */
  	    tvc->states &= ~(CStatd);
! 	    if ((tvc->fid.Fid.Vnode & 1) || (vType(tvc) == VDIR))
  		osi_dnlc_purgedp(tvc);
- 	    tvc->callsort.prev = tvc->callsort.next = NULL;
  	}
  
      afs_InitCBQueue(0);
--- 308,318 ----
  	    tvc->callback = 0;
  	    tvc->dchint = NULL;	/* invalidate hints */
  	    tvc->states &= ~(CStatd);
! 	    if (QPrev(&(tvc->callsort)))
! 		QRemove(&(tvc->callsort));
! 	    if (!(tvc->states & (CVInit|CVFlushed)) &&
!                 ((tvc->fid.Fid.Vnode & 1) || (vType(tvc) == VDIR)))
  		osi_dnlc_purgedp(tvc);
  	}
  
      afs_InitCBQueue(0);
***************
*** 338,344 ****
  		tvc->callback = 0;
  		tvc->dchint = NULL;	/* invalidate hints */
  		tvc->states &= ~(CStatd);
! 		if ((tvc->fid.Fid.Vnode & 1) || (vType(tvc) == VDIR)) {
  		    osi_dnlc_purgedp(tvc);
  		}
  		afs_DequeueCallback(tvc);
--- 339,346 ----
  		tvc->callback = 0;
  		tvc->dchint = NULL;	/* invalidate hints */
  		tvc->states &= ~(CStatd);
! 		if (!(tvc->states & (CVInit|CVFlushed)) &&
!                     ((tvc->fid.Fid.Vnode & 1) || (vType(tvc) == VDIR))) {
  		    osi_dnlc_purgedp(tvc);
  		}
  		afs_DequeueCallback(tvc);
Index: openafs/src/afs/afs_chunk.c
diff -c openafs/src/afs/afs_chunk.c:1.6 openafs/src/afs/afs_chunk.c:1.6.2.2
*** openafs/src/afs/afs_chunk.c:1.6	Tue Jul 15 19:14:11 2003
--- openafs/src/afs/afs_chunk.c	Mon Feb 20 16:49:41 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_chunk.c,v 1.6 2003/07/15 23:14:11 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_chunk.c,v 1.6.2.2 2006/02/20 21:49:41 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 22,113 ****
   * Chunk module.
   */
  
  afs_int32 afs_FirstCSize = AFS_DEFAULTCSIZE;
  afs_int32 afs_OtherCSize = AFS_DEFAULTCSIZE;
  afs_int32 afs_LogChunk = AFS_DEFAULTLSIZE;
- 
- #ifdef notdef
- int
- afs_ChunkOffset(offset)
-      afs_int32 offset;
- {
- 
-     AFS_STATCNT(afs_ChunkOffset);
-     if (offset < afs_FirstCSize)
- 	return offset;
-     else
- 	return ((offset - afs_FirstCSize) & (afs_OtherCSize - 1));
- }
- 
- 
- int
- afs_Chunk(offset)
-      afs_int32 offset;
- {
-     AFS_STATCNT(afs_Chunk);
-     if (offset < afs_FirstCSize)
- 	return 0;
-     else
- 	return (((offset - afs_FirstCSize) >> afs_LogChunk) + 1);
- }
- 
- 
- int
- afs_ChunkBase(offset)
-      int offset;
- {
-     AFS_STATCNT(afs_ChunkBase);
-     if (offset < afs_FirstCSize)
- 	return 0;
-     else
- 	return (((offset - afs_FirstCSize) & ~(afs_OtherCSize - 1)) +
- 		afs_FirstCSize);
- }
- 
- 
- int
- afs_ChunkSize(offset)
-      afs_int32 offset;
- {
-     AFS_STATCNT(afs_ChunkSize);
-     if (offset < afs_FirstCSize)
- 	return afs_FirstCSize;
-     else
- 	return afs_OtherCSize;
- }
- 
- 
- int
- afs_ChunkToBase(chunk)
-      afs_int32 chunk;
- {
-     AFS_STATCNT(afs_ChunkToBase);
-     if (chunk == 0)
- 	return 0;
-     else
- 	return (afs_FirstCSize + ((chunk - 1) << afs_LogChunk));
- }
- 
- 
- int
- afs_ChunkToSize(chunk)
-      afs_int32 chunk;
- {
-     AFS_STATCNT(afs_ChunkToSize);
-     if (chunk == 0)
- 	return afs_FirstCSize;
-     else
- 	return afs_OtherCSize;
- }
- 
- /* sizes are a power of two */
- int
- afs_SetChunkSize(chunk)
-      afs_int32 chunk;
- {
-     AFS_STATCNT(afs_SetChunkSize);
-     afs_LogChunk = chunk;
-     afs_FirstCSize = afs_OtherCSize = (1 << chunk);
- }
- 
- #endif /* notdef */
--- 22,29 ----
   * Chunk module.
   */
  
+ /* Place the defaults in afsd instead of all around the code, so
+  * AFS_SETCHUNKSIZE() needs to be called before doing anything */
  afs_int32 afs_FirstCSize = AFS_DEFAULTCSIZE;
  afs_int32 afs_OtherCSize = AFS_DEFAULTCSIZE;
  afs_int32 afs_LogChunk = AFS_DEFAULTLSIZE;
Index: openafs/src/afs/afs_chunkops.h
diff -c openafs/src/afs/afs_chunkops.h:1.6 openafs/src/afs/afs_chunkops.h:1.6.2.1
*** openafs/src/afs/afs_chunkops.h:1.6	Tue Jul 15 19:14:11 2003
--- openafs/src/afs/afs_chunkops.h	Thu Oct 13 14:46:04 2005
***************
*** 18,30 ****
        Chunks are 0 based and go up by exactly 1, covering the file.
        The other fields are internal and shouldn't be used */
  /* basic parameters */
- #ifdef AFS_NOCHUNKING
- 
- #define	AFS_OTHERCSIZE	0x10000
- #define	AFS_LOGCHUNK	16
- #define	AFS_FIRSTCSIZE	0x40000000
- 
- #else /* AFS_NOCHUNKING */
  
  #define AFS_OTHERCSIZE  (afs_OtherCSize)
  #define AFS_LOGCHUNK    (afs_LogChunk)
--- 18,23 ----
***************
*** 33,43 ****
  #define AFS_DEFAULTCSIZE 0x10000
  #define AFS_DEFAULTLSIZE 16
  
- #endif /* AFS_NOCHUNKING */
- 
- #define AFS_MINCHUNK 13		/* 8k is minimum */
- #define AFS_MAXCHUNK 18		/* 256K is maximum */
- 
  #define AFS_CHUNKOFFSET(offset) ((offset < afs_FirstCSize) ? offset : \
  			 ((offset - afs_FirstCSize) & (afs_OtherCSize - 1)))
  
--- 26,31 ----
Index: openafs/src/afs/afs_daemons.c
diff -c openafs/src/afs/afs_daemons.c:1.28.2.7 openafs/src/afs/afs_daemons.c:1.28.2.13
*** openafs/src/afs/afs_daemons.c:1.28.2.7	Wed Sep  7 13:43:25 2005
--- openafs/src/afs/afs_daemons.c	Mon Feb 13 13:31:13 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.7 2005/09/07 17:43:25 shadow Exp $");
  
  #ifdef AFS_AIX51_ENV
  #define __FULL_PROTO
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_daemons.c,v 1.28.2.13 2006/02/13 18:31:13 shadow Exp $");
  
  #ifdef AFS_AIX51_ENV
  #define __FULL_PROTO
***************
*** 103,109 ****
      }
      afs_CheckServerDaemonStarted = 0;
  }
! 
  void
  afs_Daemon(void)
  {
--- 103,114 ----
      }
      afs_CheckServerDaemonStarted = 0;
  }
! #define RECURSIVE_VFS_CONTEXT 1
! #if RECURSIVE_VFS_CONTEXT
! extern int vfs_context_ref;
! #else
! #define vfs_context_ref 1
! #endif
  void
  afs_Daemon(void)
  {
***************
*** 123,128 ****
--- 128,145 ----
      while (afs_initState < 101)
  	afs_osi_Sleep(&afs_initState);
  
+ #ifdef AFS_DARWIN80_ENV
+     if (afs_osi_ctxtp_initialized)
+         osi_Panic("vfs context already initialized");
+     while (afs_osi_ctxtp && vfs_context_ref)
+         afs_osi_Sleep(&afs_osi_ctxtp);
+ #if RECURSIVE_VFS_CONTEXT
+     if (afs_osi_ctxtp && !vfs_context_ref)
+        vfs_context_rele(afs_osi_ctxtp);
+ #endif
+     afs_osi_ctxtp = vfs_context_create(NULL);
+     afs_osi_ctxtp_initialized = 1;
+ #endif
      now = osi_Time();
      lastCBSlotBump = now;
  
***************
*** 158,163 ****
--- 175,183 ----
  	    /* things to do every minute */
  	    DFlush();		/* write out dir buffers */
  	    afs_WriteThroughDSlots();	/* write through cacheinfo entries */
+ 	    ObtainWriteLock(&afs_xvcache, 736);
+ 	    afs_FlushReclaimedVcaches();
+ 	    ReleaseWriteLock(&afs_xvcache);
  	    afs_FlushActiveVcaches(1);	/* keep flocks held & flush nfs writes */
  #ifdef AFS_DISCON_ENV
  	    afs_StoreDirtyVcaches();
***************
*** 302,307 ****
--- 322,328 ----
  	    afs_rootFid.Cell = localcell;
  	    if (afs_rootFid.Fid.Volume && afs_rootFid.Fid.Volume != volid
  		&& afs_globalVp) {
+ 		struct vcache *tvc = afs_globalVp;
  		/* If we had a root fid before and it changed location we reset
  		 * the afs_globalVp so that it will be reevaluated.
  		 * Just decrement the reference count. This only occurs during
***************
*** 355,361 ****
--- 376,386 ----
  		    crfree(credp);
  		}
  #else
+ #ifdef AFS_DARWIN80_ENV
+ 		afs_PutVCache(afs_globalVp);
+ #else
  		AFS_FAST_RELE(afs_globalVp);
+ #endif
  		afs_globalVp = 0;
  #endif
  	    }
***************
*** 595,601 ****
      }
  }
  
- #ifdef	AFS_AIX32_ENV
  #ifdef AFS_AIX41_ENV
  /* AIX 4.1 has a much different sleep/wakeup mechanism available for use. 
   * The modifications here will work for either a UP or MP machine.
--- 620,625 ----
***************
*** 619,627 ****
   * This function obtains, and returns, a pointer to a buffer for
   * processing by a daemon.  It sleeps until such a buffer is available.
   * The source of buffers for it is the list afs_asyncbuf (see also 
!  * naix_vm_strategy).  This function may be invoked concurrently by
   * several processes, that is, several instances of the same daemon.
!  * naix_vm_strategy, which adds buffers to the list, runs at interrupt
   * level, while get_bioreq runs at process level.
   *
   * Since AIX 4.1 can wake just one process at a time, the separate sleep
--- 643,651 ----
   * This function obtains, and returns, a pointer to a buffer for
   * processing by a daemon.  It sleeps until such a buffer is available.
   * The source of buffers for it is the list afs_asyncbuf (see also 
!  * afs_gn_strategy).  This function may be invoked concurrently by
   * several processes, that is, several instances of the same daemon.
!  * afs_gn_strategy, which adds buffers to the list, runs at interrupt
   * level, while get_bioreq runs at process level.
   *
   * Since AIX 4.1 can wake just one process at a time, the separate sleep
***************
*** 631,637 ****
   * process and interrupts.
   */
  Simple_lock afs_asyncbuf_lock;
! /*static*/ struct buf *
  afs_get_bioreq()
  {
      struct buf *bp = NULL;
--- 655,661 ----
   * process and interrupts.
   */
  Simple_lock afs_asyncbuf_lock;
! struct buf *
  afs_get_bioreq()
  {
      struct buf *bp = NULL;
***************
*** 847,853 ****
  
  	/*
  	 * buffer may be linked with other buffers via the b_work field.
! 	 * See also naix_vm_strategy.  For each buffer in the chain (including
  	 * bp) notify all users of the buffer that the daemon is finished
  	 * using it by calling iodone.  
  	 * assumes iodone can modify the b_work field.
--- 871,877 ----
  
  	/*
  	 * buffer may be linked with other buffers via the b_work field.
! 	 * See also afs_gn_strategy.  For each buffer in the chain (including
  	 * bp) notify all users of the buffer that the daemon is finished
  	 * using it by calling iodone.  
  	 * assumes iodone can modify the b_work field.
***************
*** 869,1223 ****
      }				/* infinite loop (unless we're interrupted) */
  }				/* end of afs_BioDaemon() */
  
- #else /* AFS_AIX41_ENV */
- 
- 
- #define	squeue afs_q
- struct afs_bioqueue {
-     struct squeue lruq;
-     int sleeper;
-     int cnt;
- };
- struct afs_bioqueue afs_bioqueue;
- struct buf *afs_busyq = NULL;
- struct buf *afs_asyncbuf;
- afs_int32 afs_biodcnt = 0;
- 
- /* in implementing this, I assumed that all external linked lists were
-  * null-terminated.  
-  *
-  * Several places in this code traverse a linked list.  The algorithm
-  * used here is probably unfamiliar to most people.  Careful examination
-  * will show that it eliminates an assignment inside the loop, as compared
-  * to the standard algorithm, at the cost of occasionally using an extra
-  * variable.
-  */
- 
- /* get_bioreq()
-  *
-  * This function obtains, and returns, a pointer to a buffer for
-  * processing by a daemon.  It sleeps until such a buffer is available.
-  * The source of buffers for it is the list afs_asyncbuf (see also 
-  * naix_vm_strategy).  This function may be invoked concurrently by
-  * several processes, that is, several instances of the same daemon.
-  * naix_vm_strategy, which adds buffers to the list, runs at interrupt
-  * level, while get_bioreq runs at process level.
-  *
-  * The common kernel paradigm of sleeping and waking up, in which all the
-  * competing processes sleep waiting for wakeups on one address, is not
-  * followed here.  Instead, the following paradigm is used:  when a daemon
-  * goes to sleep, it checks for other sleeping daemons.  If there aren't any,
-  * it sleeps on the address of variable afs_asyncbuf.  But if there is
-  * already a daemon sleeping on that address, it threads its own unique
-  * address onto a list, and sleeps on that address.  This way, every 
-  * sleeper is sleeping on a different address, and every wakeup wakes up
-  * exactly one daemon.  This prevents a whole bunch of daemons from waking
-  * up and then immediately having to go back to sleep.  This provides a
-  * performance gain and makes the I/O scheduling a bit more deterministic.
-  * The list of sleepers is variable afs_bioqueue.  The unique address
-  * on which to sleep is passed to get_bioreq as its parameter.
-  */
- /*static*/ struct buf *
- afs_get_bioreq(self)
-      struct afs_bioqueue *self;	/* address on which to sleep */
- 
- {
-     struct buf *bp = NULL;
-     struct buf *bestbp;
-     struct buf **bestlbpP, **lbpP;
-     int bestage, stop;
-     struct buf *t1P, *t2P;	/* temp pointers for list manipulation */
-     int oldPriority;
-     afs_uint32 wait_ret;
-     struct afs_bioqueue *s;
- 
-     /* ??? Does the forward pointer of the returned buffer need to be NULL?
-      */
- 
-     /* Disable interrupts from the strategy function, and save the 
-      * prior priority level
-      */
-     oldPriority = i_disable(INTMAX);
- 
-     /* Each iteration of following loop either pulls
-      * a buffer off afs_asyncbuf, or sleeps.  
-      */
-     while (1) {			/* inner loop */
- 	if (afs_asyncbuf) {
- 	    /* look for oldest buffer */
- 	    bp = bestbp = afs_asyncbuf;
- 	    bestage = (int)bestbp->av_back;
- 	    bestlbpP = &afs_asyncbuf;
- 	    while (1) {
- 		lbpP = &bp->av_forw;
- 		bp = *lbpP;
- 		if (!bp)
- 		    break;
- 		if ((int)bp->av_back - bestage < 0) {
- 		    bestbp = bp;
- 		    bestlbpP = lbpP;
- 		    bestage = (int)bp->av_back;
- 		}
- 	    }
- 	    bp = bestbp;
- 	    *bestlbpP = bp->av_forw;
- 	    break;
- 	} else {
- 	    int interrupted;
- 
- 	    /* If afs_asyncbuf is null, it is necessary to go to sleep.
- 	     * There are two possibilities:  either there is already a
- 	     * daemon that is sleeping on the address of afs_asyncbuf,
- 	     * or there isn't. 
- 	     */
- 	    if (afs_bioqueue.sleeper) {
- 		/* enqueue */
- 		QAdd(&(afs_bioqueue.lruq), &(self->lruq));
- 		interrupted = sleep((caddr_t) self, PCATCH | (PZERO + 1));
- 		if (self->lruq.next != &self->lruq) {	/* XXX ##3 XXX */
- 		    QRemove(&(self->lruq));	/* dequeue */
- 		}
- 		self->cnt++;
- 		afs_bioqueue.sleeper = FALSE;
- 		if (interrupted) {
- 		    /* re-enable interrupts from strategy */
- 		    i_enable(oldPriority);
- 		    return (NULL);
- 		}
- 		continue;
- 	    } else {
- 		afs_bioqueue.sleeper = TRUE;
- 		interrupted =
- 		    sleep((caddr_t) & afs_asyncbuf, PCATCH | (PZERO + 1));
- 		afs_bioqueue.sleeper = FALSE;
- 		if (interrupted) {
- 		    /*
- 		     * We need to wakeup another daemon if present
- 		     * since we were waiting on afs_asyncbuf.
- 		     */
- #ifdef	notdef			/* The following doesn't work as advertised */
- 		    if (afs_bioqueue.lruq.next != &afs_bioqueue.lruq) {
- 			struct squeue *bq = afs_bioqueue.lruq.next;
- 			QRemove(bq);
- 			wakeup(bq);
- 		    }
- #endif
- 		    /* re-enable interrupts from strategy */
- 		    i_enable(oldPriority);
- 		    return (NULL);
- 		}
- 		continue;
- 	    }
- 
- 	}			/* end of "else asyncbuf is empty" */
-     }				/* end of "inner loop" */
- 
-     /*assert (bp); */
- 
-     i_enable(oldPriority);	/* re-enable interrupts from strategy */
- 
-     /* For the convenience of other code, replace the gnodes in
-      * the b_vp field of bp and the other buffers on the b_work
-      * chain with the corresponding vnodes.   
-      *
-      * ??? what happens to the gnodes?  They're not just cut loose,
-      * are they?
-      */
-     for (t1P = bp;;) {
- 	t2P = (struct buf *)t1P->b_work;
- 	t1P->b_vp = ((struct gnode *)t1P->b_vp)->gn_vnode;
- 	if (!t2P)
- 	    break;
- 
- 	t1P = (struct buf *)t2P->b_work;
- 	t2P->b_vp = ((struct gnode *)t2P->b_vp)->gn_vnode;
- 	if (!t1P)
- 	    break;
-     }
- 
-     /* If the buffer does not specify I/O, it may immediately
-      * be returned to the caller.  This condition is detected
-      * by examining the buffer's flags (the b_flags field).  If
-      * the B_PFPROT bit is set, the buffer represents a protection
-      * violation, rather than a request for I/O.  The remainder
-      * of the outer loop handles the case where the B_PFPROT bit is clear.
-      */
-     if (bp->b_flags & B_PFPROT) {
- 	return (bp);
-     }
- 
-     /* wake up another process to handle the next buffer, and return
-      * bp to the caller.
-      */
-     oldPriority = i_disable(INTMAX);
- 
-     /* determine where to find the sleeping process. 
-      * There are two cases: either it is sleeping on
-      * afs_asyncbuf, or it is sleeping on its own unique
-      * address.  These cases are distinguished by examining
-      * the sleeper field of afs_bioqueue.
-      */
-     if (afs_bioqueue.sleeper) {
- 	wakeup(&afs_asyncbuf);
-     } else {
- 	if (afs_bioqueue.lruq.next == &afs_bioqueue.lruq) {
- 	    /* queue is empty, what now? ??? */
- 	    /* Should this be impossible, or does    */
- 	    /* it just mean that nobody is sleeping? */ ;
- 	} else {
- 	    struct squeue *bq = afs_bioqueue.lruq.next;
- 	    QRemove(bq);
- 	    QInit(bq);
- 	    wakeup(bq);
- 	    afs_bioqueue.sleeper = TRUE;
- 	}
-     }
-     i_enable(oldPriority);	/* re-enable interrupts from strategy */
-     return (bp);
- 
- }				/* end of function get_bioreq() */
- 
- 
- /* afs_BioDaemon
-  *
-  * This function is the daemon.  It is called from the syscall
-  * interface.  Ordinarily, a script or an administrator will run a
-  * daemon startup utility, specifying the number of I/O daemons to
-  * run.  The utility will fork off that number of processes,
-  * each making the appropriate syscall, which will cause this
-  * function to be invoked.
-  */
- static int afs_initbiod = 0;	/* this is self-initializing code */
- int DOvmlock = 0;
- afs_BioDaemon(nbiods)
-      afs_int32 nbiods;
- {
-     struct afs_bioqueue *self;
-     afs_int32 code, s, pflg = 0;
-     label_t jmpbuf;
-     struct buf *bp, *bp1, *tbp1, *tbp2;	/* temp pointers only */
-     caddr_t tmpaddr;
-     struct vnode *vp;
-     struct vcache *vcp;
-     char tmperr;
-     if (!afs_initbiod) {
- 	/* XXX ###1 XXX */
- 	afs_initbiod = 1;
- 	/* Initialize the queue of waiting processes, afs_bioqueue.  */
- 	QInit(&(afs_bioqueue.lruq));
-     }
- 
-     /* establish ourself as a kernel process so shutdown won't kill us */
- /*    u.u_procp->p_flag |= SKPROC;*/
- 
-     /* Initialize a token (self) to use in the queue of sleeping processes.   */
-     self = (struct afs_bioqueue *)afs_osi_Alloc(sizeof(struct afs_bioqueue));
-     pin(self, sizeof(struct afs_bioqueue));	/* fix in memory */
-     memset(self, 0, sizeof(*self));
-     QInit(&(self->lruq));	/* initialize queue entry pointers */
- 
- 
-     /* Ignore HUP signals... */
-     SIGDELSET(u.u_procp->p_sig, SIGHUP);
-     SIGADDSET(u.u_procp->p_sigignore, SIGHUP);
-     SIGDELSET(u.u_procp->p_sigcatch, SIGHUP);
-     /* Main body starts here -- this is an intentional infinite loop, and
-      * should NEVER exit 
-      *
-      * Now, the loop will exit if get_bioreq() returns NULL, indicating 
-      * that we've been interrupted.
-      */
-     while (1) {
- 	bp = afs_get_bioreq(self);
- 	if (!bp)
- 	    break;		/* we were interrupted */
- 	if (code = setjmpx(&jmpbuf)) {
- 	    /* This should not have happend, maybe a lack of resources  */
- 	    s = splimp();
- 	    for (bp1 = bp; bp; bp = bp1) {
- 		if (bp1)
- 		    bp1 = bp1->b_work;
- 		bp->b_actf = 0;
- 		bp->b_error = code;
- 		bp->b_flags |= B_ERROR;
- 		iodone(bp);
- 	    }
- 	    splx(s);
- 	    continue;
- 	}
- 	vcp = VTOAFS(bp->b_vp);
- 	if (bp->b_flags & B_PFSTORE) {
- 	    ObtainWriteLock(&vcp->lock, 210);
- 	    if (vcp->v.v_gnode->gn_mwrcnt) {
- 		afs_offs_t newlength =
- 		    (afs_offs_t) dbtob(bp->b_blkno) + bp->b_bcount;
- 		if (vcp->m.Length < newlength) {
- 		    afs_Trace4(afs_iclSetp, CM_TRACE_SETLENGTH,
- 			       ICL_TYPE_STRING, __FILE__, ICL_TYPE_LONG,
- 			       __LINE__, ICL_TYPE_OFFSET,
- 			       ICL_HANDLE_OFFSET(vcp->m.Length),
- 			       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(newlength));
- 		    vcp->m.Length = newlength;
- 		}
- 	    }
- 	    ReleaseWriteLock(&vcp->lock);
- 	}
- 	/* If the buffer represents a protection violation, rather than
- 	 * an actual request for I/O, no special action need be taken.  
- 	 */
- 	if (bp->b_flags & B_PFPROT) {
- 	    iodone(bp);		/* Notify all users of the buffer that we're done */
- 	    continue;
- 	}
- 	if (DOvmlock)
- 	    ObtainWriteLock(&vcp->pvmlock, 558);
- 	/*
- 	 * First map its data area to a region in the current address space
- 	 * by calling vm_att with the subspace identifier, and a pointer to
- 	 * the data area.  vm_att returns  a new data area pointer, but we
- 	 * also want to hang onto the old one.
- 	 */
- 	tmpaddr = bp->b_baddr;
- 	bp->b_baddr = vm_att(bp->b_xmemd.subspace_id, tmpaddr);
- 	tmperr = afs_ustrategy(bp);	/* temp variable saves offset calculation */
- 	if (tmperr) {		/* in non-error case */
- 	    bp->b_flags |= B_ERROR;	/* should other flags remain set ??? */
- 	    bp->b_error = tmperr;
- 	}
- 
- 	/* Unmap the buffer's data area by calling vm_det.  Reset data area
- 	 * to the value that we saved above.
- 	 */
- 	vm_det(bp->b_un.b_addr);
- 	bp->b_baddr = tmpaddr;
- 
- 	/*
- 	 * buffer may be linked with other buffers via the b_work field.
- 	 * See also naix_vm_strategy.  For each buffer in the chain (including
- 	 * bp) notify all users of the buffer that the daemon is finished
- 	 * using it by calling iodone.  
- 	 * assumes iodone can modify the b_work field.
- 	 */
- 	for (tbp1 = bp;;) {
- 	    tbp2 = (struct buf *)tbp1->b_work;
- 	    iodone(tbp1);
- 	    if (!tbp2)
- 		break;
- 
- 	    tbp1 = (struct buf *)tbp2->b_work;
- 	    iodone(tbp2);
- 	    if (!tbp1)
- 		break;
- 	}
- 	if (DOvmlock)
- 	    ReleaseWriteLock(&vcp->pvmlock);	/* Unlock the vnode.  */
- 	clrjmpx(&jmpbuf);
-     }				/* infinite loop (unless we're interrupted) */
-     unpin(self, sizeof(struct afs_bioqueue));
-     afs_osi_Free(self, sizeof(struct afs_bioqueue));
- }				/* end of afs_BioDaemon() */
  #endif /* AFS_AIX41_ENV */
- #endif /* AFS_AIX32_ENV */
  
  
  int afs_nbrs = 0;
--- 893,899 ----
***************
*** 1319,1334 ****
  	memset((char *)afs_brs, 0, sizeof(afs_brs));
  	memset((char *)&afs_xbrs, 0, sizeof(afs_lock_t));
  	afs_brsWaiters = 0;
- #ifdef AFS_AIX32_ENV
  #ifdef AFS_AIX41_ENV
  	lock_free(&afs_asyncbuf_lock);
  	unpin(&afs_asyncbuf, sizeof(struct buf *));
  	unpin(&afs_asyncbuf_cv, sizeof(afs_int32));
- #else /* AFS_AIX41_ENV */
- 	afs_busyq = NULL;
- 	afs_biodcnt = 0;
- 	memset((char *)&afs_bioqueue, 0, sizeof(struct afs_bioqueue));
- #endif
  	afs_initbiod = 0;
  #endif
      }
--- 995,1004 ----
Index: openafs/src/afs/afs_dcache.c
diff -c openafs/src/afs/afs_dcache.c:1.42.2.16 openafs/src/afs/afs_dcache.c:1.42.2.19
*** openafs/src/afs/afs_dcache.c:1.42.2.16	Thu Aug  4 16:45:14 2005
--- openafs/src/afs/afs_dcache.c	Thu Oct 13 14:42:27 2005
***************
*** 14,20 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_dcache.c,v 1.42.2.16 2005/08/04 20:45:14 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.19 2005/10/13 18:42:27 shadow Exp $");
  
  #include "afs/sysincludes.h"	/*Standard vendor system headers */
  #include "afsincludes.h"	/*AFS-based standard headers */
***************
*** 223,238 ****
      u_int counter;
      u_int cb_lowat;
      u_int dc_hiwat =
! 	(100 - CM_DCACHECOUNTFREEPCT +
! 	 CM_DCACHEEXTRAPCT) * afs_cacheFiles / 100;
      afs_min_cache =
  	(((10 * AFS_CHUNKSIZE(0)) + afs_fsfragsize) & ~afs_fsfragsize) >> 10;
  
      osi_GetuTime(&CTD_stats.CTD_afterSleep);
      afs_TruncateDaemonRunning = 1;
      while (1) {
! 	cb_lowat = ((CM_DCACHESPACEFREEPCT - CM_DCACHEEXTRAPCT)
! 		    * afs_cacheBlocks) / 100;
  	MObtainWriteLock(&afs_xdcache, 266);
  	if (afs_CacheTooFull) {
  	    int space_needed, slots_needed;
--- 223,236 ----
      u_int counter;
      u_int cb_lowat;
      u_int dc_hiwat =
! 	PERCENT((100 - CM_DCACHECOUNTFREEPCT + CM_DCACHEEXTRAPCT), afs_cacheFiles);
      afs_min_cache =
  	(((10 * AFS_CHUNKSIZE(0)) + afs_fsfragsize) & ~afs_fsfragsize) >> 10;
  
      osi_GetuTime(&CTD_stats.CTD_afterSleep);
      afs_TruncateDaemonRunning = 1;
      while (1) {
! 	cb_lowat = PERCENT((CM_DCACHESPACEFREEPCT - CM_DCACHEEXTRAPCT), afs_cacheBlocks);
  	MObtainWriteLock(&afs_xdcache, 266);
  	if (afs_CacheTooFull) {
  	    int space_needed, slots_needed;
***************
*** 583,589 ****
  			MReleaseWriteLock(&afs_xdcache);
  		    }
  
! 		    AFS_FAST_RELE(tvc);
  		    MObtainWriteLock(&afs_xdcache, 528);
  		    if (afs_indexFlags[tdc->index] &
  			(IFDataMod | IFDirtyPages | IFAnyPages))
--- 581,587 ----
  			MReleaseWriteLock(&afs_xdcache);
  		    }
  
! 		    afs_PutVCache(tvc); /*XXX was AFS_FAST_RELE?*/
  		    MObtainWriteLock(&afs_xdcache, 528);
  		    if (afs_indexFlags[tdc->index] &
  			(IFDataMod | IFDirtyPages | IFAnyPages))
***************
*** 777,783 ****
  
      if (afs_WaitForCacheDrain) {
  	if (afs_blocksUsed <=
! 	    (CM_CACHESIZEDRAINEDPCT * afs_cacheBlocks) / 100) {
  	    afs_WaitForCacheDrain = 0;
  	    afs_osi_Wakeup(&afs_WaitForCacheDrain);
  	}
--- 775,781 ----
  
      if (afs_WaitForCacheDrain) {
  	if (afs_blocksUsed <=
! 	    PERCENT(CM_CACHESIZEDRAINEDPCT, afs_cacheBlocks)) {
  	    afs_WaitForCacheDrain = 0;
  	    afs_osi_Wakeup(&afs_WaitForCacheDrain);
  	}
***************
*** 810,816 ****
  
      if (afs_WaitForCacheDrain) {
  	if ((afs_blocksUsed - afs_blocksDiscarded) <=
! 	    (CM_CACHESIZEDRAINEDPCT * afs_cacheBlocks) / 100) {
  	    afs_WaitForCacheDrain = 0;
  	    afs_osi_Wakeup(&afs_WaitForCacheDrain);
  	}
--- 808,814 ----
  
      if (afs_WaitForCacheDrain) {
  	if ((afs_blocksUsed - afs_blocksDiscarded) <=
! 	    PERCENT(CM_CACHESIZEDRAINEDPCT, afs_cacheBlocks)) {
  	    afs_WaitForCacheDrain = 0;
  	    afs_osi_Wakeup(&afs_WaitForCacheDrain);
  	}
***************
*** 860,866 ****
  
      if (afs_WaitForCacheDrain) {
  	if ((afs_blocksUsed - afs_blocksDiscarded) <=
! 	    (CM_CACHESIZEDRAINEDPCT * afs_cacheBlocks) / 100) {
  	    afs_WaitForCacheDrain = 0;
  	    afs_osi_Wakeup(&afs_WaitForCacheDrain);
  	}
--- 858,864 ----
  
      if (afs_WaitForCacheDrain) {
  	if ((afs_blocksUsed - afs_blocksDiscarded) <=
! 	    PERCENT(CM_CACHESIZEDRAINEDPCT, afs_cacheBlocks)) {
  	    afs_WaitForCacheDrain = 0;
  	    afs_osi_Wakeup(&afs_WaitForCacheDrain);
  	}
***************
*** 943,949 ****
  
      while (afs_blocksDiscarded
  	   && (afs_blocksUsed >
! 	       (CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100)) {
  	afs_FreeDiscardedDCache();
      }
      return 0;
--- 941,947 ----
  
      while (afs_blocksDiscarded
  	   && (afs_blocksUsed >
! 	       PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks))) {
  	afs_FreeDiscardedDCache();
      }
      return 0;
***************
*** 1967,1973 ****
  	/* Sleep here when cache needs to be drained. */
  	if (setLocks && !slowPass
  	    && (afs_blocksUsed >
! 		(CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100)) {
  	    /* Make sure truncate daemon is running */
  	    afs_MaybeWakeupTruncateDaemon();
  	    ObtainWriteLock(&tdc->tlock, 614);
--- 1965,1971 ----
  	/* Sleep here when cache needs to be drained. */
  	if (setLocks && !slowPass
  	    && (afs_blocksUsed >
! 		PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks))) {
  	    /* Make sure truncate daemon is running */
  	    afs_MaybeWakeupTruncateDaemon();
  	    ObtainWriteLock(&tdc->tlock, 614);
***************
*** 1976,1982 ****
  	    ReleaseWriteLock(&tdc->lock);
  	    ReleaseReadLock(&avc->lock);
  	    while ((afs_blocksUsed - afs_blocksDiscarded) >
! 		   (CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100) {
  		afs_WaitForCacheDrain = 1;
  		afs_osi_Sleep(&afs_WaitForCacheDrain);
  	    }
--- 1974,1980 ----
  	    ReleaseWriteLock(&tdc->lock);
  	    ReleaseReadLock(&avc->lock);
  	    while ((afs_blocksUsed - afs_blocksDiscarded) >
! 		   PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks)) {
  		afs_WaitForCacheDrain = 1;
  		afs_osi_Sleep(&afs_WaitForCacheDrain);
  	    }
Index: openafs/src/afs/afs_init.c
diff -c openafs/src/afs/afs_init.c:1.28.2.4 openafs/src/afs/afs_init.c:1.28.2.5
*** openafs/src/afs/afs_init.c:1.28.2.4	Sun Apr  3 14:18:54 2005
--- openafs/src/afs/afs_init.c	Wed Oct  5 01:58:27 2005
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_init.c,v 1.28.2.4 2005/04/03 18:18:54 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.5 2005/10/05 05:58:27 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 352,357 ****
--- 352,359 ----
  	struct statvfs st;
  #elif defined(AFS_DUX40_ENV)
  	struct nstatfs st;
+ #elif defined(AFS_DARWIN80_ENV)
+ 	struct vfsstatfs st;
  #else
  	struct statfs st;
  #endif /* SUN56 */
***************
*** 381,386 ****
--- 383,391 ----
  	    VFS_STATFS(filevp->v_vfsp, &st);
  	    TO_KERNEL_SPACE();
  	}
+ #elif defined(AFS_DARWIN80_ENV)
+         afs_cacheVfsp = vnode_mount(filevp);
+ 	if (afs_cacheVfsp && ((st = *(vfs_statfs(afs_cacheVfsp))),1))
  #elif defined(AFS_DARWIN_ENV)
  	if (!VFS_STATFS(filevp->v_mount, &st, current_proc()))
  #elif defined(AFS_FBSD50_ENV)
***************
*** 413,419 ****
--- 418,426 ----
  #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 */
Index: openafs/src/afs/afs_memcache.c
diff -c openafs/src/afs/afs_memcache.c:1.15.2.4 openafs/src/afs/afs_memcache.c:1.15.2.5
*** openafs/src/afs/afs_memcache.c:1.15.2.4	Mon May 30 00:36:58 2005
--- openafs/src/afs/afs_memcache.c	Wed Oct  5 01:58:27 2005
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_memcache.c,v 1.15.2.4 2005/05/30 04:36:58 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.5 2005/10/05 05:58:27 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #ifndef AFS_LINUX22_ENV
***************
*** 180,192 ****
  {
      register struct memCacheEntry *mceP =
  	(struct memCacheEntry *)afs_MemCacheOpen(blkno);
!     int length = mceP->size - uioP->uio_offset;
      afs_int32 code;
  
      AFS_STATCNT(afs_MemReadUIO);
      MObtainReadLock(&mceP->afs_memLock);
!     length = (length < uioP->uio_resid) ? length : uioP->uio_resid;
!     AFS_UIOMOVE(mceP->data + uioP->uio_offset, length, UIO_READ, uioP, code);
      MReleaseReadLock(&mceP->afs_memLock);
      return code;
  }
--- 180,192 ----
  {
      register struct memCacheEntry *mceP =
  	(struct memCacheEntry *)afs_MemCacheOpen(blkno);
!     int length = mceP->size - AFS_UIO_OFFSET(uioP);
      afs_int32 code;
  
      AFS_STATCNT(afs_MemReadUIO);
      MObtainReadLock(&mceP->afs_memLock);
!     length = (length < AFS_UIO_RESID(uioP)) ? length : AFS_UIO_RESID(uioP);
!     AFS_UIOMOVE(mceP->data + AFS_UIO_OFFSET(uioP), length, UIO_READ, uioP, code);
      MReleaseReadLock(&mceP->afs_memLock);
      return code;
  }
***************
*** 281,305 ****
  
      AFS_STATCNT(afs_MemWriteUIO);
      MObtainWriteLock(&mceP->afs_memLock, 312);
!     if (uioP->uio_resid + uioP->uio_offset > mceP->dataSize) {
  	char *oldData = mceP->data;
  
! 	mceP->data = afs_osi_Alloc(uioP->uio_resid + uioP->uio_offset);
  
  	AFS_GUNLOCK();
  	memcpy(mceP->data, oldData, mceP->size);
  	AFS_GLOCK();
  
  	afs_osi_Free(oldData, mceP->dataSize);
! 	mceP->dataSize = uioP->uio_resid + uioP->uio_offset;
      }
!     if (mceP->size < uioP->uio_offset)
  	memset(mceP->data + mceP->size, 0,
! 	       (int)(uioP->uio_offset - mceP->size));
!     AFS_UIOMOVE(mceP->data + uioP->uio_offset, uioP->uio_resid, UIO_WRITE,
  		uioP, code);
!     if (uioP->uio_offset > mceP->size)
! 	mceP->size = uioP->uio_offset;
  
      MReleaseWriteLock(&mceP->afs_memLock);
      return code;
--- 281,305 ----
  
      AFS_STATCNT(afs_MemWriteUIO);
      MObtainWriteLock(&mceP->afs_memLock, 312);
!     if (AFS_UIO_RESID(uioP) + AFS_UIO_OFFSET(uioP) > mceP->dataSize) {
  	char *oldData = mceP->data;
  
! 	mceP->data = afs_osi_Alloc(AFS_UIO_RESID(uioP) + AFS_UIO_OFFSET(uioP));
  
  	AFS_GUNLOCK();
  	memcpy(mceP->data, oldData, mceP->size);
  	AFS_GLOCK();
  
  	afs_osi_Free(oldData, mceP->dataSize);
! 	mceP->dataSize = AFS_UIO_RESID(uioP) + AFS_UIO_OFFSET(uioP);
      }
!     if (mceP->size < AFS_UIO_OFFSET(uioP))
  	memset(mceP->data + mceP->size, 0,
! 	       (int)(AFS_UIO_OFFSET(uioP) - mceP->size));
!     AFS_UIOMOVE(mceP->data + AFS_UIO_OFFSET(uioP), AFS_UIO_RESID(uioP), UIO_WRITE,
  		uioP, code);
!     if (AFS_UIO_OFFSET(uioP) > mceP->size)
! 	mceP->size = AFS_UIO_OFFSET(uioP);
  
      MReleaseWriteLock(&mceP->afs_memLock);
      return code;
Index: openafs/src/afs/afs_nfsdisp.c
diff -c openafs/src/afs/afs_nfsdisp.c:1.18.2.1.4.2 openafs/src/afs/afs_nfsdisp.c:1.18.2.3
*** openafs/src/afs/afs_nfsdisp.c:1.18.2.1.4.2	Thu Oct 13 14:27:32 2005
--- openafs/src/afs/afs_nfsdisp.c	Thu Oct 13 14:26:06 2005
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_nfsdisp.c,v 1.18.2.1.4.2 2005/10/13 18:27:32 shadow Exp $");
  
  /* Ugly Ugly Ugly  but precludes conflicting XDR macros; We want kernel xdr */
  #define __XDR_INCLUDE__
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_nfsdisp.c,v 1.18.2.3 2005/10/13 18:26:06 shadow Exp $");
  
  /* Ugly Ugly Ugly  but precludes conflicting XDR macros; We want kernel xdr */
  #define __XDR_INCLUDE__
Index: openafs/src/afs/afs_osi.c
diff -c openafs/src/afs/afs_osi.c:1.48.2.4 openafs/src/afs/afs_osi.c:1.48.2.6
*** openafs/src/afs/afs_osi.c:1.48.2.4	Sun Apr  3 14:15:36 2005
--- openafs/src/afs/afs_osi.c	Wed Feb 15 15:55:11 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi.c,v 1.48.2.4 2005/04/03 18:15:36 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.6 2006/02/15 20:55:11 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 60,66 ****
--- 60,68 ----
  #elif defined(AFS_FBSD50_ENV)
      mtx_init(&afs_global_mtx, "AFS global lock", NULL, MTX_DEF);
  #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
+ #if !defined(AFS_DARWIN80_ENV)
      lockinit(&afs_global_lock, PLOCK, "afs global lock", 0, 0);
+ #endif
      afs_global_owner = 0;
  #elif defined(AFS_AIX41_ENV)
      lock_alloc((void *)&afs_global_lock, LOCK_ALLOC_PIN, 1, 1);
***************
*** 74,79 ****
--- 76,86 ----
  #endif /* AFS_HPUX_ENV */
  
      if (!afs_osicred_initialized) {
+ #if defined(AFS_DARWIN80_ENV)
+         afs_osi_ctxtp_initialized = 0;
+         afs_osi_ctxtp = NULL; /* initialized in afs_Daemon since it has
+                                   a proc reference that cannot be changed */
+ #endif
  #if defined(AFS_XBSD_ENV)
  	/* Can't just invent one, must use crget() because of mutex */
  	afs_osi_credp = crdup(osi_curcred());
***************
*** 82,88 ****
--- 89,100 ----
  #if defined(AFS_LINUX26_ENV)
          afs_osi_cred.cr_group_info = groups_alloc(0);
  #endif
+ #if defined(AFS_DARWIN80_ENV)
+         afs_osi_cred.cr_ref = 1; /* kauth_cred_get_ref needs 1 existing ref */
+ #else
  	crhold(&afs_osi_cred);	/* don't let it evaporate */
+ #endif
+ 
  	afs_osi_credp = &afs_osi_cred;
  #endif
  	afs_osicred_initialized = 1;
***************
*** 284,289 ****
--- 296,302 ----
      curproc->p_flag |= SSYS;
  #elif defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
      set_system_proc(u.u_procp);
+ #elif defined(AFS_DARWIN80_ENV)
  #elif defined(AFS_DARWIN_ENV)
      /* maybe call init_process instead? */
      current_proc()->p_flag |= P_SYSTEM;
***************
*** 333,341 ****
--- 346,356 ----
      stime(&sta);
      AFS_GLOCK();
  #elif defined(AFS_DARWIN_ENV)
+ #ifndef AFS_DARWIN80_ENV
      AFS_GUNLOCK();
      setthetime(atv);
      AFS_GLOCK();
+ #endif
  #else
      /* stolen from kern_time.c */
  #ifndef	AFS_AUX_ENV
***************
*** 560,565 ****
--- 575,588 ----
  shutdown_osi(void)
  {
      AFS_STATCNT(shutdown_osi);
+ #ifdef AFS_DARWIN80_ENV
+     if (afs_osi_ctxtp_initialized && afs_osi_ctxtp) {
+        vfs_context_rele(afs_osi_ctxtp);
+        afs_osi_ctxtp = NULL;
+        afs_osi_ctxtp_initialized = 0;
+     }
+     shutdown_osisleep();
+ #endif
      if (afs_cold_shutdown) {
  	LOCK_INIT(&afs_ftf, "afs_ftf");
      }
***************
*** 765,771 ****
  }
  #endif
  
! #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
  void
  afs_osi_TraverseProcTable(void)
  {
--- 788,794 ----
  }
  #endif
  
! #if (defined(AFS_DARWIN_ENV) && !defined(AFS_DARWIN80_ENV)) || defined(AFS_FBSD_ENV)
  void
  afs_osi_TraverseProcTable(void)
  {
***************
*** 989,994 ****
--- 1012,1036 ----
  
      return rv;
  }
+ #elif defined(AFS_DARWIN80_ENV) 
+ const struct AFS_UCRED *
+ afs_osi_proc2cred(AFS_PROC * pr)
+ {
+     struct AFS_UCRED *rv = NULL;
+     static struct AFS_UCRED cr;
+     struct ucred *pcred;
+ 
+     if (pr == NULL) {
+ 	return NULL;
+     }
+     pcred = proc_ucred(pr);
+     cr.cr_ref = 1;
+     cr.cr_uid = pcred->cr_uid;
+     cr.cr_ngroups = pcred->cr_ngroups;
+     memcpy(cr.cr_groups, pcred->cr_groups,
+            NGROUPS * sizeof(gid_t));
+     return &cr;
+ }
  #elif defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
  const struct AFS_UCRED *
  afs_osi_proc2cred(AFS_PROC * pr)
Index: openafs/src/afs/afs_osi.h
diff -c openafs/src/afs/afs_osi.h:1.22.2.10 openafs/src/afs/afs_osi.h:1.22.2.14
*** openafs/src/afs/afs_osi.h:1.22.2.10	Mon Jul 11 15:29:55 2005
--- openafs/src/afs/afs_osi.h	Fri Dec 23 20:09:52 2005
***************
*** 123,128 ****
--- 123,136 ----
  /*
   * Vnode related macros
   */
+ #if defined(AFS_DARWIN80_ENV)
+ #define vType(vc)               vnode_vtype(AFSTOV(vc))
+ #define vSetVfsp(vc, vfsp)      
+ #define vSetType(vc, type)      (vc)->m.Type = (type)
+ extern int afs_vfs_typenum;
+ #define SetAfsVnode(vn)         /* nothing; done in getnewvnode() */
+ #define IsAfsVnode(v) (vfs_typenum(vnode_mount((v))) == afs_vfs_typenum)
+ #else
  #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_LINUX22_ENV)
  #define vSetVfsp(vc, vfsp)      AFSTOV(vc)->v_mount = (vfsp)
  #define vSetType(vc, type)      AFSTOV(vc)->v_type = (type)
***************
*** 132,138 ****
  #define	vSetType(vc,type)   (vc)->v.v_type = (type)
  #define	vSetVfsp(vc,vfsp)   (vc)->v.v_vfsp = (vfsp)
  #endif
- 
  #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
  extern int (**afs_vnodeop_p) ();
  #define IsAfsVnode(v)      ((v)->v_op == afs_vnodeop_p)
--- 140,145 ----
***************
*** 142,147 ****
--- 149,155 ----
  #define	IsAfsVnode(v)	    ((v)->v_op == afs_ops)
  #define	SetAfsVnode(v)	    (v)->v_op = afs_ops
  #endif
+ #endif
  
  #ifdef AFS_SGI65_ENV
  #define	gop_lookupname(fnamep,segflg,followlink,compvpp) \
***************
*** 180,197 ****
    * In 64 bit HP-UX the timeval structure has a 64 bit member.
    */
  
! 
! #if defined(AFS_HPUX_ENV) || (defined(AFS_SUN57_ENV) && !defined(AFS_SUN510_ENV)) || defined(AFS_LINUX_64BIT_KERNEL) || (defined(AFS_SGI61_ENV) && defined(KERNEL) && defined(_K64U64))
  typedef struct {
      afs_int32 tv_sec;
      afs_int32 tv_usec;
  } osi_timeval_t;
  #else
  typedef struct timeval osi_timeval_t;
  #endif /* AFS_SGI61_ENV */
  
  #define osi_getpid() 		getpid()
  
  /*
   * osi_ThreadUnique() should yield a value that can be found in ps
   * output in order to draw correspondences between ICL traces and what
--- 188,208 ----
    * In 64 bit HP-UX the timeval structure has a 64 bit member.
    */
  
! #if defined(AFS_HPUX_ENV) || defined(AFS_LINUX_64BIT_KERNEL) || (defined(AFS_SGI61_ENV) && defined(KERNEL) && defined(_K64U64))
  typedef struct {
      afs_int32 tv_sec;
      afs_int32 tv_usec;
  } osi_timeval_t;
+ #elif defined(AFS_SUN57_ENV)
+ typedef struct timeval32 osi_timeval_t;
  #else
  typedef struct timeval osi_timeval_t;
  #endif /* AFS_SGI61_ENV */
  
  #define osi_getpid() 		getpid()
  
+ #define osi_getpid() 		getpid()
+ 
  /*
   * osi_ThreadUnique() should yield a value that can be found in ps
   * output in order to draw correspondences between ICL traces and what
***************
*** 272,277 ****
--- 283,293 ----
   * and kernel space. Call these to avoid taking page faults while
   * holding the global lock.
   */
+ #ifdef CAST_USER_ADDR_T
+ #define __U(X) CAST_USER_ADDR_T((X))
+ #else
+ #define __U(X) (X)
+ #endif
  #ifdef AFS_GLOBAL_SUNLOCK
  
  #define AFS_COPYIN(SRC,DST,LEN,CODE)				\
***************
*** 279,285 ****
  	    int haveGlock = ISAFS_GLOCK();			\
  	    if (haveGlock)					\
  		AFS_GUNLOCK();					\
! 	    CODE = copyin((SRC),(DST),(LEN));			\
  	    if (haveGlock)					\
  		AFS_GLOCK();					\
  	} while(0)
--- 295,301 ----
  	    int haveGlock = ISAFS_GLOCK();			\
  	    if (haveGlock)					\
  		AFS_GUNLOCK();					\
! 	    CODE = copyin(__U((SRC)),(DST),(LEN));			\
  	    if (haveGlock)					\
  		AFS_GLOCK();					\
  	} while(0)
***************
*** 289,295 ****
  	    int haveGlock = ISAFS_GLOCK();			\
  	    if (haveGlock)					\
  		AFS_GUNLOCK();					\
! 	    CODE = copyinstr((SRC),(DST),(LEN),(CNT));		\
  	    if (haveGlock)					\
  		AFS_GLOCK();					\
  	} while(0)
--- 305,311 ----
  	    int haveGlock = ISAFS_GLOCK();			\
  	    if (haveGlock)					\
  		AFS_GUNLOCK();					\
! 	    CODE = copyinstr(__U((SRC)),(DST),(LEN),(CNT));		\
  	    if (haveGlock)					\
  		AFS_GLOCK();					\
  	} while(0)
***************
*** 299,309 ****
  	    int haveGlock = ISAFS_GLOCK();			\
  	    if (haveGlock)					\
  		AFS_GUNLOCK();					\
! 	    CODE = copyout((SRC),(DST),(LEN));			\
  	    if (haveGlock)					\
  		AFS_GLOCK();					\
  	} while(0)
  
  #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
  #define AFS_UIOMOVE(SRC,LEN,RW,UIO,CODE)			\
  	do {							\
--- 315,337 ----
  	    int haveGlock = ISAFS_GLOCK();			\
  	    if (haveGlock)					\
  		AFS_GUNLOCK();					\
! 	    CODE = copyout((SRC),__U((DST)),(LEN));			\
  	    if (haveGlock)					\
  		AFS_GLOCK();					\
  	} while(0)
  
+ #if defined(AFS_DARWIN80_ENV)
+ #define AFS_UIOMOVE(SRC,LEN,RW,UIO,CODE)			\
+ 	do {							\
+ 	    int haveGlock = ISAFS_GLOCK();			\
+ 	    if (haveGlock)					\
+ 		AFS_GUNLOCK();					\
+ 	    uio_setrw((UIO),(RW));				\
+ 	    CODE = uiomove((SRC),(LEN),(UIO));			\
+ 	    if (haveGlock)					\
+ 		AFS_GLOCK();					\
+ 	} while(0)
+ #else
  #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
  #define AFS_UIOMOVE(SRC,LEN,RW,UIO,CODE)			\
  	do {							\
***************
*** 326,349 ****
  		AFS_GLOCK();					\
  	} while(0)
  #endif
  
  #else /* AFS_GLOBAL_SUNLOCK */
  
  #define AFS_COPYIN(SRC,DST,LEN,CODE)				\
  	do {							\
! 	    CODE = copyin((SRC),(DST),(LEN));			\
  	} while(0)
  
  #define AFS_COPYINSTR(SRC,DST,LEN,CNT,CODE)			\
  	do {							\
! 	    CODE = copyinstr((SRC),(DST),(LEN),(CNT));		\
  	} while(0)
  
  #define AFS_COPYOUT(SRC,DST,LEN,CODE)				\
  	do {							\
! 	    CODE = copyout((SRC),(DST),(LEN));			\
  	} while(0)
  
  #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
  #define AFS_UIOMOVE(SRC,LEN,RW,UIO,CODE)			\
  	do {							\
--- 354,385 ----
  		AFS_GLOCK();					\
  	} while(0)
  #endif
+ #endif /* AFS_DARWIN80_ENV */
  
  #else /* AFS_GLOBAL_SUNLOCK */
  
  #define AFS_COPYIN(SRC,DST,LEN,CODE)				\
  	do {							\
! 	    CODE = copyin(__U((SRC)),(DST),(LEN));			\
  	} while(0)
  
  #define AFS_COPYINSTR(SRC,DST,LEN,CNT,CODE)			\
  	do {							\
! 	    CODE = copyinstr(__U((SRC)),(DST),(LEN),(CNT));		\
  	} while(0)
  
  #define AFS_COPYOUT(SRC,DST,LEN,CODE)				\
  	do {							\
! 	    CODE = copyout((SRC),__U((DST)),(LEN));			\
  	} while(0)
  
+ #if defined(AFS_DARWIN80_ENV)
+ #define AFS_UIOMOVE(SRC,LEN,RW,UIO,CODE)			\
+ 	do {							\
+ 	    uio_setrw((UIO),(RW));				\
+ 	    CODE = uiomove((SRC),(LEN),(UIO));			\
+ 	} while(0)
+ #else /* AFS_OSF_ENV || AFS_FBSD_ENV */
  #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
  #define AFS_UIOMOVE(SRC,LEN,RW,UIO,CODE)			\
  	do {							\
***************
*** 356,364 ****
--- 392,414 ----
  	    CODE = uiomove((SRC),(LEN),(RW),(UIO));		\
  	} while(0)
  #endif /* AFS_OSF_ENV || AFS_FBSD_ENV */
+ #endif /* AFS_DARWIN80_ENV */
  
  #endif /* AFS_GLOBAL_SUNLOCK */
  
+ #ifdef AFS_DARWIN80_ENV
+ #define AFS_UIO_OFFSET(uio) (int)uio_offset(uio)
+ #define AFS_UIO_RESID(uio) (int)uio_resid(uio)
+ #define AFS_UIO_SETOFFSET(uio, off) uio_setoffset(uio, off)
+ #define AFS_UIO_SETRESID(uio, val) uio_setresid(uio, val)
+ #else
+ #define AFS_UIO_OFFSET(uio) (uio)->uio_offset
+ #define AFS_UIO_RESID(uio) (uio)->uio_resid
+ #define AFS_UIO_SETOFFSET(uio, off) (uio)->uio_offset = off
+ #define AFS_UIO_SETRESID(uio, val) (uio)->uio_resid = val
+ #endif
+ 
+ 
  /*
   * encapsulation of kernel data structure accesses
   */
Index: openafs/src/afs/afs_osi_pag.c
diff -c openafs/src/afs/afs_osi_pag.c:1.21.2.4 openafs/src/afs/afs_osi_pag.c:1.21.2.5
*** openafs/src/afs/afs_osi_pag.c:1.21.2.4	Mon May 23 17:09:37 2005
--- openafs/src/afs/afs_osi_pag.c	Wed Oct  5 01:58:27 2005
***************
*** 23,29 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi_pag.c,v 1.21.2.4 2005/05/23 21:09:37 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 23,29 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi_pag.c,v 1.21.2.5 2005/10/05 05:58:27 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 241,246 ****
--- 241,252 ----
  	code = AddPag(genpag(), &credp);
  	crfree(credp);
      }
+ #elif defined(AFS_DARWIN80_ENV)
+     {
+ 	struct ucred *credp = kauth_cred_proc_ref(p);
+ 	code = AddPag(p, genpag(), &credp);
+ 	kauth_cred_rele(credp);
+     }
  #elif defined(AFS_DARWIN_ENV)
      {
  	struct ucred *credp = crdup(p->p_cred->pc_ucred);
Index: openafs/src/afs/afs_osi_uio.c
diff -c openafs/src/afs/afs_osi_uio.c:1.8 openafs/src/afs/afs_osi_uio.c:1.8.2.2
*** openafs/src/afs/afs_osi_uio.c:1.8	Tue Jul 15 19:14:12 2003
--- openafs/src/afs/afs_osi_uio.c	Wed Oct 12 02:17:25 2005
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi_uio.c,v 1.8 2003/07/15 23:14:12 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_uio.c,v 1.8.2.2 2005/10/12 06:17:25 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 25,30 ****
--- 25,31 ----
   * UIO routines
   */
  
+ #ifndef AFS_DARWIN80_ENV
  /* routine to make copy of uio structure in ainuio, using aoutvec for space */
  int
  afsio_copy(struct uio *ainuio, struct uio *aoutuio,
***************
*** 76,81 ****
--- 77,83 ----
      }
      return 0;
  }
+ #endif
  
  /* skip asize bytes in the current uio structure */
  int
***************
*** 85,90 ****
--- 87,95 ----
      register int cnt;
  
      AFS_STATCNT(afsio_skip);
+ #ifdef AFS_DARWIN80_ENV
+     uio_update(auio, asize);
+ #else
      /* It isn't guaranteed that multiple iovecs work ok (hasn't been tested!) */
      while (asize > 0 && auio->afsio_resid) {
  	tv = auio->afsio_iov;
***************
*** 99,106 ****
  	tv->iov_base = (char *)(tv->iov_base) + cnt;
  	tv->iov_len -= cnt;
  	auio->uio_resid -= cnt;
! 	auio->uio_offset += cnt;
  	asize -= cnt;
      }
      return 0;
  }
--- 104,112 ----
  	tv->iov_base = (char *)(tv->iov_base) + cnt;
  	tv->iov_len -= cnt;
  	auio->uio_resid -= cnt;
! 	auio->afsio_offset += cnt;
  	asize -= cnt;
      }
+ #endif
      return 0;
  }
Index: openafs/src/afs/afs_osi_vget.c
diff -c openafs/src/afs/afs_osi_vget.c:1.10 openafs/src/afs/afs_osi_vget.c:1.10.2.1
*** openafs/src/afs/afs_osi_vget.c:1.10	Tue Jul 15 19:14:12 2003
--- openafs/src/afs/afs_osi_vget.c	Wed Oct  5 01:58:27 2005
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi_vget.c,v 1.10 2003/07/15 23:14:12 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osi_vget.c,v 1.10.2.1 2005/10/05 05:58:27 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 23,29 ****
  
  
  
! #if !defined(AFS_LINUX20_ENV)
  /* This is the common part of the vget VFS call. */
  int
  afs_osi_vget(struct vcache **avcpp, struct fid *afidp, struct vrequest *areqp)
--- 23,29 ----
  
  
  
! #if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN80_ENV)
  /* This is the common part of the vget VFS call. */
  int
  afs_osi_vget(struct vcache **avcpp, struct fid *afidp, struct vrequest *areqp)
Index: openafs/src/afs/afs_osidnlc.c
diff -c openafs/src/afs/afs_osidnlc.c:1.8 openafs/src/afs/afs_osidnlc.c:1.8.2.5
*** openafs/src/afs/afs_osidnlc.c:1.8	Tue Jul 15 19:14:12 2003
--- openafs/src/afs/afs_osidnlc.c	Fri Feb 17 23:09:33 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_osidnlc.c,v 1.8 2003/07/15 23:14:12 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_osidnlc.c,v 1.8.2.5 2006/02/18 04:09:33 shadow Exp $");
  
  #include "afs/sysincludes.h"	/*Standard vendor system headers */
  #include "afsincludes.h"	/*AFS-based standard headers */
***************
*** 197,202 ****
--- 197,205 ----
      char *ts = aname;
      struct nc *tnc, *tnc1 = 0;
      int safety;
+ #ifdef AFS_DARWIN80_ENV
+     vnode_t tvp;
+ #endif
  
      if (!afs_usednlc)
  	return 0;
***************
*** 239,249 ****
--- 242,277 ----
  	ReleaseReadLock(&afs_xvcache);
  	dnlcstats.misses++;
      } else {
+ 	if (tvc->states & CVInit) {
+ 	    ReleaseReadLock(&afs_xvcache);
+ 	    dnlcstats.misses++;
+ 	    osi_dnlc_remove(adp, aname, tvc);
+ 	    return 0;
+ 	}
  #ifdef	AFS_OSF_ENV
  	VN_HOLD((vnode_t *) tvc);
  #else
+ #ifdef AFS_DARWIN80_ENV
+ 	tvp = AFSTOV(tvc);
+ 	if (vnode_get(tvp)) {
+ 	    ReleaseReadLock(&afs_xvcache);
+ 	    dnlcstats.misses++;
+ 	    osi_dnlc_remove(adp, aname, tvc);
+ 	    return 0;
+ 	}
+ 	if (vnode_ref(tvp)) {
+ 	    ReleaseReadLock(&afs_xvcache);
+ 	    AFS_GUNLOCK();
+ 	    vnode_put(tvp);
+ 	    AFS_GLOCK();
+ 	    dnlcstats.misses++;
+ 	    osi_dnlc_remove(adp, aname, tvc);
+ 	    return 0;
+ 	}
+ #else
  	osi_vnhold(tvc, 0);
  #endif
+ #endif
  	ReleaseReadLock(&afs_xvcache);
  
  #ifdef	notdef
***************
*** 364,369 ****
--- 392,406 ----
      int i;
      int writelocked;
  
+ #ifdef AFS_DARWIN_ENV
+     if (!(adp->states & (CVInit | CVFlushed
+ #ifdef AFS_DARWIN80_ENV
+                         | CDeadVnode
+ #endif
+         )) && AFSTOV(adp))
+     cache_purge(AFSTOV(adp));
+ #endif
+ 
      if (!afs_usednlc)
  	return 0;
  
***************
*** 394,399 ****
--- 431,445 ----
      int i;
      int writelocked;
  
+ #ifdef AFS_DARWIN_ENV
+     if (!(avc->states & (CVInit | CVFlushed
+ #ifdef AFS_DARWIN80_ENV
+                         | CDeadVnode
+ #endif
+         )) && AFSTOV(avc))
+     cache_purge(AFSTOV(avc));
+ #endif
+ 
      if (!afs_usednlc)
  	return 0;
  
Index: openafs/src/afs/afs_pioctl.c
diff -c openafs/src/afs/afs_pioctl.c:1.81.2.18.2.1 openafs/src/afs/afs_pioctl.c:1.81.2.25
*** openafs/src/afs/afs_pioctl.c:1.81.2.18.2.1	Fri Oct 14 21:44:50 2005
--- openafs/src/afs/afs_pioctl.c	Thu Mar  2 01:44:05 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_pioctl.c,v 1.81.2.18.2.1 2005/10/15 01:44:50 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.25 2006/03/02 06:44:05 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #ifdef AFS_OBSD_ENV
***************
*** 430,436 ****
     interface call.
     */
  /* AFS_HPUX102 and up uses VNODE ioctl instead */
! #ifndef AFS_HPUX102_ENV
  #if !defined(AFS_SGI_ENV)
  #ifdef	AFS_AIX32_ENV
  #ifdef AFS_AIX51_ENV
--- 430,436 ----
     interface call.
     */
  /* AFS_HPUX102 and up uses VNODE ioctl instead */
! #if !defined(AFS_HPUX102_ENV) && !defined(AFS_DARWIN80_ENV)
  #if !defined(AFS_SGI_ENV)
  #ifdef	AFS_AIX32_ENV
  #ifdef AFS_AIX51_ENV
***************
*** 817,825 ****
--- 817,831 ----
      } *uap = (struct a *)args;
  
      AFS_STATCNT(afs_pioctl);
+ #ifdef AFS_DARWIN80_ENV
+     return (afs_syscall_pioctl
+ 	    (uap->path, uap->cmd, uap->cmarg, uap->follow,
+ 	     kauth_cred_get()));
+ #else
      return (afs_syscall_pioctl
  	    (uap->path, uap->cmd, uap->cmarg, uap->follow,
  	     p->p_cred->pc_ucred));
+ #endif
  }
  
  #endif
***************
*** 1466,1473 ****
--- 1472,1481 ----
  #else
  	struct proc *p = curproc;	/* XXX */
  #endif
+ #ifndef AFS_DARWIN80_ENV
  	uprintf("Process %d (%s) tried to change pags in PSetTokens\n",
  		p->p_pid, p->p_comm);
+ #endif
  	if (!setpag(p, acred, -1, &pag, 1)) {
  #else
  #ifdef	AFS_OSF_ENV
***************
*** 2540,2545 ****
--- 2548,2557 ----
      register struct vcache *tvc;
      register struct volume *tv;
      afs_int32 cell, volume;
+     struct afs_q *tq, *uq;
+ #ifdef AFS_DARWIN80_ENV
+     vnode_t vp;
+ #endif
  
      AFS_STATCNT(PFlushVolumeData);
      if (!avc)
***************
*** 2554,2572 ****
       * Clear stat'd flag from all vnodes from this volume; this will invalidate all
       * the vcaches associated with the volume.
       */
      ObtainReadLock(&afs_xvcache);
      i = VCHashV(&avc->fid);
!     for (tvc = afs_vhashT[i]; tvc; tvc = tvc->vhnext) {
  	    if (tvc->fid.Fid.Volume == volume && tvc->fid.Cell == cell) {
! #if	defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV)  || defined(AFS_SUN5_ENV)  || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV)
  		VN_HOLD(AFSTOV(tvc));
  #else
  #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
  		osi_vnhold(tvc, 0);
  #else
  		VREFCOUNT_INC(tvc); /* AIX, apparently */
  #endif
  #endif
  		ReleaseReadLock(&afs_xvcache);
  #ifdef AFS_BOZONLOCK_ENV
  		afs_BozonLock(&tvc->pvnLock, tvc);	/* Since afs_TryToSmush will do a pvn_vptrunc */
--- 2566,2611 ----
       * Clear stat'd flag from all vnodes from this volume; this will invalidate all
       * the vcaches associated with the volume.
       */
+  loop:
      ObtainReadLock(&afs_xvcache);
      i = VCHashV(&avc->fid);
!     for (tq = afs_vhashTV[i].prev; tq != &afs_vhashTV[i]; tq = uq) {
! 	    uq = QPrev(tq);
! 	    tvc = QTOVH(tq);
  	    if (tvc->fid.Fid.Volume == volume && tvc->fid.Cell == cell) {
!                 if (tvc->states & CVInit) {
!                     ReleaseReadLock(&afs_xvcache);
!                     afs_osi_Sleep(&tvc->states);
!                     goto loop;
!                 }
! #ifdef AFS_DARWIN80_ENV
!                 if (tvc->states & CDeadVnode) {
!                     ReleaseReadLock(&afs_xvcache);
!                     afs_osi_Sleep(&tvc->states);
!                     goto loop;
!                 }
! #endif
! #if	defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV)  || defined(AFS_SUN5_ENV)  || defined(AFS_HPUX_ENV) || defined(AFS_LINUX20_ENV) 
  		VN_HOLD(AFSTOV(tvc));
  #else
+ #ifdef AFS_DARWIN80_ENV
+ 		vp = AFSTOV(tvc);
+ 		if (vnode_get(vp))
+ 		    continue;
+ 		if (vnode_ref(vp)) {
+ 		    AFS_GUNLOCK();
+ 		    vnode_put(vp);
+ 		    AFS_GLOCK();
+ 		    continue;
+ 		}
+ #else
  #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
  		osi_vnhold(tvc, 0);
  #else
  		VREFCOUNT_INC(tvc); /* AIX, apparently */
  #endif
  #endif
+ #endif
  		ReleaseReadLock(&afs_xvcache);
  #ifdef AFS_BOZONLOCK_ENV
  		afs_BozonLock(&tvc->pvnLock, tvc);	/* Since afs_TryToSmush will do a pvn_vptrunc */
***************
*** 2584,2590 ****
--- 2623,2633 ----
  #ifdef AFS_BOZONLOCK_ENV
  		afs_BozonUnlock(&tvc->pvnLock, tvc);
  #endif
+ #ifdef AFS_DARWIN80_ENV
+ 		vnode_put(AFSTOV(tvc));
+ #endif
  		ObtainReadLock(&afs_xvcache);
+ 		uq = QPrev(tq);
  		/* our tvc ptr is still good until now */
  		AFS_FAST_RELE(tvc);
  	    }
Index: openafs/src/afs/afs_prototypes.h
diff -c openafs/src/afs/afs_prototypes.h:1.53.2.11 openafs/src/afs/afs_prototypes.h:1.53.2.16
*** openafs/src/afs/afs_prototypes.h:1.53.2.11	Tue Jul 12 13:49:45 2005
--- openafs/src/afs/afs_prototypes.h	Fri Feb 17 23:59:31 2006
***************
*** 531,537 ****
  
  
  /* ARCH/osi_misc.c */
- extern void osi_iput(struct inode *ip);
  extern void afs_osi_SetTime(osi_timeval_t * atv);
  
  /* LINUX/osi_misc.c */
--- 531,536 ----
***************
*** 812,826 ****
  extern afs_int32 afs_maxvcount;
  extern afs_int32 afs_vcount;
  extern int afsvnumbers;
  extern afs_rwlock_t afs_xvcache;
  extern afs_lock_t afs_xvcb;
  extern struct afs_q VLRU;
  extern afs_int32 vcachegen;
  extern unsigned int afs_paniconwarn;
! extern struct vcache *afs_vhashT[VCSIZE];
  extern afs_int32 afs_bulkStatsLost;
  extern int afs_norefpanic;
  
  void afs_vcacheInit(int astatSize);
  extern struct vcache *afs_FindVCache(struct VenusFid *afid, afs_int32 * retry,
  				     afs_int32 flag);
--- 811,828 ----
  extern afs_int32 afs_maxvcount;
  extern afs_int32 afs_vcount;
  extern int afsvnumbers;
+ extern afs_rwlock_t afs_xvreclaim;
  extern afs_rwlock_t afs_xvcache;
  extern afs_lock_t afs_xvcb;
  extern struct afs_q VLRU;
  extern afs_int32 vcachegen;
  extern unsigned int afs_paniconwarn;
! extern struct afs_q afs_vhashTV[VCSIZE];
  extern afs_int32 afs_bulkStatsLost;
  extern int afs_norefpanic;
+ extern struct vcache *ReclaimedVCList;
  
+ extern void afs_FlushReclaimedVcaches(void);
  void afs_vcacheInit(int astatSize);
  extern struct vcache *afs_FindVCache(struct VenusFid *afid, afs_int32 * retry,
  				     afs_int32 flag);
Index: openafs/src/afs/afs_server.c
diff -c openafs/src/afs/afs_server.c:1.33.2.6 openafs/src/afs/afs_server.c:1.33.2.7
*** openafs/src/afs/afs_server.c:1.33.2.6	Thu Aug  4 16:05:15 2005
--- openafs/src/afs/afs_server.c	Wed Oct  5 01:58:27 2005
***************
*** 33,39 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_server.c,v 1.33.2.6 2005/08/04 20:05:15 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.7 2005/10/05 05:58:27 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 1139,1162 ****
  void
  afsi_SetServerIPRank(sa, ifa)
       struct srvAddr *sa;
       struct ifaddr *ifa;
  {
      struct sockaddr_in *sin;
      int t;
  
      afs_uint32 subnetmask, myAddr, myNet, myDstaddr, mySubnet, netMask;
      afs_uint32 serverAddr;
  
!     if (ifa->ifa_addr->sa_family != AF_INET)
  	return;
!     sin = (struct sockaddr_in *)ifa->ifa_addr;
!     myAddr = ntohl(sin->sin_addr.s_addr);	/* one of my IP addr in host order */
      serverAddr = ntohl(sa->sa_ip);	/* server's IP addr in host order */
!     sin = (struct sockaddr_in *)ifa->ifa_netmask;
!     subnetmask = ntohl(sin->sin_addr.s_addr);	/* subnet mask in host order */
!     sin = (struct sockaddr_in *)ifa->ifa_dstaddr;
!     if (sin)
  	myDstaddr = sin->sin_addr.s_addr;
  
      if (IN_CLASSA(myAddr))
  	netMask = IN_CLASSA_NET;
--- 1139,1181 ----
  void
  afsi_SetServerIPRank(sa, ifa)
       struct srvAddr *sa;
+ #ifdef AFS_DARWIN80_ENV
+      ifaddr_t ifa;
+ #else
       struct ifaddr *ifa;
+ #endif
  {
+     struct sockaddr sout;
      struct sockaddr_in *sin;
      int t;
  
      afs_uint32 subnetmask, myAddr, myNet, myDstaddr, mySubnet, netMask;
      afs_uint32 serverAddr;
  
!     if (ifaddr_address_family(ifa) != AF_INET)
  	return;
!     t = ifaddr_address(ifa, &sout, sizeof(sout));
!     if (t == 0) {
! 	sin = (struct sockaddr_in *)&sout;
! 	myAddr = ntohl(sin->sin_addr.s_addr);	/* one of my IP addr in host order */
!     } else {
! 	myAddr = 0;
!     }
      serverAddr = ntohl(sa->sa_ip);	/* server's IP addr in host order */
!     t = ifaddr_netmask(ifa, &sout, sizeof(sout));
!     if (t == 0) {
! 	sin = (struct sockaddr_in *)&sout;
! 	subnetmask = ntohl(sin->sin_addr.s_addr);	/* subnet mask in host order */
!     } else {
! 	subnetmask = 0;
!     }
!     t = ifaddr_dstaddress(ifa, &sout, sizeof(sout));
!     if (t == 0) {
! 	sin = (struct sockaddr_in *)&sout;
  	myDstaddr = sin->sin_addr.s_addr;
+     } else {
+ 	myDstaddr = 0;
+     }
  
      if (IN_CLASSA(myAddr))
  	netMask = IN_CLASSA_NET;
***************
*** 1175,1194 ****
  	    if (serverAddr == myAddr) {	/* same machine */
  		sa->sa_iprank = afs_min(sa->sa_iprank, TOPR);
  	    } else {		/* same subnet */
! 		sa->sa_iprank = afs_min(sa->sa_iprank, HI + ifa->ifa_metric);
  	    }
  	} else {		/* same net */
! 	    sa->sa_iprank = afs_min(sa->sa_iprank, MED + ifa->ifa_metric);
  	}
      }
  #ifdef  IFF_POINTTOPOINT
      /* check for case #4 -- point-to-point link */
!     if ((ifa->ia_ifp->if_flags & IFF_POINTOPOINT)
  	&& (myDstaddr == serverAddr)) {
! 	if (ifa->ia_ifp->if_metric >= (MAXDEFRANK - MED) / PPWEIGHT)
  	    t = MAXDEFRANK;
  	else
! 	    t = MED + (PPWEIGHT << ifa->->ifa_metric);
  	if (sa->sa_iprank > t)
  	    sa->sa_iprank = t;
  	}
--- 1194,1213 ----
  	    if (serverAddr == myAddr) {	/* same machine */
  		sa->sa_iprank = afs_min(sa->sa_iprank, TOPR);
  	    } else {		/* same subnet */
! 		sa->sa_iprank = afs_min(sa->sa_iprank, HI + ifnet_metric(ifaddr_ifnet(ifa)));
  	    }
  	} else {		/* same net */
! 	    sa->sa_iprank = afs_min(sa->sa_iprank, MED + ifnet_metric(ifaddr_ifnet(ifa)));
  	}
      }
  #ifdef  IFF_POINTTOPOINT
      /* check for case #4 -- point-to-point link */
!     if ((ifnet_flags(ifaddr_ifnet(ifa)) & IFF_POINTOPOINT)
  	&& (myDstaddr == serverAddr)) {
! 	if (ifnet_metric(ifaddr_ifnet(ifa)) >= (MAXDEFRANK - MED) / PPWEIGHT)
  	    t = MAXDEFRANK;
  	else
! 	    t = MED + (PPWEIGHT << ifnet_metric(ifaddr_ifnet(ifa)));
  	if (sa->sa_iprank > t)
  	    sa->sa_iprank = t;
  	}
***************
*** 1361,1366 ****
--- 1380,1399 ----
  #ifdef AFS_SGI62_ENV
      (void)hash_enum(&hashinfo_inaddr, afsi_enum_set_rank, HTF_INET, NULL,
  		    (caddr_t) sa, NULL);
+ #elif defined(AFS_DARWIN80_ENV)
+     {
+ 	errno_t t;
+ 	int cnt=0;
+ 	ifaddr_t *addresses, address;
+ 	t = ifnet_get_address_list_family(NULL, &addresses, AF_INET);
+ 	if (t == 0) {
+ 	    while(addresses[cnt] != NULL) {
+ 		afsi_SetServerIPRank(sa, address);
+ 		cnt++;
+ 	    }
+ 	    ifnet_free_address_list(addresses);
+ 	}
+     }
  #elif defined(AFS_DARWIN60_ENV)
      {
  	struct ifnet *ifn;
Index: openafs/src/afs/afs_util.c
diff -c openafs/src/afs/afs_util.c:1.17.2.1 openafs/src/afs/afs_util.c:1.17.2.3
*** openafs/src/afs/afs_util.c:1.17.2.1	Tue Dec  7 01:12:12 2004
--- openafs/src/afs/afs_util.c	Thu Mar  9 01:41:33 2006
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_util.c,v 1.17.2.1 2004/12/07 06:12:12 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
--- 16,22 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_util.c,v 1.17.2.3 2006/03/09 06:41:33 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 262,280 ****
      register int i;
  
      afs_warn("Looking for locked data structures.\n");
!     afs_warn("conn %x, volume %x, user %x, cell %x, server %x\n", afs_xconn,
! 	     afs_xvolume, afs_xuser, afs_xcell, afs_xserver);
      {
  	register struct vcache *tvc;
  	AFS_STATCNT(afs_CheckLocks);
  
  	for (i = 0; i < VCSIZE; i++) {
  	    for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
  #ifdef	AFS_OSF_ENV
  		if (VREFCOUNT(tvc) > 1)
  #else /* AFS_OSF_ENV */
  		if (VREFCOUNT(tvc))
  #endif
  		    afs_warn("Stat cache entry at %x is held\n", tvc);
  		if (CheckLock(&tvc->lock))
  		    afs_warn("Stat entry at %x is locked\n", tvc);
--- 262,285 ----
      register int i;
  
      afs_warn("Looking for locked data structures.\n");
!     afs_warn("conn %lx, volume %lx, user %lx, cell %lx, server %lx\n", &afs_xconn,
! 	     &afs_xvolume, &afs_xuser, &afs_xcell, &afs_xserver);
      {
  	register struct vcache *tvc;
  	AFS_STATCNT(afs_CheckLocks);
  
  	for (i = 0; i < VCSIZE; i++) {
  	    for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
+                 if (tvc->states & CVInit) continue;
  #ifdef	AFS_OSF_ENV
  		if (VREFCOUNT(tvc) > 1)
  #else /* AFS_OSF_ENV */
+ #ifdef AFS_DARWIN80_ENV
+ 		if (vnode_isinuse(AFSTOV(tvc), 0))
+ #else
  		if (VREFCOUNT(tvc))
  #endif
+ #endif
  		    afs_warn("Stat cache entry at %x is held\n", tvc);
  		if (CheckLock(&tvc->lock))
  		    afs_warn("Stat entry at %x is locked\n", tvc);
Index: openafs/src/afs/afs_vcache.c
diff -c openafs/src/afs/afs_vcache.c:1.65.2.21 openafs/src/afs/afs_vcache.c:1.65.2.44
*** openafs/src/afs/afs_vcache.c:1.65.2.21	Mon Jul 11 15:29:55 2005
--- openafs/src/afs/afs_vcache.c	Fri Feb 17 23:54:50 2006
***************
*** 39,45 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_vcache.c,v 1.65.2.21 2005/07/11 19:29:55 shadow Exp $");
  
  #include "afs/sysincludes.h"	/*Standard vendor system headers */
  #include "afsincludes.h"	/*AFS-based standard headers */
--- 39,45 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_vcache.c,v 1.65.2.44 2006/02/18 04:54:50 shadow Exp $");
  
  #include "afs/sysincludes.h"	/*Standard vendor system headers */
  #include "afsincludes.h"	/*AFS-based standard headers */
***************
*** 62,77 ****
  
  /* Exported variables */
  afs_rwlock_t afs_xvcache;	/*Lock: alloc new stat cache entries */
  afs_lock_t afs_xvcb;		/*Lock: fids on which there are callbacks */
  #if !defined(AFS_LINUX22_ENV)
  static struct vcache *freeVCList;	/*Free list for stat cache entries */
  static struct vcache *Initial_freeVCList;	/*Initial list for above */
  #endif
  struct afs_q VLRU;		/*vcache LRU */
  afs_int32 vcachegen = 0;
  unsigned int afs_paniconwarn = 0;
  struct vcache *afs_vhashT[VCSIZE];
! struct vcache *afs_vhashTV[VCSIZE];
  static struct afs_cbr *afs_cbrHashT[CBRSIZE];
  afs_int32 afs_bulkStatsLost;
  int afs_norefpanic = 0;
--- 62,79 ----
  
  /* Exported variables */
  afs_rwlock_t afs_xvcache;	/*Lock: alloc new stat cache entries */
+ afs_rwlock_t afs_xvreclaim;	/*Lock: entries reclaimed, not on free list */
  afs_lock_t afs_xvcb;		/*Lock: fids on which there are callbacks */
  #if !defined(AFS_LINUX22_ENV)
  static struct vcache *freeVCList;	/*Free list for stat cache entries */
+ struct vcache *ReclaimedVCList;	/*Reclaimed list for stat entries */
  static struct vcache *Initial_freeVCList;	/*Initial list for above */
  #endif
  struct afs_q VLRU;		/*vcache LRU */
  afs_int32 vcachegen = 0;
  unsigned int afs_paniconwarn = 0;
  struct vcache *afs_vhashT[VCSIZE];
! struct afs_q afs_vhashTV[VCSIZE];
  static struct afs_cbr *afs_cbrHashT[CBRSIZE];
  afs_int32 afs_bulkStatsLost;
  int afs_norefpanic = 0;
***************
*** 132,139 ****
  afs_FlushVCache(struct vcache *avc, int *slept)
  {				/*afs_FlushVCache */
  
!     afs_int32 i, code, j;
!     struct vcache **uvc, *wvc, **uvc2, *wvc2;
  
      *slept = 0;
      AFS_STATCNT(afs_FlushVCache);
--- 134,141 ----
  afs_FlushVCache(struct vcache *avc, int *slept)
  {				/*afs_FlushVCache */
  
!     afs_int32 i, code;
!     struct vcache **uvc, *wvc;
  
      *slept = 0;
      AFS_STATCNT(afs_FlushVCache);
***************
*** 161,167 ****
      avc->states |= CVFlushed;
      /* pull the entry out of the lruq and put it on the free list */
      QRemove(&avc->vlruq);
-     avc->vlruq.prev = avc->vlruq.next = (struct afs_q *)0;
  
      /* keep track of # of files that we bulk stat'd, but never used
       * before they got recycled.
--- 163,168 ----
***************
*** 181,197 ****
      }
  
      /* remove entry from the volume hash table */
!     j = VCHashV(&avc->fid);
!     uvc2 = &afs_vhashTV[j];
!     for (wvc2 = *uvc2; wvc2; uvc2 = &wvc2->vhnext, wvc2 = *uvc2) {
!         if (avc == wvc2) {
!             *uvc2 = avc->vhnext;
!             avc->vhnext = (struct vcache *)NULL;
!             break;
!         }
!     }
!     if (!wvc || !wvc2)
! 	osi_Panic("flushvcache");	/* not in correct hash bucket */
      if (avc->mvid)
  	osi_FreeSmallSpace(avc->mvid);
      avc->mvid = (struct VenusFid *)0;
--- 182,189 ----
      }
  
      /* remove entry from the volume hash table */
!     QRemove(&avc->vhashq);
! 
      if (avc->mvid)
  	osi_FreeSmallSpace(avc->mvid);
      avc->mvid = (struct VenusFid *)0;
***************
*** 203,212 ****
      /* OK, there are no internal vrefCounts, so there shouldn't
       * be any more refs here. */
      if (avc->v) {
  	avc->v->v_data = NULL;	/* remove from vnode */
! 	avc->v = NULL;		/* also drop the ptr to vnode */
      }
  #endif
      afs_FreeAllAxs(&(avc->Access));
  
      /* we can't really give back callbacks on RO files, since the
--- 195,213 ----
      /* OK, there are no internal vrefCounts, so there shouldn't
       * be any more refs here. */
      if (avc->v) {
+ #ifdef AFS_DARWIN80_ENV
+ 	vnode_clearfsnode(AFSTOV(avc));
+         vnode_removefsref(AFSTOV(avc));
+ #else
  	avc->v->v_data = NULL;	/* remove from vnode */
! #endif
! 	AFSTOV(avc) = NULL;             /* also drop the ptr to vnode */
      }
  #endif
+ #ifdef AFS_SUN510_ENV
+     /* As we use private vnodes, cleanup is up to us */
+     vn_reinit(AFSTOV(avc));
+ #endif
      afs_FreeAllAxs(&(avc->Access));
  
      /* we can't really give back callbacks on RO files, since the
***************
*** 247,253 ****
      /* This should put it back on the vnode free list since usecount is 1 */
      afs_vcount--;
      vSetType(avc, VREG);
!     if (VREFCOUNT(avc) > 0) {
  #if defined(AFS_OSF_ENV)
  	VN_UNLOCK(AFSTOV(avc));
  #endif
--- 248,254 ----
      /* This should put it back on the vnode free list since usecount is 1 */
      afs_vcount--;
      vSetType(avc, VREG);
!     if (VREFCOUNT_GT(avc,0)) {
  #if defined(AFS_OSF_ENV)
  	VN_UNLOCK(AFSTOV(avc));
  #endif
***************
*** 576,581 ****
--- 577,626 ----
      MReleaseWriteLock(&afs_xvcb);
  }
  
+ void 
+ afs_FlushReclaimedVcaches(void)
+ {
+ #if !defined(AFS_LINUX22_ENV)
+     struct vcache *tvc;
+     int code, fv_slept;
+     struct vcache *tmpReclaimedVCList = NULL;	
+ 
+     ObtainWriteLock(&afs_xvreclaim, 76);
+     while (ReclaimedVCList) {
+ 	tvc = ReclaimedVCList;	/* take from free list */
+ 	ReclaimedVCList = tvc->nextfree;
+ 	tvc->nextfree = NULL;
+ 	code = afs_FlushVCache(tvc, &fv_slept);
+ 	if (code) {
+ 	    /* Ok, so, if we got code != 0, uh, wtf do we do? */
+ 	    /* Probably, build a temporary list and then put all back when we
+ 	       get to the end of the list */
+ 	    /* This is actually really crappy, but we need to not leak these.
+ 	       We probably need a way to be smarter about this. */
+ 	    tvc->nextfree = tmpReclaimedVCList;
+ 	    tmpReclaimedVCList = tvc;
+ 	    printf("Reclaim list flush %x failed: %d\n", tvc, code);
+ 	}
+         if (tvc->states & (CVInit
+ #ifdef AFS_DARWIN80_ENV
+ 			  | CDeadVnode
+ #endif
+            )) {
+ 	   tvc->states &= ~(CVInit
+ #ifdef AFS_DARWIN80_ENV
+ 			    | CDeadVnode
+ #endif
+ 	   );
+ 	   afs_osi_Wakeup(&tvc->states);
+ 	}
+     }
+     if (tmpReclaimedVCList) 
+ 	ReclaimedVCList = tmpReclaimedVCList;
+ 
+     ReleaseWriteLock(&afs_xvreclaim);
+ #endif
+ }
+ 
  /*
   * afs_NewVCache
   *
***************
*** 607,612 ****
--- 652,660 ----
      int code, fv_slept;
  
      AFS_STATCNT(afs_NewVCache);
+ 
+     afs_FlushReclaimedVcaches();
+ 
  #if defined(AFS_OSF_ENV) || defined(AFS_LINUX22_ENV)
  #if defined(AFS_OSF30_ENV) || defined(AFS_LINUX22_ENV)
      if (afs_vcount >= afs_maxvcount)
***************
*** 621,627 ****
      if (((3 * afs_vcount) > nvnode) || (afs_vcount >= afs_maxvcount))
  #endif
      {
- 	struct afs_q *tq, *uq;
  	int i;
  	char *panicstr;
  
--- 669,674 ----
***************
*** 635,641 ****
  		refpanic("Exceeded pool of AFS vnodes(VLRU cycle?)");
  	    } else if (QNext(uq) != tq) {
  		refpanic("VLRU inconsistent");
! 	    } else if (VREFCOUNT(tvc) < 1) {
  		refpanic("refcnt 0 on VLRU");
  	    }
  
--- 682,688 ----
  		refpanic("Exceeded pool of AFS vnodes(VLRU cycle?)");
  	    } else if (QNext(uq) != tq) {
  		refpanic("VLRU inconsistent");
! 	    } else if (!VREFCOUNT_GT(tvc,0)) {
  		refpanic("refcnt 0 on VLRU");
  	    }
  
***************
*** 643,649 ****
  	    if (tvc != afs_globalVp && VREFCOUNT(tvc) > 1 && tvc->opens == 0) {
                  struct dentry *dentry;
                  struct list_head *cur, *head;
-                 AFS_FAST_HOLD(tvc);
                  AFS_GUNLOCK();
  #if defined(AFS_LINUX24_ENV)
                  spin_lock(&dcache_lock);
--- 690,695 ----
***************
*** 679,689 ****
  #endif
  	    inuse:
  		AFS_GLOCK();
- 		AFS_FAST_RELE(tvc);
  	    }
  #endif
  
! 	    if (VREFCOUNT(tvc) == 1 && tvc->opens == 0
  		&& (tvc->states & CUnlinkedDel) == 0) {
  		code = afs_FlushVCache(tvc, &fv_slept);
  		if (code == 0) {
--- 725,735 ----
  #endif
  	    inuse:
  		AFS_GLOCK();
  	    }
  #endif
  
! 	    if (VREFCOUNT_GT(tvc,0) && !VREFCOUNT_GT(tvc,1) &&
! 		tvc->opens == 0
  		&& (tvc->states & CUnlinkedDel) == 0) {
  		code = afs_FlushVCache(tvc, &fv_slept);
  		if (code == 0) {
***************
*** 699,710 ****
  		break;
  	}
  	if (anumber == VCACHE_FREE) {
! 	    printf("NewVCache: warning none freed, using %d of %d\n",
  		   afs_vcount, afs_maxvcount);
  	    if (afs_vcount >= afs_maxvcount) {
! 		osi_Panic("NewVCache - none freed");
! 		/* XXX instead of panicing, should do afs_maxvcount++
! 		 * and magic up another one */
  	    }
  	}
      }
--- 745,755 ----
  		break;
  	}
  	if (anumber == VCACHE_FREE) {
! 	    printf("afs_NewVCache: warning none freed, using %d of %d\n",
  		   afs_vcount, afs_maxvcount);
  	    if (afs_vcount >= afs_maxvcount) {
! 	    	printf("afs_NewVCache - none freed\n");
! 		return NULL;
  	    }
  	}
      }
***************
*** 741,746 ****
--- 786,792 ----
  #else /* AFS_OSF_ENV */
      /* pull out a free cache entry */
      if (!freeVCList) {
+         int loop = 0;
  	i = 0;
  	for (tq = VLRU.prev; (anumber > 0) && (tq != &VLRU); tq = uq) {
  	    tvc = QTOV(tq);
***************
*** 748,786 ****
  
  	    if (tvc->states & CVFlushed) {
  		refpanic("CVFlushed on VLRU");
- #if 0
  	    } else if (i++ > 2 * afs_cacheStats) {	/* even allowing for a few xallocs... */
  		refpanic("Increase -stat parameter of afsd(VLRU cycle?)");
- #endif
  	    } else if (QNext(uq) != tq) {
  		refpanic("VLRU inconsistent");
! 	    }
  
! 	    if (((VREFCOUNT(tvc) == 0) 
! #if defined(AFS_DARWIN_ENV) && !defined(UKERNEL) 
! 		 || ((VREFCOUNT(tvc) == 1) && 
! 		     (UBCINFOEXISTS(AFSTOV(tvc))))
  #endif
! 		 ) && tvc->opens == 0 && (tvc->states & CUnlinkedDel) == 0) {
  #if defined (AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
! 		/*
! 		 * vgone() reclaims the vnode, which calls afs_FlushVCache(),
! 		 * then it puts the vnode on the free list.
! 		 * If we don't do this we end up with a cleaned vnode that's
! 		 * not on the free list.
! 		 * XXX assume FreeBSD is the same for now.
! 		 */
! 	        AFS_GUNLOCK();
! 		vgone(AFSTOV(tvc));
! 		AFS_GLOCK();
! 		code = fv_slept = 0;
  #else
! 		code = afs_FlushVCache(tvc, &fv_slept);
  #endif
  		if (code == 0) {
  		    anumber--;
  		}
  		if (fv_slept) {
  		    uq = VLRU.prev;
  		    i = 0;
  		    continue;	/* start over - may have raced. */
--- 794,865 ----
  
  	    if (tvc->states & CVFlushed) {
  		refpanic("CVFlushed on VLRU");
  	    } else if (i++ > 2 * afs_cacheStats) {	/* even allowing for a few xallocs... */
  		refpanic("Increase -stat parameter of afsd(VLRU cycle?)");
  	    } else if (QNext(uq) != tq) {
  		refpanic("VLRU inconsistent");
! 	    } else if (tvc->states & CVInit) {
! 		continue;
!             }
  
!            if (!VREFCOUNT_GT(tvc,0)
! #if defined(AFS_DARWIN_ENV) && !defined(UKERNEL) && !defined(AFS_DARWIN80_ENV)
!                || ((VREFCOUNT(tvc) == 1) && 
!                    (UBCINFOEXISTS(AFSTOV(tvc))))
  #endif
!                && tvc->opens == 0 && (tvc->states & CUnlinkedDel) == 0) {
  #if defined (AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
! #ifdef AFS_DARWIN80_ENV
! 	        vnode_t tvp = AFSTOV(tvc);
! 		/* VREFCOUNT_GT only sees usecounts, not iocounts */
! 		/* so this may fail to actually recycle the vnode now */
! 		/* must call vnode_get to avoid races. */
!                 fv_slept = 0;
! 		if (vnode_get(tvp) == 0) {
! 		    fv_slept=1;
! 		    /* must release lock, since vnode_put will immediately
! 		       reclaim if there are no other users */
! 		    ReleaseWriteLock(&afs_xvcache);
! 		    AFS_GUNLOCK();
! 		    vnode_recycle(tvp);
! 		    vnode_put(tvp);
! 		    AFS_GLOCK();
! 		    ObtainWriteLock(&afs_xvcache, 336);
! 		}
! 		/* we can't use the vnode_recycle return value to figure
! 		 * this out, since the iocount we have to hold makes it
! 		 * always "fail" */
! 		if (AFSTOV(tvc) == tvp) {
!                     if (anumber > 0 && fv_slept) {
!                        QRemove(&tvc->vlruq);
!                        QAdd(&VLRU, &tvc->vlruq);
!                     }
! 		    code = EBUSY;
! 		} else
! 		    code = 0;
  #else
!                 /*
!                  * vgone() reclaims the vnode, which calls afs_FlushVCache(),
!                  * then it puts the vnode on the free list.
!                  * If we don't do this we end up with a cleaned vnode that's
!                  * not on the free list.
!                  * XXX assume FreeBSD is the same for now.
!                  */
!                 AFS_GUNLOCK();
!                 vgone(AFSTOV(tvc));
!                 fv_slept = 0;
!                 code = 0;
!                 AFS_GLOCK();
! #endif
! #else
!                 code = afs_FlushVCache(tvc, &fv_slept);
  #endif
  		if (code == 0) {
  		    anumber--;
  		}
  		if (fv_slept) {
+                     if (loop++ > 100)
+                        break;
  		    uq = VLRU.prev;
  		    i = 0;
  		    continue;	/* start over - may have raced. */
***************
*** 793,799 ****
      if (!freeVCList) {
  	/* none free, making one is better than a panic */
  	afs_stats_cmperf.vcacheXAllocs++;	/* count in case we have a leak */
- 	if (afs_cacheStats == afs_stats_cmperf.vcacheXAllocs) printf("would vlru cycle panic\n");
  	tvc = (struct vcache *)afs_osi_Alloc(sizeof(struct vcache));
  #if defined(AFS_DARWIN_ENV) && !defined(UKERNEL)
  	tvc->v = NULL; /* important to clean this, or use memset 0 */
--- 872,877 ----
***************
*** 842,863 ****
--- 920,995 ----
      RWLOCK_INIT(&tvc->vlock, "vcache vlock");
  #endif /* defined(AFS_SUN5_ENV) */
  
+     tvc->parentVnode = 0;
+     tvc->mvid = NULL;
+     tvc->linkData = NULL;
+     tvc->cbExpires = 0;
+     tvc->opens = 0;
+     tvc->execsOrWriters = 0;
+     tvc->flockCount = 0;
+     tvc->anyAccess = 0;
+     tvc->states = CVInit;
+     tvc->last_looker = 0;
+     tvc->fid = *afid;
+     tvc->asynchrony = -1;
+     tvc->vc_error = 0;
+ #ifdef AFS_TEXT_ENV
+     tvc->flushDV.low = tvc->flushDV.high = AFS_MAXDV;
+ #endif
+     hzero(tvc->mapDV);
+     tvc->truncPos = AFS_NOTRUNC;        /* don't truncate until we need to */
+     hzero(tvc->m.DataVersion);  /* in case we copy it into flushDV */
+     tvc->Access = NULL;
+     tvc->callback = serverp;    /* to minimize chance that clear
+ 				 * request is lost */
+ 
+     i = VCHash(afid);
+     j = VCHashV(afid);
+ 
+     tvc->hnext = afs_vhashT[i];
+     afs_vhashT[i] = tvc;
+     QAdd(&afs_vhashTV[j], &tvc->vhashq);
+     
+     if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
+         refpanic("NewVCache VLRU inconsistent");
+     }
+     QAdd(&VLRU, &tvc->vlruq);   /* put in lruq */
+     if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
+         refpanic("NewVCache VLRU inconsistent2");
+     }
+     if (tvc->vlruq.next->prev != &(tvc->vlruq)) {
+         refpanic("NewVCache VLRU inconsistent3");
+     }
+     if (tvc->vlruq.prev->next != &(tvc->vlruq)) {
+         refpanic("NewVCache VLRU inconsistent4");
+     }
+     vcachegen++;
+     /* it should now be safe to drop the xvcache lock */
  #ifdef AFS_OBSD_ENV
+     ReleaseWriteLock(&afs_xvcache);
      AFS_GUNLOCK();
      afs_nbsd_getnewvnode(tvc);	/* includes one refcount */
      AFS_GLOCK();
+     ObtainWriteLock(&afs_xvcache,337);
      lockinit(&tvc->rwlock, PINOD, "vcache", 0, 0);
  #endif
  #ifdef AFS_DARWIN_ENV
+     ReleaseWriteLock(&afs_xvcache);
      AFS_GUNLOCK();
      afs_darwin_getnewvnode(tvc);	/* includes one refcount */
      AFS_GLOCK();
+     ObtainWriteLock(&afs_xvcache,338);
+ #ifdef AFS_DARWIN80_ENV
+     LOCKINIT(tvc->rwlock);
+ #else
      lockinit(&tvc->rwlock, PINOD, "vcache", 0, 0);
  #endif
+ #endif
  #ifdef AFS_FBSD_ENV
      {
  	struct vnode *vp;
  
+ 	ReleaseWriteLock(&afs_xvcache);
  	AFS_GUNLOCK();
  #if defined(AFS_FBSD60_ENV)
  	if (getnewvnode(MOUNT_AFS, afs_globalVFS, &afs_vnodeops, &vp))
***************
*** 868,873 ****
--- 1000,1006 ----
  #endif
  	    panic("afs getnewvnode");	/* can't happen */
  	AFS_GLOCK();
+ 	ObtainWriteLock(&afs_xvcache,339);
  	if (tvc->v != NULL) {
  	    /* I'd like to know if this ever happens...
  	     * We don't drop global for the rest of this function,
***************
*** 886,910 ****
  	lockinit(&tvc->rwlock, PINOD, "vcache", 0, 0);
      }
  #endif
-     tvc->parentVnode = 0;
-     tvc->mvid = NULL;
-     tvc->linkData = NULL;
-     tvc->cbExpires = 0;
-     tvc->opens = 0;
-     tvc->execsOrWriters = 0;
-     tvc->flockCount = 0;
-     tvc->anyAccess = 0;
-     tvc->states = 0;
-     tvc->last_looker = 0;
-     tvc->fid = *afid;
-     tvc->asynchrony = -1;
-     tvc->vc_error = 0;
- #ifdef AFS_TEXT_ENV
-     tvc->flushDV.low = tvc->flushDV.high = AFS_MAXDV;
- #endif
-     hzero(tvc->mapDV);
-     tvc->truncPos = AFS_NOTRUNC;	/* don't truncate until we need to */
-     hzero(tvc->m.DataVersion);	/* in case we copy it into flushDV */
  
  #if defined(AFS_OSF_ENV) || defined(AFS_LINUX22_ENV)
      /* Hold it for the LRU (should make count 2) */
--- 1019,1024 ----
***************
*** 941,949 ****
      afs_BozonInit(&tvc->pvnLock, tvc);
  #endif
  
-     tvc->Access = NULL;
-     tvc->callback = serverp;	/* to minimize chance that clear
- 				 * request is lost */
      /* initialize vnode data, note vrefCount is v.v_count */
  #ifdef	AFS_AIX_ENV
      /* Don't forget to free the gnode space */
--- 1055,1060 ----
***************
*** 1034,1060 ****
      osi_dnlc_purgedp(tvc);	/* this may be overkill */
      memset((char *)&(tvc->callsort), 0, sizeof(struct afs_q));
      tvc->slocks = NULL;
!     i = VCHash(afid);
!     j = VCHashV(afid);
! 
!     tvc->hnext = afs_vhashT[i];
!     tvc->vhnext = afs_vhashTV[j];
!     afs_vhashT[i] = afs_vhashTV[j] = tvc;
! 
!     if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
! 	refpanic("NewVCache VLRU inconsistent");
!     }
!     QAdd(&VLRU, &tvc->vlruq);	/* put in lruq */
!     if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
! 	refpanic("NewVCache VLRU inconsistent2");
!     }
!     if (tvc->vlruq.next->prev != &(tvc->vlruq)) {
! 	refpanic("NewVCache VLRU inconsistent3");
!     }
!     if (tvc->vlruq.prev->next != &(tvc->vlruq)) {
! 	refpanic("NewVCache VLRU inconsistent4");
!     }
!     vcachegen++;
  
      return tvc;
  
--- 1145,1152 ----
      osi_dnlc_purgedp(tvc);	/* this may be overkill */
      memset((char *)&(tvc->callsort), 0, sizeof(struct afs_q));
      tvc->slocks = NULL;
!     tvc->states &=~ CVInit;
!     afs_osi_Wakeup(&tvc->states);
  
      return tvc;
  
***************
*** 1087,1092 ****
--- 1179,1190 ----
      ObtainReadLock(&afs_xvcache);
      for (i = 0; i < VCSIZE; i++) {
  	for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
+             if (tvc->states & CVInit) continue;
+ #ifdef AFS_DARWIN80_ENV
+             if (tvc->states & CDeadVnode &&
+                 (tvc->states & (CCore|CUnlinkedDel) ||
+                  tvc->flockCount)) panic("Dead vnode has core/unlinkedel/flock");
+ #endif
  	    if (doflocks && tvc->flockCount != 0) {
  		/* if this entry has an flock, send a keep-alive call out */
  		osi_vnhold(tvc, 0);
***************
*** 1113,1120 ****
  			  AFS_STATS_FS_RPCIDX_EXTENDLOCK, SHARED_LOCK, NULL));
  
  		ReleaseWriteLock(&tvc->lock);
! 		ObtainReadLock(&afs_xvcache);
! 		AFS_FAST_RELE(tvc);
  	    }
  	    didCore = 0;
  	    if ((tvc->states & CCore) || (tvc->states & CUnlinkedDel)) {
--- 1211,1223 ----
  			  AFS_STATS_FS_RPCIDX_EXTENDLOCK, SHARED_LOCK, NULL));
  
  		ReleaseWriteLock(&tvc->lock);
! #ifdef AFS_DARWIN80_ENV
!                 AFS_FAST_RELE(tvc);
!                 ObtainReadLock(&afs_xvcache);
! #else
!                 ObtainReadLock(&afs_xvcache);
!                 AFS_FAST_RELE(tvc);
! #endif
  	    }
  	    didCore = 0;
  	    if ((tvc->states & CCore) || (tvc->states & CUnlinkedDel)) {
***************
*** 1132,1138 ****
  		/*
  		 * That's because if we come in via the CUnlinkedDel bit state path we'll be have 0 refcnt
  		 */
! 		osi_Assert(VREFCOUNT(tvc) > 0);
  		AFS_RWLOCK((vnode_t *) tvc, VRWLOCK_WRITE);
  #endif
  		ObtainWriteLock(&tvc->lock, 52);
--- 1235,1241 ----
  		/*
  		 * That's because if we come in via the CUnlinkedDel bit state path we'll be have 0 refcnt
  		 */
! 		osi_Assert(VREFCOUNT_GT(tvc,0));
  		AFS_RWLOCK((vnode_t *) tvc, VRWLOCK_WRITE);
  #endif
  		ObtainWriteLock(&tvc->lock, 52);
***************
*** 1182,1187 ****
--- 1285,1299 ----
  #if defined(AFS_SGI_ENV)
  		AFS_RWUNLOCK((vnode_t *) tvc, VRWLOCK_WRITE);
  #endif
+ #ifdef AFS_DARWIN80_ENV
+ 		AFS_FAST_RELE(tvc);
+ 		if (didCore) {
+ 		    AFS_RELE(AFSTOV(tvc));
+ 		    /* Matches write code setting CCore flag */
+ 		    crfree(cred);
+ 		}
+ 		ObtainReadLock(&afs_xvcache);
+ #else
  		ObtainReadLock(&afs_xvcache);
  		AFS_FAST_RELE(tvc);
  		if (didCore) {
***************
*** 1189,1194 ****
--- 1301,1307 ----
  		    /* Matches write code setting CCore flag */
  		    crfree(cred);
  		}
+ #endif
  	    }
  	}
      }
***************
*** 1196,1201 ****
--- 1309,1315 ----
  }
  
  
+ 
  /*
   * afs_VerifyVCache
   *
***************
*** 1625,1631 ****
  
      ObtainSharedLock(&afs_xvcache, 5);
  
!     tvc = afs_FindVCache(afid, &retry, DO_STATS | DO_VLRU);
      if (tvc && retry) {
  #if	defined(AFS_SGI_ENV) && !defined(AFS_SGI53_ENV)
  	ReleaseSharedLock(&afs_xvcache);
--- 1739,1745 ----
  
      ObtainSharedLock(&afs_xvcache, 5);
  
!     tvc = afs_FindVCache(afid, &retry, DO_STATS | DO_VLRU | IS_SLOCK);
      if (tvc && retry) {
  #if	defined(AFS_SGI_ENV) && !defined(AFS_SGI53_ENV)
  	ReleaseSharedLock(&afs_xvcache);
***************
*** 1637,1642 ****
--- 1751,1757 ----
      if (tvc) {
  	if (cached)
  	    *cached = 1;
+ 	osi_Assert((tvc->states & CVInit) == 0);
  	if (tvc->states & CStatd) {
  	    ReleaseSharedLock(&afs_xvcache);
  	    return tvc;
***************
*** 1649,1654 ****
--- 1764,1775 ----
  	newvcache = 1;
  
  	ConvertWToSLock(&afs_xvcache);
+ 	if (!tvc)
+ 	{
+ 		ReleaseSharedLock(&afs_xvcache);
+ 		return NULL;
+ 	}
+ 
  	afs_stats_cmperf.vcacheMisses++;
      }
  
***************
*** 1666,1671 ****
--- 1787,1796 ----
  	return tvc;
      }
  #endif /* AFS_OSF_ENV */
+ #ifdef AFS_DARWIN80_ENV
+ /* Darwin 8.0 only has bufs in nfs, so we shouldn't have to worry about them.
+    What about ubc? */
+ #else
  #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
      /*
       * XXX - I really don't like this.  Should try to understand better.
***************
*** 1727,1732 ****
--- 1852,1858 ----
  #endif
      }
  #endif
+ #endif
  
      ObtainWriteLock(&afs_xcbhash, 464);
      tvc->states &= ~CUnique;
***************
*** 1777,1785 ****
      if (code) {
  	ReleaseWriteLock(&tvc->lock);
  
! 	ObtainReadLock(&afs_xvcache);
! 	AFS_FAST_RELE(tvc);
! 	ReleaseReadLock(&afs_xvcache);
  	return NULL;
      }
  
--- 1903,1909 ----
      if (code) {
  	ReleaseWriteLock(&tvc->lock);
  
! 	afs_PutVCache(tvc);
  	return NULL;
      }
  
***************
*** 1836,1843 ****
  	tvc->states &= ~CUnique;
  
  	ReleaseReadLock(&tvc->lock);
  	ObtainReadLock(&afs_xvcache);
- 	AFS_FAST_RELE(tvc);
      }
      /* if (tvc) */
      ReleaseReadLock(&afs_xvcache);
--- 1960,1967 ----
  	tvc->states &= ~CUnique;
  
  	ReleaseReadLock(&tvc->lock);
+ 	afs_PutVCache(tvc);
  	ObtainReadLock(&afs_xvcache);
      }
      /* if (tvc) */
      ReleaseReadLock(&afs_xvcache);
***************
*** 1855,1861 ****
  #endif
  
      ObtainSharedLock(&afs_xvcache, 6);
!     tvc = afs_FindVCache(&nfid, &retry, DO_VLRU /* no xstats now */ );
      if (tvc && retry) {
  #if	defined(AFS_SGI_ENV) && !defined(AFS_SGI53_ENV)
  	ReleaseSharedLock(&afs_xvcache);
--- 1979,1985 ----
  #endif
  
      ObtainSharedLock(&afs_xvcache, 6);
!     tvc = afs_FindVCache(&nfid, &retry, DO_VLRU | IS_SLOCK/* no xstats now */ );
      if (tvc && retry) {
  #if	defined(AFS_SGI_ENV) && !defined(AFS_SGI53_ENV)
  	ReleaseSharedLock(&afs_xvcache);
***************
*** 1870,1875 ****
--- 1994,2004 ----
  	tvc = afs_NewVCache(&nfid, serverp);
  	newvcache = 1;
  	ConvertWToSLock(&afs_xvcache);
+ 	if (!tvc)
+ 	{
+ 		ReleaseSharedLock(&afs_xvcache);
+ 		return NULL;
+ 	}
      }
  
      ReleaseSharedLock(&afs_xvcache);
***************
*** 1909,1917 ****
  	if (tvp)
  	    afs_PutVolume(tvp, READ_LOCK);
  	ReleaseWriteLock(&tvc->lock);
! 	ObtainReadLock(&afs_xvcache);
! 	AFS_FAST_RELE(tvc);
! 	ReleaseReadLock(&afs_xvcache);
  	return NULL;
      }
  
--- 2038,2044 ----
  	if (tvp)
  	    afs_PutVolume(tvp, READ_LOCK);
  	ReleaseWriteLock(&tvc->lock);
! 	afs_PutVCache(tvc);
  	return NULL;
      }
  
***************
*** 1968,1973 ****
--- 2095,2106 ----
      struct AFSCallBack CallBack;
      struct AFSVolSync tsync;
      int origCBs = 0;
+ #ifdef	AFS_OSF_ENV
+     int vg;
+ #endif
+ #ifdef AFS_DARWIN80_ENV
+     vnode_t tvp;
+ #endif
  
      start = osi_Time();
  
***************
*** 1996,2017 ****
  	afid->Fid.Unique = tvolp->rootUnique;
      }
  
      ObtainSharedLock(&afs_xvcache, 7);
      i = VCHash(afid);
      for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
  	if (!FidCmp(&(tvc->fid), afid)) {
  #ifdef	AFS_OSF_ENV
  	    /* Grab this vnode, possibly reactivating from the free list */
  	    /* for the present (95.05.25) everything on the hash table is
  	     * definitively NOT in the free list -- at least until afs_reclaim
  	     * can be safely implemented */
- 	    int vg;
  	    AFS_GUNLOCK();
  	    vg = vget(AFSTOV(tvc));	/* this bumps ref count */
  	    AFS_GLOCK();
  	    if (vg)
  		continue;
  #endif /* AFS_OSF_ENV */
  	    break;
  	}
      }
--- 2129,2172 ----
  	afid->Fid.Unique = tvolp->rootUnique;
      }
  
+  rootvc_loop:
      ObtainSharedLock(&afs_xvcache, 7);
      i = VCHash(afid);
      for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
  	if (!FidCmp(&(tvc->fid), afid)) {
+             if (tvc->states & CVInit) {
+ 		ReleaseSharedLock(&afs_xvcache);
+ 		afs_osi_Sleep(&tvc->states);
+ 		goto rootvc_loop;
+             }
  #ifdef	AFS_OSF_ENV
  	    /* Grab this vnode, possibly reactivating from the free list */
  	    /* for the present (95.05.25) everything on the hash table is
  	     * definitively NOT in the free list -- at least until afs_reclaim
  	     * can be safely implemented */
  	    AFS_GUNLOCK();
  	    vg = vget(AFSTOV(tvc));	/* this bumps ref count */
  	    AFS_GLOCK();
  	    if (vg)
  		continue;
  #endif /* AFS_OSF_ENV */
+ #ifdef AFS_DARWIN80_ENV
+             if (tvc->states & CDeadVnode) {
+ 		ReleaseSharedLock(&afs_xvcache);
+ 		afs_osi_Sleep(&tvc->states);
+ 		goto rootvc_loop;
+             }
+ 	    tvp = AFSTOV(tvc);
+ 	    if (vnode_get(tvp))       /* this bumps ref count */
+ 	        continue;
+ 	    if (vnode_ref(tvp)) {
+ 		AFS_GUNLOCK();
+ 		/* AFSTOV(tvc) may be NULL */
+ 		vnode_put(tvp);
+ 		AFS_GLOCK();
+ 	        continue;
+ 	    }
+ #endif
  	    break;
  	}
      }
***************
*** 2022,2030 ****
  	if (tvc)
  	    AFS_RELE(AFSTOV(tvc));
  #endif
- 	tvc = NULL;
  	getNewFid = 1;
  	ReleaseSharedLock(&afs_xvcache);
  	goto newmtpt;
      }
  
--- 2177,2193 ----
  	if (tvc)
  	    AFS_RELE(AFSTOV(tvc));
  #endif
  	getNewFid = 1;
  	ReleaseSharedLock(&afs_xvcache);
+ #ifdef AFS_DARWIN80_ENV
+         if (tvc) {
+             AFS_GUNLOCK();
+             vnode_put(AFSTOV(tvc));
+             vnode_rele(AFSTOV(tvc));
+             AFS_GLOCK();
+         }
+ #endif
+         tvc = NULL;
  	goto newmtpt;
      }
  
***************
*** 2032,2044 ****
  	UpgradeSToWLock(&afs_xvcache, 23);
  	/* no cache entry, better grab one */
  	tvc = afs_NewVCache(afid, NULL);
  	newvcache = 1;
  	afs_stats_cmperf.vcacheMisses++;
      } else {
  	if (cached)
  	    *cached = 1;
  	afs_stats_cmperf.vcacheHits++;
! #ifdef	AFS_OSF_ENV
  	/* we already bumped the ref count in the for loop above */
  #else /* AFS_OSF_ENV */
  	osi_vnhold(tvc, 0);
--- 2195,2212 ----
  	UpgradeSToWLock(&afs_xvcache, 23);
  	/* no cache entry, better grab one */
  	tvc = afs_NewVCache(afid, NULL);
+ 	if (!tvc)
+ 	{
+ 		ReleaseWriteLock(&afs_xvcache);
+ 		return NULL;
+ 	}
  	newvcache = 1;
  	afs_stats_cmperf.vcacheMisses++;
      } else {
  	if (cached)
  	    *cached = 1;
  	afs_stats_cmperf.vcacheHits++;
! #if	defined(AFS_OSF_ENV) || defined(AFS_DARWIN80_ENV)
  	/* we already bumped the ref count in the for loop above */
  #else /* AFS_OSF_ENV */
  	osi_vnhold(tvc, 0);
***************
*** 2125,2133 ****
  	if ((tvc->states & CForeign) || (tvc->fid.Fid.Vnode & 1))
  	    osi_dnlc_purgedp(tvc);	/* if it (could be) a directory */
  	ReleaseWriteLock(&tvc->lock);
! 	ObtainReadLock(&afs_xvcache);
! 	AFS_FAST_RELE(tvc);
! 	ReleaseReadLock(&afs_xvcache);
  	return NULL;
      }
  
--- 2293,2299 ----
  	if ((tvc->states & CForeign) || (tvc->fid.Fid.Vnode & 1))
  	    osi_dnlc_purgedp(tvc);	/* if it (could be) a directory */
  	ReleaseWriteLock(&tvc->lock);
! 	afs_PutVCache(tvc);
  	return NULL;
      }
  
***************
*** 2289,2295 ****
    loop:
      ObtainSharedLock(&afs_xvcache, 8);
  
!     tvc = afs_FindVCache(afid, &retry, DO_VLRU /* no stats */ );
      if (tvc && retry) {
  #if	defined(AFS_SGI_ENV) && !defined(AFS_SGI53_ENV)
  	ReleaseSharedLock(&afs_xvcache);
--- 2455,2461 ----
    loop:
      ObtainSharedLock(&afs_xvcache, 8);
  
!     tvc = afs_FindVCache(afid, &retry, DO_VLRU| IS_SLOCK /* no stats */ );
      if (tvc && retry) {
  #if	defined(AFS_SGI_ENV) && !defined(AFS_SGI53_ENV)
  	ReleaseSharedLock(&afs_xvcache);
***************
*** 2304,2309 ****
--- 2470,2480 ----
  	tvc = afs_NewVCache(afid, NULL);
  	newvcache = 1;
  	ConvertWToSLock(&afs_xvcache);
+ 	if (!tvc)
+ 	{
+ 		ReleaseSharedLock(&afs_xvcache);
+ 		return NULL;
+ 	}
      }
  
      ReleaseSharedLock(&afs_xvcache);
***************
*** 2406,2419 ****
--- 2577,2617 ----
  afs_PutVCache(register struct vcache *avc)
  {
      AFS_STATCNT(afs_PutVCache);
+ #ifdef AFS_DARWIN80_ENV
+     vnode_put(AFSTOV(avc));
+     AFS_FAST_RELE(avc);
+ #else
      /*
       * Can we use a read lock here?
       */
      ObtainReadLock(&afs_xvcache);
      AFS_FAST_RELE(avc);
      ReleaseReadLock(&afs_xvcache);
+ #endif
  }				/*afs_PutVCache */
  
+ 
+ static void findvc_sleep(struct vcache *avc, int flag) {
+     if (flag & IS_SLOCK) {
+ 	    ReleaseSharedLock(&afs_xvcache);
+     } else {
+ 	if (flag & IS_WLOCK) {
+ 	    ReleaseWriteLock(&afs_xvcache);
+ 	} else {
+ 	    ReleaseReadLock(&afs_xvcache);
+ 	}
+     }
+     afs_osi_Sleep(&avc->states);
+     if (flag & IS_SLOCK) {
+ 	    ObtainSharedLock(&afs_xvcache, 341);
+     } else {
+ 	if (flag & IS_WLOCK) {
+ 	    ObtainWriteLock(&afs_xvcache, 343);
+ 	} else {
+ 	    ObtainReadLock(&afs_xvcache);
+ 	}
+     }
+ }
  /*
   * afs_FindVCache
   *
***************
*** 2439,2459 ****
  
      register struct vcache *tvc;
      afs_int32 i;
  
      AFS_STATCNT(afs_FindVCache);
  
      i = VCHash(afid);
      for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
  	if (FidMatches(afid, tvc)) {
  #ifdef  AFS_OSF_ENV
  	    /* Grab this vnode, possibly reactivating from the free list */
- 	    int vg;
  	    AFS_GUNLOCK();
  	    vg = vget(AFSTOV(tvc));
  	    AFS_GLOCK();
  	    if (vg)
  		continue;
  #endif /* AFS_OSF_ENV */
  	    break;
  	}
      }
--- 2637,2683 ----
  
      register struct vcache *tvc;
      afs_int32 i;
+ #if defined( AFS_OSF_ENV)
+     int vg;
+ #endif
+ #ifdef AFS_DARWIN80_ENV
+     vnode_t tvp;
+ #endif
  
      AFS_STATCNT(afs_FindVCache);
  
+  findloop:
      i = VCHash(afid);
      for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
  	if (FidMatches(afid, tvc)) {
+             if (tvc->states & CVInit) {
+ 		findvc_sleep(tvc, flag);
+ 		goto findloop;
+             }
  #ifdef  AFS_OSF_ENV
  	    /* Grab this vnode, possibly reactivating from the free list */
  	    AFS_GUNLOCK();
  	    vg = vget(AFSTOV(tvc));
  	    AFS_GLOCK();
  	    if (vg)
  		continue;
  #endif /* AFS_OSF_ENV */
+ #ifdef  AFS_DARWIN80_ENV
+             if (tvc->states & CDeadVnode) {
+                 findvc_sleep(tvc, flag);
+ 		goto findloop;
+             }
+ 	    tvp = AFSTOV(tvc);
+ 	    if (vnode_get(tvp))
+ 		continue;
+ 	    if (vnode_ref(tvp)) {
+ 		AFS_GUNLOCK();
+ 		/* AFSTOV(tvc) may be NULL */
+ 		vnode_put(tvp);
+ 		AFS_GLOCK();
+ 		continue;
+ 	    }
+ #endif
  	    break;
  	}
      }
***************
*** 2462,2473 ****
      if (tvc) {
  	if (retry)
  	    *retry = 0;
! #if !defined(AFS_OSF_ENV)
  	osi_vnhold(tvc, retry);	/* already held, above */
  	if (retry && *retry)
  	    return 0;
  #endif
! #ifdef AFS_DARWIN_ENV
  	tvc->states |= CUBCinit;
  	AFS_GUNLOCK();
  	if (UBCINFOMISSING(AFSTOV(tvc)) ||
--- 2686,2697 ----
      if (tvc) {
  	if (retry)
  	    *retry = 0;
! #if !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN80_ENV)
  	osi_vnhold(tvc, retry);	/* already held, above */
  	if (retry && *retry)
  	    return 0;
  #endif
! #if defined(AFS_DARWIN_ENV) && !defined(AFS_DARWIN80_ENV)
  	tvc->states |= CUBCinit;
  	AFS_GUNLOCK();
  	if (UBCINFOMISSING(AFSTOV(tvc)) ||
***************
*** 2553,2564 ****
      afs_int32 i;
      afs_int32 count = 0;
      struct vcache *found_tvc = NULL;
  
      AFS_STATCNT(afs_FindVCache);
  
- #if defined(AFS_SGI_ENV) && !defined(AFS_SGI53_ENV)
    loop:
- #endif
  
      ObtainSharedLock(&afs_xvcache, 331);
  
--- 2777,2792 ----
      afs_int32 i;
      afs_int32 count = 0;
      struct vcache *found_tvc = NULL;
+ #ifdef  AFS_OSF_ENV
+     int vg;
+ #endif
+ #ifdef AFS_DARWIN80_ENV
+     vnode_t tvp;
+ #endif
  
      AFS_STATCNT(afs_FindVCache);
  
    loop:
  
      ObtainSharedLock(&afs_xvcache, 331);
  
***************
*** 2569,2577 ****
  	    && (tvc->fid.Fid.Volume == afid->Fid.Volume)
  	    && ((tvc->fid.Fid.Unique & 0xffffff) == afid->Fid.Unique)
  	    && (tvc->fid.Cell == afid->Cell)) {
  #ifdef  AFS_OSF_ENV
  	    /* Grab this vnode, possibly reactivating from the free list */
- 	    int vg;
  	    AFS_GUNLOCK();
  	    vg = vget(AFSTOV(tvc));
  	    AFS_GLOCK();
--- 2797,2810 ----
  	    && (tvc->fid.Fid.Volume == afid->Fid.Volume)
  	    && ((tvc->fid.Fid.Unique & 0xffffff) == afid->Fid.Unique)
  	    && (tvc->fid.Cell == afid->Cell)) {
+ 	    if (tvc->states & CVInit) {
+ 		int lock;
+ 		ReleaseSharedLock(&afs_xvcache);
+ 		afs_osi_Sleep(&tvc->states);
+ 		goto loop;
+             }
  #ifdef  AFS_OSF_ENV
  	    /* Grab this vnode, possibly reactivating from the free list */
  	    AFS_GUNLOCK();
  	    vg = vget(AFSTOV(tvc));
  	    AFS_GLOCK();
***************
*** 2580,2585 ****
--- 2813,2838 ----
  		continue;
  	    }
  #endif /* AFS_OSF_ENV */
+ #ifdef  AFS_DARWIN80_ENV
+             if (tvc->states & CDeadVnode) {
+ 		ReleaseSharedLock(&afs_xvcache);
+ 		afs_osi_Sleep(&tvc->states);
+ 		goto loop;
+             }
+ 	    tvp = AFSTOV(tvc);
+ 	    if (vnode_get(tvp)) {
+ 		/* This vnode no longer exists. */
+ 		continue;
+ 	    }
+ 	    if (vnode_ref(tvp)) {
+ 		/* This vnode no longer exists. */
+ 		AFS_GUNLOCK();
+ 		/* AFSTOV(tvc) may be NULL */
+ 		vnode_put(tvp);
+ 		AFS_GLOCK();
+ 		continue;
+ 	    }
+ #endif /* AFS_DARWIN80_ENV */
  	    count++;
  	    if (found_tvc) {
  		/* Duplicates */
***************
*** 2590,2595 ****
--- 2843,2853 ----
  #endif
  		afs_duplicate_nfs_fids++;
  		ReleaseSharedLock(&afs_xvcache);
+ #ifdef AFS_DARWIN80_ENV
+                 /* Drop our reference counts. */
+                 vnode_put(AFSTOV(tvc));
+                 vnode_put(AFSTOV(found_tvc));
+ #endif
  		return count;
  	    }
  	    found_tvc = tvc;
***************
*** 2724,2733 ****
  #endif /* AFS_SGI62_ENV */
      }
  #endif
- 
      QInit(&VLRU);
! 
! 
  }
  
  /*
--- 2982,2990 ----
  #endif /* AFS_SGI62_ENV */
      }
  #endif
      QInit(&VLRU);
!     for(i = 0; i < VCSIZE; ++i)
! 	QInit(&afs_vhashTV[i]);
  }
  
  /*
***************
*** 2781,2787 ****
  		    vms_delete(tvc->segid);
  		    AFS_GLOCK();
  		    tvc->segid = tvc->vmh = NULL;
! 		    if (VREFCOUNT(tvc))
  			osi_Panic("flushVcache: vm race");
  		}
  		if (tvc->credp) {
--- 3038,3044 ----
  		    vms_delete(tvc->segid);
  		    AFS_GLOCK();
  		    tvc->segid = tvc->vmh = NULL;
! 		    if (VREFCOUNT_GT(tvc,0))
  			osi_Panic("flushVcache: vm race");
  		}
  		if (tvc->credp) {
***************
*** 2803,2809 ****
  
  		afs_FreeAllAxs(&(tvc->Access));
  	    }
! 	    afs_vhashT[i] = afs_vhashTV[i] = 0;
  	}
      }
      /*
--- 3060,3066 ----
  
  		afs_FreeAllAxs(&(tvc->Access));
  	    }
! 	    afs_vhashT[i] = 0;
  	}
      }
      /*
***************
*** 2828,2832 ****
      RWLOCK_INIT(&afs_xvcache, "afs_xvcache");
      LOCK_INIT(&afs_xvcb, "afs_xvcb");
      QInit(&VLRU);
! 
  }
--- 3085,3090 ----
      RWLOCK_INIT(&afs_xvcache, "afs_xvcache");
      LOCK_INIT(&afs_xvcb, "afs_xvcb");
      QInit(&VLRU);
!     for(i = 0; i < VCSIZE; ++i)
! 	QInit(&afs_vhashTV[i]);
  }
Index: openafs/src/afs/afs_volume.c
diff -c openafs/src/afs/afs_volume.c:1.26.2.1 openafs/src/afs/afs_volume.c:1.26.2.5
*** openafs/src/afs/afs_volume.c:1.26.2.1	Tue Dec  7 01:12:12 2004
--- openafs/src/afs/afs_volume.c	Fri Feb 17 23:09:34 2006
***************
*** 19,25 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_volume.c,v 1.26.2.1 2004/12/07 06:12:12 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
--- 19,25 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/afs_volume.c,v 1.26.2.5 2006/02/18 04:09:34 shadow Exp $");
  
  #include "afs/stds.h"
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
***************
*** 238,243 ****
--- 238,246 ----
      unsigned int now;
      struct vcache *tvc;
      afs_int32 *volumeID, *cellID, vsize, nvols;
+ #ifdef AFS_DARWIN80_ENV
+     vnode_t tvp;
+ #endif
      AFS_STATCNT(afs_CheckVolumeNames);
  
      nvols = 0;
***************
*** 284,289 ****
--- 287,293 ----
  
      /* next ensure all mt points are re-evaluated */
      if (nvols || (flags & (AFS_VOLCHECK_FORCE | AFS_VOLCHECK_MTPTS))) {
+ loop:
  	ObtainReadLock(&afs_xvcache);
  	for (i = 0; i < VCSIZE; i++) {
  	    for (tvc = afs_vhashT[i]; tvc; tvc = tvc->hnext) {
***************
*** 306,312 ****
--- 310,339 ----
  		    && (inVolList(&tvc->fid, nvols, volumeID, cellID)
  			|| (flags & AFS_VOLCHECK_FORCE))) {
  
+                     if (tvc->states & CVInit) {
+                         ReleaseReadLock(&afs_xvcache);
+ 			afs_osi_Sleep(&tvc->states);
+                         goto loop;
+                     }
+ #ifdef AFS_DARWIN80_ENV
+                     if (tvc->states & CDeadVnode) {
+                         ReleaseReadLock(&afs_xvcache);
+ 			afs_osi_Sleep(&tvc->states);
+                         goto loop;
+                     }
+ 		    tvp = AFSTOV(tvc);
+ 		    if (vnode_get(tvp))
+ 			continue;
+ 		    if (vnode_ref(tvp)) {
+ 			AFS_GUNLOCK();
+ 			/* AFSTOV(tvc) may be NULL */
+ 			vnode_put(tvp);
+ 			AFS_GLOCK();
+ 			continue;
+ 		    }
+ #else
  		    AFS_FAST_HOLD(tvc);
+ #endif
  		    ReleaseReadLock(&afs_xvcache);
  
  		    ObtainWriteLock(&afs_xcbhash, 485);
***************
*** 317,326 ****
--- 344,360 ----
  		    if (tvc->fid.Fid.Vnode & 1 || (vType(tvc) == VDIR))
  			osi_dnlc_purgedp(tvc);
  
+ #ifdef AFS_DARWIN80_ENV
+ 		    vnode_put(AFSTOV(tvc));
+ 		    /* our tvc ptr is still good until now */
+ 		    AFS_FAST_RELE(tvc);
+ 		    ObtainReadLock(&afs_xvcache);
+ #else
  		    ObtainReadLock(&afs_xvcache);
  
  		    /* our tvc ptr is still good until now */
  		    AFS_FAST_RELE(tvc);
+ #endif
  		}
  	    }
  	}
Index: openafs/src/afs/lock.h
diff -c openafs/src/afs/lock.h:1.13.2.1 openafs/src/afs/lock.h:1.13.2.2
*** openafs/src/afs/lock.h:1.13.2.1	Wed Apr 13 22:31:32 2005
--- openafs/src/afs/lock.h	Wed Oct  5 01:58:27 2005
***************
*** 107,113 ****
--- 107,117 ----
  #define MyPidxx current->pid
  #else
  #if defined(AFS_DARWIN_ENV)
+ #if defined(AFS_DARWIN80_ENV)
+ #define MyPidxx (proc_selfpid())
+ #else
  #define MyPidxx (current_proc()->p_pid )
+ #endif
  #else
  #if defined(AFS_FBSD_ENV)
  #define MyPidxx (curproc->p_pid )
Index: openafs/src/afs/sysctl.h
diff -c openafs/src/afs/sysctl.h:1.2 openafs/src/afs/sysctl.h:1.2.2.1
*** openafs/src/afs/sysctl.h:1.2	Fri Oct 24 02:26:00 2003
--- openafs/src/afs/sysctl.h	Thu Mar  9 01:41:33 2006
***************
*** 38,43 ****
--- 38,45 ----
  #define AFS_SC_DARWIN_14			3
  #define AFS_SC_DARWIN_60			4
  #define AFS_SC_DARWIN_70			5
+ #define AFS_SC_DARWIN_80			6
+ #define AFS_SC_DARWIN_90			7
  
  /* AFS_SC_DARWIN_ALL: darwin version-independent sysctls */
  #define AFS_SC_DARWIN_ALL_REALMODES		1
***************
*** 57,60 ****
--- 59,68 ----
  /* AFS_SC_DARWIN_70: darwin 7.x sysctls */
  	/* nothing defined */
  
+ /* AFS_SC_DARWIN_80: darwin 8.x sysctls */
+ 	/* nothing defined */
+ 
+ /* AFS_SC_DARWIN_90: darwin 9.x sysctls */
+ 	/* nothing defined */
+ 
  #endif /* AFS_SYSCTL_H */
Index: openafs/src/afs/sysincludes.h
diff -c openafs/src/afs/sysincludes.h:1.28.2.7 openafs/src/afs/sysincludes.h:1.28.2.10
*** openafs/src/afs/sysincludes.h:1.28.2.7	Mon Jul 11 15:13:47 2005
--- openafs/src/afs/sysincludes.h	Thu Mar  9 16:41:53 2006
***************
*** 39,45 ****
--- 39,47 ----
  #include <ufs/ffs/fs.h>
  #include <ufs/ufs/quota.h>
  #include <ufs/ufs/inode.h>
+ #ifndef AFS_OBSD38_ENV
  #include <ufs/ufs/extattr.h>
+ #endif
  #include <ufs/ufs/ufsmount.h>
  #ifndef MLEN
  #include <sys/mbuf.h>
***************
*** 95,100 ****
--- 97,105 ----
  #include <linux/slab.h>
  #include <linux/string.h>
  #include <asm/semaphore.h>
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ #include <linux/mutex.h>
+ #endif
  #include <linux/errno.h>
  #ifdef COMPLETION_H_EXISTS
  #include <linux/completion.h>
***************
*** 217,223 ****
  #  include "h/dir.h"
  #endif /* SGI || SUN || HPUX */
  
! #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
  #include "h/user.h"
  #endif /* AFS_SGI64_ENV */
  #define	MACH_USER_API	1
--- 222,228 ----
  #  include "h/dir.h"
  #endif /* SGI || SUN || HPUX */
  
! #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN80_ENV)
  #include "h/user.h"
  #endif /* AFS_SGI64_ENV */
  #define	MACH_USER_API	1
***************
*** 254,259 ****
--- 259,268 ----
  #  include <sys/uio.h>
  #  include <sys/mount.h>
  #  include <sys/namei.h>
+ #ifdef AFS_DARWIN80_ENV
+ #  include <sys/kauth.h>
+ #include <string.h>
+ #endif
  #  include <sys/vnode.h>
  #  include <sys/queue.h>
  #  include <sys/malloc.h>
***************
*** 274,282 ****
--- 283,293 ----
  #undef timeout_fcn_t
  #define _DIR_H_
  #define doff_t          int32_t
+ #ifndef AFS_DARWIN80_ENV
  #  include <ufs/ufs/quota.h>
  #  include <ufs/ufs/inode.h>
  #  include <ufs/ffs/fs.h>
+ #endif
  #else
  #  include "h/vfs.h"
  #  include "h/vnode.h"
Index: openafs/src/afs/AIX/osi_inode.c
diff -c openafs/src/afs/AIX/osi_inode.c:1.8.2.1 openafs/src/afs/AIX/osi_inode.c:1.8.2.2
*** openafs/src/afs/AIX/osi_inode.c:1.8.2.1	Wed Aug 25 03:16:15 2004
--- openafs/src/afs/AIX/osi_inode.c	Sat Oct 15 10:24:25 2005
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/AIX/osi_inode.c,v 1.8.2.1 2004/08/25 07:16:15 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.2 2005/10/15 14:24:25 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 144,150 ****
  
      a.dev = dev;
      a.ans = NULL;
!     vfs_search(devtovfs_func, &a);
      return a.ans;
  }
  
--- 144,150 ----
  
      a.dev = dev;
      a.ans = NULL;
!     vfs_search(devtovfs_func, (caddr_t) &a);
      return a.ans;
  }
  
Index: openafs/src/afs/AIX/osi_machdep.h
diff -c openafs/src/afs/AIX/osi_machdep.h:1.3.2.2 openafs/src/afs/AIX/osi_machdep.h:1.3.2.3
*** openafs/src/afs/AIX/osi_machdep.h:1.3.2.2	Wed Apr 13 22:31:34 2005
--- openafs/src/afs/AIX/osi_machdep.h	Fri Jan 20 00:06:57 2006
***************
*** 69,74 ****
--- 69,76 ----
  			    simple_unlock((void *)&afs_global_lock);	\
  			} while(0)
  #define ISAFS_GLOCK()	lock_mine((void *)&afs_global_lock)
+ 
+ #define ifnet_flags(x) (x?(x)->if_flags:0)
  #endif
  
  #endif /* _OSI_MACHDEP_H_ */
Index: openafs/src/afs/AIX/osi_vnodeops.c
diff -c openafs/src/afs/AIX/osi_vnodeops.c:1.15 openafs/src/afs/AIX/osi_vnodeops.c:1.15.2.3
*** openafs/src/afs/AIX/osi_vnodeops.c:1.15	Tue Mar 16 21:29:39 2004
--- openafs/src/afs/AIX/osi_vnodeops.c	Thu Jan 26 10:45:51 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/AIX/osi_vnodeops.c,v 1.15 2004/03/17 02:29:39 shadow Exp $");
  
  #include "h/systm.h"
  #include "h/types.h"
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/AIX/osi_vnodeops.c,v 1.15.2.3 2006/01/26 15:45:51 shadow Exp $");
  
  #include "h/systm.h"
  #include "h/types.h"
***************
*** 55,188 ****
  #include "afsincludes.h"
  
  
- /*
-  * declare all the functions so they can be used to init the table
-  */
- /* creation/naming/deletion */
- int afs_gn_link();
- int afs_gn_mkdir();
- int afs_gn_mknod();
- int afs_gn_remove();
- int afs_gn_rename();
- int afs_gn_rmdir();
- /* lookup, file handle stuff */
- int afs_gn_lookup();
- int afs_gn_fid();
- /* access to files */
- int afs_gn_open();
- int afs_gn_create();
- int afs_gn_hold();
- int afs_gn_rele();
- int afs_gn_close();
- int afs_gn_map();
- int afs_gn_unmap();
- /* manipulate attributes of files */
- int afs_gn_access();
- int afs_gn_getattr();
- int afs_gn_setattr();
- /* data update operations */
- int afs_gn_fclear();
- int afs_gn_fsync();
- int afs_gn_ftrunc();
- int afs_gn_rdwr();
- int afs_gn_lockctl();
- /* extensions */
- int afs_gn_ioctl();
- int afs_gn_readlink();
- int afs_gn_select();
- int afs_gn_symlink();
- int afs_gn_readdir();
- /* buffer ops */
- int afs_gn_strategy();
- /* security things */
- int afs_gn_revoke();
- int afs_gn_getacl();
- int afs_gn_setacl();
- int afs_gn_getpcl();
- int afs_gn_setpcl();
- int afs_gn_enosys();
- 
- 
- /*
-  * declare a struct vnodeops and initialize it with ptrs to all functions
-  */
- struct vnodeops afs_gn_vnodeops = {
-     /* creation/naming/deletion */
-     afs_gn_link,
-     afs_gn_mkdir,
-     afs_gn_mknod,
-     afs_gn_remove,
-     afs_gn_rename,
-     afs_gn_rmdir,
-     /* lookup, file handle stuff */
-     afs_gn_lookup,
-     afs_gn_fid,
-     /* access to files */
-     afs_gn_open,
-     afs_gn_create,
-     afs_gn_hold,
-     afs_gn_rele,
-     afs_gn_close,
-     afs_gn_map,
-     afs_gn_unmap,
-     /* manipulate attributes of files */
-     afs_gn_access,
-     afs_gn_getattr,
-     afs_gn_setattr,
-     /* data update operations */
-     afs_gn_fclear,
-     afs_gn_fsync,
-     afs_gn_ftrunc,
-     afs_gn_rdwr,
-     afs_gn_lockctl,
-     /* extensions */
-     afs_gn_ioctl,
-     afs_gn_readlink,
-     afs_gn_select,
-     afs_gn_symlink,
-     afs_gn_readdir,
-     /* buffer ops */
-     afs_gn_strategy,
-     /* security things */
-     afs_gn_revoke,
-     afs_gn_getacl,
-     afs_gn_setacl,
-     afs_gn_getpcl,
-     afs_gn_setpcl,
-     afs_gn_enosys,		/* vn_seek */
-     afs_gn_enosys,		/* vn_fsync_range */
-     afs_gn_enosys,		/* vn_create_attr */
-     afs_gn_enosys,		/* vn_finfo */
-     afs_gn_enosys,		/* vn_map_lloff */
-     afs_gn_enosys,		/* vn_readdir_eofp */
-     afs_gn_enosys,		/* vn_rdwr_attr */
-     afs_gn_enosys,		/* vn_memcntl */
-     afs_gn_enosys,		/* vn_spare7 */
-     afs_gn_enosys,		/* vn_spare8 */
-     afs_gn_enosys,		/* vn_spare9 */
-     afs_gn_enosys,		/* vn_spareA */
-     afs_gn_enosys,		/* vn_spareB */
-     afs_gn_enosys,		/* vn_spareC */
-     afs_gn_enosys,		/* vn_spareD */
-     afs_gn_enosys,		/* vn_spareE */
-     afs_gn_enosys		/* vn_spareF */
- #ifdef AFS_AIX51_ENV
- 	, afs_gn_enosys,	/* pagerBackRange */
-     afs_gn_enosys,		/* pagerGetFileSize */
-     afs_gn_enosys,		/* pagerReadAhead */
-     afs_gn_enosys,		/* pagerWriteBehind */
-     afs_gn_enosys		/* pagerEndCopy */
- #endif
- };
- struct vnodeops *afs_ops = &afs_gn_vnodeops;
- 
- 
  int
! afs_gn_link(vp, dp, name, cred)
!      struct vnode *vp;
!      struct vnode *dp;
!      char *name;
!      struct ucred *cred;
  {
      int error;
  
--- 55,65 ----
  #include "afsincludes.h"
  
  
  int
! afs_gn_link(struct vnode *vp, 
! 	    struct vnode *dp, 
! 	    char *name, 
! 	    struct ucred *cred)
  {
      int error;
  
***************
*** 195,209 ****
  
  
  int
! afs_gn_mkdir(dp, name, Mode, cred)
!      struct vnode *dp;
!      char *name;
! #ifdef AFS_AIX51_ENV
!      int32long64_t Mode;
! #else
!      int Mode;
! #endif
!      struct ucred *cred;
  {
      struct vattr va;
      struct vnode *vp;
--- 72,81 ----
  
  
  int
! afs_gn_mkdir(struct vnode *dp, 
! 	     char *name, 
! 	     int32long64_t Mode, 
! 	     struct ucred *cred)
  {
      struct vattr va;
      struct vnode *vp;
***************
*** 226,241 ****
  
  
  int
! afs_gn_mknod(dp, name, Mode, dev, cred)
!      struct vnode *dp;
!      char *name;
! #ifdef AFS_AIX51_ENV
!      int Mode;
! #else
!      int Mode;
! #endif
!      dev_t dev;
!      struct ucred *cred;
  {
      struct vattr va;
      struct vnode *vp;
--- 98,108 ----
  
  
  int
! afs_gn_mknod(struct vnode *dp, 
! 	     char *name, 
! 	     int32long64_t Mode, 
! 	     dev_t dev, 
! 	     struct ucred *cred)
  {
      struct vattr va;
      struct vnode *vp;
***************
*** 248,254 ****
      va.va_mode = (mode & 07777) & ~get_umask();
  
  /**** I'm not sure if suser() should stay here since it makes no sense in AFS; however the documentation says that one "should be super-user unless making a FIFO file. Others systems such as SUN do this checking in the early stages of mknod (before the abstraction), so it's equivalently the same! *****/
!     if (va.va_type != VFIFO && !suser(&error))
  	return (EPERM);
      switch (va.va_type) {
      case VDIR:
--- 115,121 ----
      va.va_mode = (mode & 07777) & ~get_umask();
  
  /**** I'm not sure if suser() should stay here since it makes no sense in AFS; however the documentation says that one "should be super-user unless making a FIFO file. Others systems such as SUN do this checking in the early stages of mknod (before the abstraction), so it's equivalently the same! *****/
!     if (va.va_type != VFIFO && !suser((char *)&error))
  	return (EPERM);
      switch (va.va_type) {
      case VDIR:
***************
*** 262,268 ****
      case VBLK:
  	va.va_rdev = dev;
      default:
! 	error = afs_create(dp, name, &va, NONEXCL, mode, &vp, cred);
      }
      if (!error) {
  	AFS_RELE(vp);
--- 129,135 ----
      case VBLK:
  	va.va_rdev = dev;
      default:
! 	error = afs_create(VTOAFS(dp), name, &va, NONEXCL, mode, (struct vcache **)&vp, cred);
      }
      if (!error) {
  	AFS_RELE(vp);
***************
*** 275,285 ****
  
  
  int
! afs_gn_remove(vp, dp, name, cred)
!      struct vnode *vp;		/* Ignored in AFS */
!      struct vnode *dp;
!      char *name;
!      struct ucred *cred;
  {
      int error;
  
--- 142,151 ----
  
  
  int
! afs_gn_remove(struct vnode *vp,		/* Ignored in AFS */
!               struct vnode * dp, 
! 	      char *name, 
! 	      struct ucred *cred)
  {
      int error;
  
***************
*** 292,305 ****
  
  
  int
! afs_gn_rename(vp, dp, name, tp, tdp, tname, cred)
!      struct vnode *dp;
!      char *name;
!      struct vnode *vp;		/* Ignored in AFS */
!      struct vnode *tp;		/* Ignored in AFS */
!      struct vnode *tdp;
!      char *tname;
!      struct ucred *cred;
  {
      int error;
  
--- 158,170 ----
  
  
  int
! afs_gn_rename(struct vnode *vp, 		/* Ignored in AFS */
! 	      struct vnode *dp, 
! 	      char *name, 
! 	      struct vnode *tp, 		/* Ignored in AFS */
! 	      struct vnode *tdp, 
! 	      char *tname, 
! 	      struct ucred *cred)
  {
      int error;
  
***************
*** 313,323 ****
  
  
  int
! afs_gn_rmdir(vp, dp, name, cred)
!      struct vnode *vp;		/* Ignored in AFS */
!      struct vnode *dp;
!      char *name;
!      struct ucred *cred;
  {
      int error;
  
--- 178,187 ----
  
  
  int
! afs_gn_rmdir(struct vnode *vp, 		/* Ignored in AFS */
! 	     struct vnode *dp, 
! 	     char *name, 
! 	     struct ucred *cred)
  {
      int error;
  
***************
*** 334,350 ****
  
  
  int
! afs_gn_lookup(dp, vpp, name, Flags, vattrp, cred)
!      struct vattr *vattrp;
!      struct vnode *dp;
!      struct vnode **vpp;
!      char *name;
! #ifdef AFS_AIX51_ENV
!      int32long64_t Flags;	/* includes FOLLOW... */
! #else
!      afs_uint32 Flags;		/* includes FOLLOW... */
! #endif
!      struct ucred *cred;
  {
      int error;
      int flags = Flags;
--- 198,209 ----
  
  
  int
! afs_gn_lookup(struct vnode *dp, 
! 	      struct vnode **vpp, 
! 	      char *name, 
! 	      int32long64_t Flags, 	/* includes FOLLOW... */
! 	      struct vattr *vattrp, 
! 	      struct ucred *cred)
  {
      int error;
      int flags = Flags;
***************
*** 360,369 ****
  
  
  int
! afs_gn_fid(vp, fidp, cred)
!      struct vnode *vp;
!      struct fid *fidp;
!      struct ucred *cred;
  {
      int error;
  
--- 219,227 ----
  
  
  int
! afs_gn_fid(struct vnode *vp, 
! 	struct fid *fidp, 
! 	struct ucred *cred)
  {
      int error;
  
***************
*** 376,392 ****
  
  
  int
! afs_gn_open(vp, Flags, ext, vinfop, cred)
!      struct vnode *vp;
! #ifdef AFS_AIX51_ENV
!      int32long64_t Flags;
!      ext_t ext;			/* Ignored in AFS */
! #else
!      int Flags;
!      int ext;			/* Ignored in AFS */
! #endif
!      struct ucred **vinfop;	/* return ptr for fp->f_vinfo, used as fp->f_cred */
!      struct ucred *cred;
  {
      int error;
      struct vattr va;
--- 234,244 ----
  
  
  int
! afs_gn_open(struct vnode *vp, 
! 	    int32long64_t Flags, 
! 	    ext_t ext, 
! 	    struct ucred **vinfop, 
! 	    struct ucred *cred)
  {
      int error;
      struct vattr va;
***************
*** 411,427 ****
  	afs_osi_Sleep(&tvp->opens);
      }
  
!     error = afs_access(vp, modes, cred);
      if (error) {
  	goto abort;
      }
  
!     error = afs_open(&vp, flags, cred);
      if (!error) {
  	if (flags & FTRUNC) {
  	    VATTR_NULL(&va);
  	    va.va_size = 0;
! 	    error = afs_setattr(vp, &va, cred);
  	}
  
  	if (flags & FNSHARE)
--- 263,279 ----
  	afs_osi_Sleep(&tvp->opens);
      }
  
!     error = afs_access(VTOAFS(vp), modes, cred);
      if (error) {
  	goto abort;
      }
  
!     error = afs_open((struct vcache **) &vp, flags, cred);
      if (!error) {
  	if (flags & FTRUNC) {
  	    VATTR_NULL(&va);
  	    va.va_size = 0;
! 	    error = afs_setattr(VTOAFS(vp), &va, cred);
  	}
  
  	if (flags & FNSHARE)
***************
*** 447,465 ****
  
  
  int
! afs_gn_create(dp, vpp, Flags, name, Mode, vinfop, cred)
!      struct vnode *dp;
!      struct vnode **vpp;
!      char *name;
! #ifdef AFS_AIX51_ENV
!      int32long64_t Flags;
!      int32long64_t Mode;
! #else
!      int Flags;
!      int Mode;
! #endif
!      struct ucred **vinfop;	/* return ptr for fp->f_vinfo, used as fp->f_cred */
!      struct ucred *cred;
  {
      struct vattr va;
      enum vcexcl exclusive;
--- 299,312 ----
  
  
  int
! afs_gn_create(struct vnode *dp, 
! 	      struct vnode **vpp, 
! 	      int32long64_t Flags, 
! 	      char *name, 
! 	      int32long64_t Mode, 
! 	      struct ucred **vinfop, /* return ptr for fp->f_vinfo, used as fp->f_cred */
! 	      struct ucred *cred)
! 
  {
      struct vattr va;
      enum vcexcl exclusive;
***************
*** 481,487 ****
  	modes |= X_ACC;
      if ((flags & FWRITE) || (flags & FTRUNC))
  	modes |= W_ACC;
!     error = afs_create(dp, name, &va, exclusive, modes, vpp, cred);
      if (error) {
  	return error;
      }
--- 328,334 ----
  	modes |= X_ACC;
      if ((flags & FWRITE) || (flags & FTRUNC))
  	modes |= W_ACC;
!     error = afs_create(VTOAFS(dp), name, &va, exclusive, modes, (struct vcache **)vpp, cred);
      if (error) {
  	return error;
      }
***************
*** 502,508 ****
  	 * execsOrWriters flag (else we'll be treated as the sun's "core"
  	 * case). */
  	*vinfop = cred;		/* save user creds in fp->f_vinfo */
! 	error = afs_open(vpp, flags, cred);
      }
      afs_Trace4(afs_iclSetp, CM_TRACE_GCREATE, ICL_TYPE_POINTER, dp,
  	       ICL_TYPE_STRING, name, ICL_TYPE_LONG, mode, ICL_TYPE_LONG,
--- 349,355 ----
  	 * execsOrWriters flag (else we'll be treated as the sun's "core"
  	 * case). */
  	*vinfop = cred;		/* save user creds in fp->f_vinfo */
! 	error = afs_open((struct vcache **)vpp, flags, cred);
      }
      afs_Trace4(afs_iclSetp, CM_TRACE_GCREATE, ICL_TYPE_POINTER, dp,
  	       ICL_TYPE_STRING, name, ICL_TYPE_LONG, mode, ICL_TYPE_LONG,
***************
*** 512,519 ****
  
  
  int
! afs_gn_hold(vp)
!      struct vnode *vp;
  {
      AFS_STATCNT(afs_gn_hold);
      ++(vp->v_count);
--- 359,365 ----
  
  
  int
! afs_gn_hold(struct vnode *vp)
  {
      AFS_STATCNT(afs_gn_hold);
      ++(vp->v_count);
***************
*** 523,530 ****
  int vmPageHog = 0;
  
  int
! afs_gn_rele(vp)
!      struct vnode *vp;
  {
      struct vcache *vcp = VTOAFS(vp);
      int error = 0;
--- 369,375 ----
  int vmPageHog = 0;
  
  int
! afs_gn_rele(struct vnode *vp)
  {
      struct vcache *vcp = VTOAFS(vp);
      int error = 0;
***************
*** 544,558 ****
  
  
  int
! afs_gn_close(vp, Flags, vinfo, cred)
!      struct vnode *vp;
! #ifdef AFS_AIX51_ENV
!      int32long64_t Flags;
! #else
!      int Flags;
! #endif
!      caddr_t vinfo;		/* Ignored in AFS */
!      struct ucred *cred;
  {
      int error;
      struct vcache *tvp = VTOAFS(vp);
--- 389,398 ----
  
  
  int
! afs_gn_close(struct vnode *vp, 
! 	     int32long64_t Flags, 
! 	     caddr_t vinfo, 		/* Ignored in AFS */
! 	     struct ucred *cred)
  {
      int error;
      struct vcache *tvp = VTOAFS(vp);
***************
*** 573,587 ****
  
  
  int
! afs_gn_map(vp, addr, Len, Off, Flag, cred)
!      struct vnode *vp;
!      caddr_t addr;
! #ifdef AFS_AIX51_ENV
!      uint32long64_t Len, Off, Flag;
! #else
!      u_int Len, Off, Flag;
! #endif
!      struct ucred *cred;
  {
      struct vcache *vcp = VTOAFS(vp);
      struct vrequest treq;
--- 413,424 ----
  
  
  int
! afs_gn_map(struct vnode *vp, 
! 	   caddr_t addr, 
! 	   uint32long64_t Len, 
! 	   uint32long64_t Off, 
! 	   uint32long64_t Flag, 
! 	   struct ucred *cred)
  {
      struct vcache *vcp = VTOAFS(vp);
      struct vrequest treq;
***************
*** 612,618 ****
  #endif
  	/* Consider  V_INTRSEG too for interrupts */
  	if (error =
! 	    vms_create(&vcp->segid, V_CLIENT, vcp->v.v_gnode, tlen, 0, 0)) {
  	    ReleaseWriteLock(&vcp->lock);
  	    return (EOPNOTSUPP);
  	}
--- 449,455 ----
  #endif
  	/* Consider  V_INTRSEG too for interrupts */
  	if (error =
! 	    vms_create(&vcp->segid, V_CLIENT, (dev_t) vcp->v.v_gnode, tlen, 0, 0)) {
  	    ReleaseWriteLock(&vcp->lock);
  	    return (EOPNOTSUPP);
  	}
***************
*** 650,663 ****
  
  
  int
! afs_gn_unmap(vp, flag, cred)
!      struct vnode *vp;
! #ifdef AFS_AIX51_ENV
!      int32long64_t flag;
! #else
!      int flag;
! #endif
!      struct ucred *cred;
  {
      struct vcache *vcp = VTOAFS(vp);
      AFS_STATCNT(afs_gn_unmap);
--- 487,495 ----
  
  
  int
! afs_gn_unmap(struct vnode *vp, 
! 	     int32long64_t flag, 
! 	     struct ucred *cred)
  {
      struct vcache *vcp = VTOAFS(vp);
      AFS_STATCNT(afs_gn_unmap);
***************
*** 679,694 ****
  
  
  int
! afs_gn_access(vp, Mode, Who, cred)
!      struct vnode *vp;
! #ifdef AFS_AIX51_ENV
!      int32long64_t Mode;
!      int32long64_t Who;
! #else
!      int Mode;
!      int Who;
! #endif
!      struct ucred *cred;
  {
      int error;
      struct vattr vattr;
--- 511,520 ----
  
  
  int
! afs_gn_access(struct vnode *vp, 
! 	      int32long64_t Mode, 
! 	      int32long64_t Who, 
! 	      struct ucred *cred)
  {
      int error;
      struct vattr vattr;
***************
*** 701,711 ****
  	goto out;
      }
  
!     error = afs_access(vp, mode, cred);
      if (!error) {
  	/* Additional testing */
  	if (who == ACC_OTHERS || who == ACC_ANY) {
! 	    error = afs_getattr(vp, &vattr, cred);
  	    if (!error) {
  		if (who == ACC_ANY) {
  		    if (((vattr.va_mode >> 6) & mode) == mode) {
--- 527,537 ----
  	goto out;
      }
  
!     error = afs_access(VTOAFS(vp), mode, cred);
      if (!error) {
  	/* Additional testing */
  	if (who == ACC_OTHERS || who == ACC_ANY) {
! 	    error = afs_getattr(VTOAFS(vp), &vattr, cred);
  	    if (!error) {
  		if (who == ACC_ANY) {
  		    if (((vattr.va_mode >> 6) & mode) == mode) {
***************
*** 719,725 ****
  		    error = EACCES;
  	    }
  	} else if (who == ACC_ALL) {
! 	    error = afs_getattr(vp, &vattr, cred);
  	    if (!error) {
  		if ((!((vattr.va_mode >> 6) & mode))
  		    || (!((vattr.va_mode >> 3) & mode))
--- 545,551 ----
  		    error = EACCES;
  	    }
  	} else if (who == ACC_ALL) {
! 	    error = afs_getattr(VTOAFS(vp), &vattr, cred);
  	    if (!error) {
  		if ((!((vattr.va_mode >> 6) & mode))
  		    || (!((vattr.va_mode >> 3) & mode))
***************
*** 739,753 ****
  
  
  int
! afs_gn_getattr(vp, vattrp, cred)
!      struct vnode *vp;
!      struct vattr *vattrp;
!      struct ucred *cred;
  {
      int error;
  
      AFS_STATCNT(afs_gn_getattr);
!     error = afs_getattr(vp, vattrp, cred);
      afs_Trace2(afs_iclSetp, CM_TRACE_GGETATTR, ICL_TYPE_POINTER, vp,
  	       ICL_TYPE_LONG, error);
      return (error);
--- 565,578 ----
  
  
  int
! afs_gn_getattr(struct vnode *vp, 
! 	       struct vattr *vattrp, 
! 	       struct ucred *cred)
  {
      int error;
  
      AFS_STATCNT(afs_gn_getattr);
!     error = afs_getattr(VTOAFS(vp), vattrp, cred);
      afs_Trace2(afs_iclSetp, CM_TRACE_GGETATTR, ICL_TYPE_POINTER, vp,
  	       ICL_TYPE_LONG, error);
      return (error);
***************
*** 755,774 ****
  
  
  int
! afs_gn_setattr(vp, op, arg1, arg2, arg3, cred)
!      struct vnode *vp;
! #ifdef AFS_AIX51_ENV
!      int32long64_t op;
!      int32long64_t arg1;
!      int32long64_t arg2;
!      int32long64_t arg3;
! #else
!      int op;
!      int arg1;
!      int arg2;
!      int arg3;
! #endif
!      struct ucred *cred;
  {
      struct vattr va;
      int error = 0;
--- 580,591 ----
  
  
  int
! afs_gn_setattr(struct vnode *vp, 
! 	       int32long64_t op, 
! 	       int32long64_t arg1, 
! 	       int32long64_t arg2, 
! 	       int32long64_t arg3, 
! 	       struct ucred *cred)
  {
      struct vattr va;
      int error = 0;
***************
*** 805,811 ****
  	goto out;
      }
  
!     error = afs_setattr(vp, &va, cred);
    out:
      afs_Trace2(afs_iclSetp, CM_TRACE_GSETATTR, ICL_TYPE_POINTER, vp,
  	       ICL_TYPE_LONG, error);
--- 622,628 ----
  	goto out;
      }
  
!     error = afs_setattr(VTOAFS(vp), &va, cred);
    out:
      afs_Trace2(afs_iclSetp, CM_TRACE_GSETATTR, ICL_TYPE_POINTER, vp,
  	       ICL_TYPE_LONG, error);
***************
*** 815,837 ****
  
  char zero_buffer[PAGESIZE];
  int
! afs_gn_fclear(vp, flags, offset, length, vinfo, cred)
!      struct vnode *vp;
! #ifdef AFS_AIX51_ENV
!      int32long64_t flags;
! #else
!      int flags;
! #endif
!      offset_t offset;
!      offset_t length;
!      caddr_t vinfo;
!      struct ucred *cred;
  {
      int i, len, error = 0;
      struct iovec iov;
      struct uio uio;
      static int fclear_init = 0;
!     register struct vcache *avc = VTOAFS(vp);
  
      AFS_STATCNT(afs_gn_fclear);
      if (!fclear_init) {
--- 632,649 ----
  
  char zero_buffer[PAGESIZE];
  int
! afs_gn_fclear(struct vnode *vp, 
! 	      int32long64_t flags, 
! 	      offset_t offset, 
! 	      offset_t length, 
! 	      caddr_t vinfo, 
! 	      struct ucred *cred)
  {
      int i, len, error = 0;
      struct iovec iov;
      struct uio uio;
      static int fclear_init = 0;
!     struct vcache *avc = VTOAFS(vp);
  
      AFS_STATCNT(afs_gn_fclear);
      if (!fclear_init) {
***************
*** 860,866 ****
  	uio.afsio_iovcnt = 1;
  	uio.afsio_seg = AFS_UIOSYS;
  	uio.afsio_resid = iov.iov_len;
! 	if (error = afs_rdwr(vp, &uio, UIO_WRITE, 0, cred))
  	    break;
      }
      afs_Trace4(afs_iclSetp, CM_TRACE_GFCLEAR, ICL_TYPE_POINTER, vp,
--- 672,678 ----
  	uio.afsio_iovcnt = 1;
  	uio.afsio_seg = AFS_UIOSYS;
  	uio.afsio_resid = iov.iov_len;
! 	if (error = afs_rdwr(VTOAFS(vp), &uio, UIO_WRITE, 0, cred))
  	    break;
      }
      afs_Trace4(afs_iclSetp, CM_TRACE_GFCLEAR, ICL_TYPE_POINTER, vp,
***************
*** 871,886 ****
  
  
  int
! afs_gn_fsync(vp, flags, vinfo, cred)
!      struct vnode *vp;
! #ifdef AFS_AIX51_ENV
!      int32long64_t flags;	/* Not used by AFS */
!      int32long64_t vinfo;	/* Not used by AFS */
! #else
!      int flags;			/* Not used by AFS */
!      caddr_t vinfo;		/* Not used by AFS */
! #endif
!      struct ucred *cred;
  {
      int error;
  
--- 683,692 ----
  
  
  int
! afs_gn_fsync(struct vnode *vp, 
! 	     int32long64_t flags, 	/* Not used by AFS */
! 	     int32long64_t vinfo, 	/* Not used by AFS */
! 	     struct ucred *cred)
  {
      int error;
  
***************
*** 893,908 ****
  
  
  int
! afs_gn_ftrunc(vp, flags, length, vinfo, cred)
!      struct vnode *vp;
! #ifdef AFS_AIX51_ENV
!      int32long64_t flags;	/* Ignored in AFS */
! #else
!      int flags;			/* Ignored in AFS */
! #endif
!      offset_t length;
!      caddr_t vinfo;		/* Ignored in AFS */
!      struct ucred *cred;
  {
      struct vattr va;
      int error;
--- 699,709 ----
  
  
  int
! afs_gn_ftrunc(struct vnode *vp, 
! 	      int32long64_t flags, 
! 	      offset_t length, 
! 	      caddr_t vinfo, 
! 	      struct ucred *cred)
  {
      struct vattr va;
      int error;
***************
*** 910,916 ****
      AFS_STATCNT(afs_gn_ftrunc);
      VATTR_NULL(&va);
      va.va_size = length;
!     error = afs_setattr(vp, &va, cred);
      afs_Trace4(afs_iclSetp, CM_TRACE_GFTRUNC, ICL_TYPE_POINTER, vp,
  	       ICL_TYPE_LONG, flags, ICL_TYPE_OFFSET,
  	       ICL_HANDLE_OFFSET(length), ICL_TYPE_LONG, error);
--- 711,717 ----
      AFS_STATCNT(afs_gn_ftrunc);
      VATTR_NULL(&va);
      va.va_size = length;
!     error = afs_setattr(VTOAFS(vp), &va, cred);
      afs_Trace4(afs_iclSetp, CM_TRACE_GFTRUNC, ICL_TYPE_POINTER, vp,
  	       ICL_TYPE_LONG, flags, ICL_TYPE_OFFSET,
  	       ICL_HANDLE_OFFSET(length), ICL_TYPE_LONG, error);
***************
*** 921,942 ****
  #define MIN_PAGE_HOG_SIZE 8388608
  
  int
! afs_gn_rdwr(vp, op, Flags, ubuf, ext, vinfo, vattrp, cred)
!      struct vnode *vp;
!      enum uio_rw op;
! #ifdef AFS_AIX51_ENV
!      int32long64_t Flags;
!      ext_t ext;			/* Ignored in AFS */
! #else
!      int Flags;
!      int ext;			/* Ignored in AFS */
! #endif
!      struct uio *ubuf;
!      caddr_t vinfo;		/* Ignored in AFS */
!      struct vattr *vattrp;
!      struct ucred *cred;
  {
!     register struct vcache *vcp = VTOAFS(vp);
      struct vrequest treq;
      int error = 0;
      int free_cred = 0;
--- 722,737 ----
  #define MIN_PAGE_HOG_SIZE 8388608
  
  int
! afs_gn_rdwr(struct vnode *vp, 
! 	    enum uio_rw op, 
! 	    int32long64_t Flags, 
! 	    struct uio *ubuf, 
! 	    ext_t ext, 			/* Ignored in AFS */
! 	    caddr_t vinfo, 		/* Ignored in AFS */
! 	    struct vattr *vattrp, 
! 	    struct ucred *cred)
  {
!     struct vcache *vcp = VTOAFS(vp);
      struct vrequest treq;
      int error = 0;
      int free_cred = 0;
***************
*** 1015,1028 ****
      if (op == UIO_WRITE) {
  #ifdef AFS_64BIT_CLIENT
  	if (ubuf->afsio_offset < afs_vmMappingEnd) {
! #endif /* AFS_64BIT_ENV */
  	    ObtainWriteLock(&vcp->lock, 240);
  	    vcp->states |= CDirty;	/* Set the dirty bit */
  	    afs_FakeOpen(vcp);
  	    ReleaseWriteLock(&vcp->lock);
  #ifdef AFS_64BIT_CLIENT
  	}
! #endif /* AFS_64BIT_ENV */
      }
  
      error = afs_vm_rdwr(vp, ubuf, op, flags, cred);
--- 810,823 ----
      if (op == UIO_WRITE) {
  #ifdef AFS_64BIT_CLIENT
  	if (ubuf->afsio_offset < afs_vmMappingEnd) {
! #endif /* AFS_64BIT_CLIENT */
  	    ObtainWriteLock(&vcp->lock, 240);
  	    vcp->states |= CDirty;	/* Set the dirty bit */
  	    afs_FakeOpen(vcp);
  	    ReleaseWriteLock(&vcp->lock);
  #ifdef AFS_64BIT_CLIENT
  	}
! #endif /* AFS_64BIT_CLIENT */
      }
  
      error = afs_vm_rdwr(vp, ubuf, op, flags, cred);
***************
*** 1030,1042 ****
      if (op == UIO_WRITE) {
  #ifdef AFS_64BIT_CLIENT
  	if (ubuf->afsio_offset < afs_vmMappingEnd) {
! #endif /* AFS_64BIT_ENV */
  	    ObtainWriteLock(&vcp->lock, 241);
  	    afs_FakeClose(vcp, cred);	/* XXXX For nfs trans and cores XXXX */
  	    ReleaseWriteLock(&vcp->lock);
  #ifdef AFS_64BIT_CLIENT
  	}
! #endif /* AFS_64BIT_ENV */
      }
      if (vattrp != NULL && error == 0)
  	afs_gn_getattr(vp, vattrp, cred);
--- 825,837 ----
      if (op == UIO_WRITE) {
  #ifdef AFS_64BIT_CLIENT
  	if (ubuf->afsio_offset < afs_vmMappingEnd) {
! #endif /* AFS_64BIT_CLIENT */
  	    ObtainWriteLock(&vcp->lock, 241);
  	    afs_FakeClose(vcp, cred);	/* XXXX For nfs trans and cores XXXX */
  	    ReleaseWriteLock(&vcp->lock);
  #ifdef AFS_64BIT_CLIENT
  	}
! #endif /* AFS_64BIT_CLIENT */
      }
      if (vattrp != NULL && error == 0)
  	afs_gn_getattr(vp, vattrp, cred);
***************
*** 1050,1064 ****
  }
  
  #define AFS_MAX_VM_CHUNKS 10
! afs_vm_rdwr(vp, uiop, rw, ioflag, credp)
!      register struct vnode *vp;
!      struct uio *uiop;
!      enum uio_rw rw;
!      int ioflag;
!      struct ucred *credp;
  {
!     register afs_int32 code = 0;
!     register int i;
      afs_int32 blockSize;
      afs_size_t fileSize, xfrOffset, offset, old_offset, xfrSize;
      vmsize_t txfrSize;
--- 845,859 ----
  }
  
  #define AFS_MAX_VM_CHUNKS 10
! static int
! afs_vm_rdwr(struct vnode *vp, 
! 	    struct uio *uiop, 
! 	    enum uio_rw rw, 
! 	    int ioflag, 
! 	    struct ucred *credp)
  {
!     afs_int32 code = 0;
!     int i;
      afs_int32 blockSize;
      afs_size_t fileSize, xfrOffset, offset, old_offset, xfrSize;
      vmsize_t txfrSize;
***************
*** 1068,1074 ****
      int mixed = 0;
      afs_size_t add2resid = 0;
  #endif /* AFS_64BIT_CLIENT */
!     register struct vcache *vcp = VTOAFS(vp);
      struct dcache *tdc;
      afs_size_t start_offset;
      afs_int32 save_resid = uiop->afsio_resid;
--- 863,869 ----
      int mixed = 0;
      afs_size_t add2resid = 0;
  #endif /* AFS_64BIT_CLIENT */
!     struct vcache *vcp = VTOAFS(vp);
      struct dcache *tdc;
      afs_size_t start_offset;
      afs_int32 save_resid = uiop->afsio_resid;
***************
*** 1093,1104 ****
--- 888,901 ----
      xfrOffset = uiop->afsio_offset;
      if (xfrOffset < 0 || xfrOffset + xfrSize < 0) {
  	code = EINVAL;
+ 	ReleaseReadLock(&vcp->lock);
  	goto fail;
      }
  #ifndef AFS_64BIT_CLIENT
      /* check for "file too big" error, which should really be done above us */
      if (rw == UIO_WRITE && xfrSize + fileSize > get_ulimit()) {
  	code = EFBIG;
+ 	ReleaseReadLock(&vcp->lock);
  	goto fail;
      }
  #endif /* AFS_64BIT_CLIENT */
***************
*** 1108,1116 ****
          if (rw == UIO_READ) {
              /* don't read past EOF */
              if (xfrSize+xfrOffset > fileSize) {
!             add2resid = xfrSize + xfrOffset - fileSize;
!             xfrSize = fileSize - xfrOffset;
!             if (xfrSize <= 0) goto fail;
                  txfrSize = xfrSize;
                  afsio_trim(uiop, txfrSize);
              }
--- 905,916 ----
          if (rw == UIO_READ) {
              /* don't read past EOF */
              if (xfrSize+xfrOffset > fileSize) {
! 		add2resid = xfrSize + xfrOffset - fileSize;
! 		xfrSize = fileSize - xfrOffset;
! 		if (xfrSize <= 0) {
! 		    ReleaseReadLock(&vcp->lock);
! 		    goto fail;
! 		}
                  txfrSize = xfrSize;
                  afsio_trim(uiop, txfrSize);
              }
***************
*** 1137,1145 ****
  	    ObtainWriteLock(&vcp->lock, 244);
  	    afs_FakeOpen(vcp);	/* XXXX For nfs trans and cores XXXX */
  	    ReleaseWriteLock(&vcp->lock);
- 	    ObtainReadLock(&vcp->lock);
  	    if (code)
  		goto fail;
  	    xfrSize = afs_vmMappingEnd - xfrOffset;
  	    txfrSize = xfrSize;
  	    afsio_trim(uiop, txfrSize);
--- 937,945 ----
  	    ObtainWriteLock(&vcp->lock, 244);
  	    afs_FakeOpen(vcp);	/* XXXX For nfs trans and cores XXXX */
  	    ReleaseWriteLock(&vcp->lock);
  	    if (code)
  		goto fail;
+ 	    ObtainReadLock(&vcp->lock);
  	    xfrSize = afs_vmMappingEnd - xfrOffset;
  	    txfrSize = xfrSize;
  	    afsio_trim(uiop, txfrSize);
***************
*** 1160,1166 ****
  #endif
  	/* Consider  V_INTRSEG too for interrupts */
  	if (code =
! 	    vms_create(&vcp->segid, V_CLIENT, vcp->v.v_gnode, tlen, 0, 0)) {
  	    goto fail;
  	}
  #ifdef AFS_64BIT_KERNEL
--- 960,967 ----
  #endif
  	/* Consider  V_INTRSEG too for interrupts */
  	if (code =
! 	    vms_create(&vcp->segid, V_CLIENT, (dev_t) vcp->v.v_gnode, tlen, 0, 0)) {
! 	    ReleaseReadLock(&vcp->lock);
  	    goto fail;
  	}
  #ifdef AFS_64BIT_KERNEL
***************
*** 1171,1182 ****
      }
      vcp->v.v_gnode->gn_seg = vcp->segid;
      if (rw == UIO_READ) {
  	/* don't read past EOF */
  	if (xfrSize + xfrOffset > fileSize)
  	    xfrSize = fileSize - xfrOffset;
  	if (xfrSize <= 0)
  	    goto fail;
- 	ReleaseReadLock(&vcp->lock);
  #ifdef AFS_64BIT_CLIENT
  	toffset = xfrOffset;
  	uiop->afsio_offset = xfrOffset;
--- 972,983 ----
      }
      vcp->v.v_gnode->gn_seg = vcp->segid;
      if (rw == UIO_READ) {
+ 	ReleaseReadLock(&vcp->lock);
  	/* don't read past EOF */
  	if (xfrSize + xfrOffset > fileSize)
  	    xfrSize = fileSize - xfrOffset;
  	if (xfrSize <= 0)
  	    goto fail;
  #ifdef AFS_64BIT_CLIENT
  	toffset = xfrOffset;
  	uiop->afsio_offset = xfrOffset;
***************
*** 1277,1282 ****
--- 1078,1086 ----
  	    code = vm_move(vcp->segid, xfrOffset, xfrSize, rw, uiop);
  #endif /* AFS_64BIT_CLIENT */
  	    AFS_GLOCK();
+ 	    if (code) {
+ 		goto fail;
+ 	    }
  	    xfrOffset += len;
  	    xfrSize = 0;
  	} else {
***************
*** 1295,1300 ****
--- 1099,1107 ----
  		code = afs_DoPartialWrite(vcp, &treq);
  		vcp->states |= CDirty;
  		ReleaseWriteLock(&vcp->lock);
+ 		if (code) {
+ 		    goto fail;
+ 		}
  	    }
  	    counter++;
  
***************
*** 1312,1317 ****
--- 1119,1128 ----
  #endif /* AFS_64BIT_CLIENT */
  	    AFS_GLOCK();
  	    len -= tuio.afsio_resid;
+ 	    if (code || (len <= 0)) {
+ 		code = code ? code : EINVAL;
+ 		goto fail;
+ 	    }
  	    afsio_skip(uiop, len);
  	    xfrSize -= len;
  	    xfrOffset += len;
***************
*** 1325,1333 ****
  		   ICL_TYPE_INT32, first_page, ICL_TYPE_INT32, pages);
  	AFS_GUNLOCK();
  	code = vm_writep(vcp->segid, first_page, pages);
  	if (++count > AFS_MAX_VM_CHUNKS) {
  	    count = 0;
! 	    vms_iowait(vcp->segid);
  	}
  	AFS_GLOCK();
  
--- 1136,1153 ----
  		   ICL_TYPE_INT32, first_page, ICL_TYPE_INT32, pages);
  	AFS_GUNLOCK();
  	code = vm_writep(vcp->segid, first_page, pages);
+ 	if (code) {
+ 	    AFS_GLOCK();
+ 	    goto fail;
+ 	}
  	if (++count > AFS_MAX_VM_CHUNKS) {
  	    count = 0;
! 	    code = vms_iowait(vcp->segid);
! 	    if (code) {
! 		/* cache device failure? */
! 		AFS_GLOCK();
! 		goto fail;
! 	    }
  	}
  	AFS_GLOCK();
  
***************
*** 1335,1342 ****
  
      if (count) {
  	AFS_GUNLOCK();
! 	vms_iowait(vcp->segid);
  	AFS_GLOCK();
      }
  
      ObtainWriteLock(&vcp->lock, 242);
--- 1155,1166 ----
  
      if (count) {
  	AFS_GUNLOCK();
! 	code = vms_iowait(vcp->segid);
  	AFS_GLOCK();
+ 	if (code) {
+ 	    /* cache device failure? */
+ 	    goto fail;
+ 	}
      }
  
      ObtainWriteLock(&vcp->lock, 242);
***************
*** 1367,1389 ****
  	uiop->afsio_offset = finalOffset;
      }
  #endif /* AFS_64BIT_CLIENT */
  
    fail:
-     ReleaseReadLock(&vcp->lock);
      afs_Trace2(afs_iclSetp, CM_TRACE_VMWRITE3, ICL_TYPE_POINTER, vcp,
  	       ICL_TYPE_INT32, code);
      return code;
  }
  
  
! afs_direct_rdwr(vp, uiop, rw, ioflag, credp)
!      register struct vnode *vp;
!      struct uio *uiop;
!      enum uio_rw rw;
!      int ioflag;
!      struct ucred *credp;
  {
!     register afs_int32 code = 0;
      afs_size_t fileSize, xfrOffset, offset, old_offset, xfrSize;
      struct vcache *vcp = VTOAFS(vp);
      afs_int32 save_resid = uiop->afsio_resid;
--- 1191,1213 ----
  	uiop->afsio_offset = finalOffset;
      }
  #endif /* AFS_64BIT_CLIENT */
+     ReleaseReadLock(&vcp->lock);
  
    fail:
      afs_Trace2(afs_iclSetp, CM_TRACE_VMWRITE3, ICL_TYPE_POINTER, vcp,
  	       ICL_TYPE_INT32, code);
      return code;
  }
  
  
! static int
! afs_direct_rdwr(struct vnode *vp, 
! 	        struct uio *uiop, 
! 		enum uio_rw rw, 
! 		int ioflag, 
! 		struct ucred *credp)
  {
!     afs_int32 code = 0;
      afs_size_t fileSize, xfrOffset, offset, old_offset, xfrSize;
      struct vcache *vcp = VTOAFS(vp);
      afs_int32 save_resid = uiop->afsio_resid;
***************
*** 1429,1435 ****
      afs_Trace3(afs_iclSetp, CM_TRACE_DIRECTRDWR, ICL_TYPE_POINTER, vp,
  	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(uiop->afsio_offset),
  	       ICL_TYPE_LONG, uiop->afsio_resid);
!     code = afs_rdwr(vp, uiop, rw, ioflag, credp);
      if (code != 0) {
  	uiop->afsio_resid = save_resid;
      } else {
--- 1253,1259 ----
      afs_Trace3(afs_iclSetp, CM_TRACE_DIRECTRDWR, ICL_TYPE_POINTER, vp,
  	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(uiop->afsio_offset),
  	       ICL_TYPE_LONG, uiop->afsio_resid);
!     code = afs_rdwr(VTOAFS(vp), uiop, rw, ioflag, credp);
      if (code != 0) {
  	uiop->afsio_resid = save_resid;
      } else {
***************
*** 1456,1466 ****
  
  
  static int
! lock_normalize(vp, lckdat, offset, cred)
!      struct vnode *vp;
!      struct eflock *lckdat;
!      offset_t offset;
!      struct ucred *cred;
  {
      struct vattr vattr;
      int code;
--- 1280,1289 ----
  
  
  static int
! lock_normalize(struct vnode *vp, 
! 	       struct flock *lckdat, 
! 	       offset_t offset, 
! 	       struct ucred *cred)
  {
      struct vattr vattr;
      int code;
***************
*** 1472,1478 ****
  	lckdat->l_start += (off_t) offset;
  	break;
      case 2:
! 	code = afs_getattr(vp, &vattr, cred);
  	if (code != 0)
  	    return code;
  	lckdat->l_start += (off_t) vattr.va_size;
--- 1295,1301 ----
  	lckdat->l_start += (off_t) offset;
  	break;
      case 2:
! 	code = afs_getattr(VTOAFS(vp), &vattr, cred);
  	if (code != 0)
  	    return code;
  	lckdat->l_start += (off_t) vattr.va_size;
***************
*** 1486,1503 ****
  
  
  
! afs_gn_lockctl(vp, offset, lckdat, cmd, ignored_fcn, ignored_id, cred)
!      void (*ignored_fcn) ();
!      void *ignored_id;
!      struct vnode *vp;
!      offset_t offset;
!      struct eflock *lckdat;
!      struct ucred *cred;
! #ifdef AFS_AIX51_ENV
!      int32long64_t cmd;
! #else
!      int cmd;
! #endif
  {
      int error, ncmd = 0;
      struct flock flkd;
--- 1309,1326 ----
  
  
  
! int
! afs_gn_lockctl(struct vnode *vp, 
! 	       offset_t offset, 
! 	       struct eflock *lckdat, 
! 	       int32long64_t cmd, 
! 	       int (*ignored_fcn) (),
! #ifdef AFS_AIX52_ENV /* Changed in AIX 5.2 and up */
! 	       ulong * ignored_id, 
! #else /* AFS_AIX52_ENV */
! 	       ulong32int64_t * ignored_id,
! #endif /* AFS_AIX52_ENV */
! 	       struct ucred *cred)
  {
      int error, ncmd = 0;
      struct flock flkd;
***************
*** 1538,1554 ****
  
  /* NOTE: In the nfs glue routine (nfs_gn2sun.c) the order was wrong (vp, flags, cmd, arg, ext); was that another typo? */
  int
! afs_gn_ioctl(vp, Cmd, arg, flags, channel, ext)
!      struct vnode *vp;
! #ifdef AFS_AIX51_ENV
!      int32long64_t Cmd;
! #else
!      int Cmd;
! #endif
!      int arg;
!      int flags;			/* Ignored in AFS */
!      int channel;		/* Ignored in AFS */
!      int ext;			/* Ignored in AFS */
  {
      int error;
      int cmd = Cmd;
--- 1361,1372 ----
  
  /* NOTE: In the nfs glue routine (nfs_gn2sun.c) the order was wrong (vp, flags, cmd, arg, ext); was that another typo? */
  int
! afs_gn_ioctl(struct vnode *vp, 
! 	     int32long64_t Cmd, 
! 	     caddr_t arg, 
! 	     size_t flags, 		/* Ignored in AFS */
! 	     ext_t ext, 		/* Ignored in AFS */
! 	     struct ucred *crp)		/* Ignored in AFS */
  {
      int error;
      int cmd = Cmd;
***************
*** 1563,1572 ****
  
  
  int
! afs_gn_readlink(vp, uiop, cred)
!      struct vnode *vp;
!      struct uio *uiop;
!      struct ucred *cred;
  {
      int error;
  
--- 1381,1389 ----
  
  
  int
! afs_gn_readlink(struct vnode *vp, 
! 	        struct uio *uiop, 
! 		struct ucred *cred)
  {
      int error;
  
***************
*** 1579,1589 ****
  
  
  int
! afs_gn_select(vp, which, vinfo, mpx)
!      struct vnode *vp;
!      int which;
!      caddr_t *vinfo;
!      caddr_t *mpx;
  {
      AFS_STATCNT(afs_gn_select);
      /* NO SUPPORT for this in afs YET! */
--- 1396,1408 ----
  
  
  int
! afs_gn_select(struct vnode *vp, 
! 	      int32long64_t correl,
! 	      ushort e,
! 	      ushort *re,
! 	      void (* notify)(),
! 	      caddr_t vinfo,
! 	      struct ucred *crp)
  {
      AFS_STATCNT(afs_gn_select);
      /* NO SUPPORT for this in afs YET! */
***************
*** 1592,1602 ****
  
  
  int
! afs_gn_symlink(vp, link, target, cred)
!      struct vnode *vp;
!      char *target;
!      char *link;
!      struct ucred *cred;
  {
      struct vattr va;
      int error;
--- 1411,1420 ----
  
  
  int
! afs_gn_symlink(struct vnode *vp, 
! 	       char *link, 
! 	       char *target, 
! 	       struct ucred *cred)
  {
      struct vattr va;
      int error;
***************
*** 1613,1622 ****
  
  
  int
! afs_gn_readdir(vp, uiop, cred)
!      struct vnode *vp;
!      struct uio *uiop;
!      struct ucred *cred;
  {
      int error;
  
--- 1431,1439 ----
  
  
  int
! afs_gn_readdir(struct vnode *vp, 
! 	       struct uio *uiop, 
! 	       struct ucred *cred)
  {
      int error;
  
***************
*** 1629,1644 ****
  
  
  extern Simple_lock afs_asyncbuf_lock;
  /*
   * Buffers are ranked by age.  A buffer's age is the value of afs_biotime
!  * when the buffer is processed by naix_vmstrategy.  afs_biotime is
   * incremented for each buffer.  A buffer's age is kept in its av_back field.
   * The age ranking is used by the daemons, which favor older buffers.
   */
  afs_int32 afs_biotime = 0;
  
- extern struct buf *afs_asyncbuf;
- extern int afs_asyncbuf_cv;
  /* This function is called with a list of buffers, threaded through
   * the av_forw field.  Our goal is to copy the list of buffers into the
   * afs_asyncbuf list, sorting buffers into sublists linked by the b_work field.
--- 1446,1462 ----
  
  
  extern Simple_lock afs_asyncbuf_lock;
+ extern struct buf *afs_asyncbuf;
+ extern int afs_asyncbuf_cv;
+ 
  /*
   * Buffers are ranked by age.  A buffer's age is the value of afs_biotime
!  * when the buffer is processed by afs_gn_strategy.  afs_biotime is
   * incremented for each buffer.  A buffer's age is kept in its av_back field.
   * The age ranking is used by the daemons, which favor older buffers.
   */
  afs_int32 afs_biotime = 0;
  
  /* This function is called with a list of buffers, threaded through
   * the av_forw field.  Our goal is to copy the list of buffers into the
   * afs_asyncbuf list, sorting buffers into sublists linked by the b_work field.
***************
*** 1647,1662 ****
   * be increased to cover all of the buffers in the b_work queue.
   */
  #define	AIX_VM_BLKSIZE	8192
! afs_gn_strategy(abp, cred)
!      struct ucred *cred;
!      register struct buf *abp;
  {
!     register struct buf **lbp, *tbp;
! #ifdef AFS_64BIT_KERNEL
!     afs_int64 *lwbp;		/* last quy in work chain */
! #else
!     int *lwbp;			/* last guy in work chain */
! #endif
      struct buf *nbp, *qbp, *qnbp, *firstComparable;
      int doMerge;
      int oldPriority;
--- 1465,1482 ----
   * be increased to cover all of the buffers in the b_work queue.
   */
  #define	AIX_VM_BLKSIZE	8192
! /* Note: This function seems to be called as ddstrategy entry point, ie
!  * has one argument. However, it also needs to be present as
!  * vn_strategy entry point which has three arguments, but it seems to never
!  * be called in that capacity (it would fail horribly due to the argument
!  * mismatch). I'm confused, but it obviously has to be this way, maybe
!  * some IBM people can shed som light on this 
!  */
! int
! afs_gn_strategy(struct buf *abp)
  {
!     struct buf **lbp, *tbp;
!     struct buf **lwbp;
      struct buf *nbp, *qbp, *qnbp, *firstComparable;
      int doMerge;
      int oldPriority;
***************
*** 1710,1715 ****
--- 1530,1536 ----
  	     */
  	    continue;
  	}
+ 
  	/* we may have actually added the "new" firstComparable */
  	if (tbp->av_forw == firstComparable)
  	    firstComparable = tbp;
***************
*** 1766,1797 ****
  		    doMerge = 1;	/* both integral #s of blocks */
  		}
  		if (doMerge) {
! 		    register struct buf *xbp;
  
  		    /* merge both of these blocks together */
  		    /* first set age to the older of the two */
! #ifdef AFS_64BIT_KERNEL
! 		    if ((afs_int64) qnbp->av_back - (afs_int64) qbp->av_back <
! 			0)
! #else
! 		    if ((int)qnbp->av_back - (int)qbp->av_back < 0)
! #endif
  			qbp->av_back = qnbp->av_back;
! 		    lwbp = &qbp->b_work;
  		    /* find end of qbp's work queue */
! 		    for (xbp = (struct buf *)(*lwbp); xbp;
! 			 lwbp = &xbp->b_work, xbp = (struct buf *)(*lwbp));
  		    /*
  		     * now setting *lwbp will change the last ptr in the qbp's
  		     * work chain
  		     */
  		    qbp->av_forw = qnbp->av_forw;	/* splice out qnbp */
  		    qbp->b_bcount += qnbp->b_bcount;	/* fix count */
! #ifdef AFS_64BIT_KERNEL
! 		    *lwbp = (afs_int64) qnbp;	/* append qnbp to end */
! #else
! 		    *lwbp = (int)qnbp;	/* append qnbp to end */
! #endif
  		    /*
  		     * note that qnbp is bogus, but it doesn't matter because
  		     * we're going to restart the for loop now.
--- 1587,1611 ----
  		    doMerge = 1;	/* both integral #s of blocks */
  		}
  		if (doMerge) {
! 		    struct buf *xbp;
  
  		    /* merge both of these blocks together */
  		    /* first set age to the older of the two */
! 		    if ((int32long64_t) qnbp->av_back - 
! 			    (int32long64_t) qbp->av_back < 0) {
  			qbp->av_back = qnbp->av_back;
! 		    }
! 		    lwbp = (struct buf **) &qbp->b_work;
  		    /* find end of qbp's work queue */
! 		    for (xbp = *lwbp; xbp;
! 			 lwbp = (struct buf **) &xbp->b_work, xbp = *lwbp);
  		    /*
  		     * now setting *lwbp will change the last ptr in the qbp's
  		     * work chain
  		     */
  		    qbp->av_forw = qnbp->av_forw;	/* splice out qnbp */
  		    qbp->b_bcount += qnbp->b_bcount;	/* fix count */
! 		    *lwbp = qnbp;	/* append qnbp to end */
  		    /*
  		     * note that qnbp is bogus, but it doesn't matter because
  		     * we're going to restart the for loop now.
***************
*** 1808,1823 ****
  }
  
  
! afs_inactive(avc, acred)
!      register struct vcache *avc;
!      struct AFS_UCRED *acred;
  {
      afs_InactiveVCache(avc, acred);
  }
  
  int
! afs_gn_revoke(vp)
!      struct vnode *vp;
  {
      AFS_STATCNT(afs_gn_revoke);
      /* NO SUPPORT for this in afs YET! */
--- 1622,1640 ----
  }
  
  
! int
! afs_inactive(struct vcache *avc, 
! 	     struct AFS_UCRED *acred)
  {
      afs_InactiveVCache(avc, acred);
  }
  
  int
! afs_gn_revoke(struct vnode *vp,
!               int32long64_t cmd,
! 	      int32long64_t flag,
! 	      struct vattr *vinfop,
! 	      struct ucred *crp)
  {
      AFS_STATCNT(afs_gn_revoke);
      /* NO SUPPORT for this in afs YET! */
***************
*** 1825,1875 ****
  }
  
  int
! afs_gn_getacl(vp, uiop, cred)
!      struct vnode *vp;
!      struct uio *uiop;
!      struct ucred *cred;
  {
      return ENOSYS;
  };
  
  
  int
! afs_gn_setacl(vp, uiop, cred)
!      struct vnode *vp;
!      struct uio *uiop;
!      struct ucred *cred;
  {
      return ENOSYS;
  };
  
  
  int
! afs_gn_getpcl(vp, uiop, cred)
!      struct vnode *vp;
!      struct uio *uiop;
!      struct ucred *cred;
  {
      return ENOSYS;
  };
  
  
  int
! afs_gn_setpcl(vp, uiop, cred)
!      struct vnode *vp;
!      struct uio *uiop;
!      struct ucred *cred;
  {
      return ENOSYS;
  };
  int
  afs_gn_enosys()
  {
      return ENOSYS;
  }
  
  extern struct vfsops Afs_vfsops;
- extern struct vnodeops afs_gn_vnodeops;
  extern int Afs_init();
  
  #define	AFS_CALLOUT_TBL_SIZE	256
--- 1642,1810 ----
  }
  
  int
! afs_gn_getacl(struct vnode *vp, 
! 	      struct uio *uiop, 
! 	      struct ucred *cred)
  {
      return ENOSYS;
  };
  
  
  int
! afs_gn_setacl(struct vnode *vp, 
! 	      struct uio *uiop, 
! 	      struct ucred *cred)
  {
      return ENOSYS;
  };
  
  
  int
! afs_gn_getpcl(struct vnode *vp, 
! 	      struct uio *uiop, 
! 	      struct ucred *cred)
  {
      return ENOSYS;
  };
  
  
  int
! afs_gn_setpcl(struct vnode *vp, 
! 	      struct uio *uiop, 
! 	      struct ucred *cred)
  {
      return ENOSYS;
  };
+ 
+ 
+ int
+ afs_gn_seek(struct vnode* vp, offset_t * offp, struct ucred * crp)
+ {
+ /*
+  * File systems which do not wish to do offset validation can simply
+  * return 0.  File systems which do not provide the vn_seek entry point
+  * will have a maximum offset of OFF_MAX (2 gigabytes minus 1) enforced
+  * by the logical file system.
+  */
+     return 0;
+ }
+ 
+ 
  int
  afs_gn_enosys()
  {
      return ENOSYS;
  }
  
+ /*
+  * declare a struct vnodeops and initialize it with ptrs to all functions
+  */
+ struct vnodeops afs_gn_vnodeops = {
+     /* creation/naming/deletion */
+     afs_gn_link,
+     afs_gn_mkdir,
+     afs_gn_mknod,
+     afs_gn_remove,
+     afs_gn_rename,
+     afs_gn_rmdir,
+     /* lookup, file handle stuff */
+     afs_gn_lookup,
+     (int(*)(struct vnode*,struct fileid*,struct ucred*))
+ 	afs_gn_fid,
+     /* access to files */
+     (int(*)(struct vnode *, int32long64_t, ext_t, caddr_t *,struct ucred *))
+ 	afs_gn_open,
+     (int(*)(struct vnode *, struct vnode **, int32long64_t,caddr_t, int32long64_t, caddr_t *, struct ucred *))
+ 	afs_gn_create,
+     afs_gn_hold,
+     afs_gn_rele,
+     afs_gn_close,
+     afs_gn_map,
+     afs_gn_unmap,
+     /* manipulate attributes of files */
+     afs_gn_access,
+     afs_gn_getattr,
+     afs_gn_setattr,
+     /* data update operations */
+     afs_gn_fclear,
+     afs_gn_fsync,
+     afs_gn_ftrunc,
+     afs_gn_rdwr,
+     afs_gn_lockctl,
+     /* extensions */
+     afs_gn_ioctl,
+     afs_gn_readlink,
+     afs_gn_select,
+     afs_gn_symlink,
+     afs_gn_readdir,
+     /* buffer ops */
+     (int(*)(struct vnode*,struct buf*,struct ucred*))
+ 	afs_gn_strategy,
+     /* security things */
+     afs_gn_revoke,
+     afs_gn_getacl,
+     afs_gn_setacl,
+     afs_gn_getpcl,
+     afs_gn_setpcl,
+     afs_gn_seek,
+     (int(*)(struct vnode *, int32long64_t, int32long64_t, offset_t, offset_t, struct ucred *))
+ 	afs_gn_enosys,		/* vn_fsync_range */
+     (int(*)(struct vnode *, struct vnode **, int32long64_t, char *, struct vattr *, int32long64_t, caddr_t *, struct ucred *))
+ 	afs_gn_enosys,		/* vn_create_attr */
+     (int(*)(struct vnode *, int32long64_t, void *, size_t, struct ucred *))
+ 	afs_gn_enosys,		/* vn_finfo */
+     (int(*)(struct vnode *, caddr_t, offset_t, offset_t, uint32long64_t, uint32long64_t, struct ucred *))
+ 	afs_gn_enosys,		/* vn_map_lloff */
+     (int(*)(struct vnode*,struct uio*,int*,struct ucred*))
+ 	afs_gn_enosys,		/* vn_readdir_eofp */
+     (int(*)(struct vnode *, enum uio_rw, int32long64_t, struct uio *, ext_t , caddr_t, struct vattr *, struct vattr *, struct ucred *))
+ 	afs_gn_enosys,		/* vn_rdwr_attr */
+     (int(*)(struct vnode*,int,void*,struct ucred*))
+ 	afs_gn_enosys,		/* vn_memcntl */
+ #ifdef AFS_AIX53_ENV /* Present in AIX 5.3 and up */
+     (int(*)(struct vnode*,const char*,struct uio*,struct ucred*))
+ 	afs_gn_enosys,		/* vn_getea */
+     (int(*)(struct vnode*,const char*,struct uio*,int,struct ucred*))
+ 	afs_gn_enosys,		/* vn_setea */
+     (int(*)(struct vnode *, struct uio *, struct ucred *))
+ 	afs_gn_enosys,		/* vn_listea */
+     (int(*)(struct vnode *, const char *, struct ucred *))
+ 	afs_gn_enosys,		/* vn_removeea */
+     (int(*)(struct vnode *, const char *, struct vattr *, struct ucred *))
+ 	afs_gn_enosys,		/* vn_statea */
+     (int(*)(struct vnode *, uint64_t, acl_type_t *, struct uio *, size_t *, mode_t *, struct ucred *))
+ 	afs_gn_enosys,		/* vn_getxacl */
+     (int(*)(struct vnode *, uint64_t, acl_type_t, struct uio *, mode_t,  struct ucred *))
+ 	afs_gn_enosys,		/* vn_setxacl */
+ #else /* AFS_AIX53_ENV */
+     afs_gn_enosys,		/* vn_spare7 */
+     afs_gn_enosys,		/* vn_spare8 */
+     afs_gn_enosys,		/* vn_spare9 */
+     afs_gn_enosys,		/* vn_spareA */
+     afs_gn_enosys,		/* vn_spareB */
+     afs_gn_enosys,		/* vn_spareC */
+     afs_gn_enosys,		/* vn_spareD */
+ #endif /* AFS_AIX53_ENV */
+     afs_gn_enosys,		/* vn_spareE */
+     afs_gn_enosys		/* vn_spareF */
+ #ifdef AFS_AIX51_ENV
+     ,(int(*)(struct gnode*,long long,char*,unsigned long*, unsigned long*,unsigned int*))
+ 	afs_gn_enosys,		/* pagerBackRange */
+     (int64_t(*)(struct gnode*))
+ 	afs_gn_enosys,		/* pagerGetFileSize */
+     (void(*)(struct gnode *, vpn_t, vpn_t *, vpn_t *, vpn_t *, boolean_t))
+ 	afs_gn_enosys,		/* pagerReadAhead */
+     (void(*)(struct gnode *, int64_t, int64_t, uint))
+ 	afs_gn_enosys,		/* pagerReadWriteBehind */
+     (void(*)(struct gnode*,long long,unsigned long,unsigned long,unsigned int))
+ 	afs_gn_enosys		/* pagerEndCopy */
+ #endif
+ };
+ struct vnodeops *afs_ops = &afs_gn_vnodeops;
+ 
+ 
+ 
  extern struct vfsops Afs_vfsops;
  extern int Afs_init();
  
  #define	AFS_CALLOUT_TBL_SIZE	256
***************
*** 1883,1889 ****
  static
  vfs_mount(struct vfs *a, struct ucred *b)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1818,1824 ----
  static
  vfs_mount(struct vfs *a, struct ucred *b)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 1898,1904 ****
  static
  vfs_unmount(struct vfs *a, int b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1833,1839 ----
  static
  vfs_unmount(struct vfs *a, int b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 1913,1919 ****
  static
  vfs_root(struct vfs *a, struct vnode **b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1848,1854 ----
  static
  vfs_root(struct vfs *a, struct vnode **b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 1928,1934 ****
  static
  vfs_statfs(struct vfs *a, struct statfs *b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1863,1869 ----
  static
  vfs_statfs(struct vfs *a, struct statfs *b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 1943,1949 ****
  static
  vfs_sync(struct gfs *a)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1878,1884 ----
  static
  vfs_sync(struct gfs *a)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 1957,1963 ****
  static
  vfs_vget(struct vfs *a, struct vnode **b, struct fileid *c, struct ucred *d)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1892,1898 ----
  static
  vfs_vget(struct vfs *a, struct vnode **b, struct fileid *c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 1972,1978 ****
  static
  vfs_cntl(struct vfs *a, int b, caddr_t c, size_t d, struct ucred *e)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1907,1913 ----
  static
  vfs_cntl(struct vfs *a, int b, caddr_t c, size_t d, struct ucred *e)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 1987,1993 ****
  static
  vfs_quotactl(struct vfs *a, int b, uid_t c, caddr_t d, struct ucred *e)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1922,1928 ----
  static
  vfs_quotactl(struct vfs *a, int b, uid_t c, caddr_t d, struct ucred *e)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2003,2009 ****
  static
  vfs_syncvfs(struct gfs *a, struct vfs *b, int c, struct ucred *d)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1938,1944 ----
  static
  vfs_syncvfs(struct gfs *a, struct vfs *b, int c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2034,2040 ****
  static
  vn_link(struct vnode *a, struct vnode *b, char *c, struct ucred *d)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1969,1975 ----
  static
  vn_link(struct vnode *a, struct vnode *b, char *c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2047,2060 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_mkdir(struct vnode *a, char *b, int32long64_t c, struct ucred *d)
  {
! #else
! vn_mkdir(struct vnode *a, char *b, int c, struct ucred *d)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1982,1990 ----
  }
  
  static
  vn_mkdir(struct vnode *a, char *b, int32long64_t c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2067,2081 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_mknod(struct vnode *a, caddr_t b, int32long64_t c, dev_t d,
  	 struct ucred *e)
  {
! #else
! vn_mknod(struct vnode *a, caddr_t b, int c, dev_t d, struct ucred *e)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 1997,2006 ----
  }
  
  static
  vn_mknod(struct vnode *a, caddr_t b, int32long64_t c, dev_t d,
  	 struct ucred *e)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2090,2096 ****
  static
  vn_remove(struct vnode *a, struct vnode *b, char *c, struct ucred *d)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2015,2021 ----
  static
  vn_remove(struct vnode *a, struct vnode *b, char *c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2106,2112 ****
  vn_rename(struct vnode *a, struct vnode *b, caddr_t c, struct vnode *d,
  	  struct vnode *e, caddr_t f, struct ucred *g)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2031,2037 ----
  vn_rename(struct vnode *a, struct vnode *b, caddr_t c, struct vnode *d,
  	  struct vnode *e, caddr_t f, struct ucred *g)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2121,2127 ****
  static
  vn_rmdir(struct vnode *a, struct vnode *b, char *c, struct ucred *d)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2046,2052 ----
  static
  vn_rmdir(struct vnode *a, struct vnode *b, char *c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2134,2147 ****
  }
  
  static
! #ifdef AFS_AIX51_ENV
!   vn_lookup(struct vnode *a, struct vnode **b, char *c, int32long64_t d,
! #else
! vn_lookup(struct vnode *a, struct vnode **b, char *c, int d,
! #endif
  	  struct vattr *v, struct ucred *e)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2059,2068 ----
  }
  
  static
! vn_lookup(struct vnode *a, struct vnode **b, char *c, int32long64_t d,
  	  struct vattr *v, struct ucred *e)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2156,2162 ****
  static
  vn_fid(struct vnode *a, struct fileid *b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2077,2083 ----
  static
  vn_fid(struct vnode *a, struct fileid *b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2169,2183 ****
  }
  
  static
! #ifdef AFS_AIX51_ENV
! vn_open(struct vnode *a, int b, int c, caddr_t * d, struct ucred *e)
! {
! #else
! vn_open(struct vnode *a, int32long64_t b, ext_t c, caddr_t * d,
  	struct ucred *e)
  {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2090,2102 ----
  }
  
  static
! vn_open(struct vnode *a, 
! 	int32long64_t b, 
! 	ext_t c, 
! 	caddr_t * d, 
  	struct ucred *e)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2190,2205 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_create(struct vnode *a, struct vnode **b, int32long64_t c, caddr_t d,
  	  int32long64_t e, caddr_t * f, struct ucred *g)
  {
! #else
! vn_create(struct vnode *a, struct vnode **b, int c, caddr_t d, int e,
! 	  caddr_t * f, struct ucred *g)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2109,2118 ----
  }
  
  static
  vn_create(struct vnode *a, struct vnode **b, int32long64_t c, caddr_t d,
  	  int32long64_t e, caddr_t * f, struct ucred *g)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2214,2220 ****
  static
  vn_hold(struct vnode *a)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2127,2133 ----
  static
  vn_hold(struct vnode *a)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2229,2235 ****
  static
  vn_rele(struct vnode *a)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2142,2148 ----
  static
  vn_rele(struct vnode *a)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2242,2255 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_close(struct vnode *a, int32long64_t b, caddr_t c, struct ucred *d)
  {
! #else
! vn_close(struct vnode *a, int b, caddr_t c, struct ucred *d)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2155,2163 ----
  }
  
  static
  vn_close(struct vnode *a, int32long64_t b, caddr_t c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2262,2276 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_map(struct vnode *a, caddr_t b, uint32long64_t c, uint32long64_t d,
         uint32long64_t e, struct ucred *f)
  {
! #else
! vn_map(struct vnode *a, caddr_t b, uint c, uint d, uint e, struct ucred *f)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2170,2179 ----
  }
  
  static
  vn_map(struct vnode *a, caddr_t b, uint32long64_t c, uint32long64_t d,
         uint32long64_t e, struct ucred *f)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2283,2296 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_unmap(struct vnode *a, int32long64_t b, struct ucred *c)
  {
! #else
! vn_unmap(struct vnode *a, int b, struct ucred *c)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2186,2194 ----
  }
  
  static
  vn_unmap(struct vnode *a, int32long64_t b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2303,2316 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_access(struct vnode *a, int32long64_t b, int32long64_t c, struct ucred *d)
  {
! #else
! vn_access(struct vnode *a, int b, int c, struct ucred *d)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2201,2209 ----
  }
  
  static
  vn_access(struct vnode *a, int32long64_t b, int32long64_t c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2325,2331 ****
  static
  vn_getattr(struct vnode *a, struct vattr *b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2218,2224 ----
  static
  vn_getattr(struct vnode *a, struct vattr *b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2338,2352 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_setattr(struct vnode *a, int32long64_t b, int32long64_t c, int32long64_t d,
  	   int32long64_t e, struct ucred *f)
  {
! #else
! vn_setattr(struct vnode *a, int b, int c, int d, int e, struct ucred *f)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2231,2240 ----
  }
  
  static
  vn_setattr(struct vnode *a, int32long64_t b, int32long64_t c, int32long64_t d,
  	   int32long64_t e, struct ucred *f)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2359,2372 ****
  }
  
  static
! #ifdef AFS_AIX51_ENV
!   vn_fclear(struct vnode *a, int32long64_t b, offset_t c, offset_t d
! #else
! vn_fclear(struct vnode *a, int b, offset_t c, offset_t d
! #endif
  	  , caddr_t e, struct ucred *f)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2247,2256 ----
  }
  
  static
! vn_fclear(struct vnode *a, int32long64_t b, offset_t c, offset_t d
  	  , caddr_t e, struct ucred *f)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2379,2392 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_fsync(struct vnode *a, int32long64_t b, int32long64_t c, struct ucred *d)
  {
! #else
! vn_fsync(struct vnode *a, int b, int c, struct ucred *d)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2263,2271 ----
  }
  
  static
  vn_fsync(struct vnode *a, int32long64_t b, int32long64_t c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2399,2413 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_ftrunc(struct vnode *a, int32long64_t b, offset_t c, caddr_t d,
  	  struct ucred *e)
  {
! #else
! vn_ftrunc(struct vnode *a, int b, offset_t c, caddr_t d, struct ucred *e)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2278,2287 ----
  }
  
  static
  vn_ftrunc(struct vnode *a, int32long64_t b, offset_t c, caddr_t d,
  	  struct ucred *e)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2420,2435 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_rdwr(struct vnode *a, enum uio_rw b, int32long64_t c, struct uio *d,
  	ext_t e, caddr_t f, struct vattr *v, struct ucred *g)
  {
! #else
! vn_rdwr(struct vnode *a, enum uio_rw b, int c, struct uio *d, int e,
! 	caddr_t f, struct vattr *v, struct ucred *g)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2294,2303 ----
  }
  
  static
  vn_rdwr(struct vnode *a, enum uio_rw b, int32long64_t c, struct uio *d,
  	ext_t e, caddr_t f, struct vattr *v, struct ucred *g)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2442,2457 ****
  }
  
  static
! #ifdef AFS_AIX51_ENV
! vn_lockctl(struct vnode *a, offset_t b, struct eflock *c, int32long64_t d,
! 	   int (*e) (), ulong32int64_t * f, struct ucred *g)
  {
! #else
! vn_lockctl(struct vnode *a, offset_t b, struct eflock *c, int d, int (*e) (),
! 	   ulong * f, struct ucred *g)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2310,2328 ----
  }
  
  static
! vn_lockctl(struct vnode *a,
! 	   offset_t b,
! 	   struct eflock *c,
! 	   int32long64_t d,
! 	   int (*e) (),
! #ifdef AFS_AIX52_ENV /* Changed in AIX 5.2 and up */
! 	       ulong * f, 
! #else /* AFS_AIX52_ENV */
! 	       ulong32int64_t * f,
! #endif /* AFS_AIX52_ENV */
! 	   struct ucred *g)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2464,2478 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_ioctl(struct vnode *a, int32long64_t b, caddr_t c, size_t d, ext_t e,
  	 struct ucred *f)
  {
! #else
! vn_ioctl(struct vnode *a, int b, caddr_t c, size_t d, int e, struct ucred *f)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2335,2344 ----
  }
  
  static
  vn_ioctl(struct vnode *a, int32long64_t b, caddr_t c, size_t d, ext_t e,
  	 struct ucred *f)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2487,2493 ****
  static
  vn_readlink(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2353,2359 ----
  static
  vn_readlink(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2500,2514 ****
  }
  
  static
! #ifdef AFS_AIX51_ENV
!   vn_select(struct vnode *a, int32long64_t b, ushort c, ushort * d,
! 	    void (*e) ()
! #else
! vn_select(struct vnode *a, int b, ushort c, ushort * d, void (*e) ()
! #endif
! 	  , caddr_t f, struct ucred *g)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2366,2375 ----
  }
  
  static
! vn_select(struct vnode *a, int32long64_t b, ushort c, ushort * d,
! 	  void (*e) (), caddr_t f, struct ucred *g)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2523,2529 ****
  static
  vn_symlink(struct vnode *a, char *b, char *c, struct ucred *d)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2384,2390 ----
  static
  vn_symlink(struct vnode *a, char *b, char *c, struct ucred *d)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2538,2544 ****
  static
  vn_readdir(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2399,2405 ----
  static
  vn_readdir(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2551,2565 ****
  }
  
  static
- #ifdef AFS_AIX51_ENV
  vn_revoke(struct vnode *a, int32long64_t b, int32long64_t c, struct vattr *d,
  	  struct ucred *e)
  {
! #else
! vn_revoke(struct vnode *a, int b, int c, struct vattr *d, struct ucred *e)
! {
! #endif
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2412,2421 ----
  }
  
  static
  vn_revoke(struct vnode *a, int32long64_t b, int32long64_t c, struct vattr *d,
  	  struct ucred *e)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2574,2580 ****
  static
  vn_getacl(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2430,2436 ----
  static
  vn_getacl(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2589,2595 ****
  static
  vn_setacl(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2445,2451 ----
  static
  vn_setacl(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2604,2610 ****
  static
  vn_getpcl(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2460,2466 ----
  static
  vn_getpcl(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2619,2625 ****
  static
  vn_setpcl(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     register glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
--- 2475,2481 ----
  static
  vn_setpcl(struct vnode *a, struct uio *b, struct ucred *c)
  {
!     int glockOwner, ret;
  
      glockOwner = ISAFS_GLOCK();
      if (!glockOwner)
***************
*** 2631,2637 ****
      return ret;
  }
  
- extern int afs_gn_strategy();
  
  struct vnodeops locked_afs_gn_vnodeops = {
      vn_link,
--- 2487,2492 ----
***************
*** 2662,2681 ****
      vn_select,
      vn_symlink,
      vn_readdir,
!     afs_gn_strategy,		/* no locking!!! (discovered the hard way) */
      vn_revoke,
      vn_getacl,
      vn_setacl,
      vn_getpcl,
      vn_setpcl,
!     afs_gn_enosys,		/* vn_seek */
!     afs_gn_enosys,		/* vn_fsync_range */
!     afs_gn_enosys,		/* vn_create_attr */
!     afs_gn_enosys,		/* vn_finfo */
!     afs_gn_enosys,		/* vn_map_lloff */
!     afs_gn_enosys,		/* vn_readdir_eofp */
!     afs_gn_enosys,		/* vn_rdwr_attr */
!     afs_gn_enosys,		/* vn_memcntl */
      afs_gn_enosys,		/* vn_spare7 */
      afs_gn_enosys,		/* vn_spare8 */
      afs_gn_enosys,		/* vn_spare9 */
--- 2517,2560 ----
      vn_select,
      vn_symlink,
      vn_readdir,
!     (int(*)(struct vnode*,struct buf*,struct ucred*))
! 	afs_gn_strategy,	/* no locking!!! (discovered the hard way) */
      vn_revoke,
      vn_getacl,
      vn_setacl,
      vn_getpcl,
      vn_setpcl,
!     afs_gn_seek,
!     (int(*)(struct vnode *, int32long64_t, int32long64_t, offset_t, offset_t, struct ucred *))
! 	afs_gn_enosys,		/* vn_fsync_range */
!     (int(*)(struct vnode *, struct vnode **, int32long64_t, char *, struct vattr *, int32long64_t, caddr_t *, struct ucred *))
! 	afs_gn_enosys,		/* vn_create_attr */
!     (int(*)(struct vnode *, int32long64_t, void *, size_t, struct ucred *))
! 	afs_gn_enosys,		/* vn_finfo */
!     (int(*)(struct vnode *, caddr_t, offset_t, offset_t, uint32long64_t, uint32long64_t, struct ucred *))
! 	afs_gn_enosys,		/* vn_map_lloff */
!     (int(*)(struct vnode*,struct uio*,int*,struct ucred*))
! 	afs_gn_enosys,		/* vn_readdir_eofp */
!     (int(*)(struct vnode *, enum uio_rw, int32long64_t, struct uio *, ext_t , caddr_t, struct vattr *, struct vattr *, struct ucred *))
! 	afs_gn_enosys,		/* vn_rdwr_attr */
!     (int(*)(struct vnode*,int,void*,struct ucred*))
! 	afs_gn_enosys,		/* vn_memcntl */
! #ifdef AFS_AIX53_ENV /* Present in AIX 5.3 and up */
!     (int(*)(struct vnode*,const char*,struct uio*,struct ucred*))
! 	afs_gn_enosys,		/* vn_getea */
!     (int(*)(struct vnode*,const char*,struct uio*,int,struct ucred*))
! 	afs_gn_enosys,		/* vn_setea */
!     (int(*)(struct vnode *, struct uio *, struct ucred *))
! 	afs_gn_enosys,		/* vn_listea */
!     (int(*)(struct vnode *, const char *, struct ucred *))
! 	afs_gn_enosys,		/* vn_removeea */
!     (int(*)(struct vnode *, const char *, struct vattr *, struct ucred *))
! 	afs_gn_enosys,		/* vn_statea */
!     (int(*)(struct vnode *, uint64_t, acl_type_t *, struct uio *, size_t *, mode_t *, struct ucred *))
! 	afs_gn_enosys,		/* vn_getxacl */
!     (int(*)(struct vnode *, uint64_t, acl_type_t, struct uio *, mode_t,  struct ucred *))
! 	afs_gn_enosys,		/* vn_setxacl */
! #else /* AFS_AIX53_ENV */
      afs_gn_enosys,		/* vn_spare7 */
      afs_gn_enosys,		/* vn_spare8 */
      afs_gn_enosys,		/* vn_spare9 */
***************
*** 2683,2696 ****
      afs_gn_enosys,		/* vn_spareB */
      afs_gn_enosys,		/* vn_spareC */
      afs_gn_enosys,		/* vn_spareD */
      afs_gn_enosys,		/* vn_spareE */
      afs_gn_enosys		/* vn_spareF */
  #ifdef AFS_AIX51_ENV
! 	, afs_gn_enosys,	/* pagerBackRange */
!     afs_gn_enosys,		/* pagerGetFileSize */
!     afs_gn_enosys,		/* pagerReadAhead */
!     afs_gn_enosys,		/* pagerWriteBehind */
!     afs_gn_enosys		/* pagerEndCopy */
  #endif
  };
  
--- 2562,2581 ----
      afs_gn_enosys,		/* vn_spareB */
      afs_gn_enosys,		/* vn_spareC */
      afs_gn_enosys,		/* vn_spareD */
+ #endif /* AFS_AIX53_ENV */
      afs_gn_enosys,		/* vn_spareE */
      afs_gn_enosys		/* vn_spareF */
  #ifdef AFS_AIX51_ENV
!     ,(int(*)(struct gnode*,long long,char*,unsigned long*, unsigned long*,unsigned int*))
! 	afs_gn_enosys,		/* pagerBackRange */
!     (int64_t(*)(struct gnode*))
! 	afs_gn_enosys,		/* pagerGetFileSize */
!     (void(*)(struct gnode *, vpn_t, vpn_t *, vpn_t *, vpn_t *, boolean_t))
! 	afs_gn_enosys,		/* pagerReadAhead */
!     (void(*)(struct gnode *, int64_t, int64_t, uint))
! 	afs_gn_enosys,		/* pagerReadWriteBehind */
!     (void(*)(struct gnode*,long long,unsigned long,unsigned long,unsigned int))
! 	afs_gn_enosys		/* pagerEndCopy */
  #endif
  };
  
***************
*** 2700,2705 ****
      AFS_MOUNT_AFS,
      "afs",
      Afs_init,
!     GFS_VERSION4 | GFS_REMOTE,
      NULL
  };
--- 2585,2590 ----
      AFS_MOUNT_AFS,
      "afs",
      Afs_init,
!     GFS_VERSION4 | GFS_VERSION42 | GFS_REMOTE,
      NULL
  };
Index: openafs/src/afs/DARWIN/osi_file.c
diff -c openafs/src/afs/DARWIN/osi_file.c:1.8 openafs/src/afs/DARWIN/osi_file.c:1.8.2.4
*** openafs/src/afs/DARWIN/osi_file.c:1.8	Tue Jul 15 19:14:17 2003
--- openafs/src/afs/DARWIN/osi_file.c	Mon Feb 20 23:47:07 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_file.c,v 1.8 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/DARWIN/osi_file.c,v 1.8.2.4 2006/02/21 04:47:07 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 32,37 ****
--- 32,40 ----
  {
      int code;
      static int inited = 0;
+ #ifdef AFS_DARWIN80_ENV
+     char *buffer = (char*)_MALLOC(MFSNAMELEN, M_TEMP, M_WAITOK);
+ #endif
  
      if (inited)
  	return;
***************
*** 39,62 ****
  
      if (vp == NULL)
  	return;
      if (strncmp("hfs", vp->v_mount->mnt_vfc->vfc_name, 3) == 0)
  	afs_CacheFSType = AFS_APPL_HFS_CACHE;
      else if (strncmp("ufs", vp->v_mount->mnt_vfc->vfc_name, 3) == 0)
  	afs_CacheFSType = AFS_APPL_UFS_CACHE;
      else
  	osi_Panic("Unknown cache vnode type\n");
  }
  
  ino_t
! VnodeToIno(vnode_t * avp)
  {
      unsigned long ret;
  
      if (afs_CacheFSType == AFS_APPL_UFS_CACHE) {
  	struct inode *ip = VTOI(avp);
  	ret = ip->i_number;
      } else if (afs_CacheFSType == AFS_APPL_HFS_CACHE) {
! #ifndef VTOH
  	struct vattr va;
  	if (VOP_GETATTR(avp, &va, &afs_osi_cred, current_proc()))
  	    osi_Panic("VOP_GETATTR failed in VnodeToIno\n");
--- 42,88 ----
  
      if (vp == NULL)
  	return;
+ #ifdef AFS_DARWIN80_ENV
+     vfs_name(vnode_mount(vp), buffer);
+     if (strncmp("hfs", buffer, 3) == 0)
+ #else
      if (strncmp("hfs", vp->v_mount->mnt_vfc->vfc_name, 3) == 0)
+ #endif
  	afs_CacheFSType = AFS_APPL_HFS_CACHE;
+ #ifdef AFS_DARWIN80_ENV
+     else if (strncmp("ufs", buffer, 3) == 0)
+ #else
      else if (strncmp("ufs", vp->v_mount->mnt_vfc->vfc_name, 3) == 0)
+ #endif
  	afs_CacheFSType = AFS_APPL_UFS_CACHE;
      else
  	osi_Panic("Unknown cache vnode type\n");
+ #ifdef AFS_DARWIN80_ENV
+     _FREE(buffer, M_TEMP);
+ #endif
  }
  
  ino_t
! VnodeToIno(vnode_t avp)
  {
      unsigned long ret;
  
+ #ifndef AFS_DARWIN80_ENV
      if (afs_CacheFSType == AFS_APPL_UFS_CACHE) {
  	struct inode *ip = VTOI(avp);
  	ret = ip->i_number;
      } else if (afs_CacheFSType == AFS_APPL_HFS_CACHE) {
! #endif
! #if defined(AFS_DARWIN80_ENV) 
! 	struct vattr va;
! 	VATTR_INIT(&va);
!         VATTR_WANTED(&va, va_fileid);
! 	if (vnode_getattr(avp, &va, afs_osi_ctxtp))
! 	    osi_Panic("VOP_GETATTR failed in VnodeToIno\n");
!         if (!VATTR_ALL_SUPPORTED(&va))
! 	    osi_Panic("VOP_GETATTR unsupported fileid in VnodeToIno\n");
! 	ret = va.va_fileid;
! #elif !defined(VTOH)
  	struct vattr va;
  	if (VOP_GETATTR(avp, &va, &afs_osi_cred, current_proc()))
  	    osi_Panic("VOP_GETATTR failed in VnodeToIno\n");
***************
*** 65,86 ****
  	struct hfsnode *hp = VTOH(avp);
  	ret = H_FILEID(hp);
  #endif
      } else
  	osi_Panic("VnodeToIno called before cacheops initialized\n");
      return ret;
  }
  
  
  dev_t
! VnodeToDev(vnode_t * avp)
  {
! 
! 
      if (afs_CacheFSType == AFS_APPL_UFS_CACHE) {
  	struct inode *ip = VTOI(avp);
  	return ip->i_dev;
      } else if (afs_CacheFSType == AFS_APPL_HFS_CACHE) {
! #ifndef VTOH			/* slow, but works */
  	struct vattr va;
  	if (VOP_GETATTR(avp, &va, &afs_osi_cred, current_proc()))
  	    osi_Panic("VOP_GETATTR failed in VnodeToDev\n");
--- 91,123 ----
  	struct hfsnode *hp = VTOH(avp);
  	ret = H_FILEID(hp);
  #endif
+ #ifndef AFS_DARWIN80_ENV
      } else
  	osi_Panic("VnodeToIno called before cacheops initialized\n");
+ #endif
      return ret;
  }
  
  
  dev_t
! VnodeToDev(vnode_t avp)
  {
! #ifndef AFS_DARWIN80_ENV
      if (afs_CacheFSType == AFS_APPL_UFS_CACHE) {
  	struct inode *ip = VTOI(avp);
  	return ip->i_dev;
      } else if (afs_CacheFSType == AFS_APPL_HFS_CACHE) {
! #endif
! #if defined(AFS_DARWIN80_ENV) 
! 	struct vattr va;
!         VATTR_INIT(&va);
!         VATTR_WANTED(&va, va_fsid);
! 	if (vnode_getattr(avp, &va, afs_osi_ctxtp))
! 	    osi_Panic("VOP_GETATTR failed in VnodeToDev\n");
!         if (!VATTR_ALL_SUPPORTED(&va))
! 	    osi_Panic("VOP_GETATTR unsupported fsid in VnodeToIno\n");
! 	return va.va_fsid;	/* XXX they say it's the dev.... */
! #elif !defined(VTOH)
  	struct vattr va;
  	if (VOP_GETATTR(avp, &va, &afs_osi_cred, current_proc()))
  	    osi_Panic("VOP_GETATTR failed in VnodeToDev\n");
***************
*** 89,96 ****
--- 126,135 ----
  	struct hfsnode *hp = VTOH(avp);
  	return H_DEV(hp);
  #endif
+ #ifndef AFS_DARWIN80_ENV
      } else
  	osi_Panic("VnodeToDev called before cacheops initialized\n");
+ #endif
  }
  
  void *
***************
*** 115,128 ****
--- 154,171 ----
      }
      afile = (struct osi_file *)osi_AllocSmallSpace(sizeof(struct osi_file));
      AFS_GUNLOCK();
+ #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 */
      else if (afs_CacheFSType == AFS_APPL_UFS_CACHE)
+ #endif
  	code =
  	    igetinode(afs_cacheVfsp, (dev_t) cacheDev.dev, (ino_t) ainode,
  		      &vp, &va, &dummy);
+ #ifndef AFS_DARWIN80_ENV
      else
  	panic("osi_UFSOpen called before cacheops initialized\n");
+ #endif
      AFS_GLOCK();
      if (code) {
  	osi_FreeSmallSpace(afile);
***************
*** 144,150 ****
--- 187,204 ----
      AFS_STATCNT(osi_Stat);
      MObtainWriteLock(&afs_xosi, 320);
      AFS_GUNLOCK();
+ #ifdef AFS_DARWIN80_ENV
+     VATTR_INIT(&tvattr);
+     VATTR_WANTED(&tvattr, va_size);
+     VATTR_WANTED(&tvattr, va_blocksize);
+     VATTR_WANTED(&tvattr, va_mtime);
+     VATTR_WANTED(&tvattr, va_atime);
+     code = vnode_getattr(afile->vnode, &tvattr, afs_osi_ctxtp);
+     if (code == 0 && !VATTR_ALL_SUPPORTED(&tvattr))
+        code = EINVAL;
+ #else
      code = VOP_GETATTR(afile->vnode, &tvattr, &afs_osi_cred, current_proc());
+ #endif
      AFS_GLOCK();
      if (code == 0) {
  	astat->size = tvattr.va_size;
***************
*** 161,167 ****
--- 215,225 ----
  {
      AFS_STATCNT(osi_Close);
      if (afile->vnode) {
+ #ifdef AFS_DARWIN80_ENV
+         vnode_close(afile->vnode, O_RDWR, afs_osi_ctxtp);
+ #else
  	AFS_RELE(afile->vnode);
+ #endif
      }
  
      osi_FreeSmallSpace(afile);
***************
*** 185,204 ****
      if (code || tstat.size <= asize)
  	return code;
      MObtainWriteLock(&afs_xosi, 321);
      VATTR_NULL(&tvattr);
      tvattr.va_size = asize;
-     AFS_GUNLOCK();
      code = VOP_SETATTR(afile->vnode, &tvattr, &afs_osi_cred, current_proc());
      AFS_GLOCK();
      MReleaseWriteLock(&afs_xosi);
      return code;
  }
  
  void
  osi_DisableAtimes(struct vnode *avp)
  {
  
! 
      if (afs_CacheFSType == AFS_APPL_UFS_CACHE) {
  	struct inode *ip = VTOI(avp);
  	ip->i_flag &= ~IN_ACCESS;
--- 243,277 ----
      if (code || tstat.size <= asize)
  	return code;
      MObtainWriteLock(&afs_xosi, 321);
+     AFS_GUNLOCK();
+ #ifdef AFS_DARWIN80_ENV
+     VATTR_INIT(&tvattr);
+     VATTR_SET(&tvattr, va_size, asize);
+     code = vnode_setattr(afile->vnode, &tvattr, afs_osi_ctxtp);
+ #else
      VATTR_NULL(&tvattr);
      tvattr.va_size = asize;
      code = VOP_SETATTR(afile->vnode, &tvattr, &afs_osi_cred, current_proc());
+ #endif
      AFS_GLOCK();
      MReleaseWriteLock(&afs_xosi);
      return code;
  }
  
  void
+ #ifdef AFS_DARWIN80_ENV
+ osi_DisableAtimes(vnode_t avp)
+ #else
  osi_DisableAtimes(struct vnode *avp)
+ #endif
  {
+ #ifdef AFS_DARWIN80_ENV
+     struct vnode_attr vap;
  
!     VATTR_INIT(&vap);
!     VATTR_CLEAR_SUPPORTED(&vap, va_access_time);
!     vnode_setattr(avp, &vap, afs_osi_ctxtp);
! #else
      if (afs_CacheFSType == AFS_APPL_UFS_CACHE) {
  	struct inode *ip = VTOI(avp);
  	ip->i_flag &= ~IN_ACCESS;
***************
*** 209,214 ****
--- 282,288 ----
  	hp->h_nodeflags &= ~IN_ACCESS;
      }
  #endif
+ #endif
  }
  
  
***************
*** 220,225 ****
--- 294,302 ----
      struct AFS_UCRED *oldCred;
      unsigned int resid;
      register afs_int32 code;
+ #ifdef AFS_DARWIN80_ENV
+     uio_t uio;
+ #endif
      AFS_STATCNT(osi_Read);
  
      /**
***************
*** 236,244 ****
--- 313,329 ----
      if (offset != -1)
  	afile->offset = offset;
      AFS_GUNLOCK();
+ #ifdef AFS_DARWIN80_ENV
+     uio=uio_create(1, afile->offset, AFS_UIOSYS, UIO_READ);
+     uio_addiov(uio, CAST_USER_ADDR_T(aptr), asize);
+     code = VNOP_READ(afile->vnode, uio, IO_UNIT, afs_osi_ctxtp);
+     resid = AFS_UIO_RESID(uio);
+     uio_free(uio);
+ #else
      code =
  	gop_rdwr(UIO_READ, afile->vnode, (caddr_t) aptr, asize, afile->offset,
  		 AFS_UIOSYS, IO_UNIT, &afs_osi_cred, &resid);
+ #endif
      AFS_GLOCK();
      if (code == 0) {
  	code = asize - resid;
***************
*** 260,265 ****
--- 345,353 ----
      struct AFS_UCRED *oldCred;
      unsigned int resid;
      register afs_int32 code;
+ #ifdef AFS_DARWIN80_ENV
+     uio_t uio;
+ #endif
      AFS_STATCNT(osi_Write);
      if (!afile)
  	osi_Panic("afs_osi_Write called with null param");
***************
*** 267,276 ****
--- 355,372 ----
  	afile->offset = offset;
      {
  	AFS_GUNLOCK();
+ #ifdef AFS_DARWIN80_ENV
+         uio=uio_create(1, afile->offset, AFS_UIOSYS, UIO_WRITE);
+         uio_addiov(uio, CAST_USER_ADDR_T(aptr), asize);
+         code = VNOP_WRITE(afile->vnode, uio, IO_UNIT, afs_osi_ctxtp);
+         resid = AFS_UIO_RESID(uio);
+         uio_free(uio);
+ #else
  	code =
  	    gop_rdwr(UIO_WRITE, afile->vnode, (caddr_t) aptr, asize,
  		     afile->offset, AFS_UIOSYS, IO_UNIT, &afs_osi_cred,
  		     &resid);
+ #endif
  	AFS_GLOCK();
      }
      if (code == 0) {
Index: openafs/src/afs/DARWIN/osi_groups.c
diff -c openafs/src/afs/DARWIN/osi_groups.c:1.5 openafs/src/afs/DARWIN/osi_groups.c:1.5.2.2
*** openafs/src/afs/DARWIN/osi_groups.c:1.5	Tue Jul 15 19:14:17 2003
--- openafs/src/afs/DARWIN/osi_groups.c	Tue Nov 29 00:02:24 2005
***************
*** 18,25 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_groups.c,v 1.5 2003/07/15 23:14:17 shadow Exp $");
! 
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #include "afs/afs_stats.h"	/* statistics */
--- 18,37 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_groups.c,v 1.5.2.2 2005/11/29 05:02:24 shadow Exp $");
! /* We should be doing something better anyway */
! #ifdef AFS_DARWIN80_ENV
! int
! setpag(proc, cred, pagvalue, newpag, change_parent)
!      struct proc *proc;
!      struct ucred **cred;
!      afs_uint32 pagvalue;
!      afs_uint32 *newpag;
!      afs_uint32 change_parent;
! { 
!   return -1;
! }
! #else
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #include "afs/afs_stats.h"	/* statistics */
***************
*** 74,80 ****
      return code;
  }
  
- 
  int
  setpag(proc, cred, pagvalue, newpag, change_parent)
       struct proc *proc;
--- 86,91 ----
***************
*** 159,161 ****
--- 170,173 ----
      crfree(oldcr);
      return (0);
  }
+ #endif
Index: openafs/src/afs/DARWIN/osi_inode.c
diff -c openafs/src/afs/DARWIN/osi_inode.c:1.7 openafs/src/afs/DARWIN/osi_inode.c:1.7.2.1
*** openafs/src/afs/DARWIN/osi_inode.c:1.7	Wed Jul 28 23:13:44 2004
--- openafs/src/afs/DARWIN/osi_inode.c	Wed Oct  5 01:58:29 2005
***************
*** 16,30 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_inode.c,v 1.7 2004/07/29 03:13:44 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
  #include "afs/osi_inode.h"
  #include "afs/afs_stats.h"	/* statistics stuff */
  #include <ufs/ufs/ufsmount.h>
  extern struct ucred afs_osi_cred;
  
  getinode(fs, dev, inode, vpp, perror)
       struct mount *fs;
       struct vnode **vpp;
--- 16,110 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_inode.c,v 1.7.2.1 2005/10/05 05:58:29 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
  #include "afs/osi_inode.h"
  #include "afs/afs_stats.h"	/* statistics stuff */
+ #ifndef AFS_DARWIN80_ENV
  #include <ufs/ufs/ufsmount.h>
+ #endif
  extern struct ucred afs_osi_cred;
+ extern int afs_CacheFSType;
  
+ #ifdef AFS_DARWIN80_ENV
+ getinode(fs, dev, inode, vpp, perror)
+     mount_t fs;
+     vnode_t *vpp;
+     dev_t dev;
+     ino_t inode;
+     int *perror;
+ {
+     struct vnode *vp;
+     int code;
+     vfs_context_t ctx;
+     char volfspath[64];
+     
+     *vpp = 0;
+     *perror = 0;
+     sprintf(volfspath, "/.vol/%d/%d", dev, inode);
+     code = vnode_open(volfspath, O_RDWR, 0, 0, &vp, afs_osi_ctxtp);
+     if (code) {
+ 	*perror = BAD_IGET;
+ 	return code;
+     } else {
+ 	*vpp = vp;
+ 	return (0);
+     }
+ }    
+     
+   
+ igetinode(vfsp, dev, inode, vpp, va, perror)
+     vnode_t *vpp;
+     mount_t vfsp;
+     dev_t dev;
+     ino_t inode;
+     struct vattr *va;
+     int *perror;
+ {
+     vnode_t pvp, vp;
+     extern struct osi_dev cacheDev;
+     register int code = 0;
+     
+     *perror = 0;
+     
+     AFS_STATCNT(igetinode);
+     if ((code = getinode(vfsp, dev, inode, &vp, perror)) != 0) {
+ 	return (code);
+     }
+     if (vnode_vtype(vp) != VREG && vnode_vtype(vp) != VDIR && vnode_vtype(vp) != VLNK) {
+ 	vnode_close(vp, O_RDWR, afs_osi_ctxtp);
+ 	printf("igetinode: bad type %d\n", vnode_vtype(vp));
+ 	return (ENOENT);
+     }
+     VATTR_INIT(va);
+     VATTR_WANTED(va, va_mode);
+     VATTR_WANTED(va, va_nlink);
+     VATTR_WANTED(va, va_size);
+     code = vnode_getattr(vp, va, afs_osi_ctxtp);
+     if (code) {
+ 	vnode_close(vp, O_RDWR, afs_osi_ctxtp);
+         return code;
+     }
+     if (!VATTR_ALL_SUPPORTED(va)) {
+ 	vnode_close(vp, O_RDWR, afs_osi_ctxtp);
+         return ENOENT;
+     }
+     if (va->va_mode == 0) {
+ 	vnode_close(vp, O_RDWR, afs_osi_ctxtp);
+ 	/* Not an allocated inode */
+ 	return (ENOENT);
+     }
+     if (va->va_nlink == 0) {
+ 	vnode_close(vp, O_RDWR, afs_osi_ctxtp);
+ 	return (ENOENT);
+     }
+     
+     *vpp = vp;
+     return (0);
+ }
+ #else
  getinode(fs, dev, inode, vpp, perror)
       struct mount *fs;
       struct vnode **vpp;
***************
*** 85,91 ****
  	return (0);
      }
  }
! extern int afs_CacheFSType;
  igetinode(vfsp, dev, inode, vpp, va, perror)
       struct vnode **vpp;
       struct mount *vfsp;
--- 165,171 ----
  	return (0);
      }
  }
! 
  igetinode(vfsp, dev, inode, vpp, va, perror)
       struct vnode **vpp;
       struct mount *vfsp;
***************
*** 151,306 ****
  	vput(vp);
      }
  }
  
- #if 0
- /*
-  * icreate system call -- create an inode
-  */
- afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, retval)
-      long *retval;
-      long dev, near_inode, param1, param2, param3, param4;
- {
-     int dummy, err = 0;
-     struct inode *ip, *newip;
-     register int code;
-     struct vnode *vp;
- 
-     AFS_STATCNT(afs_syscall_icreate);
- 
-     if (!afs_suser(NULL))
- 	return (EPERM);
- 
-     code = getinode(0, (dev_t) dev, 2, &ip, &dummy);
-     if (code) {
- 	return (ENOENT);
-     }
-     code = ialloc(ip, (ino_t) near_inode, 0, &newip);
-     iput(ip);
-     if (code) {
- 	return (code);
-     }
-     IN_LOCK(newip);
-     newip->i_flag |= IACC | IUPD | ICHG;
- 
-     newip->i_nlink = 1;
- 
-     newip->i_mode = IFREG;
- 
-     IN_UNLOCK(newip);
-     vp = ITOV(newip);
-     VN_LOCK(vp);
-     vp->v_type = VREG;
-     VN_UNLOCK(vp);
- 
-     if (!vp->v_object) {
- 	extern struct vfs_ubcops ufs_ubcops;
- 	extern struct vm_ubc_object *ubc_object_allocate();
- 	struct vm_ubc_object *vop;
- 	vop = ubc_object_allocate(&vp, &ufs_ubcops, vp->v_mount->m_funnel);
- 	VN_LOCK(vp);
- 	vp->v_object = vop;
- 	VN_UNLOCK(vp);
-     }
- 
- 
-     IN_LOCK(newip);
-     newip->i_flags |= IC_XUID | IC_XGID;
-     newip->i_flags &= ~IC_PROPLIST;
-     newip->i_vicep1 = param1;
-     if (param2 == 0x1fffffff /*INODESPECIAL*/) {
- 	newip->i_vicep2 = ((0x1fffffff << 3) + (param4 & 0x3));
- 	newip->i_vicep3a = (u_short) (param3 >> 16);
- 	newip->i_vicep3b = (u_short) param3;
-     } else {
- 	newip->i_vicep2 =
- 	    (((param2 >> 16) & 0x1f) << 27) +
- 	    (((param4 >> 16) & 0x1f) << 22) + (param3 & 0x3fffff);
- 	newip->i_vicep3a = (u_short) param4;
- 	newip->i_vicep3b = (u_short) param2;
-     }
-     newip->i_vicemagic = VICEMAGIC;
- 
-     *retval = newip->i_number;
-     IN_UNLOCK(newip);
-     iput(newip);
-     return (code);
- }
- 
- 
- afs_syscall_iopen(dev, inode, usrmod, retval)
-      long *retval;
-      int dev, inode, usrmod;
- {
-     struct file *fp;
-     struct inode *ip;
-     struct vnode *vp = NULL;
-     int dummy;
-     int fd;
-     extern struct fileops vnops;
-     register int code;
- 
-     AFS_STATCNT(afs_syscall_iopen);
- 
-     if (!afs_suser(NULL))
- 	return (EPERM);
- 
-     code = igetinode(0, (dev_t) dev, (ino_t) inode, &ip, &dummy);
-     if (code) {
- 	return (code);
-     }
-     if ((code = falloc(&fp, &fd)) != 0) {
- 	iput(ip);
- 	return (code);
-     }
-     IN_UNLOCK(ip);
- 
-     FP_LOCK(fp);
-     fp->f_flag = (usrmod - FOPEN) & FMASK;
-     fp->f_type = DTYPE_VNODE;
-     fp->f_ops = &vnops;
-     fp->f_data = (caddr_t) ITOV(ip);
- 
-     FP_UNLOCK(fp);
-     U_FD_SET(fd, fp, &u.u_file_state);
-     *retval = fd;
-     return (0);
- }
- 
- 
- /*
-  * Support for iinc() and idec() system calls--increment or decrement
-  * count on inode.
-  * Restricted to super user.
-  * Only VICEMAGIC type inodes.
-  */
- afs_syscall_iincdec(dev, inode, inode_p1, amount)
-      int dev, inode, inode_p1, amount;
- {
-     int dummy;
-     struct inode *ip;
-     register int code;
- 
-     if (!afs_suser(NULL))
- 	return (EPERM);
- 
-     code = igetinode(0, (dev_t) dev, (ino_t) inode, &ip, &dummy);
-     if (code) {
- 	return (code);
-     }
-     if (!IS_VICEMAGIC(ip)) {
- 	return (EPERM);
-     } else if (ip->i_vicep1 != inode_p1) {
- 	return (ENXIO);
-     }
-     ip->i_nlink += amount;
-     if (ip->i_nlink == 0) {
- 	CLEAR_VICEMAGIC(ip);
-     }
-     ip->i_flag |= ICHG;
-     iput(ip);
-     return (0);
- }
- #else
  afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, retval)
       long *retval;
       long dev, near_inode, param1, param2, param3, param4;
--- 231,238 ----
  	vput(vp);
      }
  }
+ #endif
  
  afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, retval)
       long *retval;
       long dev, near_inode, param1, param2, param3, param4;
***************
*** 320,323 ****
  {
      return EOPNOTSUPP;
  }
- #endif
--- 252,254 ----
Index: openafs/src/afs/DARWIN/osi_machdep.h
diff -c openafs/src/afs/DARWIN/osi_machdep.h:1.3.2.3 openafs/src/afs/DARWIN/osi_machdep.h:1.3.2.7
*** openafs/src/afs/DARWIN/osi_machdep.h:1.3.2.3	Wed Apr 13 22:31:35 2005
--- openafs/src/afs/DARWIN/osi_machdep.h	Thu Dec  1 02:37:21 2005
***************
*** 25,36 ****
  #endif
  #endif
  
  #include <sys/lock.h>
- #include <kern/thread.h>
  #include <sys/user.h>
  
  #define getpid()                current_proc()->p_pid
  #define getppid()               current_proc()->p_pptr->p_pid
  #undef gop_lookupname
  #define gop_lookupname osi_lookupname
  
--- 25,60 ----
  #endif
  #endif
  
+ #ifdef AFS_DARWIN80_ENV
+ #include <kern/locks.h>
+ #include <sys/mount.h>
+ #include <h/vnode.h>
+ #else
  #include <sys/lock.h>
  #include <sys/user.h>
+ #include <sys/vnode.h>
+ #endif
+ #include <kern/thread.h>
  
+ #ifdef AFS_DARWIN80_ENV
+ #define vop_proc vfs_context_proc(ap->a_context)
+ #define vop_cred vfs_context_ucred(ap->a_context)
+ #define cn_proc(cnp) vfs_context_proc(ap->a_context)
+ #define cn_cred(cnp) vfs_context_ucred(ap->a_context)
+ #define vop_cn_proc vfs_context_proc(ap->a_context)
+ #define vop_cn_cred vfs_context_ucred(ap->a_context)
+ #define getpid()                proc_selfpid()
+ #define getppid()               proc_selfppid()
+ #else
+ #define vop_proc ap->a_p
+ #define vop_cred ap->a_cred
+ #define cn_proc(cnp) (cnp)->cn_proc
+ #define cn_cred(cnp) (cnp)->cn_cred
+ #define vop_cn_proc cn_proc(ap->a_cnp)
+ #define vop_cn_cred cn_cred(ap->a_cnp)
  #define getpid()                current_proc()->p_pid
  #define getppid()               current_proc()->p_pptr->p_pid
+ #endif
  #undef gop_lookupname
  #define gop_lookupname osi_lookupname
  
***************
*** 39,52 ****
--- 63,132 ----
  /* vcexcl - used only by afs_create */
  enum vcexcl { EXCL, NONEXCL };
  
+ #ifndef AFS_DARWIN80_ENV
+ #define vnode_clearfsnode(x) ((x)->v_data = 0)
+ #define vnode_fsnode(x) (x)->v_data
+ #define vnode_lock(x) vn_lock(x, LK_EXCLUSIVE | LK_RETRY, current_proc());
+ #define vnode_isvroot(x) (((x)->v_flag & VROOT)?1:0)
+ #define vnode_vtype(x) (x)->v_type
+ #define vnode_isdir(x) ((x)->v_type == VDIR)
+ 
+ #define vfs_flags(x) (x)->v_flags
+ #define vfs_setflags(x, y) (x)->mnt_flag |= (y)
+ #define vfs_clearflags(x, y) (x)->mnt_flag &= (~(y))
+ #define vfs_isupdate(x) ((x)->mnt_flag & MNT_UPDATE)
+ #define vfs_fsprivate(x) (x)->mnt_data
+ #define vfs_setfsprivate(x,y) (x)->mnt_data = (y)
+ #define vfs_typenum(x) (x)->mnt_vfc->vfc_typenum
+ #endif
+ 
+ #ifdef AFS_DARWIN80_ENV
+ #define vrele vnode_rele
+ #define vput vnode_rele
+ #define vref vnode_ref
+ #define vattr vnode_attr
+ #if 0
+ #define vn_lock(v, unused1, unused2) vnode_get((v))
+ #define VOP_LOCK(v, unused1, unused2) vnode_get((v))
+ #define VOP_UNLOCK(v, unused1, unused2) vnode_put((v))
+ #endif
+ 
+ #define va_size va_data_size
+ #define va_atime va_access_time
+ #define va_mtime va_modify_time
+ #define va_ctime va_change_time
+ #define va_bytes va_total_alloc 
+ #define va_blocksize va_iosize
+ #define va_nodeid va_fileid
+ 
+ #define crref kauth_cred_get_with_ref
+ #define crhold kauth_cred_ref
+ #define crfree kauth_cred_rele
+ #define crdup kauth_cred_dup
+ 
+ extern vfs_context_t afs_osi_ctxtp;
+ extern int afs_osi_ctxtp_initialized;
+ #endif
+ 
  /* 
   * Time related macros
   */
  #ifndef AFS_DARWIN60_ENV
  extern struct timeval time;
  #endif
+ #ifdef AFS_DARWIN80_ENV
+ static inline time_t osi_Time(void) {
+     struct timeval _now;
+     microtime(&_now);
+     return _now.tv_sec;
+ }
+ #else
  #define osi_Time() (time.tv_sec)
+ #endif
  #define afs_hz      hz
+ #ifdef AFS_DARWIN80_ENV
+ extern int hz;
+ #endif
  
  #define PAGESIZE 8192
  
***************
*** 58,63 ****
--- 138,147 ----
  #define VN_HOLD(vp) darwin_vn_hold(vp)
  #define VN_RELE(vp) vrele(vp);
  
+ void darwin_vn_hold(struct vnode *vp);
+ #ifdef AFS_DARWIN80_ENV
+ void darwin_vn_rele(struct vnode *vp);
+ #endif
  
  #define gop_rdwr(rw,gp,base,len,offset,segflg,unit,cred,aresid) \
    vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(unit),(cred),(aresid),current_proc())
***************
*** 67,72 ****
--- 151,173 ----
  #ifdef KERNEL
  extern thread_t afs_global_owner;
  /* simple locks cannot be used since sleep can happen at any time */
+ #ifdef AFS_DARWIN80_ENV
+ /* mach locks still don't have an exported try, but we are forced to use them */
+ extern lck_mtx_t  *afs_global_lock;
+ #define AFS_GLOCK() \
+     do { \
+ 	osi_Assert(afs_global_owner != current_thread()); \
+ 	lck_mtx_lock(afs_global_lock); \
+ 	osi_Assert(afs_global_owner == 0); \
+ 	afs_global_owner = current_thread(); \
+     } while (0)
+ #define AFS_GUNLOCK() \
+     do { \
+ 	osi_Assert(afs_global_owner == current_thread()); \
+ 	afs_global_owner = 0; \
+         lck_mtx_unlock(afs_global_lock); \
+     } while(0)
+ #else
  /* Should probably use mach locks rather than bsd locks, since we use the
     mach thread control api's elsewhere (mach locks not used for consistency
     with rx, since rx needs lock_write_try() in order to use mach locks
***************
*** 84,89 ****
--- 185,191 ----
  	afs_global_owner = 0; \
          lockmgr(&afs_global_lock, LK_RELEASE, 0, current_proc()); \
      } while(0)
+ #endif
  #define ISAFS_GLOCK() (afs_global_owner == current_thread())
  
  #define SPLVAR
***************
*** 101,114 ****
  #define AFS_APPL_UFS_CACHE 1
  #define AFS_APPL_HFS_CACHE 2
  
! extern ino_t VnodeToIno(vnode_t * vp);
! extern dev_t VnodeToDev(vnode_t * vp);
  
  #define osi_curproc() current_proc()
  
  /* FIXME */
  #define osi_curcred() &afs_osi_cred 
  
  #endif /* KERNEL */
  
  #endif /* _OSI_MACHDEP_H_ */
--- 203,236 ----
  #define AFS_APPL_UFS_CACHE 1
  #define AFS_APPL_HFS_CACHE 2
  
! extern ino_t VnodeToIno(vnode_t avp);
! extern dev_t VnodeToDev(vnode_t vp);
! extern int igetinode(mount_t vfsp, dev_t dev , ino_t inode, vnode_t *vpp,
!               struct vattr *va, int *perror);
  
  #define osi_curproc() current_proc()
  
  /* FIXME */
  #define osi_curcred() &afs_osi_cred 
  
+ #ifdef AFS_DARWIN80_ENV
+ uio_t afsio_darwin_partialcopy(uio_t auio, int size);
+ 
+ #define uprintf printf
+ #endif
+ 
+ #ifndef AFS_DARWIN80_ENV
+ #define ifaddr_address_family(x) (x)->ifa_addr->sa_family
+ #define ifaddr_address(x, y, z) memcpy(y, (x)->ifa_addr, z)
+ #define ifaddr_netmask(x, y, z) memcpy(y, (x)->ifa_netmask, z)
+ #define ifaddr_dstaddress(x, y, z) memcpy(y, (x)->ifa_dstaddr, z)
+ #define ifaddr_ifnet(x) (x?(x)->ifa_ifp:0)
+ #define ifnet_flags(x) (x?(x)->if_flags:0)
+ #define ifnet_metric(x) (x?(x)->if_data.ifi_metric:0)
+ /*#define ifnet_mtu(x) (x)->if_mtu*/
+ #define ifaddr_withnet(x) ifa_ifwithnet(x)
+ #endif
+ 
  #endif /* KERNEL */
  
  #endif /* _OSI_MACHDEP_H_ */
Index: openafs/src/afs/DARWIN/osi_misc.c
diff -c openafs/src/afs/DARWIN/osi_misc.c:1.6.2.1 openafs/src/afs/DARWIN/osi_misc.c:1.6.2.2
*** openafs/src/afs/DARWIN/osi_misc.c:1.6.2.1	Fri Mar 11 01:50:35 2005
--- openafs/src/afs/DARWIN/osi_misc.c	Wed Oct  5 01:58:29 2005
***************
*** 11,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_misc.c,v 1.6.2.1 2005/03/11 06:50:35 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #include <sys/namei.h>
  
  int
  osi_lookupname(char *aname, enum uio_seg seg, int followlink,
  	       struct vnode **vpp)
--- 11,54 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_misc.c,v 1.6.2.2 2005/10/05 05:58:29 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #include <sys/namei.h>
  
+ #ifndef PATHBUFLEN
+ #define PATHBUFLEN 256
+ #endif
+ 
+ #ifdef AFS_DARWIN80_ENV
+ int
+ osi_lookupname(char *aname, enum uio_seg seg, int followlink,
+ 	       struct vnode **vpp) {
+     vfs_context_t ctx;
+     char tname[PATHBUFLEN];
+     int code, flags;
+     size_t len;
+     
+     if (seg == AFS_UIOUSER) { /* XXX 64bit */
+ 	AFS_COPYINSTR(aname, tname, sizeof(tname), &len, code);
+ 	if (code)
+ 	    return code;
+ 	aname=tname;
+     }
+     flags = 0;
+     if (!followlink)
+ 	flags |= VNODE_LOOKUP_NOFOLLOW;
+     ctx=vfs_context_create(NULL);
+     code = vnode_lookup(aname, flags, vpp, ctx);
+     if (!code) { /* get a usecount */
+ 	vnode_ref(*vpp);
+ 	vnode_put(*vpp);
+     }
+     vfs_context_rele(ctx);
+     return code;
+ }
+ #else
  int
  osi_lookupname(char *aname, enum uio_seg seg, int followlink,
  	       struct vnode **vpp)
***************
*** 37,56 ****
      VOP_UNLOCK(n.ni_vp, 0, current_proc());
      return 0;
  }
  
  /*
   * afs_suser() returns true if the caller is superuser, false otherwise.
   *
   * Note that it must NOT set errno.
   */
! 
  afs_suser(void *credp)
  {
      int error;
      struct proc *p = current_proc();
  
      if ((error = suser(p->p_ucred, &p->p_acflag)) == 0) {
  	return (1);
      }
      return (0);
  }
--- 69,229 ----
      VOP_UNLOCK(n.ni_vp, 0, current_proc());
      return 0;
  }
+ #endif
  
  /*
   * afs_suser() returns true if the caller is superuser, false otherwise.
   *
   * Note that it must NOT set errno.
   */
! int
  afs_suser(void *credp)
  {
      int error;
      struct proc *p = current_proc();
  
+ #ifdef AFS_DARWIN80_ENV
+     if ((error = proc_suser(p)) == 0) {
+ 	return (1);
+     }
+     return (0);
+ #else
      if ((error = suser(p->p_ucred, &p->p_acflag)) == 0) {
  	return (1);
      }
      return (0);
+ #endif
+ }
+ 
+ #ifdef AFS_DARWIN80_ENV
+ uio_t afsio_darwin_partialcopy(uio_t auio, int size) {
+    uio_t res;
+    int i;
+    user_addr_t iovaddr;
+    user_size_t iovsize;
+ 
+    /* XXX 64 bit userspaace? */
+    res = uio_create(uio_iovcnt(auio), uio_offset(auio),
+                     uio_isuserspace(auio) ? UIO_USERSPACE32 : UIO_SYSSPACE32,
+                     uio_rw(auio));
+ 
+    for (i = 0;i < uio_iovcnt(auio) && size > 0;i++) {
+        if (uio_getiov(auio, i, &iovaddr, &iovsize))
+            break;
+        if (iovsize > size)
+           iovsize = size;
+        if (uio_addiov(res, iovaddr, iovsize))
+           break;
+        size -= iovsize;
+    }
+    return res;
  }
+ 
+ vfs_context_t afs_osi_ctxtp;
+ int afs_osi_ctxtp_initialized;
+ static thread_t vfs_context_owner;
+ #define RECURSIVE_VFS_CONTEXT 1
+ #if RECURSIVE_VFS_CONTEXT
+ static proc_t vfs_context_curproc;
+ int vfs_context_ref;
+ #else 
+ #define vfs_context_ref 1
+ #endif
+ void get_vfs_context(void) {
+   int isglock = ISAFS_GLOCK();
+ 
+   if (!isglock)
+      AFS_GLOCK();
+   if (afs_osi_ctxtp_initialized) {
+      if (!isglock)
+         AFS_GUNLOCK();
+       return;
+   }
+   osi_Assert(vfs_context_owner != current_thread());
+ #if RECURSIVE_VFS_CONTEXT
+   if (afs_osi_ctxtp && current_proc() == vfs_context_curproc) {
+      vfs_context_ref++;
+      vfs_context_owner = current_thread();
+      if (!isglock)
+         AFS_GUNLOCK();
+      return;
+   }
+ #endif
+   while (afs_osi_ctxtp && vfs_context_ref) {
+      printf("[%d] waiting for afs_osi_ctxtp\n", proc_selfpid());
+      afs_osi_Sleep(&afs_osi_ctxtp);
+      if (afs_osi_ctxtp_initialized) {
+        printf("[%d] ok\n", proc_selfpid());
+        if (!isglock)
+           AFS_GUNLOCK();
+        return;
+      }
+      if (!afs_osi_ctxtp || !vfs_context_ref)
+         printf("[%d] ok\n", proc_selfpid());
+   }
+ #if RECURSIVE_VFS_CONTEXT
+   vfs_context_rele(afs_osi_ctxtp);
+   vfs_context_ref=1;
+ #else
+   osi_Assert(vfs_context_owner == (thread_t)0);
+ #endif
+   afs_osi_ctxtp = vfs_context_create(NULL);
+   vfs_context_owner = current_thread();
+   vfs_context_curproc = current_proc();
+   if (!isglock)
+      AFS_GUNLOCK();
+ }
+ 
+ void put_vfs_context(void) {
+   int isglock = ISAFS_GLOCK();
+ 
+   if (!isglock)
+      AFS_GLOCK();
+   if (afs_osi_ctxtp_initialized) {
+      if (!isglock)
+         AFS_GUNLOCK();
+       return;
+   }
+ #if RECURSIVE_VFS_CONTEXT
+   if (vfs_context_owner == current_thread())
+       vfs_context_owner = (thread_t)0;
+   vfs_context_ref--;
+ #else
+   osi_Assert(vfs_context_owner == current_thread());
+   vfs_context_rele(afs_osi_ctxtp);
+   afs_osi_ctxtp = NULL;
+   vfs_context_owner = (thread_t)0;
+ #endif
+   afs_osi_Wakeup(&afs_osi_ctxtp);
+      if (!isglock)
+         AFS_GUNLOCK();
+ }
+ 
+ extern int afs3_syscall();
+ 
+ int afs_cdev_nop_openclose(dev_t dev, int flags, int devtype,struct proc *p) {
+   return 0;
+ }
+ extern int afs3_syscall(struct proc *p, void *data, unsigned long *retval);
+ 
+ int
+ afs_cdev_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct proc *p) {
+    unsigned long retval=0;
+    int code;
+    struct afssysargs *a = (struct afssysargs *)data;
+    if (proc_is64bit(p))
+      return EINVAL;
+ 
+   if (cmd != VIOC_SYSCALL) {
+      return EINVAL;
+   }
+ 
+  code=afs3_syscall(p, data, &retval);
+  if (code)
+     return code;
+  if (retval && a->syscall != AFSCALL_CALL && a->param1 != AFSOP_CACHEINODE) { printf("SSCall(%d,%d) is returning non-error value %d\n", a->syscall, a->param1, retval); }
+  a->retval = retval;
+  return 0; 
+ }
+ 
+ #endif
Index: openafs/src/afs/DARWIN/osi_module.c
diff -c openafs/src/afs/DARWIN/osi_module.c:1.10.2.1 openafs/src/afs/DARWIN/osi_module.c:1.10.2.3
*** openafs/src/afs/DARWIN/osi_module.c:1.10.2.1	Mon Apr  4 00:01:19 2005
--- openafs/src/afs/DARWIN/osi_module.c	Fri Nov 18 23:35:40 2005
***************
*** 2,19 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_module.c,v 1.10.2.1 2005/04/04 04:01:19 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
  #ifdef AFS_DARWIN60_ENV		/* not in Kernel.framework anymore !?! */
  #include <sys/syscall.h>
  #else
  #include "sys/syscall.h"
  #endif
  #include <mach/kmod.h>
  
- struct vfsconf afs_vfsconf;
  extern struct vfsops afs_vfsops;
  extern struct mount *afs_globalVFS;
  extern int Afs_xsetgroups();
--- 2,39 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_module.c,v 1.10.2.3 2005/11/19 04:35:40 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
+ #ifdef AFS_DARWIN80_ENV
+ static vfstable_t afs_vfstable;
+ static struct vfs_fsentry afs_vfsentry;
+ extern struct vnodeopv_desc afs_vnodeop_opv_desc;
+ extern struct vnodeopv_desc afs_dead_vnodeop_opv_desc;
+ static struct vnodeopv_desc *afs_vnodeop_opv_desc_list[2] =
+    { &afs_vnodeop_opv_desc, &afs_dead_vnodeop_opv_desc };
+ 
+ 
+ #include <sys/conf.h>
+ #include <miscfs/devfs/devfs.h>
+ #define seltrue eno_select
+ struct cdevsw afs_cdev = NO_CDEVICE;
+ #undef seltrue
+ static int afs_cdev_major;
+ extern open_close_fcn_t afs_cdev_nop_openclose;
+ extern ioctl_fcn_t afs_cdev_ioctl;
+ static void *afs_cdev_devfs_handle;
+ #else
  #ifdef AFS_DARWIN60_ENV		/* not in Kernel.framework anymore !?! */
  #include <sys/syscall.h>
  #else
  #include "sys/syscall.h"
  #endif
+ struct vfsconf afs_vfsconf;
+ #endif
  #include <mach/kmod.h>
  
  extern struct vfsops afs_vfsops;
  extern struct mount *afs_globalVFS;
  extern int Afs_xsetgroups();
***************
*** 26,35 ****
  kern_return_t
  afs_modload(struct kmod_info *ki, void *data)
  {
!     if (sysent[AFS_SYSCALL].sy_call != nosys) {
! 	printf("AFS_SYSCALL in use. aborting\n");
  	return KERN_FAILURE;
      }
      memset(&afs_vfsconf, 0, sizeof(struct vfsconf));
      strcpy(afs_vfsconf.vfc_name, "afs");
      afs_vfsconf.vfc_vfsops = &afs_vfsops;
--- 46,77 ----
  kern_return_t
  afs_modload(struct kmod_info *ki, void *data)
  {
!     osi_Init();
! #ifdef AFS_DARWIN80_ENV
!     memset(&afs_vfsentry, 0, sizeof(struct vfs_fsentry));
!     strcpy(afs_vfsentry.vfe_fsname, "afs");
!     afs_vfsentry.vfe_vfsops = &afs_vfsops;
!     afs_vfsentry.vfe_vopcnt = 2;
!     afs_vfsentry.vfe_opvdescs = afs_vnodeop_opv_desc_list;
!     /* We may be 64bit ready too (VFS_TBL64BITREADY) */
!     afs_vfsentry.vfe_flags = VFS_TBLTHREADSAFE|VFS_TBLNOTYPENUM;
!     if (vfs_fsadd(&afs_vfsentry, &afs_vfstable)) {
! 	printf("AFS: vfs_fsadd failed. aborting\n");
  	return KERN_FAILURE;
      }
+     afs_cdev.d_open = &afs_cdev_nop_openclose;
+     afs_cdev.d_close = &afs_cdev_nop_openclose;
+     afs_cdev.d_ioctl = &afs_cdev_ioctl;
+     afs_cdev_major = cdevsw_add(-1, &afs_cdev);
+     if (afs_cdev_major == -1) {
+ 	printf("AFS: cdevsw_add failed. aborting\n");
+         vfs_fsremove(afs_vfstable);
+ 	return KERN_FAILURE;
+     }
+     afs_cdev_devfs_handle = devfs_make_node(makedev(afs_cdev_major, 0),
+                                             DEVFS_CHAR, UID_ROOT, GID_WHEEL,
+                                             0666, "openafs_ioctl", 0);
+ #else
      memset(&afs_vfsconf, 0, sizeof(struct vfsconf));
      strcpy(afs_vfsconf.vfc_name, "afs");
      afs_vfsconf.vfc_vfsops = &afs_vfsops;
***************
*** 39,44 ****
--- 81,90 ----
  	printf("AFS: vfsconf_add failed. aborting\n");
  	return KERN_FAILURE;
      }
+     if (sysent[AFS_SYSCALL].sy_call != nosys) {
+ 	printf("AFS_SYSCALL in use. aborting\n");
+ 	return KERN_FAILURE;
+     }
      sysent[SYS_setgroups].sy_call = Afs_xsetgroups;
  #if 0
      sysent[SYS_ioctl].sy_call = afs_xioctl;
***************
*** 49,54 ****
--- 95,105 ----
  #ifdef KERNEL_FUNNEL
      sysent[AFS_SYSCALL].sy_funnel = KERNEL_FUNNEL;
  #endif
+ #endif
+ #ifdef AFS_DARWIN80_ENV
+     MUTEX_SETUP();
+     afs_global_lock = lck_mtx_alloc_init(openafs_lck_grp, 0);
+ #endif
      return KERN_SUCCESS;
  }
  
***************
*** 57,72 ****
--- 108,136 ----
  {
      if (afs_globalVFS)
  	return KERN_FAILURE;
+ #ifdef AFS_DARWIN80_ENV
+     if (vfs_fsremove(afs_vfstable))
+ 	return KERN_FAILURE;
+     devfs_remove(afs_cdev_devfs_handle);
+     cdevsw_remove(afs_cdev_major, &afs_cdev);
+ #else
      if (vfsconf_del("afs"))
  	return KERN_FAILURE;
      /* give up syscall entries for ioctl & setgroups, which we've stolen */
  #if 0
      sysent[SYS_ioctl].sy_call = ioctl;
  #endif
+ #ifndef AFS_DARWIN80_ENV
      sysent[SYS_setgroups].sy_call = setgroups;
+ #endif
      /* give up the stolen syscall entry */
      sysent[AFS_SYSCALL].sy_narg = 0;
      sysent[AFS_SYSCALL].sy_call = nosys;
+ #endif
+ #ifdef AFS_DARWIN80_ENV
+     MUTEX_FINISH();
+     lck_mtx_free(afs_global_lock, openafs_lck_grp);
+ #endif
      return KERN_SUCCESS;
  }
  
Index: openafs/src/afs/DARWIN/osi_prototypes.h
diff -c openafs/src/afs/DARWIN/osi_prototypes.h:1.5.2.1 openafs/src/afs/DARWIN/osi_prototypes.h:1.5.2.2
*** openafs/src/afs/DARWIN/osi_prototypes.h:1.5.2.1	Fri Mar 11 01:50:35 2005
--- openafs/src/afs/DARWIN/osi_prototypes.h	Wed Oct  5 01:58:29 2005
***************
*** 20,25 ****
--- 20,28 ----
  /* osi_misc.c */
  extern int osi_lookupname(char *aname, enum uio_seg seg, int followlink,
  			  struct vnode **vpp);
+ extern int afs_suser(void *credp);
+ extern void get_vfs_context(void);
+ extern void put_vfs_context(void);
  
  /* osi_sleep.c */
  extern void afs_osi_fullSigMask(void);
***************
*** 28,31 ****
--- 31,39 ----
  /* osi_vm.c */
  extern void osi_VM_NukePages(struct vnode *vp, off_t offset, off_t size);
  extern int osi_VM_Setup(struct vcache *avc, int force);
+ 
+ /* osi_vnodeops.c */
+ extern int afs_darwin_getnewvnode(struct vcache *avc);
+ extern int afs_darwin_finalizevnode(struct vcache *avc, struct vnode *parent, 
+                                      struct componentname *cnp, int isroot);
  #endif /* _OSI_PROTO_H_ */
Index: openafs/src/afs/DARWIN/osi_sleep.c
diff -c openafs/src/afs/DARWIN/osi_sleep.c:1.10 openafs/src/afs/DARWIN/osi_sleep.c:1.10.2.3
*** openafs/src/afs/DARWIN/osi_sleep.c:1.10	Wed Jul 28 23:33:00 2004
--- openafs/src/afs/DARWIN/osi_sleep.c	Fri Feb 17 10:29:47 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_sleep.c,v 1.10 2004/07/29 03:33:00 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_sleep.c,v 1.10.2.3 2006/02/17 15:29:47 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 84,91 ****
--- 84,121 ----
      int seq;			/* Sequence number: this is incremented
  				 * by wakeup calls; wait will not return until
  				 * it changes */
+ #ifdef AFS_DARWIN80_ENV
+    lck_mtx_t *lck;
+    thread_t owner;
+ #endif
  } afs_event_t;
  
+ #ifdef AFS_DARWIN80_ENV
+ #define EVTLOCK_INIT(e) \
+     do { \
+ 	(e)->lck = lck_mtx_alloc_init(openafs_lck_grp, 0); \
+ 	(e)->owner = 0; \
+     } while (0)
+ #define EVTLOCK_LOCK(e) \
+     do { \
+ 	osi_Assert((e)->owner != current_thread()); \
+ 	lck_mtx_lock((e)->lck); \
+ 	osi_Assert((e)->owner == 0); \
+ 	(e)->owner = current_thread(); \
+     } while (0)
+ #define EVTLOCK_UNLOCK(e) \
+     do { \
+ 	osi_Assert((e)->owner == current_thread()); \
+ 	(e)->owner = 0; \
+ 	lck_mtx_unlock((e)->lck); \
+     } while (0)
+ #define EVTLOCK_DESTROY(e) lck_mtx_free((e)->lck, openafs_lck_grp)
+ #else
+ #define EVTLOCK_INIT(e)
+ #define EVTLOCK_LOCK(e)
+ #define EVTLOCK_UNLOCK(e)
+ #define EVTLOCK_DESTROY(e)
+ #endif
  #define HASHSIZE 128
  afs_event_t *afs_evhasht[HASHSIZE];	/* Hash table for events */
  #define afs_evhash(event)       (afs_uint32) ((((long)event)>>2) & (HASHSIZE-1));
***************
*** 96,114 ****
  static afs_event_t *
  afs_getevent(char *event)
  {
!     afs_event_t *evp, *newp = 0;
      int hashcode;
  
      AFS_ASSERT_GLOCK();
      hashcode = afs_evhash(event);
      evp = afs_evhasht[hashcode];
      while (evp) {
  	if (evp->event == event) {
  	    evp->refcount++;
  	    return evp;
  	}
  	if (evp->refcount == 0)
  	    newp = evp;
  	evp = evp->next;
      }
      if (!newp) {
--- 126,146 ----
  static afs_event_t *
  afs_getevent(char *event)
  {
!     afs_event_t *evp, *oevp, *newp = 0;
      int hashcode;
  
      AFS_ASSERT_GLOCK();
      hashcode = afs_evhash(event);
      evp = afs_evhasht[hashcode];
      while (evp) {
+ 	EVTLOCK_LOCK(evp);
  	if (evp->event == event) {
  	    evp->refcount++;
  	    return evp;
  	}
  	if (evp->refcount == 0)
  	    newp = evp;
+ 	EVTLOCK_UNLOCK(evp);
  	evp = evp->next;
      }
      if (!newp) {
***************
*** 117,130 ****
--- 149,174 ----
  	newp->next = afs_evhasht[hashcode];
  	afs_evhasht[hashcode] = newp;
  	newp->seq = 0;
+ 	EVTLOCK_INIT(newp);
      }
+     EVTLOCK_LOCK(newp);
      newp->event = event;
      newp->refcount = 1;
      return newp;
  }
  
  /* Release the specified event */
+ #ifdef AFS_DARWIN80_ENV
+ #define relevent(evp) \
+     do { \
+ 	osi_Assert((evp)->owner == current_thread()); \
+         (evp)->refcount--; \
+ 	(evp)->owner = 0; \
+ 	lck_mtx_unlock((evp)->lck); \
+     } while (0)
+ #else
  #define relevent(evp) ((evp)->refcount--)
+ #endif
  
  
  void
***************
*** 134,141 ****
--- 178,194 ----
      int seq;
  
      evp = afs_getevent(event);
+ #ifdef AFS_DARWIN80_ENV
+      AFS_ASSERT_GLOCK();
+      AFS_GUNLOCK();
+ #endif
      seq = evp->seq;
      while (seq == evp->seq) {
+ #ifdef AFS_DARWIN80_ENV
+ 	evp->owner = 0;
+ 	msleep(event, evp->lck, PVFS, "afs_osi_Sleep", NULL);
+ 	evp->owner = current_thread();
+ #else
  	AFS_ASSERT_GLOCK();
  	AFS_GUNLOCK();
  #ifdef AFS_DARWIN14_ENV
***************
*** 146,158 ****
--- 199,216 ----
  	thread_block(0);
  #endif
  	AFS_GLOCK();
+ #endif
      }
      relevent(evp);
+ #ifdef AFS_DARWIN80_ENV
+     AFS_GLOCK();
+ #endif
  }
  
  void 
  afs_osi_fullSigMask()
  {
+ #ifndef AFS_DARWIN80_ENV
      struct uthread *user_thread = (struct uthread *)get_bsdthread_info(current_act());
         
      /* Protect original sigmask */
***************
*** 162,172 ****
--- 220,232 ----
  	/* Mask all signals */
  	user_thread->uu_sigmask = ~(sigset_t)0;
      }
+ #endif
  }
  
  void 
  afs_osi_fullSigRestore()
  {
+ #ifndef AFS_DARWIN80_ENV
      struct uthread *user_thread = (struct uthread *)get_bsdthread_info(current_act());
         
      /* Protect original sigmask */
***************
*** 176,181 ****
--- 236,242 ----
  	/* Clear the oldmask */
  	user_thread->uu_oldmask = (sigset_t)0;
      }
+ #endif
  }
  
  int
***************
*** 199,213 ****
  {
      int code = 0;
      struct afs_event *evp;
!     int ticks, seq;
      int prio;
  
-     ticks = (ams * afs_hz) / 1000;
  
  
      evp = afs_getevent(event);
      seq = evp->seq;
      AFS_GUNLOCK();
  #ifdef AFS_DARWIN14_ENV
      /* this is probably safe for all versions, but testing is hard. */
      /* using tsleep instead of assert_wait/thread_set_timer/thread_block
--- 260,290 ----
  {
      int code = 0;
      struct afs_event *evp;
!     int seq;
      int prio;
+ #ifdef AFS_DARWIN80_ENV
+     struct timespec ts;
+ #else
+     int ticks;
+ #endif
  
  
  
      evp = afs_getevent(event);
      seq = evp->seq;
      AFS_GUNLOCK();
+ #ifdef AFS_DARWIN80_ENV
+     if (aintok)
+         prio = PCATCH | PPAUSE;
+     else
+         prio = PVFS;
+     ts.tv_sec = ams / 1000;
+     ts.tv_nsec = (ams % 1000) * 1000000;
+     evp->owner = 0;
+     code = msleep(event, evp->lck, prio, "afs_osi_TimedSleep", &ts);
+     evp->owner = current_thread();
+ #else
+     ticks = (ams * afs_hz) / 1000;
  #ifdef AFS_DARWIN14_ENV
      /* this is probably safe for all versions, but testing is hard. */
      /* using tsleep instead of assert_wait/thread_set_timer/thread_block
***************
*** 229,238 ****
--- 306,319 ----
      code = 0;
  #endif
      AFS_GLOCK();
+ #endif
      if (seq == evp->seq)
  	code = EINTR;
  
      relevent(evp);
+ #ifdef AFS_DARWIN80_ENV
+     AFS_GLOCK();
+ #endif
      return code;
  }
  
***************
*** 257,259 ****
--- 338,365 ----
      relevent(evp);
      return ret;
  }
+ 
+ void
+ shutdown_osisleep(void) {
+     struct afs_event *evp, *nevp, **pevpp;
+     int i;
+     for (i=0; i < HASHSIZE; i++) {
+ 	evp = afs_evhasht[i];
+ 	pevpp = &afs_evhasht[i];
+ 	while (evp) {
+ 	    EVTLOCK_LOCK(evp);
+ 	    nevp = evp->next;
+ 	    if (evp->refcount == 0) {
+ 		EVTLOCK_DESTROY(evp);
+ 		*pevpp = evp->next;
+ 		osi_FreeSmallSpace(evp);
+ 		afs_evhashcnt--;
+ 	    } else {
+ 		EVTLOCK_UNLOCK(evp);
+ 		pevpp = &evp->next;
+ 	    }
+ 	    evp = nevp;
+ 	}
+     }
+ }
+ 
Index: openafs/src/afs/DARWIN/osi_vfsops.c
diff -c openafs/src/afs/DARWIN/osi_vfsops.c:1.11.2.1 openafs/src/afs/DARWIN/osi_vfsops.c:1.11.2.4
*** openafs/src/afs/DARWIN/osi_vfsops.c:1.11.2.1	Mon Apr  4 00:01:19 2005
--- openafs/src/afs/DARWIN/osi_vfsops.c	Tue Jan 17 11:08:20 2006
***************
*** 5,11 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vfsops.c,v 1.11.2.1 2005/04/04 04:01:19 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_vfsops.c,v 1.11.2.4 2006/01/17 16:08:20 shadow Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
***************
*** 13,24 ****
--- 13,31 ----
  #include <sys/malloc.h>
  #include <sys/namei.h>
  #include <sys/conf.h>
+ #ifndef AFS_DARWIN80_ENV
  #include <sys/syscall.h>
+ #endif
  #include <sys/sysctl.h>
  #include "../afs/sysctl.h"
  
+ #ifndef M_UFSMNT
+ #define M_UFSMNT M_TEMP /* DARWIN80 MALLOC doesn't look at the type anyway */
+ #endif
+ 
  struct vcache *afs_globalVp = 0;
  struct mount *afs_globalVFS = 0;
+ int afs_vfs_typenum;
  
  int
  afs_quotactl()
***************
*** 45,107 ****
      return (EINVAL);
  }
  
  int
  afs_start(mp, flags, p)
       struct mount *mp;
       int flags;
!      struct proc *p;
  {
      return (0);			/* nothing to do. ? */
  }
  
  int
! afs_mount(mp, path, data, ndp, p)
       register struct mount *mp;
       char *path;
       caddr_t data;
       struct nameidata *ndp;
!      struct proc *p;
  {
      /* ndp contains the mounted-from device.  Just ignore it.
       * we also don't care about our proc struct. */
      size_t size;
      int error;
  
!     if (mp->mnt_flag & MNT_UPDATE)
  	return EINVAL;
  
      AFS_GLOCK();
      AFS_STATCNT(afs_mount);
  
!     if (data == NULL && afs_globalVFS) {	/* Don't allow remounts. */
  	AFS_GUNLOCK();
  	return (EBUSY);
      }
  
      afs_globalVFS = mp;
      mp->vfs_bsize = 8192;
-     vfs_getnewfsid(mp);
      mp->mnt_stat.f_iosize = 8192;
  
      (void)copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
      memset(mp->mnt_stat.f_mntonname + size, 0, MNAMELEN - size);
!     memset(mp->mnt_stat.f_mntfromname, 0, MNAMELEN);
  
!     if (data == NULL) {
! 	strcpy(mp->mnt_stat.f_mntfromname, "AFS");
  	/* null terminated string "AFS" will fit, just leave it be. */
! 	mp->mnt_data = (qaddr_t) NULL;
      } else {
  	struct VenusFid *rootFid = NULL;
  	struct volume *tvp;
  	char volName[MNAMELEN];
  
! 	(void)copyinstr((char *)data, volName, MNAMELEN - 1, &size);
  	memset(volName + size, 0, MNAMELEN - size);
  
  	if (volName[0] == 0) {
! 	    strcpy(mp->mnt_stat.f_mntfromname, "AFS");
! 	    mp->mnt_data = (qaddr_t) & afs_rootFid;
  	} else {
  	    struct cell *localcell = afs_GetPrimaryCell(READ_LOCK);
  	    if (localcell == NULL) {
--- 52,153 ----
      return (EINVAL);
  }
  
+ #ifdef AFS_DARWIN80_ENV
+ #define CTX_TYPE vfs_context_t
+ #define CTX_PROC_CONVERT(C) vfs_context_proc((C))
+ #define STATFS_TYPE struct vfsstatfs
+ #else
+ #define CTX_TYPE struct proc *
+ #define CTX_PROC_CONVERT(C) (C)
+ #define STATFS_TYPE struct statfs
+ #define vfs_statfs(VFS) &(VFS)->mnt_stat
+ #endif
+ #define PROC_DECL(out,in) struct proc *out = CTX_PROC_CONVERT(in)
+ 
  int
  afs_start(mp, flags, p)
       struct mount *mp;
       int flags;
!      CTX_TYPE p;
  {
      return (0);			/* nothing to do. ? */
  }
  
  int
! afs_statfs(struct mount *mp, STATFS_TYPE *abp, CTX_TYPE ctx);
! #ifdef AFS_DARWIN80_ENV
! int
! afs_mount(mp, devvp, data, ctx)
!      register struct mount *mp;
!      vnode_t *devvp;
!      user_addr_t data;
!      vfs_context_t ctx;
! #else
! int
! afs_mount(mp, path, data, ndp, ctx)
       register struct mount *mp;
       char *path;
       caddr_t data;
       struct nameidata *ndp;
!      CTX_TYPE ctx;
! #endif
  {
      /* ndp contains the mounted-from device.  Just ignore it.
       * we also don't care about our proc struct. */
      size_t size;
      int error;
+ #ifdef AFS_DARWIN80_ENV
+     struct vfsioattr ioattr;
+     /* vfs_statfs advertised as RO, but isn't */
+     /* new api will be needed to initialize this information (nfs needs to
+        set mntfromname too) */
+ #endif
+     STATFS_TYPE *mnt_stat = vfs_statfs(mp); 
  
!     if (vfs_isupdate(mp))
  	return EINVAL;
  
      AFS_GLOCK();
      AFS_STATCNT(afs_mount);
  
!     if (data == 0 && afs_globalVFS) {	/* Don't allow remounts. */
  	AFS_GUNLOCK();
  	return (EBUSY);
      }
  
      afs_globalVFS = mp;
+ #ifdef AFS_DARWIN80_ENV
+     vfs_ioattr(mp, &ioattr);
+     ioattr.io_devblocksize = 8192;
+     vfs_setioattr(mp, &ioattr);
+     /* f_iosize is handled in VFS_GETATTR */
+ #else
      mp->vfs_bsize = 8192;
      mp->mnt_stat.f_iosize = 8192;
+ #endif
+     vfs_getnewfsid(mp);
  
+ #ifndef AFS_DARWIN80_ENV
      (void)copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, &size);
      memset(mp->mnt_stat.f_mntonname + size, 0, MNAMELEN - size);
! #endif
!     memset(mnt_stat->f_mntfromname, 0, MNAMELEN);
  
!     if (data == 0) {
! 	strcpy(mnt_stat->f_mntfromname, "AFS");
  	/* null terminated string "AFS" will fit, just leave it be. */
! 	vfs_setfsprivate(mp, NULL);
      } else {
  	struct VenusFid *rootFid = NULL;
  	struct volume *tvp;
  	char volName[MNAMELEN];
  
! 	(void)copyinstr(data, volName, MNAMELEN - 1, &size);
  	memset(volName + size, 0, MNAMELEN - size);
  
  	if (volName[0] == 0) {
! 	    strcpy(mnt_stat->f_mntfromname, "AFS");
! 	    vfs_setfsprivate(mp, &afs_rootFid);
  	} else {
  	    struct cell *localcell = afs_GetPrimaryCell(READ_LOCK);
  	    if (localcell == NULL) {
***************
*** 110,116 ****
  	    }
  
  	    /* Set the volume identifier to "AFS:volume.name" */
! 	    snprintf(mp->mnt_stat.f_mntfromname, MNAMELEN - 1, "AFS:%s",
  		     volName);
  	    tvp =
  		afs_GetVolumeByName(volName, localcell->cellNum, 1,
--- 156,162 ----
  	    }
  
  	    /* Set the volume identifier to "AFS:volume.name" */
! 	    snprintf(mnt_stat->f_mntfromname, MNAMELEN - 1, "AFS:%s",
  		     volName);
  	    tvp =
  		afs_GetVolumeByName(volName, localcell->cellNum, 1,
***************
*** 129,163 ****
  		return ENODEV;
  	    }
  
! 	    mp->mnt_data = (qaddr_t) rootFid;
  	}
      }
      strcpy(mp->mnt_stat.f_fstypename, "afs");
      AFS_GUNLOCK();
!     (void)afs_statfs(mp, &mp->mnt_stat, p);
      return 0;
  }
  
  int
! afs_unmount(mp, flags, p)
       struct mount *mp;
       int flags;
!      struct proc *p;
  {
! 
      AFS_GLOCK();
      AFS_STATCNT(afs_unmount);
  
!     if (mp->mnt_data != (qaddr_t) - 1) {
! 	if (mp->mnt_data != NULL) {
! 	    FREE(mp->mnt_data, M_UFSMNT);
! 	    mp->mnt_data = (qaddr_t) - 1;
  	} else {
  	    if (flags & MNT_FORCE) {
                  if (afs_globalVp) {
                      AFS_GUNLOCK();
                      vrele(AFSTOV(afs_globalVp));
                      AFS_GLOCK();
                  }
  		afs_globalVp = NULL;
  		AFS_GUNLOCK();
--- 175,219 ----
  		return ENODEV;
  	    }
  
! 	    vfs_setfsprivate(mp, &rootFid);
  	}
      }
+ #ifdef AFS_DARWIN80_ENV
+     afs_vfs_typenum=vfs_typenum(mp);
+     vfs_setauthopaque(mp);
+     vfs_setauthopaqueaccess(mp);
+ #else
      strcpy(mp->mnt_stat.f_fstypename, "afs");
+ #endif
      AFS_GUNLOCK();
!     (void)afs_statfs(mp, mnt_stat, ctx);
      return 0;
  }
  
  int
! afs_unmount(mp, flags, ctx)
       struct mount *mp;
       int flags;
!      CTX_TYPE ctx;
  {
!     void *mdata = vfs_fsprivate(mp);
      AFS_GLOCK();
      AFS_STATCNT(afs_unmount);
  
!     if (mdata != (qaddr_t) - 1) {
! 	if (mdata != NULL) {
! 	    vfs_setfsprivate(mp, (qaddr_t) - 1);
! 	    FREE(mdata, M_UFSMNT);
  	} else {
  	    if (flags & MNT_FORCE) {
                  if (afs_globalVp) {
+ #ifdef AFS_DARWIN80_ENV
+                     afs_PutVCache(afs_globalVp);
+ #else
                      AFS_GUNLOCK();
                      vrele(AFSTOV(afs_globalVp));
                      AFS_GLOCK();
+ #endif
                  }
  		afs_globalVp = NULL;
  		AFS_GUNLOCK();
***************
*** 170,176 ****
  		return EBUSY;
  	    }
  	}
! 	mp->mnt_flag &= ~MNT_LOCAL;
      }
  
      AFS_GUNLOCK();
--- 226,232 ----
  		return EBUSY;
  	    }
  	}
! 	vfs_clearflags(mp, MNT_LOCAL);
      }
  
      AFS_GUNLOCK();
***************
*** 178,233 ****
      return 0;
  }
  
  int
  afs_root(struct mount *mp, struct vnode **vpp)
  {
      int error;
      struct vrequest treq;
      register struct vcache *tvp = 0;
      struct proc *p = current_proc();
!     struct ucred cr;
  
      pcred_readlock(p);
!     cr = *p->p_cred->pc_ucred;
      pcred_unlock(p);
      AFS_GLOCK();
      AFS_STATCNT(afs_root);
!     if (mp->mnt_data == NULL && afs_globalVp
  	&& (afs_globalVp->states & CStatd)) {
  	tvp = afs_globalVp;
  	error = 0;
!     } else if (mp->mnt_data == (qaddr_t) - 1) {
  	error = ENOENT;
      } else {
! 	struct VenusFid *rootFid = (mp->mnt_data == NULL)
! 	    ? &afs_rootFid : (struct VenusFid *)mp->mnt_data;
! 
! 	if (afs_globalVp) {
! 	    afs_PutVCache(afs_globalVp);
! 	    afs_globalVp = NULL;
! 	}
  
! 	if (!(error = afs_InitReq(&treq, &cr)) && !(error = afs_CheckInit())) {
  	    tvp = afs_GetVCache(rootFid, &treq, NULL, NULL);
  	    /* we really want this to stay around */
  	    if (tvp) {
! 		if (mp->mnt_data == NULL)
  		    afs_globalVp = tvp;
  	    } else
  		error = ENOENT;
  	}
      }
      if (tvp) {
  	osi_vnhold(tvp, 0);
  	AFS_GUNLOCK();
  	vn_lock(AFSTOV(tvp), LK_EXCLUSIVE | LK_RETRY, p);
  	AFS_GLOCK();
! 	if (mp->mnt_data == NULL) {
  	    afs_globalVFS = mp;
  	}
  	*vpp = AFSTOV(tvp);
  	AFSTOV(tvp)->v_flag |= VROOT;
  	AFSTOV(tvp)->v_vfsp = mp;
      }
  
      afs_Trace2(afs_iclSetp, CM_TRACE_VFSROOT, ICL_TYPE_POINTER, *vpp,
--- 234,330 ----
      return 0;
  }
  
+ #ifdef AFS_DARWIN80_ENV
+ int
+ afs_root(struct mount *mp, struct vnode **vpp, vfs_context_t ctx)
+ #else
  int
  afs_root(struct mount *mp, struct vnode **vpp)
+ #endif
  {
+     void *mdata = vfs_fsprivate(mp);
      int error;
      struct vrequest treq;
      register struct vcache *tvp = 0;
+ #ifdef AFS_DARWIN80_ENV
+     struct ucred *cr = vfs_context_ucred(ctx);
+     int needref=0;
+ #else
      struct proc *p = current_proc();
!     struct ucred _cr;
!     struct ucred *cr = &_cr;
  
      pcred_readlock(p);
!     _cr = *p->p_cred->pc_ucred;
      pcred_unlock(p);
+ #endif
      AFS_GLOCK();
      AFS_STATCNT(afs_root);
!     if (mdata == NULL && afs_globalVp
  	&& (afs_globalVp->states & CStatd)) {
  	tvp = afs_globalVp;
  	error = 0;
! #ifdef AFS_DARWIN80_ENV
!         needref=1;
! #endif
!     } else if (mdata == (qaddr_t) - 1) {
  	error = ENOENT;
      } else {
! 	struct VenusFid *rootFid = (mdata == NULL)
! 	    ? &afs_rootFid : (struct VenusFid *)mdata;
  
! 	if (!(error = afs_InitReq(&treq, cr)) && !(error = afs_CheckInit())) {
  	    tvp = afs_GetVCache(rootFid, &treq, NULL, NULL);
+ #ifdef AFS_DARWIN80_ENV
+             if (tvp) {
+ 	        AFS_GUNLOCK();
+                 error = afs_darwin_finalizevnode(tvp, NULL, NULL, 1);
+ 	        AFS_GLOCK();
+                 if (error)
+                    tvp = NULL;
+                 else 
+                    /* re-acquire the usecount that finalizevnode disposed of */
+                    vnode_ref(AFSTOV(tvp));
+             }
+ #endif
  	    /* we really want this to stay around */
  	    if (tvp) {
! 		if (mdata == NULL) {
! 		    if (afs_globalVp) {
! 			afs_PutVCache(afs_globalVp);
! 			afs_globalVp = NULL;
! 		    }
  		    afs_globalVp = tvp;
+ #ifdef AFS_DARWIN80_ENV
+                     needref=1;
+ #endif
+                 }
  	    } else
  		error = ENOENT;
  	}
      }
      if (tvp) {
+ #ifndef AFS_DARWIN80_ENV /* DARWIN80 caller does not need a usecount reference */
  	osi_vnhold(tvp, 0);
  	AFS_GUNLOCK();
  	vn_lock(AFSTOV(tvp), LK_EXCLUSIVE | LK_RETRY, p);
  	AFS_GLOCK();
! #endif
! #ifdef AFS_DARWIN80_ENV
!         if (needref) /* this iocount is for the caller. the initial iocount
!                         is for the eventual afs_PutVCache. for mdata != null,
!                         there will not be a PutVCache, so the caller gets the
!                         initial (from GetVCache or finalizevnode) iocount*/
!            vnode_get(AFSTOV(tvp));
! #endif
! 	if (mdata == NULL) {
  	    afs_globalVFS = mp;
  	}
  	*vpp = AFSTOV(tvp);
+ #ifndef AFS_DARWIN80_ENV 
  	AFSTOV(tvp)->v_flag |= VROOT;
  	AFSTOV(tvp)->v_vfsp = mp;
+ #endif
      }
  
      afs_Trace2(afs_iclSetp, CM_TRACE_VFSROOT, ICL_TYPE_POINTER, *vpp,
***************
*** 236,241 ****
--- 333,339 ----
      return error;
  }
  
+ #ifndef AFS_DARWIN80_ENV /* vget vfsop never had this prototype AFAIK */
  int
  afs_vget(mp, lfl, vp)
       struct mount *mp;
***************
*** 254,270 ****
      return error;
  }
  
  int
! afs_statfs(struct mount *mp, struct statfs *abp, struct proc *p)
  {
      AFS_GLOCK();
      AFS_STATCNT(afs_statfs);
  
  #if 0
      abp->f_type = MOUNT_AFS;
  #endif
      abp->f_bsize = mp->vfs_bsize;
      abp->f_iosize = mp->vfs_bsize;
  
      /* Fake a high number below to satisfy programs that use the statfs call
       * to make sure that there's enough space in the device partition before
--- 352,380 ----
      return error;
  }
  
+ int afs_vfs_vget(struct mount *mp, void *ino, struct vnode **vpp)
+ {
+    return ENOENT; /* cannot implement */
+ }
+ 
+ #endif
+ 
  int
! afs_statfs(struct mount *mp, STATFS_TYPE *abp, CTX_TYPE ctx)
  {
+     STATFS_TYPE *sysstat = vfs_statfs(mp);
      AFS_GLOCK();
      AFS_STATCNT(afs_statfs);
  
  #if 0
      abp->f_type = MOUNT_AFS;
  #endif
+ #ifdef AFS_DARWIN80_ENV
+     abp->f_bsize = abp->f_iosize = vfs_devblocksize(mp);
+ #else
      abp->f_bsize = mp->vfs_bsize;
      abp->f_iosize = mp->vfs_bsize;
+ #endif
  
      /* Fake a high number below to satisfy programs that use the statfs call
       * to make sure that there's enough space in the device partition before
***************
*** 273,306 ****
      abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
  	abp->f_ffree = 2000000;
  
!     abp->f_fsid.val[0] = mp->mnt_stat.f_fsid.val[0];
!     abp->f_fsid.val[1] = mp->mnt_stat.f_fsid.val[1];
!     if (abp != &mp->mnt_stat) {
! 	abp->f_type = mp->mnt_vfc->vfc_typenum;
  	memcpy((caddr_t) & abp->f_mntonname[0],
! 	       (caddr_t) mp->mnt_stat.f_mntonname, MNAMELEN);
  	memcpy((caddr_t) & abp->f_mntfromname[0],
! 	       (caddr_t) mp->mnt_stat.f_mntfromname, MNAMELEN);
      }
  
      AFS_GUNLOCK();
      return 0;
  }
  
  int
  afs_sync(mp, waitfor, cred, p)
       struct mount *mp;
       int waitfor;
       struct ucred *cred;
!      struct prioc *p;
  {
      return 0;
  }
  
  u_int32_t afs_darwin_realmodes = 0;
  
  int afs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, 
  	       void *newp, size_t newlen, struct proc *p)
  {
      int error;
  
--- 383,493 ----
      abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
  	abp->f_ffree = 2000000;
  
!     if (abp != sysstat) {
!         abp->f_fsid.val[0] = sysstat->f_fsid.val[0];
!         abp->f_fsid.val[1] = sysstat->f_fsid.val[1];
! #ifndef AFS_DARWIN80_ENV
! 	abp->f_type = vfs_typenum(mp);
! #endif
  	memcpy((caddr_t) & abp->f_mntonname[0],
! 	       (caddr_t) sysstat->f_mntonname, MNAMELEN);
  	memcpy((caddr_t) & abp->f_mntfromname[0],
! 	       (caddr_t) sysstat->f_mntfromname, MNAMELEN);
      }
  
      AFS_GUNLOCK();
      return 0;
  }
  
+ #ifdef AFS_DARWIN80_ENV
+ int
+ afs_vfs_getattr(struct mount *mp, struct vfs_attr *outattrs,
+                 vfs_context_t context)
+ {
+     VFSATTR_RETURN(outattrs, f_bsize, vfs_devblocksize(mp));
+     VFSATTR_RETURN(outattrs, f_iosize, vfs_devblocksize(mp));
+     VFSATTR_RETURN(outattrs, f_blocks, 2000000);
+     VFSATTR_RETURN(outattrs, f_bfree, 2000000);
+     VFSATTR_RETURN(outattrs, f_bavail, 2000000);
+     VFSATTR_RETURN(outattrs, f_files, 2000000);
+     VFSATTR_RETURN(outattrs, f_ffree, 2000000);
+     if ( VFSATTR_IS_ACTIVE(outattrs, f_capabilities) )
+     {
+          vol_capabilities_attr_t *vcapattrptr;
+          vcapattrptr = &outattrs->f_capabilities;
+          vcapattrptr->capabilities[VOL_CAPABILITIES_FORMAT] =
+                    VOL_CAP_FMT_SYMBOLICLINKS |
+                    VOL_CAP_FMT_HARDLINKS |
+                    VOL_CAP_FMT_ZERO_RUNS |
+                    VOL_CAP_FMT_CASE_SENSITIVE |
+                    VOL_CAP_FMT_CASE_PRESERVING |
+                    VOL_CAP_FMT_FAST_STATFS;
+          vcapattrptr->capabilities[VOL_CAPABILITIES_INTERFACES] = 
+                    VOL_CAP_INT_ADVLOCK | 
+                    VOL_CAP_INT_FLOCK;
+          vcapattrptr->capabilities[VOL_CAPABILITIES_RESERVED1] = 0;
+          vcapattrptr->capabilities[VOL_CAPABILITIES_RESERVED2] = 0;
+ 
+          /* Capabilities we know about: */
+          vcapattrptr->valid[VOL_CAPABILITIES_FORMAT] =
+                  VOL_CAP_FMT_PERSISTENTOBJECTIDS |
+                  VOL_CAP_FMT_SYMBOLICLINKS |
+                  VOL_CAP_FMT_HARDLINKS |
+                  VOL_CAP_FMT_JOURNAL |
+                  VOL_CAP_FMT_JOURNAL_ACTIVE |
+                  VOL_CAP_FMT_NO_ROOT_TIMES |
+                  VOL_CAP_FMT_SPARSE_FILES |
+                  VOL_CAP_FMT_ZERO_RUNS |
+                  VOL_CAP_FMT_CASE_SENSITIVE |
+                  VOL_CAP_FMT_CASE_PRESERVING |
+                  VOL_CAP_FMT_FAST_STATFS;
+          vcapattrptr->valid[VOL_CAPABILITIES_INTERFACES] =
+                  VOL_CAP_INT_SEARCHFS |
+                  VOL_CAP_INT_ATTRLIST |
+                  VOL_CAP_INT_NFSEXPORT |
+                  VOL_CAP_INT_READDIRATTR |
+                  VOL_CAP_INT_EXCHANGEDATA |
+                  VOL_CAP_INT_COPYFILE |
+                  VOL_CAP_INT_ALLOCATE |
+                  VOL_CAP_INT_VOL_RENAME |
+                  VOL_CAP_INT_ADVLOCK |
+                  VOL_CAP_INT_FLOCK;
+          vcapattrptr->valid[VOL_CAPABILITIES_RESERVED1] = 0;
+          vcapattrptr->valid[VOL_CAPABILITIES_RESERVED2] = 0;
+              
+          VFSATTR_SET_SUPPORTED(outattrs, f_capabilities);
+     }
+     return 0;
+ }
+ #endif
+ 
+ #ifdef AFS_DARWIN80_ENV
+ int
+ afs_sync(mp, waitfor, ctx)
+      struct mount *mp;
+      int waitfor;
+      CTX_TYPE ctx;
+ #else
  int
  afs_sync(mp, waitfor, cred, p)
       struct mount *mp;
       int waitfor;
       struct ucred *cred;
!      struct proc *p;
! #endif
  {
      return 0;
  }
  
  u_int32_t afs_darwin_realmodes = 0;
  
+ #ifdef AFS_DARWIN80_ENV
+ int afs_sysctl(int *name, u_int namelen, user_addr_t oldp, size_t *oldlenp, 
+ 	       user_addr_t newp, size_t newlen, vfs_context_t context)
+ #else
  int afs_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, 
  	       void *newp, size_t newlen, struct proc *p)
+ #endif
  {
      int error;
  
***************
*** 315,322 ****
--- 502,529 ----
  	case AFS_SC_DARWIN_ALL:
  	    switch (name[2]) {
  	    case AFS_SC_DARWIN_ALL_REALMODES:
+ #ifdef AFS_DARWIN80_ENV
+ 		if (oldp != USER_ADDR_NULL && oldlenp == NULL)
+ 		    return (EFAULT);
+ 		if (oldp && *oldlenp < sizeof(u_int32_t))
+ 		    return (ENOMEM);
+ 		if (newp && newlen != sizeof(u_int32_t))
+ 		    return (EINVAL);
+ 		*oldlenp = sizeof(u_int32_t);
+ 		if (oldp) {
+ 		    if ((error = copyout(&afs_darwin_realmodes,
+ 					 oldp, sizeof(u_int32_t)))) {
+ 			return error;
+ 		    }
+ 		}
+ 		if (newp)
+ 		    return copyin(newp, &afs_darwin_realmodes,
+ 				  sizeof(u_int32_t));
+ 		return 0;
+ #else
  	        return sysctl_int(oldp, oldlenp, newp, newlen,
  				  &afs_darwin_realmodes);
+ #endif
  	    }
  	    break;
  	    /* darwin version specific sysctl's goes here */
***************
*** 332,337 ****
--- 539,545 ----
  int
  afs_init(struct vfsconf *vfc)
  {
+ #ifndef AFS_DARWIN80_ENV /* vfs_fsadd does all this junk */
      int j;
      int (**opv_desc_vector) ();
      struct vnodeopv_entry_desc *opve_descp;
***************
*** 393,411 ****
      for (j = 0; j < vfs_opv_numops; j++)
  	if (opv_desc_vector[j] == NULL)
  	    opv_desc_vector[j] = opv_desc_vector[VOFFSET(vop_default)];
  }
  
  struct vfsops afs_vfsops = {
!     afs_mount,
!     afs_start,
!     afs_unmount,
!     afs_root,
!     afs_quotactl,
!     afs_statfs,
!     afs_sync,
!     afs_vget,
!     afs_fhtovp,
!     afs_vptofh,
!     afs_init,
!     afs_sysctl
  };
--- 601,634 ----
      for (j = 0; j < vfs_opv_numops; j++)
  	if (opv_desc_vector[j] == NULL)
  	    opv_desc_vector[j] = opv_desc_vector[VOFFSET(vop_default)];
+ #endif
+     return 0;
  }
  
  struct vfsops afs_vfsops = {
!    afs_mount,
!    afs_start,
!    afs_unmount,
!    afs_root,
! #ifdef AFS_DARWIN80_ENV
!    0,
!    afs_vfs_getattr,
! #else
!    afs_quotactl,
!    afs_statfs,
! #endif
!    afs_sync,
! #ifdef AFS_DARWIN80_ENV
!    0,0,0,
! #else
!    afs_vfs_vget,
!    afs_fhtovp,
!    afs_vptofh,
! #endif
!    afs_init,
!    afs_sysctl, 
! #ifdef AFS_DARWIN80_ENV
!    0 /*setattr */,
!    {0}
! #endif
  };
Index: openafs/src/afs/DARWIN/osi_vm.c
diff -c openafs/src/afs/DARWIN/osi_vm.c:1.14.2.3 openafs/src/afs/DARWIN/osi_vm.c:1.14.2.5
*** openafs/src/afs/DARWIN/osi_vm.c:1.14.2.3	Mon Apr  4 00:01:19 2005
--- openafs/src/afs/DARWIN/osi_vm.c	Sat Jan 28 13:04:05 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vm.c,v 1.14.2.3 2005/04/04 04:01:19 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_vm.c,v 1.14.2.5 2006/01/28 18:04:05 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 41,46 ****
--- 41,48 ----
      kern_return_t kret;
      off_t size;
  
+     if (!vp)
+ 	return 0;
      AFS_GUNLOCK();
  #if 0
      if (!(UBCINFOMISSING(vp) || UBCINFORECLAIMED(vp))) {
***************
*** 66,74 ****
--- 68,80 ----
      struct vnode *vp = AFSTOV(avc);
      ReleaseWriteLock(&avc->lock);
      AFS_GUNLOCK();
+ #ifdef AFS_DARWIN80_ENV
+     ubc_sync_range(vp, 0, ubc_getsize(vp), UBC_SYNC|UBC_PUSHDIRTY);
+ #else
      if (UBCINFOEXISTS(vp)) {
  	ubc_pushdirty(vp);
      }
+ #endif
      AFS_GLOCK();
      ObtainWriteLock(&avc->lock, 94);
  }
***************
*** 92,103 ****
--- 98,113 ----
  
      ReleaseWriteLock(&avc->lock);
      AFS_GUNLOCK();
+ #ifdef AFS_DARWIN80_ENV
+     ubc_sync_range(vp, 0, ubc_getsize(vp), UBC_INVALIDATE);
+ #else
      if (UBCINFOEXISTS(vp)) {
  	size = ubc_getsize(vp);
  	kret = ubc_invalidate(vp, 0, size);
  	if (kret != 1)		/* should be KERN_SUCCESS */
  	    printf("TryToSmush: invalidate failed (error = %d)\n", kret);
      }
+ #endif
      AFS_GLOCK();
      ObtainWriteLock(&avc->lock, 59);
  }
***************
*** 116,121 ****
--- 126,138 ----
      void *object;
      kern_return_t kret;
      off_t size;
+ #ifdef AFS_DARWIN80_ENV
+     size = ubc_getsize(vp);
+     ubc_sync_range(vp, 0, size, UBC_INVALIDATE);
+ 	/* XXX what about when not CStatd */
+     if (avc->states & CStatd && size != avc->m.Length)
+        ubc_setsize(vp, avc->m.Length);
+ #else
      if (UBCINFOEXISTS(vp)) {
  	size = ubc_getsize(vp);
  	kret = ubc_invalidate(vp, 0, size);
***************
*** 126,131 ****
--- 143,149 ----
  	  if (UBCISVALID(vp))
  	    ubc_setsize(vp, avc->m.Length);
      }
+ #endif
  }
  
  /* Purge pages beyond end-of-file, when truncating a file.
***************
*** 138,146 ****
--- 156,168 ----
  osi_VM_Truncate(struct vcache *avc, int alen, struct AFS_UCRED *acred)
  {
      struct vnode *vp = AFSTOV(avc);
+ #ifdef AFS_DARWIN80_ENV
+     ubc_setsize(vp, alen);
+ #else
      if (UBCINFOEXISTS(vp) && UBCISVALID(vp)) {
  	ubc_setsize(vp, alen);
      }
+ #endif
  }
  
  void
***************
*** 167,172 ****
--- 189,195 ----
      int error;
      struct vnode *vp = AFSTOV(avc);
  
+ #ifndef AFS_DARWIN80_ENV
      if (UBCISVALID(vp) && ((avc->states & CStatd) || force)) {
  	if (!UBCINFOEXISTS(vp)) {
  	    osi_vnhold(avc, 0);
***************
*** 186,190 ****
--- 209,214 ----
  	    ubc_setsize(vp, avc->m.Length);
  	}
      }
+ #endif
      return 0;
  }
Index: openafs/src/afs/DARWIN/osi_vnodeops.c
diff -c openafs/src/afs/DARWIN/osi_vnodeops.c:1.18.2.4 openafs/src/afs/DARWIN/osi_vnodeops.c:1.18.2.20
*** openafs/src/afs/DARWIN/osi_vnodeops.c:1.18.2.4	Thu Apr 28 21:51:07 2005
--- openafs/src/afs/DARWIN/osi_vnodeops.c	Thu Mar  2 01:36:33 2006
***************
*** 5,11 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/DARWIN/osi_vnodeops.c,v 1.18.2.4 2005/04/29 01:51:07 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.20 2006/03/02 06:36:33 shadow Exp $");
  
  #include <afs/sysincludes.h>	/* Standard vendor system headers */
  #include <afsincludes.h>	/* Afs-based standard headers */
***************
*** 16,66 ****
  #if defined(AFS_DARWIN70_ENV)
  #include <vfs/vfs_support.h>
  #endif /* defined(AFS_DARWIN70_ENV) */
  
! int afs_vop_lookup(struct vop_lookup_args *);
! int afs_vop_create(struct vop_create_args *);
! int afs_vop_mknod(struct vop_mknod_args *);
! int afs_vop_open(struct vop_open_args *);
! int afs_vop_close(struct vop_close_args *);
! int afs_vop_access(struct vop_access_args *);
! int afs_vop_getattr(struct vop_getattr_args *);
! int afs_vop_setattr(struct vop_setattr_args *);
! int afs_vop_read(struct vop_read_args *);
! int afs_vop_write(struct vop_write_args *);
! int afs_vop_pagein(struct vop_pagein_args *);
! int afs_vop_pageout(struct vop_pageout_args *);
! int afs_vop_ioctl(struct vop_ioctl_args *);
! int afs_vop_select(struct vop_select_args *);
! int afs_vop_mmap(struct vop_mmap_args *);
! int afs_vop_fsync(struct vop_fsync_args *);
! int afs_vop_seek(struct vop_seek_args *);
! int afs_vop_remove(struct vop_remove_args *);
! int afs_vop_link(struct vop_link_args *);
! int afs_vop_rename(struct vop_rename_args *);
! int afs_vop_mkdir(struct vop_mkdir_args *);
! int afs_vop_rmdir(struct vop_rmdir_args *);
! int afs_vop_symlink(struct vop_symlink_args *);
! int afs_vop_readdir(struct vop_readdir_args *);
! int afs_vop_readlink(struct vop_readlink_args *);
  #if !defined(AFS_DARWIN70_ENV)
  extern int ufs_abortop(struct vop_abortop_args *);
  #endif /* !defined(AFS_DARWIN70_ENV) */
! int afs_vop_inactive(struct vop_inactive_args *);
! int afs_vop_reclaim(struct vop_reclaim_args *);
! int afs_vop_lock(struct vop_lock_args *);
! int afs_vop_unlock(struct vop_unlock_args *);
! int afs_vop_bmap(struct vop_bmap_args *);
! int afs_vop_strategy(struct vop_strategy_args *);
! int afs_vop_print(struct vop_print_args *);
! int afs_vop_islocked(struct vop_islocked_args *);
! int afs_vop_pathconf(struct vop_pathconf_args *);
! int afs_vop_advlock(struct vop_advlock_args *);
! int afs_vop_truncate(struct vop_truncate_args *);
! int afs_vop_update(struct vop_update_args *);
! int afs_vop_blktooff __P((struct vop_blktooff_args *));
! int afs_vop_offtoblk __P((struct vop_offtoblk_args *));
! int afs_vop_cmap __P((struct vop_cmap_args *));
! 
  
  #define afs_vop_opnotsupp \
  	((int (*) __P((struct  vop_reallocblks_args *)))eopnotsupp)
--- 16,96 ----
  #if defined(AFS_DARWIN70_ENV)
  #include <vfs/vfs_support.h>
  #endif /* defined(AFS_DARWIN70_ENV) */
+ #ifdef AFS_DARWIN80_ENV
+ #include <sys/vnode_if.h>
+ #include <sys/kauth.h>
+ #endif
+ 
+ #ifdef AFS_DARWIN80_ENV
+ #define VOPPREF(x) &vnop_ ## x
+ #define VOPPROT(x) vnop_ ## x
+ #define OSI_UPL_ABORT_RANGE(pl, offset, size, flags) \
+   ubc_upl_abort_range((pl), (offset), (size), (flags))
+ #define OSI_UPL_COMMIT_RANGE(pl, offset, size, flags) \
+   ubc_upl_commit_range((pl), (offset), (size), (flags))
+ #define OSI_UPL_MAP(upl, offset) ubc_upl_map((upl), (offset))
+ #define OSI_UPL_UNMAP(upl) ubc_upl_unmap((upl))
+ #define VOP_ABORTOP(x, y)
+ #else
+ #define VOPPREF(x) &vop_ ## x
+ #define VOPPROT(x) vop_ ## x
+ #define OSI_UPL_ABORT_RANGE(pl, offset, size, flags) \
+   kernel_upl_abort_range((pl), (offset), (size), (flags))
+ #define OSI_UPL_COMMIT_RANGE(pl, offset, size, flags) \
+   kernel_upl_commit_range((pl), (offset), (size), (flags), \
+                           UPL_GET_INTERNAL_PAGE_LIST((pl)),\
+                                     MAX_UPL_TRANSFER)
+ #define OSI_UPL_MAP(upl, offset) kernel_upl_map(kernel_map, (upl), (offset))
+ #define OSI_UPL_UNMAP(upl) kernel_upl_unmap(kernel_map, (upl))
+ #endif
  
! extern char afs_zeros[AFS_ZEROS];
! 
! int afs_vop_lookup(struct VOPPROT(lookup_args) *);
! int afs_vop_create(struct VOPPROT(create_args) *);
! int afs_vop_mknod(struct VOPPROT(mknod_args) *);
! int afs_vop_open(struct VOPPROT(open_args) *);
! int afs_vop_close(struct VOPPROT(close_args) *);
! int afs_vop_access(struct VOPPROT(access_args) *);
! int afs_vop_getattr(struct VOPPROT(getattr_args) *);
! int afs_vop_setattr(struct VOPPROT(setattr_args) *);
! int afs_vop_read(struct VOPPROT(read_args) *);
! int afs_vop_write(struct VOPPROT(write_args) *);
! int afs_vop_pagein(struct VOPPROT(pagein_args) *);
! int afs_vop_pageout(struct VOPPROT(pageout_args) *);
! int afs_vop_ioctl(struct VOPPROT(ioctl_args) *);
! int afs_vop_select(struct VOPPROT(select_args) *);
! int afs_vop_mmap(struct VOPPROT(mmap_args) *);
! int afs_vop_fsync(struct VOPPROT(fsync_args) *);
! int afs_vop_remove(struct VOPPROT(remove_args) *);
! int afs_vop_link(struct VOPPROT(link_args) *);
! int afs_vop_rename(struct VOPPROT(rename_args) *);
! int afs_vop_mkdir(struct VOPPROT(mkdir_args) *);
! int afs_vop_rmdir(struct VOPPROT(rmdir_args) *);
! int afs_vop_symlink(struct VOPPROT(symlink_args) *);
! int afs_vop_readdir(struct VOPPROT(readdir_args) *);
! int afs_vop_readlink(struct VOPPROT(readlink_args) *);
  #if !defined(AFS_DARWIN70_ENV)
  extern int ufs_abortop(struct vop_abortop_args *);
  #endif /* !defined(AFS_DARWIN70_ENV) */
! int afs_vop_inactive(struct VOPPROT(inactive_args) *);
! int afs_vop_reclaim(struct VOPPROT(reclaim_args) *);
! int afs_vop_strategy(struct VOPPROT(strategy_args) *);
! int afs_vop_pathconf(struct VOPPROT(pathconf_args) *);
! int afs_vop_advlock(struct VOPPROT(advlock_args) *);
! int afs_vop_blktooff __P((struct VOPPROT(blktooff_args) *));
! int afs_vop_offtoblk __P((struct VOPPROT(offtoblk_args) *));
! #ifndef AFS_DARWIN80_ENV
! int afs_vop_truncate(struct VOPPROT(truncate_args) *);
! int afs_vop_update(struct VOPPROT(update_args) *);
! int afs_vop_lock(struct VOPPROT(lock_args) *);
! int afs_vop_unlock(struct VOPPROT(unlock_args) *);
! int afs_vop_bmap(struct VOPPROT(bmap_args) *);
! int afs_vop_seek(struct VOPPROT(seek_args) *);
! int afs_vop_cmap __P((struct VOPPROT(cmap_args) *));
! int afs_vop_print(struct VOPPROT(print_args) *);
! int afs_vop_islocked(struct VOPPROT(islocked_args) *);
! #endif
  
  #define afs_vop_opnotsupp \
  	((int (*) __P((struct  vop_reallocblks_args *)))eopnotsupp)
***************
*** 71,135 ****
  
  /* Global vfs data structures for AFS. */
  int (**afs_vnodeop_p) ();
  struct vnodeopv_entry_desc afs_vnodeop_entries[] = {
!     {&vop_default_desc, vn_default_error},
!     {&vop_lookup_desc, afs_vop_lookup},	/* lookup */
!     {&vop_create_desc, afs_vop_create},	/* create */
!     {&vop_mknod_desc, afs_vop_mknod},	/* mknod */
!     {&vop_open_desc, afs_vop_open},	/* open */
!     {&vop_close_desc, afs_vop_close},	/* close */
!     {&vop_access_desc, afs_vop_access},	/* access */
!     {&vop_getattr_desc, afs_vop_getattr},	/* getattr */
!     {&vop_setattr_desc, afs_vop_setattr},	/* setattr */
!     {&vop_read_desc, afs_vop_read},	/* read */
!     {&vop_write_desc, afs_vop_write},	/* write */
!     {&vop_pagein_desc, afs_vop_pagein},	/* read */
!     {&vop_pageout_desc, afs_vop_pageout},	/* write */
!     {&vop_ioctl_desc, afs_vop_ioctl},	/* XXX ioctl */
!     {&vop_select_desc, afs_vop_select},	/* select */
!     {&vop_mmap_desc, afs_vop_mmap},	/* mmap */
!     {&vop_fsync_desc, afs_vop_fsync},	/* fsync */
!     {&vop_seek_desc, afs_vop_seek},	/* seek */
!     {&vop_remove_desc, afs_vop_remove},	/* remove */
!     {&vop_link_desc, afs_vop_link},	/* link */
!     {&vop_rename_desc, afs_vop_rename},	/* rename */
!     {&vop_mkdir_desc, afs_vop_mkdir},	/* mkdir */
!     {&vop_rmdir_desc, afs_vop_rmdir},	/* rmdir */
!     {&vop_symlink_desc, afs_vop_symlink},	/* symlink */
!     {&vop_readdir_desc, afs_vop_readdir},	/* readdir */
!     {&vop_readlink_desc, afs_vop_readlink},	/* readlink */
  #if defined(AFS_DARWIN70_ENV)
!     { &vop_abortop_desc, nop_abortop },             /* abortop */
  #else /* ! defined(AFS_DARWIN70_ENV) */
      /* Yes, we use the ufs_abortop call.  It just releases the namei
       * buffer stuff */
!     {&vop_abortop_desc, ufs_abortop},	/* abortop */
  #endif /* defined(AFS_DARWIN70_ENV) */
!     {&vop_inactive_desc, afs_vop_inactive},	/* inactive */
!     {&vop_reclaim_desc, afs_vop_reclaim},	/* reclaim */
!     {&vop_lock_desc, afs_vop_lock},	/* lock */
!     {&vop_unlock_desc, afs_vop_unlock},	/* unlock */
!     {&vop_bmap_desc, afs_vop_bmap},	/* bmap */
!     {&vop_strategy_desc, afs_vop_strategy},	/* strategy */
!     {&vop_print_desc, afs_vop_print},	/* print */
!     {&vop_islocked_desc, afs_vop_islocked},	/* islocked */
!     {&vop_pathconf_desc, afs_vop_pathconf},	/* pathconf */
!     {&vop_advlock_desc, afs_vop_advlock},	/* advlock */
!     {&vop_blkatoff_desc, afs_vop_blkatoff},	/* blkatoff */
!     {&vop_valloc_desc, afs_vop_valloc},	/* valloc */
!     {&vop_reallocblks_desc, afs_vop_reallocblks},	/* reallocblks */
!     {&vop_vfree_desc, afs_vop_vfree},	/* vfree */
!     {&vop_truncate_desc, afs_vop_truncate},	/* truncate */
!     {&vop_update_desc, afs_vop_update},	/* update */
!     {&vop_blktooff_desc, afs_vop_blktooff},	/* blktooff */
!     {&vop_offtoblk_desc, afs_vop_offtoblk},	/* offtoblk */
!     {&vop_cmap_desc, afs_vop_cmap},	/* cmap */
!     {&vop_bwrite_desc, vn_bwrite},
!     {(struct vnodeop_desc *)NULL, (int (*)())NULL}
  };
  struct vnodeopv_desc afs_vnodeop_opv_desc =
      { &afs_vnodeop_p, afs_vnodeop_entries };
  
  #define GETNAME()       \
      struct componentname *cnp = ap->a_cnp; \
      char *name; \
--- 101,226 ----
  
  /* Global vfs data structures for AFS. */
  int (**afs_vnodeop_p) ();
+ 
+ #define VOPFUNC int (*)(void *)
+ 
  struct vnodeopv_entry_desc afs_vnodeop_entries[] = {
!     {VOPPREF(default_desc), (VOPFUNC)vn_default_error},
!     {VOPPREF(lookup_desc), (VOPFUNC)afs_vop_lookup},	/* lookup */
!     {VOPPREF(create_desc), (VOPFUNC)afs_vop_create},	/* create */
!     {VOPPREF(mknod_desc), (VOPFUNC)afs_vop_mknod},	/* mknod */
!     {VOPPREF(open_desc), (VOPFUNC)afs_vop_open},	/* open */
!     {VOPPREF(close_desc), (VOPFUNC)afs_vop_close},	/* close */
!     {VOPPREF(access_desc), (VOPFUNC)afs_vop_access},	/* access */
!     {VOPPREF(getattr_desc), (VOPFUNC)afs_vop_getattr},	/* getattr */
!     {VOPPREF(setattr_desc), (VOPFUNC)afs_vop_setattr},	/* setattr */
!     {VOPPREF(read_desc), (VOPFUNC)afs_vop_read},	/* read */
!     {VOPPREF(write_desc), (VOPFUNC)afs_vop_write},	/* write */
!     {VOPPREF(pagein_desc), (VOPFUNC)afs_vop_pagein},	/* read */
!     {VOPPREF(pageout_desc), (VOPFUNC)afs_vop_pageout},	/* write */
!     {VOPPREF(ioctl_desc), (VOPFUNC)afs_vop_ioctl},	/* XXX ioctl */
!     {VOPPREF(select_desc), (VOPFUNC)afs_vop_select},	/* select */
!     {VOPPREF(mmap_desc), (VOPFUNC)afs_vop_mmap},	/* mmap */
!     {VOPPREF(fsync_desc), (VOPFUNC)afs_vop_fsync},	/* fsync */
! #ifndef AFS_DARWIN80_ENV
!     {VOPPREF(seek_desc), (VOPFUNC)afs_vop_seek},	/* seek */
! #endif
!     {VOPPREF(remove_desc), (VOPFUNC)afs_vop_remove},	/* remove */
!     {VOPPREF(link_desc), (VOPFUNC)afs_vop_link},	/* link */
!     {VOPPREF(rename_desc), (VOPFUNC)afs_vop_rename},	/* rename */
!     {VOPPREF(mkdir_desc), (VOPFUNC)afs_vop_mkdir},	/* mkdir */
!     {VOPPREF(rmdir_desc), (VOPFUNC)afs_vop_rmdir},	/* rmdir */
!     {VOPPREF(symlink_desc), (VOPFUNC)afs_vop_symlink},	/* symlink */
!     {VOPPREF(readdir_desc), (VOPFUNC)afs_vop_readdir},	/* readdir */
!     {VOPPREF(readlink_desc), (VOPFUNC)afs_vop_readlink},	/* readlink */
! #ifndef AFS_DARWIN80_ENV
  #if defined(AFS_DARWIN70_ENV)
!     {VOPPREF(abortop_desc), (VOPFUNC)nop_abortop },             /* abortop */
  #else /* ! defined(AFS_DARWIN70_ENV) */
      /* Yes, we use the ufs_abortop call.  It just releases the namei
       * buffer stuff */
!     {VOPPREF(abortop_desc), (VOPFUNC)ufs_abortop},	/* abortop */
  #endif /* defined(AFS_DARWIN70_ENV) */
! #endif
!     {VOPPREF(inactive_desc), (VOPFUNC)afs_vop_inactive},	/* inactive */
!     {VOPPREF(reclaim_desc), (VOPFUNC)afs_vop_reclaim},	/* reclaim */
! #ifndef AFS_DARWIN80_ENV
!     {VOPPREF(lock_desc), (VOPFUNC)afs_vop_lock},	/* lock */
!     {VOPPREF(unlock_desc), (VOPFUNC)afs_vop_unlock},	/* unlock */
!     {VOPPREF(bmap_desc), (VOPFUNC)afs_vop_bmap},	/* bmap */
! #endif
! #ifdef AFS_DARWIN80_ENV
!     {VOPPREF(strategy_desc), (VOPFUNC)err_strategy},	/* strategy */
! #else
!     {VOPPREF(strategy_desc), (VOPFUNC)afs_vop_strategy},	/* strategy */
! #endif
! #ifndef AFS_DARWIN80_ENV
!     {VOPPREF(print_desc), (VOPFUNC)afs_vop_print},	/* print */
!     {VOPPREF(islocked_desc), (VOPFUNC)afs_vop_islocked},	/* islocked */
! #endif
!     {VOPPREF(pathconf_desc), (VOPFUNC)afs_vop_pathconf},	/* pathconf */
!     {VOPPREF(advlock_desc), (VOPFUNC)afs_vop_advlock},	/* advlock */
! #ifndef AFS_DARWIN80_ENV
!     {VOPPREF(blkatoff_desc), (VOPFUNC)afs_vop_blkatoff},	/* blkatoff */
!     {VOPPREF(valloc_desc), (VOPFUNC)afs_vop_valloc},	/* valloc */
!     {VOPPREF(reallocblks_desc), (VOPFUNC)afs_vop_reallocblks},	/* reallocblks */
!     {VOPPREF(vfree_desc), (VOPFUNC)afs_vop_vfree},	/* vfree */
!     {VOPPREF(update_desc), (VOPFUNC)afs_vop_update},	/* update */
!     {VOPPREF(cmap_desc), (VOPFUNC)afs_vop_cmap},	/* cmap */
!     {VOPPREF(truncate_desc), (VOPFUNC)afs_vop_truncate},	/* truncate */
! #endif
!     {VOPPREF(blktooff_desc), (VOPFUNC)afs_vop_blktooff},	/* blktooff */
!     {VOPPREF(offtoblk_desc), (VOPFUNC)afs_vop_offtoblk},	/* offtoblk */
!     {VOPPREF(bwrite_desc), (VOPFUNC)vn_bwrite},
!     {(struct vnodeop_desc *)NULL, (void (*)())NULL}
  };
  struct vnodeopv_desc afs_vnodeop_opv_desc =
      { &afs_vnodeop_p, afs_vnodeop_entries };
  
+ #ifdef AFS_DARWIN80_ENV
+ /* vfs structures for incompletely initialized vnodes */
+ int (**afs_dead_vnodeop_p) ();
+ 
+ struct vnodeopv_entry_desc afs_dead_vnodeop_entries[] = {
+     {VOPPREF(default_desc), (VOPFUNC)vn_default_error},
+     {VOPPREF(lookup_desc), (VOPFUNC)vn_default_error},	/* lookup */
+     {VOPPREF(create_desc), (VOPFUNC)err_create},	/* create */
+     {VOPPREF(mknod_desc), (VOPFUNC)err_mknod},	/* mknod */
+     {VOPPREF(open_desc), (VOPFUNC)err_open},	/* open */
+     {VOPPREF(close_desc), (VOPFUNC)err_close},	/* close */
+     {VOPPREF(access_desc), (VOPFUNC)err_access},	/* access */
+     {VOPPREF(getattr_desc), (VOPFUNC)err_getattr},	/* getattr */
+     {VOPPREF(setattr_desc), (VOPFUNC)err_setattr},	/* setattr */
+     {VOPPREF(read_desc), (VOPFUNC)err_read},	/* read */
+     {VOPPREF(write_desc), (VOPFUNC)err_write},	/* write */
+     {VOPPREF(pagein_desc), (VOPFUNC)err_pagein},	/* read */
+     {VOPPREF(pageout_desc), (VOPFUNC)err_pageout},	/* write */
+     {VOPPREF(ioctl_desc), (VOPFUNC)err_ioctl},	/* XXX ioctl */
+     {VOPPREF(select_desc), (VOPFUNC)nop_select},	/* select */
+     {VOPPREF(mmap_desc), (VOPFUNC)err_mmap},	/* mmap */
+     {VOPPREF(fsync_desc), (VOPFUNC)err_fsync},	/* fsync */
+     {VOPPREF(remove_desc), (VOPFUNC)err_remove},	/* remove */
+     {VOPPREF(link_desc), (VOPFUNC)err_link},	/* link */
+     {VOPPREF(rename_desc), (VOPFUNC)err_rename},	/* rename */
+     {VOPPREF(mkdir_desc), (VOPFUNC)err_mkdir},	/* mkdir */
+     {VOPPREF(rmdir_desc), (VOPFUNC)err_rmdir},	/* rmdir */
+     {VOPPREF(symlink_desc), (VOPFUNC)err_symlink},	/* symlink */
+     {VOPPREF(readdir_desc), (VOPFUNC)err_readdir},	/* readdir */
+     {VOPPREF(readlink_desc), (VOPFUNC)err_readlink},	/* readlink */
+     {VOPPREF(inactive_desc), (VOPFUNC)afs_vop_inactive},	/* inactive */
+     {VOPPREF(reclaim_desc), (VOPFUNC)afs_vop_reclaim},	/* reclaim */
+     {VOPPREF(strategy_desc), (VOPFUNC)err_strategy},	/* strategy */
+     {VOPPREF(pathconf_desc), (VOPFUNC)err_pathconf},	/* pathconf */
+     {VOPPREF(advlock_desc), (VOPFUNC)err_advlock},	/* advlock */
+     {VOPPREF(blktooff_desc), (VOPFUNC)err_blktooff},	/* blktooff */
+     {VOPPREF(offtoblk_desc), (VOPFUNC)err_offtoblk},	/* offtoblk */
+     {VOPPREF(bwrite_desc), (VOPFUNC)err_bwrite},
+     {(struct vnodeop_desc *)NULL, (void (*)())NULL}
+ };
+ struct vnodeopv_desc afs_dead_vnodeop_opv_desc =
+     { &afs_dead_vnodeop_p, afs_dead_vnodeop_entries };
+ #endif
+ 
  #define GETNAME()       \
      struct componentname *cnp = ap->a_cnp; \
      char *name; \
***************
*** 145,174 ****
      int haveGlock=ISAFS_GLOCK(); 
      struct vcache *tvc = VTOAFS(vp);
  
      tvc->states |= CUBCinit;
      if (haveGlock) AFS_GUNLOCK(); 
  
      /* vget needed for 0 ref'd vnode in GetVCache to not panic in vref.
         vref needed for multiref'd vnode in vnop_remove not to deadlock
         ourselves during vop_inactive, except we also need to not reinst
         the ubc... so we just call VREF there now anyway. */
  
!     if (VREFCOUNT(tvc) > 0)
  	VREF(((struct vnode *)(vp))); 
!     else
  	afs_vget(afs_globalVFS, 0, (vp));
  
      if (UBCINFOMISSING(vp) || UBCINFORECLAIMED(vp)) {
  	ubc_info_init(vp); 
      }
  
      if (haveGlock) AFS_GLOCK(); 
      tvc->states &= ~CUBCinit;
  }
- 
  int
  afs_vop_lookup(ap)
!      struct vop_lookup_args	/* {
  				 * struct vnodeop_desc * a_desc;
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
--- 236,298 ----
      int haveGlock=ISAFS_GLOCK(); 
      struct vcache *tvc = VTOAFS(vp);
  
+ #ifndef AFS_DARWIN80_ENV
      tvc->states |= CUBCinit;
+ #endif
+ #ifdef AFS_DARWIN80_ENV
+     osi_Assert((tvc->states & CVInit) == 0);
+     if (tvc->states & CDeadVnode)
+        osi_Assert(!vnode_isinuse(vp, 1));
+ #endif
      if (haveGlock) AFS_GUNLOCK(); 
  
+ #ifdef AFS_DARWIN80_ENV
+ 	if (vnode_get(vp)) {
+            /* being terminated. kernel won't give us a ref. Now what? our
+               callers don't expect us to fail */
+ #if 1
+            panic("vn_hold on terminating vnode");
+ #else           
+            if (haveGlock) AFS_GLOCK(); 
+            return;
+ #endif
+         }
+ 	if (vnode_ref(vp)) {
+ #if 1
+ 	    panic("vn_hold on terminating vnode");
+ #else           
+ 	    vnode_put(vp);
+ 	    if (haveGlock) AFS_GLOCK(); 
+ 	    return;
+ #endif
+ 	}
+ 	vnode_put(vp);
+ #else
      /* vget needed for 0 ref'd vnode in GetVCache to not panic in vref.
         vref needed for multiref'd vnode in vnop_remove not to deadlock
         ourselves during vop_inactive, except we also need to not reinst
         the ubc... so we just call VREF there now anyway. */
  
!     if (VREFCOUNT_GT(tvc, 0))
  	VREF(((struct vnode *)(vp))); 
!      else 
  	afs_vget(afs_globalVFS, 0, (vp));
+ #endif
  
+ #ifndef AFS_DARWIN80_ENV
      if (UBCINFOMISSING(vp) || UBCINFORECLAIMED(vp)) {
  	ubc_info_init(vp); 
      }
+ #endif
  
      if (haveGlock) AFS_GLOCK(); 
+ #ifndef AFS_DARWIN80_ENV
      tvc->states &= ~CUBCinit;
+ #endif
  }
  int
  afs_vop_lookup(ap)
!      struct VOPPROT(lookup_args)/* {
  				 * struct vnodeop_desc * a_desc;
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
***************
*** 182,223 ****
      int lockparent;		/* 1 => lockparent flag is set */
      int wantparent;		/* 1 => wantparent or lockparent flag */
      struct proc *p;
      GETNAME();
!     p = cnp->cn_proc;
      lockparent = flags & LOCKPARENT;
      wantparent = flags & (LOCKPARENT | WANTPARENT);
  
!     if (ap->a_dvp->v_type != VDIR) {
  	*ap->a_vpp = 0;
  	DROPNAME();
  	return ENOTDIR;
      }
      dvp = ap->a_dvp;
      if (flags & ISDOTDOT)
  	VOP_UNLOCK(dvp, 0, p);
      AFS_GLOCK();
!     error = afs_lookup(VTOAFS(dvp), name, &vcp, cnp->cn_cred);
      AFS_GUNLOCK();
      if (error) {
  	if (flags & ISDOTDOT)
  	    VOP_LOCK(dvp, LK_EXCLUSIVE | LK_RETRY, p);
  	if ((cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME)
  	    && (flags & ISLASTCN) && error == ENOENT)
  	    error = EJUSTRETURN;
  	if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN))
  	    cnp->cn_flags |= SAVENAME;
  	DROPNAME();
  	*ap->a_vpp = 0;
  	return (error);
      }
      vp = AFSTOV(vcp);		/* always get a node if no error */
      vp->v_vfsp = dvp->v_vfsp;
  
      if (UBCINFOMISSING(vp) ||
  	UBCINFORECLAIMED(vp)) {
  	    ubc_info_init(vp);
      }
  
      /* The parent directory comes in locked.  We unlock it on return
       * unless the caller wants it left locked.
       * we also always return the vnode locked. */
--- 306,374 ----
      int lockparent;		/* 1 => lockparent flag is set */
      int wantparent;		/* 1 => wantparent or lockparent flag */
      struct proc *p;
+ #ifdef AFS_DARWIN80_ENV
+     vcp = VTOAFS(ap->a_dvp);
+     if (vcp->mvstat != 1) {
+ 	error = cache_lookup(ap->a_dvp, ap->a_vpp, ap->a_cnp);
+ 	if (error == -1) 
+ 	    return 0;
+ 	if (error == ENOENT) 
+ 	    return error;
+     }
+ #endif
+ 
      GETNAME();
!     p = vop_cn_proc;
! 
      lockparent = flags & LOCKPARENT;
      wantparent = flags & (LOCKPARENT | WANTPARENT);
  
!     if (!vnode_isdir(ap->a_dvp)) {
  	*ap->a_vpp = 0;
  	DROPNAME();
  	return ENOTDIR;
      }
      dvp = ap->a_dvp;
+ #ifndef AFS_DARWIN80_ENV
      if (flags & ISDOTDOT)
  	VOP_UNLOCK(dvp, 0, p);
+ #endif
      AFS_GLOCK();
!     error = afs_lookup(VTOAFS(dvp), name, &vcp, vop_cn_cred);
      AFS_GUNLOCK();
      if (error) {
+ #ifndef AFS_DARWIN80_ENV
  	if (flags & ISDOTDOT)
  	    VOP_LOCK(dvp, LK_EXCLUSIVE | LK_RETRY, p);
+ #endif
  	if ((cnp->cn_nameiop == CREATE || cnp->cn_nameiop == RENAME)
  	    && (flags & ISLASTCN) && error == ENOENT)
  	    error = EJUSTRETURN;
+ #ifndef AFS_DARWIN80_ENV
  	if (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN))
  	    cnp->cn_flags |= SAVENAME;
+ #endif
  	DROPNAME();
  	*ap->a_vpp = 0;
  	return (error);
      }
+ #ifdef AFS_DARWIN80_ENV
+     if ((error=afs_darwin_finalizevnode(vcp, ap->a_dvp, ap->a_cnp, 0))) {
+ 	*ap->a_vpp = 0;
+ 	return error;
+     }
+ #endif
      vp = AFSTOV(vcp);		/* always get a node if no error */
+ #ifndef AFS_DARWIN80_ENV /* XXX needed for multi-mount thing, but can't have it yet */
      vp->v_vfsp = dvp->v_vfsp;
  
      if (UBCINFOMISSING(vp) ||
  	UBCINFORECLAIMED(vp)) {
  	    ubc_info_init(vp);
      }
+ #endif
  
+ #ifndef AFS_DARWIN80_ENV
      /* The parent directory comes in locked.  We unlock it on return
       * unless the caller wants it left locked.
       * we also always return the vnode locked. */
***************
*** 240,250 ****
--- 391,404 ----
  	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
  	/* always return the child locked */
      }
+ #endif
      *ap->a_vpp = vp;
  
+ #ifndef AFS_DARWIN80_ENV
      if ((cnp->cn_nameiop == RENAME && wantparent && (flags & ISLASTCN)
  	 || (cnp->cn_nameiop != LOOKUP && (flags & ISLASTCN))))
  	cnp->cn_flags |= SAVENAME;
+ #endif
  
      DROPNAME();
      return error;
***************
*** 252,258 ****
  
  int
  afs_vop_create(ap)
!      struct vop_create_args	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
  				 * struct componentname *a_cnp;
--- 406,412 ----
  
  int
  afs_vop_create(ap)
!      struct VOPPROT(create_args)	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
  				 * struct componentname *a_cnp;
***************
*** 264,286 ****
      register struct vnode *dvp = ap->a_dvp;
      struct proc *p;
      GETNAME();
!     p = cnp->cn_proc;
  
      /* vnode layer handles excl/nonexcl */
      AFS_GLOCK();
      error =
  	afs_create(VTOAFS(dvp), name, ap->a_vap, NONEXCL, ap->a_vap->va_mode,
! 		   &vcp, cnp->cn_cred);
      AFS_GUNLOCK();
      if (error) {
  	VOP_ABORTOP(dvp, cnp);
  	vput(dvp);
  	DROPNAME();
  	return (error);
      }
  
      if (vcp) {
  	*ap->a_vpp = AFSTOV(vcp);
  	(*ap->a_vpp)->v_vfsp = dvp->v_vfsp;
  	vn_lock(*ap->a_vpp, LK_EXCLUSIVE | LK_RETRY, p);
  	if (UBCINFOMISSING(*ap->a_vpp) || UBCINFORECLAIMED(*ap->a_vpp)) {
--- 418,449 ----
      register struct vnode *dvp = ap->a_dvp;
      struct proc *p;
      GETNAME();
!     p = vop_cn_proc;
  
      /* vnode layer handles excl/nonexcl */
      AFS_GLOCK();
      error =
  	afs_create(VTOAFS(dvp), name, ap->a_vap, NONEXCL, ap->a_vap->va_mode,
! 		   &vcp, vop_cn_cred);
      AFS_GUNLOCK();
      if (error) {
+ #ifndef AFS_DARWIN80_ENV
  	VOP_ABORTOP(dvp, cnp);
  	vput(dvp);
+ #endif
  	DROPNAME();
  	return (error);
      }
  
      if (vcp) {
+ #ifdef AFS_DARWIN80_ENV
+         if ((error=afs_darwin_finalizevnode(vcp, ap->a_dvp, ap->a_cnp, 0))) {
+              *ap->a_vpp=0;
+              return error;
+         }
+ #endif
  	*ap->a_vpp = AFSTOV(vcp);
+ #ifndef AFS_DARWIN80_ENV /* XXX needed for multi-mount thing, but can't have it yet */
  	(*ap->a_vpp)->v_vfsp = dvp->v_vfsp;
  	vn_lock(*ap->a_vpp, LK_EXCLUSIVE | LK_RETRY, p);
  	if (UBCINFOMISSING(*ap->a_vpp) || UBCINFORECLAIMED(*ap->a_vpp)) {
***************
*** 288,320 ****
  	    ubc_info_init(*ap->a_vpp);
  	    vcp->states &= ~CUBCinit;
  	}
      } else
  	*ap->a_vpp = 0;
  
      if ((cnp->cn_flags & SAVESTART) == 0)
  	FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
      vput(dvp);
      DROPNAME();
      return error;
  }
  
  int
  afs_vop_mknod(ap)
!      struct vop_mknod_args	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
  				 * struct componentname *a_cnp;
  				 * struct vattr *a_vap;
  				 * } */ *ap;
  {
      FREE_ZONE(ap->a_cnp->cn_pnbuf, ap->a_cnp->cn_pnlen, M_NAMEI);
      vput(ap->a_dvp);
      return (ENODEV);
  }
  
  int
  afs_vop_open(ap)
!      struct vop_open_args	/* {
  				 * struct vnode *a_vp;
  				 * int  a_mode;
  				 * struct ucred *a_cred;
--- 451,488 ----
  	    ubc_info_init(*ap->a_vpp);
  	    vcp->states &= ~CUBCinit;
  	}
+ #endif
      } else
  	*ap->a_vpp = 0;
  
+ #ifndef AFS_DARWIN80_ENV
      if ((cnp->cn_flags & SAVESTART) == 0)
  	FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
      vput(dvp);
+ #endif
      DROPNAME();
      return error;
  }
  
  int
  afs_vop_mknod(ap)
!      struct VOPPROT(mknod_args)	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
  				 * struct componentname *a_cnp;
  				 * struct vattr *a_vap;
  				 * } */ *ap;
  {
+ #ifndef AFS_DARWIN80_ENV
      FREE_ZONE(ap->a_cnp->cn_pnbuf, ap->a_cnp->cn_pnlen, M_NAMEI);
      vput(ap->a_dvp);
+ #endif
      return (ENODEV);
  }
  
  int
  afs_vop_open(ap)
!      struct VOPPROT(open_args)	/* {
  				 * struct vnode *a_vp;
  				 * int  a_mode;
  				 * struct ucred *a_cred;
***************
*** 324,330 ****
      int error;
      struct vnode *vp = ap->a_vp;
      struct vcache *vc = VTOAFS(vp);
! #ifdef AFS_DARWIN14_ENV
      int didhold = 0;
      /*----------------------------------------------------------------
       * osi_VM_TryReclaim() removes the ubcinfo of a vnode, but that vnode
--- 492,498 ----
      int error;
      struct vnode *vp = ap->a_vp;
      struct vcache *vc = VTOAFS(vp);
! #if defined(AFS_DARWIN14_ENV) && !defined(AFS_DARWIN80_ENV)
      int didhold = 0;
      /*----------------------------------------------------------------
       * osi_VM_TryReclaim() removes the ubcinfo of a vnode, but that vnode
***************
*** 340,353 ****
  	didhold = ubc_hold(vp);
  #endif /* AFS_DARWIN14_ENV */
      AFS_GLOCK();
!     error = afs_open(&vc, ap->a_mode, ap->a_cred);
  #ifdef DIAGNOSTIC
      if (AFSTOV(vc) != vp)
  	panic("AFS open changed vnode!");
  #endif
!     osi_FlushPages(vc, ap->a_cred);
      AFS_GUNLOCK();
! #ifdef AFS_DARWIN14_ENV
      if (error && didhold)
  	ubc_rele(vp);
  #endif /* AFS_DARWIN14_ENV */
--- 508,521 ----
  	didhold = ubc_hold(vp);
  #endif /* AFS_DARWIN14_ENV */
      AFS_GLOCK();
!     error = afs_open(&vc, ap->a_mode, vop_cred);
  #ifdef DIAGNOSTIC
      if (AFSTOV(vc) != vp)
  	panic("AFS open changed vnode!");
  #endif
!     osi_FlushPages(vc, vop_cred);
      AFS_GUNLOCK();
! #if defined(AFS_DARWIN14_ENV) && !defined(AFS_DARWIN80_ENV)
      if (error && didhold)
  	ubc_rele(vp);
  #endif /* AFS_DARWIN14_ENV */
***************
*** 356,362 ****
  
  int
  afs_vop_close(ap)
!      struct vop_close_args	/* {
  				 * struct vnode *a_vp;
  				 * int  a_fflag;
  				 * struct ucred *a_cred;
--- 524,530 ----
  
  int
  afs_vop_close(ap)
!      struct VOPPROT(close_args)	/* {
  				 * struct vnode *a_vp;
  				 * int  a_fflag;
  				 * struct ucred *a_cred;
***************
*** 367,385 ****
      struct vnode *vp = ap->a_vp;
      struct vcache *avc = VTOAFS(vp);
      AFS_GLOCK();
!     if (ap->a_cred)
! 	code = afs_close(avc, ap->a_fflag, ap->a_cred, ap->a_p);
      else
! 	code = afs_close(avc, ap->a_fflag, &afs_osi_cred, ap->a_p);
!     osi_FlushPages(avc, ap->a_cred);	/* hold bozon lock, but not basic vnode lock */
      AFS_GUNLOCK();
  
      return code;
  }
  
  int
  afs_vop_access(ap)
!      struct vop_access_args	/* {
  				 * struct vnode *a_vp;
  				 * int  a_mode;
  				 * struct ucred *a_cred;
--- 535,658 ----
      struct vnode *vp = ap->a_vp;
      struct vcache *avc = VTOAFS(vp);
      AFS_GLOCK();
!     if (vop_cred)
! 	code = afs_close(avc, ap->a_fflag, vop_cred, vop_proc);
      else
! 	code = afs_close(avc, ap->a_fflag, &afs_osi_cred, vop_proc);
!     osi_FlushPages(avc, vop_cred);	/* hold bozon lock, but not basic vnode lock */
      AFS_GUNLOCK();
  
      return code;
  }
  
+ #ifdef AFS_DARWIN80_ENV
+ extern int afs_fakestat_enable;
+ 
+ int
+ afs_vop_access(ap)
+      struct VOPPROT(access_args)        /* {
+                                  * struct vnode *a_vp;
+                                  * int  a_action;
+                                  * vfs_context_t a_context;
+                                  * } */ *ap;
+ {
+     int code;
+     struct vrequest treq;
+     struct afs_fakestat_state fakestate;
+     struct vcache * tvc = VTOAFS(ap->a_vp);
+     int bits=0;
+     int cmb = CHECK_MODE_BITS;
+     AFS_GLOCK();
+     afs_InitFakeStat(&fakestate);
+     if ((code = afs_InitReq(&treq, vop_cred)))
+         goto out2;
+ 
+     code = afs_TryEvalFakeStat(&tvc, &fakestate, &treq);
+     if (code) {
+         code = afs_CheckCode(code, &treq, 55);
+         goto out;
+     }
+ 
+     code = afs_VerifyVCache(tvc, &treq);
+     if (code) {
+         code = afs_CheckCode(code, &treq, 56);
+         goto out;
+     }
+     if (afs_fakestat_enable && tvc->mvstat && !(tvc->states & CStatd)) {
+         code = 0;
+         goto out;
+     }
+     if (vnode_isdir(ap->a_vp)) {
+        if (ap->a_action & KAUTH_VNODE_LIST_DIRECTORY)
+           bits |= PRSFS_LOOKUP;
+        if (ap->a_action & KAUTH_VNODE_ADD_FILE)
+           bits |= PRSFS_INSERT;
+        if (ap->a_action & KAUTH_VNODE_SEARCH)
+           bits |= PRSFS_LOOKUP;
+        if (ap->a_action & KAUTH_VNODE_DELETE)
+           bits |= PRSFS_DELETE;
+        if (ap->a_action & KAUTH_VNODE_ADD_SUBDIRECTORY)
+           bits |= PRSFS_INSERT;
+        if (ap->a_action & KAUTH_VNODE_DELETE_CHILD)
+           bits |= PRSFS_DELETE;
+ #if 0 /* I'd argue this should be enforced on the parent. But that's ugly */
+        if (ap->a_action & KAUTH_VNODE_READ_ATTRIBUTES)
+           bits |= PRSFS_LOOKUP;
+        if (ap->a_action & KAUTH_VNODE_READ_SECURITY) /* mode bits/gid, not afs acl */
+           bits |= PRSFS_LOOKUP;
+ #endif
+     } else {
+        if (ap->a_action & KAUTH_VNODE_READ_DATA)
+           bits |= PRSFS_READ;
+        if (ap->a_action & KAUTH_VNODE_WRITE_DATA)
+           bits |= PRSFS_WRITE;
+        if (ap->a_action & KAUTH_VNODE_EXECUTE)
+           bits |= PRSFS_READ; /* and mode bits.... */
+        if (ap->a_action & KAUTH_VNODE_READ_ATTRIBUTES)
+           bits |= PRSFS_LOOKUP;
+        if (ap->a_action & KAUTH_VNODE_READ_SECURITY) /* mode bits/gid, not afs acl */
+           bits |= PRSFS_LOOKUP;
+        if ((ap->a_action & ((1 << 25) - 1)) == KAUTH_VNODE_EXECUTE)
+           /* if only exec, don't check for read mode bit */
+           /* high bits of ap->a_action are not for 'generic rights bits', and
+              so should not be checked (KAUTH_VNODE_ACCESS is often present
+              and needs to be masked off) */
+ 	  cmb |= CMB_ALLOW_EXEC_AS_READ;
+     }
+     if (ap->a_action & KAUTH_VNODE_WRITE_ATTRIBUTES)
+        bits |= PRSFS_WRITE;
+ #if 0 /* no extended attributes */
+     if (ap->a_action & KAUTH_VNODE_READ_EXTATTRIBUTES)
+        bits |= PRSFS_READ;
+     if (ap->a_action & KAUTH_VNODE_WRITE_EXTATTRIBUTES)
+        bits |= PRSFS_WRITE;
+ #endif
+     if (ap->a_action & KAUTH_VNODE_WRITE_SECURITY)
+        bits |= PRSFS_WRITE;
+     /* we can't check for KAUTH_VNODE_TAKE_OWNERSHIP, so we always permit it */
+     
+     code = afs_AccessOK(tvc, bits, &treq, cmb);
+ 
+     if (code == 1 && vnode_vtype(ap->a_vp) == VREG &&
+         ap->a_action & KAUTH_VNODE_EXECUTE &&
+         (tvc->m.Mode & 0100) != 0100) {
+         code = 0;
+      }
+     if (code) {
+         code= 0;               /* if access is ok */
+     } else {
+         code = afs_CheckCode(EACCES, &treq, 57);        /* failure code */
+     }
+ out:
+      afs_PutFakeStat(&fakestate);
+ out2:
+     AFS_GUNLOCK();
+     return code;
+ }
+ #else
  int
  afs_vop_access(ap)
!      struct VOPPROT(access_args)	/* {
  				 * struct vnode *a_vp;
  				 * int  a_mode;
  				 * struct ucred *a_cred;
***************
*** 388,401 ****
  {
      int code;
      AFS_GLOCK();
!     code = afs_access(VTOAFS(ap->a_vp), ap->a_mode, ap->a_cred);
      AFS_GUNLOCK();
      return code;
  }
  
  int
  afs_vop_getattr(ap)
!      struct vop_getattr_args	/* {
  				 * struct vnode *a_vp;
  				 * struct vattr *a_vap;
  				 * struct ucred *a_cred;
--- 661,675 ----
  {
      int code;
      AFS_GLOCK();
!     code = afs_access(VTOAFS(ap->a_vp), ap->a_mode, vop_cred);
      AFS_GUNLOCK();
      return code;
  }
+ #endif
  
  int
  afs_vop_getattr(ap)
!      struct VOPPROT(getattr_args)	/* {
  				 * struct vnode *a_vp;
  				 * struct vattr *a_vap;
  				 * struct ucred *a_cred;
***************
*** 405,418 ****
      int code;
  
      AFS_GLOCK();
!     code = afs_getattr(VTOAFS(ap->a_vp), ap->a_vap, ap->a_cred);
      AFS_GUNLOCK();
      return code;
  }
  
  int
  afs_vop_setattr(ap)
!      struct vop_setattr_args	/* {
  				 * struct vnode *a_vp;
  				 * struct vattr *a_vap;
  				 * struct ucred *a_cred;
--- 679,708 ----
      int code;
  
      AFS_GLOCK();
!     code = afs_getattr(VTOAFS(ap->a_vp), ap->a_vap, vop_cred);
      AFS_GUNLOCK();
+ #ifdef AFS_DARWIN80_ENV
+     VATTR_SET_SUPPORTED(ap->a_vap, va_type);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_mode);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_uid);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_gid);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_fileid);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_nlink);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_data_size);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_access_time);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_modify_time);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_change_time);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_gen);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_flags);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_iosize);
+     VATTR_SET_SUPPORTED(ap->a_vap, va_total_alloc);
+ #endif
      return code;
  }
  
  int
  afs_vop_setattr(ap)
!      struct VOPPROT(setattr_args)	/* {
  				 * struct vnode *a_vp;
  				 * struct vattr *a_vap;
  				 * struct ucred *a_cred;
***************
*** 421,434 ****
  {
      int code;
      AFS_GLOCK();
!     code = afs_setattr(VTOAFS(ap->a_vp), ap->a_vap, ap->a_cred);
      AFS_GUNLOCK();
      return code;
  }
  
  int
  afs_vop_read(ap)
!      struct vop_read_args	/* {
  				 * struct vnode *a_vp;
  				 * struct uio *a_uio;
  				 * int a_ioflag;
--- 711,724 ----
  {
      int code;
      AFS_GLOCK();
!     code = afs_setattr(VTOAFS(ap->a_vp), ap->a_vap, vop_cred);
      AFS_GUNLOCK();
      return code;
  }
  
  int
  afs_vop_read(ap)
!      struct VOPPROT(read_args)	/* {
  				 * struct vnode *a_vp;
  				 * struct uio *a_uio;
  				 * int a_ioflag;
***************
*** 438,453 ****
      int code;
      struct vnode *vp = ap->a_vp;
      struct vcache *avc = VTOAFS(vp);
      AFS_GLOCK();
!     osi_FlushPages(avc, ap->a_cred);	/* hold bozon lock, but not basic vnode lock */
!     code = afs_read(avc, ap->a_uio, ap->a_cred, 0, 0, 0);
      AFS_GUNLOCK();
      return code;
  }
  
  int
  afs_vop_pagein(ap)
!      struct vop_pagein_args	/* {
  				 * struct vnode *a_vp;
  				 * upl_t a_pl;
  				 * vm_offset_t a_pl_offset;
--- 728,750 ----
      int code;
      struct vnode *vp = ap->a_vp;
      struct vcache *avc = VTOAFS(vp);
+ #ifdef AFS_DARWIN80_ENV
+     ubc_sync_range(ap->a_vp, AFS_UIO_OFFSET(ap->a_uio), AFS_UIO_OFFSET(ap->a_uio) + AFS_UIO_RESID(ap->a_uio), UBC_PUSHDIRTY);
+ #else
+     if (UBCINFOEXISTS(ap->a_vp)) {
+ 	ubc_clean(ap->a_vp, 0);
+     }
+ #endif
      AFS_GLOCK();
!     osi_FlushPages(avc, vop_cred);	/* hold bozon lock, but not basic vnode lock */
!     code = afs_read(avc, ap->a_uio, vop_cred, 0, 0, 0);
      AFS_GUNLOCK();
      return code;
  }
  
  int
  afs_vop_pagein(ap)
!      struct VOPPROT(pagein_args)	/* {
  				 * struct vnode *a_vp;
  				 * upl_t a_pl;
  				 * vm_offset_t a_pl_offset;
***************
*** 465,478 ****
      int flags = ap->a_flags;
      struct ucred *cred;
      vm_offset_t ioaddr;
      struct uio auio;
      struct iovec aiov;
      struct uio *uio = &auio;
      int nocommit = flags & UPL_NOCOMMIT;
  
      int code;
      struct vcache *tvc = VTOAFS(vp);
! 
      if (UBCINVALID(vp)) {
  #if DIAGNOSTIC
  	panic("afs_vop_pagein: invalid vp");
--- 762,779 ----
      int flags = ap->a_flags;
      struct ucred *cred;
      vm_offset_t ioaddr;
+ #ifdef AFS_DARWIN80_ENV
+     struct uio *uio;
+ #else
      struct uio auio;
      struct iovec aiov;
      struct uio *uio = &auio;
+ #endif
      int nocommit = flags & UPL_NOCOMMIT;
  
      int code;
      struct vcache *tvc = VTOAFS(vp);
! #ifndef AFS_DARWIN80_ENV
      if (UBCINVALID(vp)) {
  #if DIAGNOSTIC
  	panic("afs_vop_pagein: invalid vp");
***************
*** 481,521 ****
      }
  
      UBCINFOCHECK("afs_vop_pagein", vp);
      if (pl == (upl_t) NULL) {
  	panic("afs_vop_pagein: no upl");
      }
  
      cred = ubc_getcred(vp);
      if (cred == NOCRED)
! 	cred = ap->a_cred;
  
      if (size == 0) {
  	if (!nocommit)
! 	    kernel_upl_abort_range(pl, pl_offset, size,
  				   UPL_ABORT_ERROR | UPL_ABORT_FREE_ON_EMPTY);
  	return (0);
      }
      if (f_offset < 0) {
  	if (!nocommit)
! 	    kernel_upl_abort_range(pl, pl_offset, size,
  				   UPL_ABORT_ERROR | UPL_ABORT_FREE_ON_EMPTY);
  	return (EINVAL);
      }
      if (f_offset & PAGE_MASK)
  	panic("afs_vop_pagein: offset not page aligned");
  
      auio.uio_iov = &aiov;
      auio.uio_iovcnt = 1;
      auio.uio_offset = f_offset;
      auio.uio_segflg = UIO_SYSSPACE;
      auio.uio_rw = UIO_READ;
      auio.uio_procp = NULL;
-     kernel_upl_map(kernel_map, pl, &ioaddr);
-     ioaddr += pl_offset;
      auio.uio_resid = aiov.iov_len = size;
      aiov.iov_base = (caddr_t) ioaddr;
      AFS_GLOCK();
!     osi_FlushPages(tvc, ap->a_cred);	/* hold bozon lock, but not basic vnode lock */
      code = afs_read(tvc, uio, cred, 0, 0, 0);
      if (code == 0) {
  	ObtainWriteLock(&tvc->lock, 2);
--- 782,828 ----
      }
  
      UBCINFOCHECK("afs_vop_pagein", vp);
+ #endif
      if (pl == (upl_t) NULL) {
  	panic("afs_vop_pagein: no upl");
      }
  
      cred = ubc_getcred(vp);
      if (cred == NOCRED)
! 	cred = vop_cred;
  
      if (size == 0) {
  	if (!nocommit)
! 	    OSI_UPL_ABORT_RANGE(pl, pl_offset, size,
  				   UPL_ABORT_ERROR | UPL_ABORT_FREE_ON_EMPTY);
  	return (0);
      }
      if (f_offset < 0) {
  	if (!nocommit)
! 	    OSI_UPL_ABORT_RANGE(pl, pl_offset, size,
  				   UPL_ABORT_ERROR | UPL_ABORT_FREE_ON_EMPTY);
  	return (EINVAL);
      }
      if (f_offset & PAGE_MASK)
  	panic("afs_vop_pagein: offset not page aligned");
  
+     OSI_UPL_MAP(pl, &ioaddr);
+     ioaddr += pl_offset;
+ #ifdef AFS_DARWIN80_ENV
+     uio = uio_create(1, f_offset, UIO_SYSSPACE32, UIO_READ);
+     uio_addiov(uio, CAST_USER_ADDR_T(ioaddr), size);
+ #else
      auio.uio_iov = &aiov;
      auio.uio_iovcnt = 1;
      auio.uio_offset = f_offset;
      auio.uio_segflg = UIO_SYSSPACE;
      auio.uio_rw = UIO_READ;
      auio.uio_procp = NULL;
      auio.uio_resid = aiov.iov_len = size;
      aiov.iov_base = (caddr_t) ioaddr;
+ #endif
      AFS_GLOCK();
!     osi_FlushPages(tvc, vop_cred);	/* hold bozon lock, but not basic vnode lock */
      code = afs_read(tvc, uio, cred, 0, 0, 0);
      if (code == 0) {
  	ObtainWriteLock(&tvc->lock, 2);
***************
*** 525,551 ****
      AFS_GUNLOCK();
  
      /* Zero out rest of last page if there wasn't enough data in the file */
!     if (code == 0 && auio.uio_resid > 0)
  	memset(aiov.iov_base, 0, auio.uio_resid);
  
!     kernel_upl_unmap(kernel_map, pl);
      if (!nocommit) {
  	if (code)
! 	    kernel_upl_abort_range(pl, pl_offset, size,
  				   UPL_ABORT_ERROR | UPL_ABORT_FREE_ON_EMPTY);
  	else
! 	    kernel_upl_commit_range(pl, pl_offset, size,
  				    UPL_COMMIT_CLEAR_DIRTY |
! 				    UPL_COMMIT_FREE_ON_EMPTY,
! 				    UPL_GET_INTERNAL_PAGE_LIST(pl),
! 				    MAX_UPL_TRANSFER);
      }
      return code;
  }
  
  int
  afs_vop_write(ap)
!      struct vop_write_args	/* {
  				 * struct vnode *a_vp;
  				 * struct uio *a_uio;
  				 * int a_ioflag;
--- 832,865 ----
      AFS_GUNLOCK();
  
      /* Zero out rest of last page if there wasn't enough data in the file */
!     if (code == 0 && AFS_UIO_RESID(uio) > 0) {
! #ifdef AFS_DARWIN80_ENV
! 	memset(((caddr_t)ioaddr) + (size - AFS_UIO_RESID(uio)), 0,
!                AFS_UIO_RESID(uio));
! #else
  	memset(aiov.iov_base, 0, auio.uio_resid);
+ #endif
+     }
  
!     OSI_UPL_UNMAP(pl);
      if (!nocommit) {
  	if (code)
! 	    OSI_UPL_ABORT_RANGE(pl, pl_offset, size,
  				   UPL_ABORT_ERROR | UPL_ABORT_FREE_ON_EMPTY);
  	else
! 	    OSI_UPL_COMMIT_RANGE(pl, pl_offset, size,
  				    UPL_COMMIT_CLEAR_DIRTY |
! 				    UPL_COMMIT_FREE_ON_EMPTY);
      }
+ #ifdef AFS_DARWIN80_ENV
+     uio_free(uio);
+ #endif
      return code;
  }
  
  int
  afs_vop_write(ap)
!      struct VOPPROT(write_args)	/* {
  				 * struct vnode *a_vp;
  				 * struct uio *a_uio;
  				 * int a_ioflag;
***************
*** 555,577 ****
      int code;
      struct vcache *avc = VTOAFS(ap->a_vp);
      void *object;
!     AFS_GLOCK();
!     osi_FlushPages(avc, ap->a_cred);	/* hold bozon lock, but not basic vnode lock */
      if (UBCINFOEXISTS(ap->a_vp)) {
  	ubc_clean(ap->a_vp, 1);
      }
      if (UBCINFOEXISTS(ap->a_vp))
! 	osi_VM_NukePages(ap->a_vp, ap->a_uio->uio_offset,
! 			 ap->a_uio->uio_resid);
      code =
! 	afs_write(VTOAFS(ap->a_vp), ap->a_uio, ap->a_ioflag, ap->a_cred, 0);
      AFS_GUNLOCK();
      return code;
  }
  
  int
  afs_vop_pageout(ap)
!      struct vop_pageout_args	/* {
  				 * struct vnode *a_vp;
  				 * upl_t   a_pl,
  				 * vm_offset_t   a_pl_offset,
--- 869,895 ----
      int code;
      struct vcache *avc = VTOAFS(ap->a_vp);
      void *object;
! #ifdef AFS_DARWIN80_ENV
!     ubc_sync_range(ap->a_vp, AFS_UIO_OFFSET(ap->a_uio), AFS_UIO_OFFSET(ap->a_uio) + AFS_UIO_RESID(ap->a_uio), UBC_INVALIDATE);
! #else
      if (UBCINFOEXISTS(ap->a_vp)) {
  	ubc_clean(ap->a_vp, 1);
      }
      if (UBCINFOEXISTS(ap->a_vp))
! 	osi_VM_NukePages(ap->a_vp, AFS_UIO_OFFSET(ap->a_uio),
! 			 AFS_UIO_RESID(ap->a_uio));
! #endif
!     AFS_GLOCK();
!     osi_FlushPages(avc, vop_cred);	/* hold bozon lock, but not basic vnode lock */
      code =
! 	afs_write(VTOAFS(ap->a_vp), ap->a_uio, ap->a_ioflag, vop_cred, 0);
      AFS_GUNLOCK();
      return code;
  }
  
  int
  afs_vop_pageout(ap)
!      struct VOPPROT(pageout_args)	/* {
  				 * struct vnode *a_vp;
  				 * upl_t   a_pl,
  				 * vm_offset_t   a_pl_offset,
***************
*** 589,603 ****
      int flags = ap->a_flags;
      struct ucred *cred;
      vm_offset_t ioaddr;
      struct uio auio;
      struct iovec aiov;
      struct uio *uio = &auio;
      int nocommit = flags & UPL_NOCOMMIT;
      int iosize;
  
      int code;
      struct vcache *tvc = VTOAFS(vp);
! 
      if (UBCINVALID(vp)) {
  #if DIAGNOSTIC
  	panic("afs_vop_pageout: invalid vp");
--- 907,925 ----
      int flags = ap->a_flags;
      struct ucred *cred;
      vm_offset_t ioaddr;
+ #ifdef AFS_DARWIN80_ENV
+     struct uio *uio;
+ #else
      struct uio auio;
      struct iovec aiov;
      struct uio *uio = &auio;
+ #endif
      int nocommit = flags & UPL_NOCOMMIT;
      int iosize;
  
      int code;
      struct vcache *tvc = VTOAFS(vp);
! #ifndef AFS_DARWIN80_ENV
      if (UBCINVALID(vp)) {
  #if DIAGNOSTIC
  	panic("afs_vop_pageout: invalid vp");
***************
*** 606,615 ****
      }
  
      UBCINFOCHECK("afs_vop_pageout", vp);
      if (pl == (upl_t) NULL) {
  	panic("afs_vop_pageout: no upl");
      }
! #if 1
      {
  	int lbn, s;
  	struct buf *bp;
--- 928,941 ----
      }
  
      UBCINFOCHECK("afs_vop_pageout", vp);
+ #endif
      if (pl == (upl_t) NULL) {
  	panic("afs_vop_pageout: no upl");
      }
! #if !defined(AFS_DARWIN80_ENV) /* XXX nfs now uses it's own bufs (struct nfsbuf)
!                                   maybe the generic
!                                   layer doesn't have them anymore? In any case,
!                                   we can't just copy code from nfs... */
      {
  	int lbn, s;
  	struct buf *bp;
***************
*** 634,644 ****
  #endif
      cred = ubc_getcred(vp);
      if (cred == NOCRED)
! 	cred = ap->a_cred;
  
      if (size == 0) {
  	if (!nocommit)
! 	    kernel_upl_abort_range(pl, pl_offset, size,
  				   UPL_ABORT_FREE_ON_EMPTY);
  	return (0);
      }
--- 960,970 ----
  #endif
      cred = ubc_getcred(vp);
      if (cred == NOCRED)
! 	cred = vop_cred;
  
      if (size == 0) {
  	if (!nocommit)
! 	    OSI_UPL_ABORT_RANGE(pl, pl_offset, size,
  				   UPL_ABORT_FREE_ON_EMPTY);
  	return (0);
      }
***************
*** 646,658 ****
  	panic("nfs_pageout: (IO_APPEND | IO_SYNC)");
      if (f_offset < 0) {
  	if (!nocommit)
! 	    kernel_upl_abort_range(pl, pl_offset, size,
  				   UPL_ABORT_FREE_ON_EMPTY);
  	return (EINVAL);
      }
      if (f_offset >= tvc->m.Length) {
  	if (!nocommit)
! 	    kernel_upl_abort_range(pl, pl_offset, size,
  				   UPL_ABORT_FREE_ON_EMPTY);
  	return (EINVAL);
      }
--- 972,984 ----
  	panic("nfs_pageout: (IO_APPEND | IO_SYNC)");
      if (f_offset < 0) {
  	if (!nocommit)
! 	    OSI_UPL_ABORT_RANGE(pl, pl_offset, size,
  				   UPL_ABORT_FREE_ON_EMPTY);
  	return (EINVAL);
      }
      if (f_offset >= tvc->m.Length) {
  	if (!nocommit)
! 	    OSI_UPL_ABORT_RANGE(pl, pl_offset, size,
  				   UPL_ABORT_FREE_ON_EMPTY);
  	return (EINVAL);
      }
***************
*** 669,688 ****
  
      if (size > (iosize + (PAGE_SIZE - 1)) & ~PAGE_MASK && !nocommit)  {
              int iosize_rnd=(iosize + (PAGE_SIZE - 1)) & ~PAGE_MASK;
! 	    kernel_upl_abort_range(pl, pl_offset + iosize_rnd,
                                     size - iosize_rnd,
  				   UPL_ABORT_FREE_ON_EMPTY);
      }
      auio.uio_iov = &aiov;
      auio.uio_iovcnt = 1;
      auio.uio_offset = f_offset;
      auio.uio_segflg = UIO_SYSSPACE;
      auio.uio_rw = UIO_WRITE;
      auio.uio_procp = NULL;
-     kernel_upl_map(kernel_map, pl, &ioaddr);
-     ioaddr += pl_offset;
      auio.uio_resid = aiov.iov_len = iosize;
      aiov.iov_base = (caddr_t) ioaddr;
  #if 1				/* USV [ */
      {
  	/* 
--- 995,1019 ----
  
      if (size > (iosize + (PAGE_SIZE - 1)) & ~PAGE_MASK && !nocommit)  {
              int iosize_rnd=(iosize + (PAGE_SIZE - 1)) & ~PAGE_MASK;
! 	    OSI_UPL_ABORT_RANGE(pl, pl_offset + iosize_rnd,
                                     size - iosize_rnd,
  				   UPL_ABORT_FREE_ON_EMPTY);
      }
+     OSI_UPL_MAP(pl, &ioaddr);
+     ioaddr += pl_offset;
+ #ifdef AFS_DARWIN80_ENV
+     uio = uio_create(1, f_offset, UIO_SYSSPACE32, UIO_READ);
+     uio_addiov(uio, CAST_USER_ADDR_T(ioaddr), size);
+ #else
      auio.uio_iov = &aiov;
      auio.uio_iovcnt = 1;
      auio.uio_offset = f_offset;
      auio.uio_segflg = UIO_SYSSPACE;
      auio.uio_rw = UIO_WRITE;
      auio.uio_procp = NULL;
      auio.uio_resid = aiov.iov_len = iosize;
      aiov.iov_base = (caddr_t) ioaddr;
+ #endif
  #if 1				/* USV [ */
      {
  	/* 
***************
*** 699,705 ****
  #endif /* ] USV */
  
      AFS_GLOCK();
!     osi_FlushPages(tvc, ap->a_cred);	/* hold bozon lock, but not basic vnode lock */
      ObtainWriteLock(&tvc->lock, 1);
      afs_FakeOpen(tvc);
      ReleaseWriteLock(&tvc->lock);
--- 1030,1036 ----
  #endif /* ] USV */
  
      AFS_GLOCK();
!     osi_FlushPages(tvc, vop_cred);	/* hold bozon lock, but not basic vnode lock */
      ObtainWriteLock(&tvc->lock, 1);
      afs_FakeOpen(tvc);
      ReleaseWriteLock(&tvc->lock);
***************
*** 710,734 ****
      afs_FakeClose(tvc, cred);
      ReleaseWriteLock(&tvc->lock);
      AFS_GUNLOCK();
!     kernel_upl_unmap(kernel_map, pl);
      if (!nocommit) {
  	if (code)
! 	    kernel_upl_abort_range(pl, pl_offset, size,
  				   UPL_ABORT_FREE_ON_EMPTY);
  	else
! 	    kernel_upl_commit_range(pl, pl_offset, size,
  				    UPL_COMMIT_CLEAR_DIRTY |
! 				    UPL_COMMIT_FREE_ON_EMPTY,
! 				    UPL_GET_INTERNAL_PAGE_LIST(pl),
! 				    MAX_UPL_TRANSFER);
      }
  
      return code;
  }
  
  int
  afs_vop_ioctl(ap)
!      struct vop_ioctl_args	/* {
  				 * struct vnode *a_vp;
  				 * int  a_command;
  				 * caddr_t  a_data;
--- 1041,1066 ----
      afs_FakeClose(tvc, cred);
      ReleaseWriteLock(&tvc->lock);
      AFS_GUNLOCK();
!     OSI_UPL_UNMAP(pl);
      if (!nocommit) {
  	if (code)
! 	    OSI_UPL_ABORT_RANGE(pl, pl_offset, size,
  				   UPL_ABORT_FREE_ON_EMPTY);
  	else
! 	    OSI_UPL_COMMIT_RANGE(pl, pl_offset, size,
  				    UPL_COMMIT_CLEAR_DIRTY |
! 				    UPL_COMMIT_FREE_ON_EMPTY);
      }
  
+ #ifdef AFS_DARWIN80_ENV
+     uio_free(uio);
+ #endif
      return code;
  }
  
  int
  afs_vop_ioctl(ap)
!      struct VOPPROT(ioctl_args)	/* {
  				 * struct vnode *a_vp;
  				 * int  a_command;
  				 * caddr_t  a_data;
***************
*** 760,766 ****
  /* ARGSUSED */
  int
  afs_vop_select(ap)
!      struct vop_select_args	/* {
  				 * struct vnode *a_vp;
  				 * int  a_which;
  				 * int  a_fflags;
--- 1092,1098 ----
  /* ARGSUSED */
  int
  afs_vop_select(ap)
!      struct VOPPROT(select_args)	/* {
  				 * struct vnode *a_vp;
  				 * int  a_which;
  				 * int  a_fflags;
***************
*** 782,788 ****
  /* ARGSUSED */
  int
  afs_vop_mmap(ap)
!      struct vop_mmap_args	/* {
  				 * struct vnode *a_vp;
  				 * int  a_fflags;
  				 * struct ucred *a_cred;
--- 1114,1120 ----
  /* ARGSUSED */
  int
  afs_vop_mmap(ap)
!      struct VOPPROT(mmap_args)	/* {
  				 * struct vnode *a_vp;
  				 * int  a_fflags;
  				 * struct ucred *a_cred;
***************
*** 794,800 ****
  
  int
  afs_vop_fsync(ap)
!      struct vop_fsync_args	/* {
  				 * struct vnode *a_vp;
  				 * struct ucred *a_cred;
  				 * int a_waitfor;
--- 1126,1132 ----
  
  int
  afs_vop_fsync(ap)
!      struct VOPPROT(fsync_args)	/* {
  				 * struct vnode *a_vp;
  				 * struct ucred *a_cred;
  				 * int a_waitfor;
***************
*** 808,824 ****
  
      /* afs_vop_lookup glocks, can call us through vinvalbuf from GetVCache */
      if (!haveGlock) AFS_GLOCK();
!     if (ap->a_cred)
! 	error = afs_fsync(VTOAFS(vp), ap->a_cred);
      else
  	error = afs_fsync(VTOAFS(vp), &afs_osi_cred);
      if (!haveGlock) AFS_GUNLOCK();
      return error;
  }
  
  int
  afs_vop_seek(ap)
!      struct vop_seek_args	/* {
  				 * struct vnode *a_vp;
  				 * off_t  a_oldoff;
  				 * off_t  a_newoff;
--- 1140,1157 ----
  
      /* afs_vop_lookup glocks, can call us through vinvalbuf from GetVCache */
      if (!haveGlock) AFS_GLOCK();
!     if (vop_cred)
! 	error = afs_fsync(VTOAFS(vp), vop_cred);
      else
  	error = afs_fsync(VTOAFS(vp), &afs_osi_cred);
      if (!haveGlock) AFS_GUNLOCK();
      return error;
  }
  
+ #ifndef AFS_DARWIN80_ENV
  int
  afs_vop_seek(ap)
!      struct VOPPROT(seek_args)	/* {
  				 * struct vnode *a_vp;
  				 * off_t  a_oldoff;
  				 * off_t  a_newoff;
***************
*** 829,838 ****
  	return EINVAL;
      return (0);
  }
  
  int
  afs_vop_remove(ap)
!      struct vop_remove_args	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode *a_vp;
  				 * struct componentname *a_cnp;
--- 1162,1172 ----
  	return EINVAL;
      return (0);
  }
+ #endif
  
  int
  afs_vop_remove(ap)
!      struct VOPPROT(remove_args)	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode *a_vp;
  				 * struct componentname *a_cnp;
***************
*** 842,874 ****
      register struct vnode *vp = ap->a_vp;
      register struct vnode *dvp = ap->a_dvp;
  
      GETNAME();
      AFS_GLOCK();
!     error = afs_remove(VTOAFS(dvp), name, cnp->cn_cred);
      AFS_GUNLOCK();
      cache_purge(vp);
-     vput(dvp);
      if (!error) {
          /* necessary so we don't deadlock ourselves in vclean */
          VOP_UNLOCK(vp, 0, cnp->cn_proc);
  
  	/* If crashes continue in ubc_hold, comment this out */
          (void)ubc_uncache(vp);
      }
  
      if (dvp == vp)
  	vrele(vp);
      else
  	vput(vp);
  
      FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
      DROPNAME();
      return error;
  }
  
  int
  afs_vop_link(ap)
!      struct vop_link_args	/* {
  				 * struct vnode *a_vp;
  				 * struct vnode *a_tdvp;
  				 * struct componentname *a_cnp;
--- 1176,1226 ----
      register struct vnode *vp = ap->a_vp;
      register struct vnode *dvp = ap->a_dvp;
  
+ #ifdef AFS_DARWIN80_ENV
+     if (ap->a_flags & VNODE_REMOVE_NODELETEBUSY) {
+             /* Caller requested Carbon delete semantics */
+             if (vnode_isinuse(vp, 0)) {
+                     return EBUSY;
+             }
+     }
+ #endif
+ 
      GETNAME();
      AFS_GLOCK();
!     error = afs_remove(VTOAFS(dvp), name, vop_cn_cred);
      AFS_GUNLOCK();
      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);
  
  	/* If crashes continue in ubc_hold, comment this out */
          (void)ubc_uncache(vp);
+ #endif
      }
  
+ #ifndef AFS_DARWIN80_ENV
+     vput(dvp);
      if (dvp == vp)
  	vrele(vp);
      else
  	vput(vp);
+ #endif
  
+ #ifndef AFS_DARWIN80_ENV
      FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
+ #endif
      DROPNAME();
      return error;
  }
  
  int
  afs_vop_link(ap)
!      struct VOPPROT(link_args)	/* {
  				 * struct vnode *a_vp;
  				 * struct vnode *a_tdvp;
  				 * struct componentname *a_cnp;
***************
*** 880,910 ****
      struct proc *p;
  
      GETNAME();
!     p = cnp->cn_proc;
!     if (vp->v_type == VDIR) {
  	VOP_ABORTOP(vp, cnp);
  	error = EISDIR;
  	goto out;
      }
      if (error = vn_lock(vp, LK_EXCLUSIVE, p)) {
  	VOP_ABORTOP(dvp, cnp);
  	goto out;
      }
      AFS_GLOCK();
!     error = afs_link(VTOAFS(vp), VTOAFS(dvp), name, cnp->cn_cred);
      AFS_GUNLOCK();
      FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
      if (dvp != vp)
  	VOP_UNLOCK(vp, 0, p);
    out:
      vput(dvp);
      DROPNAME();
      return error;
  }
  
  int
  afs_vop_rename(ap)
!      struct vop_rename_args	/* {
  				 * struct vnode *a_fdvp;
  				 * struct vnode *a_fvp;
  				 * struct componentname *a_fcnp;
--- 1232,1270 ----
      struct proc *p;
  
      GETNAME();
!     p = vop_cn_proc;
!     if (vnode_isdir(vp)) {
  	VOP_ABORTOP(vp, cnp);
  	error = EISDIR;
  	goto out;
      }
+ #ifndef AFS_DARWIN80_ENV
      if (error = vn_lock(vp, LK_EXCLUSIVE, p)) {
  	VOP_ABORTOP(dvp, cnp);
  	goto out;
      }
+ #endif
      AFS_GLOCK();
!     error = afs_link(VTOAFS(vp), VTOAFS(dvp), name, vop_cn_cred);
      AFS_GUNLOCK();
+ #ifndef AFS_DARWIN80_ENV
      FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
+ #endif
+ #ifndef AFS_DARWIN80_ENV
      if (dvp != vp)
  	VOP_UNLOCK(vp, 0, p);
+ #endif
    out:
+ #ifndef AFS_DARWIN80_ENV
      vput(dvp);
+ #endif
      DROPNAME();
      return error;
  }
  
  int
  afs_vop_rename(ap)
!      struct VOPPROT(rename_args)	/* {
  				 * struct vnode *a_fdvp;
  				 * struct vnode *a_fvp;
  				 * struct componentname *a_fcnp;
***************
*** 922,929 ****
      register struct vnode *tdvp = ap->a_tdvp;
      struct vnode *fvp = ap->a_fvp;
      register struct vnode *fdvp = ap->a_fdvp;
!     struct proc *p = fcnp->cn_proc;
  
      /* Check for cross-device rename.
       * For AFS, this means anything not in AFS-space
       */
--- 1282,1296 ----
      register struct vnode *tdvp = ap->a_tdvp;
      struct vnode *fvp = ap->a_fvp;
      register struct vnode *fdvp = ap->a_fdvp;
!     struct proc *p; 
  
+     p = cn_proc(fcnp);
+ 
+ #ifdef AFS_DARWIN80_ENV
+ /* generic code tests for v_mount equality, so we don't have to, but we don't
+    get the multiple-mount "benefits" of the old behavior
+ */
+ #else
      /* Check for cross-device rename.
       * For AFS, this means anything not in AFS-space
       */
***************
*** 932,945 ****
  	error = EXDEV;
  	goto abortit;
      }
  
      /*
       * if fvp == tvp, we're just removing one name of a pair of
       * directory entries for the same element.  convert call into rename.
       ( (pinched from NetBSD 1.0's ufs_rename())
       */
      if (fvp == tvp) {
! 	if (fvp->v_type == VDIR) {
  	    error = EINVAL;
  	  abortit:
  	    VOP_ABORTOP(tdvp, tcnp);	/* XXX, why not in NFS? */
--- 1299,1317 ----
  	error = EXDEV;
  	goto abortit;
      }
+ #endif
  
+ #ifdef AFS_DARWIN80_ENV
+    /* the generic code doesn't do this, so we really should, but all the
+       vrele's are wrong... */
+ #else
      /*
       * if fvp == tvp, we're just removing one name of a pair of
       * directory entries for the same element.  convert call into rename.
       ( (pinched from NetBSD 1.0's ufs_rename())
       */
      if (fvp == tvp) {
! 	if (vnode_isdir(fvp)) {
  	    error = EINVAL;
  	  abortit:
  	    VOP_ABORTOP(tdvp, tcnp);	/* XXX, why not in NFS? */
***************
*** 959,966 ****
  	VOP_ABORTOP(tdvp, tcnp);
  	vput(tdvp);
  	vput(tvp);
- 
  	/* Delete source. */
  	vrele(fdvp);
  	vrele(fvp);
  	fcnp->cn_flags &= ~MODMASK;
--- 1331,1348 ----
  	VOP_ABORTOP(tdvp, tcnp);
  	vput(tdvp);
  	vput(tvp);
  	/* Delete source. */
+ #if defined(AFS_DARWIN80_ENV) 
+ 
+         MALLOC(fname, char *, fcnp->cn_namelen + 1, M_TEMP, M_WAITOK);
+         memcpy(fname, fcnp->cn_nameptr, fcnp->cn_namelen);
+         fname[fcnp->cn_namelen] = '\0';
+         AFS_GLOCK();
+         error = afs_remove(VTOAFS(fdvp), fname, vop_cn_cred);
+         AFS_GUNLOCK();
+         FREE(fname, M_TEMP);
+         cache_purge(fvp);
+ #else
  	vrele(fdvp);
  	vrele(fvp);
  	fcnp->cn_flags &= ~MODMASK;
***************
*** 976,983 ****
          if (fvp == NULL) {
  	    return (ENOENT);
          }
-         
          error=VOP_REMOVE(fdvp, fvp, fcnp);
          if (fdvp == fvp)
              vrele(fdvp);
          else
--- 1358,1366 ----
          if (fvp == NULL) {
  	    return (ENOENT);
          }
          error=VOP_REMOVE(fdvp, fvp, fcnp);
+ #endif
+         
          if (fdvp == fvp)
              vrele(fdvp);
          else
***************
*** 985,992 ****
--- 1368,1378 ----
          vput(fvp);
          return (error);
      }
+ #endif
+ #if !defined(AFS_DARWIN80_ENV) 
      if (error = vn_lock(fvp, LK_EXCLUSIVE, p))
  	goto abortit;
+ #endif
  
      MALLOC(fname, char *, fcnp->cn_namelen + 1, M_TEMP, M_WAITOK);
      memcpy(fname, fcnp->cn_nameptr, fcnp->cn_namelen);
***************
*** 999,1010 ****
      AFS_GLOCK();
      /* XXX use "from" or "to" creds? NFS uses "to" creds */
      error =
! 	afs_rename(VTOAFS(fdvp), fname, VTOAFS(tdvp), tname, tcnp->cn_cred);
      AFS_GUNLOCK();
  
      VOP_UNLOCK(fvp, 0, p);
      FREE(fname, M_TEMP);
      FREE(tname, M_TEMP);
      if (error)
  	goto abortit;		/* XXX */
      if (tdvp == tvp)
--- 1385,1411 ----
      AFS_GLOCK();
      /* XXX use "from" or "to" creds? NFS uses "to" creds */
      error =
! 	afs_rename(VTOAFS(fdvp), fname, VTOAFS(tdvp), tname, cn_cred(tcnp));
      AFS_GUNLOCK();
  
+ #if !defined(AFS_DARWIN80_ENV) 
      VOP_UNLOCK(fvp, 0, p);
+ #endif
      FREE(fname, M_TEMP);
      FREE(tname, M_TEMP);
+ #ifdef AFS_DARWIN80_ENV
+     cache_purge(fdvp);
+     cache_purge(fvp);
+     cache_purge(tdvp);
+     if (tvp) {
+        cache_purge(tvp);
+        if (!error) {
+           vnode_recycle(tvp);
+        }
+     }
+     if (!error)
+        cache_enter(tdvp, fvp, tcnp);
+ #else
      if (error)
  	goto abortit;		/* XXX */
      if (tdvp == tvp)
***************
*** 1015,1026 ****
  	vput(tvp);
      vrele(fdvp);
      vrele(fvp);
      return error;
  }
  
  int
  afs_vop_mkdir(ap)
!      struct vop_mkdir_args	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
  				 * struct componentname *a_cnp;
--- 1416,1428 ----
  	vput(tvp);
      vrele(fdvp);
      vrele(fvp);
+ #endif
      return error;
  }
  
  int
  afs_vop_mkdir(ap)
!      struct VOPPROT(mkdir_args)	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
  				 * struct componentname *a_cnp;
***************
*** 1034,1068 ****
      struct proc *p;
  
      GETNAME();
!     p = cnp->cn_proc;
! #ifdef DIAGNOSTIC
      if ((cnp->cn_flags & HASBUF) == 0)
  	panic("afs_vop_mkdir: no name");
  #endif
      AFS_GLOCK();
!     error = afs_mkdir(VTOAFS(dvp), name, vap, &vcp, cnp->cn_cred);
      AFS_GUNLOCK();
      if (error) {
  	VOP_ABORTOP(dvp, cnp);
  	vput(dvp);
  	DROPNAME();
  	return (error);
      }
      if (vcp) {
  	*ap->a_vpp = AFSTOV(vcp);
  	(*ap->a_vpp)->v_vfsp = dvp->v_vfsp;
  	vn_lock(*ap->a_vpp, LK_EXCLUSIVE | LK_RETRY, p);
      } else
  	*ap->a_vpp = 0;
      DROPNAME();
      FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
      vput(dvp);
      return error;
  }
  
  int
  afs_vop_rmdir(ap)
!      struct vop_rmdir_args	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode *a_vp;
  				 * struct componentname *a_cnp;
--- 1436,1479 ----
      struct proc *p;
  
      GETNAME();
!     p = vop_cn_proc;
! #if defined(DIAGNOSTIC) && !defined(AFS_DARWIN80_ENV)
      if ((cnp->cn_flags & HASBUF) == 0)
  	panic("afs_vop_mkdir: no name");
  #endif
      AFS_GLOCK();
!     error = afs_mkdir(VTOAFS(dvp), name, vap, &vcp, vop_cn_cred);
      AFS_GUNLOCK();
      if (error) {
+ #ifndef AFS_DARWIN80_ENV
  	VOP_ABORTOP(dvp, cnp);
  	vput(dvp);
+ #endif
  	DROPNAME();
  	return (error);
      }
      if (vcp) {
+ #ifdef AFS_DARWIN80_ENV
+         afs_darwin_finalizevnode(vcp, ap->a_dvp, ap->a_cnp, 0);
+ #endif
  	*ap->a_vpp = AFSTOV(vcp);
+ #ifndef AFS_DARWIN80_ENV /* XXX needed for multi-mount thing, but can't have it yet */
  	(*ap->a_vpp)->v_vfsp = dvp->v_vfsp;
  	vn_lock(*ap->a_vpp, LK_EXCLUSIVE | LK_RETRY, p);
+ #endif
      } else
  	*ap->a_vpp = 0;
      DROPNAME();
+ #ifndef AFS_DARWIN80_ENV
      FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
      vput(dvp);
+ #endif
      return error;
  }
  
  int
  afs_vop_rmdir(ap)
!      struct VOPPROT(rmdir_args)	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode *a_vp;
  				 * struct componentname *a_cnp;
***************
*** 1074,1098 ****
  
      GETNAME();
      if (dvp == vp) {
  	vrele(dvp);
  	vput(vp);
  	FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
  	DROPNAME();
  	return (EINVAL);
      }
  
      AFS_GLOCK();
!     error = afs_rmdir(VTOAFS(dvp), name, cnp->cn_cred);
      AFS_GUNLOCK();
      DROPNAME();
      vput(dvp);
      vput(vp);
      return error;
  }
  
  int
  afs_vop_symlink(ap)
!      struct vop_symlink_args	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
  				 * struct componentname *a_cnp;
--- 1485,1515 ----
  
      GETNAME();
      if (dvp == vp) {
+ #ifndef AFS_DARWIN80_ENV
  	vrele(dvp);
  	vput(vp);
  	FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
+ #endif
  	DROPNAME();
  	return (EINVAL);
      }
  
      AFS_GLOCK();
!     error = afs_rmdir(VTOAFS(dvp), name, vop_cn_cred);
      AFS_GUNLOCK();
      DROPNAME();
+     cache_purge(dvp);
+     cache_purge(vp);
+ #ifndef AFS_DARWIN80_ENV
      vput(dvp);
      vput(vp);
+ #endif
      return error;
  }
  
  int
  afs_vop_symlink(ap)
!      struct VOPPROT(symlink_args)	/* {
  				 * struct vnode *a_dvp;
  				 * struct vnode **a_vpp;
  				 * struct componentname *a_cnp;
***************
*** 1107,1123 ****
      GETNAME();
      AFS_GLOCK();
      error =
! 	afs_symlink(VTOAFS(dvp), name, ap->a_vap, ap->a_target, cnp->cn_cred);
      AFS_GUNLOCK();
      DROPNAME();
      FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
      vput(dvp);
      return error;
  }
  
  int
  afs_vop_readdir(ap)
!      struct vop_readdir_args	/* {
  				 * struct vnode *a_vp;
  				 * struct uio *a_uio;
  				 * struct ucred *a_cred;
--- 1524,1542 ----
      GETNAME();
      AFS_GLOCK();
      error =
! 	afs_symlink(VTOAFS(dvp), name, ap->a_vap, ap->a_target, vop_cn_cred);
      AFS_GUNLOCK();
      DROPNAME();
+ #ifndef AFS_DARWIN80_ENV
      FREE_ZONE(cnp->cn_pnbuf, cnp->cn_pnlen, M_NAMEI);
      vput(dvp);
+ #endif
      return error;
  }
  
  int
  afs_vop_readdir(ap)
!      struct VOPPROT(readdir_args)	/* {
  				 * struct vnode *a_vp;
  				 * struct uio *a_uio;
  				 * struct ucred *a_cred;
***************
*** 1130,1140 ****
      off_t off;
  /*    printf("readdir %x cookies %x ncookies %d\n", ap->a_vp, ap->a_cookies,
  	   ap->a_ncookies); */
!     off = ap->a_uio->uio_offset;
      AFS_GLOCK();
      error =
! 	afs_readdir(VTOAFS(ap->a_vp), ap->a_uio, ap->a_cred, ap->a_eofflag);
      AFS_GUNLOCK();
      if (!error && ap->a_ncookies != NULL) {
  	struct uio *uio = ap->a_uio;
  	const struct dirent *dp, *dp_start, *dp_end;
--- 1549,1566 ----
      off_t off;
  /*    printf("readdir %x cookies %x ncookies %d\n", ap->a_vp, ap->a_cookies,
  	   ap->a_ncookies); */
! #ifdef AFS_DARWIN80_ENV
!     /* too much work for now */
!     /* should only break nfs exports */
!     if (ap->a_flags & (VNODE_READDIR_EXTENDED | VNODE_READDIR_REQSEEKOFF))
!          return (EINVAL);
! #endif
!     off = AFS_UIO_OFFSET(ap->a_uio);
      AFS_GLOCK();
      error =
! 	afs_readdir(VTOAFS(ap->a_vp), ap->a_uio, vop_cred, ap->a_eofflag);
      AFS_GUNLOCK();
+ #ifndef AFS_DARWIN80_ENV
      if (!error && ap->a_ncookies != NULL) {
  	struct uio *uio = ap->a_uio;
  	const struct dirent *dp, *dp_start, *dp_end;
***************
*** 1161,1173 ****
  	*ap->a_cookies = cookies;
  	*ap->a_ncookies = ncookies;
      }
  
      return error;
  }
  
  int
  afs_vop_readlink(ap)
!      struct vop_readlink_args	/* {
  				 * struct vnode *a_vp;
  				 * struct uio *a_uio;
  				 * struct ucred *a_cred;
--- 1587,1600 ----
  	*ap->a_cookies = cookies;
  	*ap->a_ncookies = ncookies;
      }
+ #endif
  
      return error;
  }
  
  int
  afs_vop_readlink(ap)
!      struct VOPPROT(readlink_args)	/* {
  				 * struct vnode *a_vp;
  				 * struct uio *a_uio;
  				 * struct ucred *a_cred;
***************
*** 1176,1182 ****
      int error;
  /*    printf("readlink %x\n", ap->a_vp);*/
      AFS_GLOCK();
!     error = afs_readlink(VTOAFS(ap->a_vp), ap->a_uio, ap->a_cred);
      AFS_GUNLOCK();
      return error;
  }
--- 1603,1609 ----
      int error;
  /*    printf("readlink %x\n", ap->a_vp);*/
      AFS_GLOCK();
!     error = afs_readlink(VTOAFS(ap->a_vp), ap->a_uio, vop_cred);
      AFS_GUNLOCK();
      return error;
  }
***************
*** 1185,1237 ****
  
  int
  afs_vop_inactive(ap)
!      struct vop_inactive_args	/* {
  				 * struct vnode *a_vp;
  				 * struct proc *a_p;
  				 * } */ *ap;
  {
      register struct vnode *vp = ap->a_vp;
! 
      if (prtactive && vp->v_usecount != 0)
  	vprint("afs_vop_inactive(): pushing active", vp);
! 
!     AFS_GLOCK();
!     afs_InactiveVCache(VTOAFS(vp), 0);	/* decrs ref counts */
!     AFS_GUNLOCK();
      VOP_UNLOCK(vp, 0, ap->a_p);
      return 0;
  }
  
  int
  afs_vop_reclaim(ap)
!      struct vop_reclaim_args	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
      int error = 0;
!     int sl;
      register struct vnode *vp = ap->a_vp;
-     int haveGlock = ISAFS_GLOCK();
      struct vcache *tvc = VTOAFS(vp);
  
      cache_purge(vp);		/* just in case... */
!     if (!haveGlock)
! 	AFS_GLOCK();
!     error = afs_FlushVCache(VTOAFS(vp), &sl);	/* toss our stuff from vnode */
!     if (!haveGlock)
! 	AFS_GUNLOCK();
  
!     if (!error && vp->v_data)
! 	panic("afs_reclaim: vnode not cleaned");
!     if (!error && (tvc->v != NULL)) 
!         panic("afs_reclaim: vcache not cleaned");
  
      return error;
  }
  
  int
  afs_vop_lock(ap)
!      struct vop_lock_args	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
--- 1612,1821 ----
  
  int
  afs_vop_inactive(ap)
!      struct VOPPROT(inactive_args)	/* {
  				 * struct vnode *a_vp;
  				 * struct proc *a_p;
  				 * } */ *ap;
  {
      register struct vnode *vp = ap->a_vp;
!     struct vcache *tvc = VTOAFS(vp);
! #ifndef AFS_DARWIN80_ENV
      if (prtactive && vp->v_usecount != 0)
  	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);
+ #endif
      return 0;
  }
  
  int
  afs_vop_reclaim(ap)
!      struct VOPPROT(reclaim_args)	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
      int error = 0;
!     int sl, writelocked;
      register struct vnode *vp = ap->a_vp;
      struct vcache *tvc = VTOAFS(vp);
  
+     osi_Assert(!ISAFS_GLOCK());
      cache_purge(vp);		/* just in case... */
!     if (tvc) {
!        AFS_GLOCK();
!        writelocked = (0 == NBObtainWriteLock(&afs_xvcache, 335));
!        if (!writelocked) {
! 	   ObtainWriteLock(&afs_xvreclaim, 176);
! #ifdef AFS_DARWIN80_ENV
! 	   vnode_clearfsnode(AFSTOV(tvc));
! 	   vnode_removefsref(AFSTOV(tvc));
! #else
! 	   tvc->v->v_data = NULL;  /* remove from vnode */
! #endif
! 	   AFSTOV(tvc) = NULL;             /* also drop the ptr to vnode */
! 	   tvc->states |= CVInit; /* also CDeadVnode? */
! 	   tvc->nextfree = ReclaimedVCList;
! 	   ReclaimedVCList = tvc;
! 	   ReleaseWriteLock(&afs_xvreclaim);
!        } else {
! 	   error = afs_FlushVCache(tvc, &sl);	/* toss our stuff from vnode */
! 	   if (tvc->states & (CVInit
! #ifdef AFS_DARWIN80_ENV
! 			      | CDeadVnode
! #endif
! 		   )) {
! 	       tvc->states &= ~(CVInit
! #ifdef AFS_DARWIN80_ENV
! 				| CDeadVnode
! #endif
! 		   );
! 	       afs_osi_Wakeup(&tvc->states);
! 	   }
! 	   if (!error && vnode_fsnode(vp))
! 	       panic("afs_reclaim: vnode not cleaned");
! 	   if (!error && (tvc->v != NULL)) 
! 	       panic("afs_reclaim: vcache not cleaned");
! 	   ReleaseWriteLock(&afs_xvcache);
!        }
!        AFS_GUNLOCK();
!     }
!     return error;
! }
  
! /*
!  * Return POSIX pathconf information applicable to ufs filesystems.
!  */
! afs_vop_pathconf(ap)
!      struct VOPPROT(pathconf_args)	/* {
! 				 * struct vnode *a_vp;
! 				 * int a_name;
! 				 * int *a_retval;
! 				 * } */ *ap;
! {
!     AFS_STATCNT(afs_cntl);
!     switch (ap->a_name) {
!     case _PC_LINK_MAX:
! 	*ap->a_retval = LINK_MAX;
! 	break;
!     case _PC_NAME_MAX:
! 	*ap->a_retval = NAME_MAX;
! 	break;
!     case _PC_PATH_MAX:
! 	*ap->a_retval = PATH_MAX;
! 	break;
!     case _PC_CHOWN_RESTRICTED:
! 	*ap->a_retval = 1;
! 	break;
!     case _PC_NO_TRUNC:
! 	*ap->a_retval = 1;
! 	break;
!     case _PC_PIPE_BUF:
! 	return EINVAL;
! 	break;
! #if defined(AFS_DARWIN70_ENV)
!     case _PC_NAME_CHARS_MAX:
!         *ap->a_retval = NAME_MAX;
! 	break;
!     case _PC_CASE_SENSITIVE:
!         *ap->a_retval = 1;
! 	break;
!     case _PC_CASE_PRESERVING:
!         *ap->a_retval = 1;
! 	break;
! #endif /* defined(AFS_DARWIN70_ENV) */
!     default:
! 	return EINVAL;
!     }
!     return 0;
! }
  
+ /*
+  * Advisory record locking support (fcntl() POSIX style)
+  */
+ int
+ afs_vop_advlock(ap)
+      struct VOPPROT(advlock_args)	/* {
+ 				 * struct vnode *a_vp;
+ 				 * caddr_t  a_id;
+ 				 * int  a_op;
+ 				 * struct flock *a_fl;
+ 				 * int  a_flags;
+ 				 * } */ *ap;
+ {
+     int error;
+     struct ucred *tcr;
+     int clid;
+     int op;
+ #ifdef AFS_DARWIN80_ENV
+     proc_t p;
+     tcr=vop_cred;
+ #else
+     struct proc *p = current_proc();
+     struct ucred cr;
+     pcred_readlock(p);
+     cr = *p->p_cred->pc_ucred;
+     pcred_unlock(p);
+     tcr=&cr;
+ #endif
+     if (ap->a_flags & F_POSIX) {
+ #ifdef AFS_DARWIN80_ENV
+ 	p = (proc_t) ap->a_id;
+ 	clid = proc_pid(p);
+ #else
+ 	p = (struct proc *) ap->a_id;
+ 	clid = p->p_pid;
+ #endif
+     } else {
+ 	clid = (int)ap->a_id;
+     }
+     if (ap->a_op == F_UNLCK) {
+ 	op = F_SETLK;
+     } else if (ap->a_op == F_SETLK && ap->a_flags & F_WAIT) {
+ 	op = F_SETLKW;
+     } else {
+ 	op = ap->a_op;
+     }
+     AFS_GLOCK();
+     error = afs_lockctl(VTOAFS(ap->a_vp), ap->a_fl, op, tcr, clid);
+     AFS_GUNLOCK();
      return error;
  }
  
  int
+ afs_vop_blktooff(ap)
+      struct VOPPROT(blktooff_args)	/* {
+ 				 * struct vnode *a_vp;
+ 				 * daddr_t a_lblkno;
+ 				 * off_t *a_offset;    
+ 				 * } */ *ap;
+ {
+     *ap->a_offset = (off_t) (ap->a_lblkno * DEV_BSIZE);
+     return 0;
+ }
+ 
+ int
+ afs_vop_offtoblk(ap)
+      struct VOPPROT(offtoblk_args)	/* {
+ 				 * struct vnode *a_vp;
+ 				 * off_t a_offset;    
+ 				 * daddr_t *a_lblkno;
+ 				 * } */ *ap;
+ {
+     *ap->a_lblkno = (daddr_t) (ap->a_offset / DEV_BSIZE);
+ 
+     return (0);
+ }
+ 
+ #ifndef AFS_DARWIN80_ENV
+ int
  afs_vop_lock(ap)
!      struct VOPPROT(lock_args)	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
***************
*** 1246,1252 ****
  
  int
  afs_vop_unlock(ap)
!      struct vop_unlock_args	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
--- 1830,1836 ----
  
  int
  afs_vop_unlock(ap)
!      struct VOPPROT(unlock_args)	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
***************
*** 1260,1267 ****
  }
  
  int
  afs_vop_bmap(ap)
!      struct vop_bmap_args	/* {
  				 * struct vnode *a_vp;
  				 * daddr_t  a_bn;
  				 * struct vnode **a_vpp;
--- 1844,1878 ----
  }
  
  int
+ afs_vop_truncate(ap)
+      struct VOPPROT(truncate_args)	/* {
+ 				 * struct vnode *a_vp;
+ 				 * off_t a_length;
+ 				 * int a_flags;
+ 				 * struct ucred *a_cred;
+ 				 * struct proc *a_p;
+ 				 * } */ *ap;
+ {
+     printf("stray afs_vop_truncate\n");
+     return EOPNOTSUPP;
+ }
+ 
+ int
+ afs_vop_update(ap)
+      struct VOPPROT(update_args)	/* {
+ 				 * struct vnode *a_vp;
+ 				 * struct timeval *a_access;
+ 				 * struct timeval *a_modify;
+ 				 * int a_waitfor;
+ 				 * } */ *ap;
+ {
+     printf("stray afs_vop_update\n");
+     return EOPNOTSUPP;
+ }
+ 
+ int
  afs_vop_bmap(ap)
!      struct VOPPROT(bmap_args)	/* {
  				 * struct vnode *a_vp;
  				 * daddr_t  a_bn;
  				 * struct vnode **a_vpp;
***************
*** 1289,1295 ****
  
  int
  afs_vop_strategy(ap)
!      struct vop_strategy_args	/* {
  				 * struct buf *a_bp;
  				 * } */ *ap;
  {
--- 1900,1906 ----
  
  int
  afs_vop_strategy(ap)
!      struct VOPPROT(strategy_args)	/* {
  				 * struct buf *a_bp;
  				 * } */ *ap;
  {
***************
*** 1302,1308 ****
  
  int
  afs_vop_print(ap)
!      struct vop_print_args	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
--- 1913,1919 ----
  
  int
  afs_vop_print(ap)
!      struct VOPPROT(print_args)	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
***************
*** 1336,1342 ****
  
  int
  afs_vop_islocked(ap)
!      struct vop_islocked_args	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
--- 1947,1953 ----
  
  int
  afs_vop_islocked(ap)
!      struct VOPPROT(islocked_args)	/* {
  				 * struct vnode *a_vp;
  				 * } */ *ap;
  {
***************
*** 1344,1477 ****
      return lockstatus(&vc->rwlock);
  }
  
- /*
-  * Return POSIX pathconf information applicable to ufs filesystems.
-  */
- afs_vop_pathconf(ap)
-      struct vop_pathconf_args	/* {
- 				 * struct vnode *a_vp;
- 				 * int a_name;
- 				 * int *a_retval;
- 				 * } */ *ap;
- {
-     AFS_STATCNT(afs_cntl);
-     switch (ap->a_name) {
-     case _PC_LINK_MAX:
- 	*ap->a_retval = LINK_MAX;
- 	break;
-     case _PC_NAME_MAX:
- 	*ap->a_retval = NAME_MAX;
- 	break;
-     case _PC_PATH_MAX:
- 	*ap->a_retval = PATH_MAX;
- 	break;
-     case _PC_CHOWN_RESTRICTED:
- 	*ap->a_retval = 1;
- 	break;
-     case _PC_NO_TRUNC:
- 	*ap->a_retval = 1;
- 	break;
-     case _PC_PIPE_BUF:
- 	return EINVAL;
- 	break;
- #if defined(AFS_DARWIN70_ENV)
-     case _PC_NAME_CHARS_MAX:
-         *ap->a_retval = NAME_MAX;
- 	break;
-     case _PC_CASE_SENSITIVE:
-         *ap->a_retval = 1;
- 	break;
-     case _PC_CASE_PRESERVING:
-         *ap->a_retval = 1;
- 	break;
- #endif /* defined(AFS_DARWIN70_ENV) */
-     default:
- 	return EINVAL;
-     }
-     return 0;
- }
- 
- /*
-  * Advisory record locking support (fcntl() POSIX style)
-  */
- int
- afs_vop_advlock(ap)
-      struct vop_advlock_args	/* {
- 				 * struct vnode *a_vp;
- 				 * caddr_t  a_id;
- 				 * int  a_op;
- 				 * struct flock *a_fl;
- 				 * int  a_flags;
- 				 * } */ *ap;
- {
-     int error;
-     struct proc *p = current_proc();
-     struct ucred cr;
-     pcred_readlock(p);
-     cr = *p->p_cred->pc_ucred;
-     pcred_unlock(p);
-     AFS_GLOCK();
-     error =
- 	afs_lockctl(VTOAFS(ap->a_vp), ap->a_fl, ap->a_op, &cr, (int)ap->a_id);
-     AFS_GUNLOCK();
-     return error;
- }
- 
- int
- afs_vop_truncate(ap)
-      struct vop_truncate_args	/* {
- 				 * struct vnode *a_vp;
- 				 * off_t a_length;
- 				 * int a_flags;
- 				 * struct ucred *a_cred;
- 				 * struct proc *a_p;
- 				 * } */ *ap;
- {
-     printf("stray afs_vop_truncate\n");
-     return EOPNOTSUPP;
- }
- 
- int
- afs_vop_update(ap)
-      struct vop_update_args	/* {
- 				 * struct vnode *a_vp;
- 				 * struct timeval *a_access;
- 				 * struct timeval *a_modify;
- 				 * int a_waitfor;
- 				 * } */ *ap;
- {
-     printf("stray afs_vop_update\n");
-     return EOPNOTSUPP;
- }
- 
- int
- afs_vop_blktooff(ap)
-      struct vop_blktooff_args	/* {
- 				 * struct vnode *a_vp;
- 				 * daddr_t a_lblkno;
- 				 * off_t *a_offset;    
- 				 * } */ *ap;
- {
-     *ap->a_offset = (off_t) (ap->a_lblkno * DEV_BSIZE);
-     return 0;
- }
- 
- int
- afs_vop_offtoblk(ap)
-      struct vop_offtoblk_args	/* {
- 				 * struct vnode *a_vp;
- 				 * off_t a_offset;    
- 				 * daddr_t *a_lblkno;
- 				 * } */ *ap;
- {
-     *ap->a_lblkno = (daddr_t) (ap->a_offset / DEV_BSIZE);
- 
-     return (0);
- }
- 
  int
  afs_vop_cmap(ap)
!      struct vop_cmap_args	/* {
  				 * struct vnode *a_vp;
  				 * off_t a_foffset;    
  				 * size_t a_size;
--- 1955,1963 ----
      return lockstatus(&vc->rwlock);
  }
  
  int
  afs_vop_cmap(ap)
!      struct VOPPROT(cmap_args)	/* {
  				 * struct vnode *a_vp;
  				 * off_t a_foffset;    
  				 * size_t a_size;
***************
*** 1484,1496 ****
      *ap->a_run = MAX(ap->a_size, AFS_CHUNKSIZE(ap->a_foffset));
      return 0;
  }
  
! void
! afs_darwin_getnewvnode(struct vcache *tvc)
  {
!     while (getnewvnode(VT_AFS, afs_globalVFS, afs_vnodeop_p, &tvc->v)) {
          /* no vnodes available, force an alloc (limits be damned)! */
  	printf("failed to get vnode\n");
      }
!     tvc->v->v_data = (void *)tvc;
  }
--- 1970,2099 ----
      *ap->a_run = MAX(ap->a_size, AFS_CHUNKSIZE(ap->a_foffset));
      return 0;
  }
+ #endif
  
! int
! afs_darwin_getnewvnode(struct vcache *avc)
  {
! #ifdef AFS_DARWIN80_ENV
!     vnode_t vp;
!     int error, dead;
!     struct vnode_fsparam par;
! 
!     memset(&par, 0, sizeof(struct vnode_fsparam));
! #if 0
!     AFS_GLOCK();
!     ObtainWriteLock(&avc->lock,342);
!     if (avc->states & CStatd) { 
!        par.vnfs_vtype = avc->m.Type;
!        par.vnfs_vops = afs_vnodeop_p;
!        par.vnfs_filesize = avc->m.Length;
!        if (!ac->cnp)
!            par.vnfs_flags = VNFS_NOCACHE;
!        dead = 0;
!     } else {
!        par.vnfs_vtype = VNON;
!        par.vnfs_vops = afs_dead_vnodeop_p;
!        par.vnfs_flags = VNFS_NOCACHE|VNFS_CANTCACHE;
!        dead = 1;
!     }
!     ReleaseWriteLock(&avc->lock);
!     AFS_GUNLOCK();
!     par.vnfs_dvp = ac->dvp;
!     par.vnfs_cnp = ac->cnp;
!     par.vnfs_markroot = ac->markroot;
! #else
!     par.vnfs_vtype = VNON;
!     par.vnfs_vops = afs_dead_vnodeop_p;
!     par.vnfs_flags = VNFS_NOCACHE|VNFS_CANTCACHE;
! #endif
!     par.vnfs_mp = afs_globalVFS;
!     par.vnfs_fsnode = avc;
! 
!     error = vnode_create(VNCREATE_FLAVOR, VCREATESIZE, &par, &vp);
!     if (!error) {
!       vnode_addfsref(vp);
!       vnode_ref(vp);
!       avc->v = vp;
! #if 0
!       if (dead) {
!          vnode_recycle(vp); /* terminate as soon as iocount drops */
!          avc->states |= CDeadVnode;
!       } else if (!ac->markroot && !ac->cnp) {
!        /* the caller doesn't know anything about this vnode. if markroot
!           should have been set and wasn't, bad things may happen, so encourage
!           it to recycle */
!           vnode_recycle(vp);
!       }
! #else
!       vnode_recycle(vp); /* terminate as soon as iocount drops */
!       avc->states |= CDeadVnode;
! #endif
!     }
!     return error;
! #else
!     while (getnewvnode(VT_AFS, afs_globalVFS, afs_vnodeop_p, &avc->v)) {
          /* no vnodes available, force an alloc (limits be damned)! */
  	printf("failed to get vnode\n");
      }
!     avc->v->v_data = (void *)avc;
!     return 0;
! #endif
  }
+ #ifdef AFS_DARWIN80_ENV
+ /* if this fails, then tvc has been unrefed and may have been freed. 
+    Don't touch! */
+ int 
+ afs_darwin_finalizevnode(struct vcache *avc, struct vnode *dvp, struct componentname *cnp, int isroot) {
+    vnode_t ovp = AFSTOV(avc);
+    vnode_t nvp;
+    int error;
+    struct vnode_fsparam par;
+    AFS_GLOCK();
+    ObtainWriteLock(&avc->lock,325);
+    if (!(avc->states & CDeadVnode) && vnode_vtype(ovp) != VNON) {
+         ReleaseWriteLock(&avc->lock);
+         AFS_GUNLOCK();
+ #if 0 /* unsupported */
+         if (dvp && cnp)
+         vnode_update_identity(ovp, dvp, cnp->cn_nameptr, cnp->cn_namelen,
+                               cnp->cn_hash,
+                               VNODE_UPDATE_PARENT|VNODE_UPDATE_NAME);
+ #endif
+         vnode_rele(ovp);
+         return 0;
+    }
+    if ((avc->states & CDeadVnode) && vnode_vtype(ovp) != VNON) 
+        panic("vcache %p should not be CDeadVnode", avc);
+    AFS_GUNLOCK();
+    memset(&par, 0, sizeof(struct vnode_fsparam));
+    par.vnfs_mp = afs_globalVFS;
+    par.vnfs_vtype = avc->m.Type;
+    par.vnfs_vops = afs_vnodeop_p;
+    par.vnfs_filesize = avc->m.Length;
+    par.vnfs_fsnode = avc;
+    par.vnfs_dvp = dvp;
+    if (cnp && (cnp->cn_flags & ISDOTDOT) == 0)
+        par.vnfs_cnp = cnp;
+    if (!dvp || !cnp || (cnp->cn_flags & MAKEENTRY) == 0)
+        par.vnfs_flags = VNFS_NOCACHE;
+    if (isroot)
+        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);
+    if (!error)
+       afs_osi_Wakeup(&avc->states);
+    AFS_GUNLOCK();
+    vnode_put(ovp);
+    vnode_rele(ovp);
+    return error;
+ }
+ #endif
Index: openafs/src/afs/DOC/afs_rwlocks
diff -c openafs/src/afs/DOC/afs_rwlocks:1.3 openafs/src/afs/DOC/afs_rwlocks:1.3.8.1
*** openafs/src/afs/DOC/afs_rwlocks:1.3	Wed Nov 21 11:01:22 2001
--- openafs/src/afs/DOC/afs_rwlocks	Thu Jan 26 11:04:49 2006
***************
*** 33,38 ****
--- 33,40 ----
  holding either of this lock, unless, as in afs_create, the cache entry
  is actually created while the afs_xvcache is held.
  
+ 6a. afs_xvreclaim. Protects the lookaside reclaim list. Locked inside xvcache in FlushReclaimedVcaches via NewVCache or the 1 min loop.
+ 
  7. afs_xvcb.  Volume callback lock.  Locked before afs_xserver in
  afs_RemoveVCB.
  
Index: openafs/src/afs/HPUX/osi_inode.c
diff -c openafs/src/afs/HPUX/osi_inode.c:1.8 openafs/src/afs/HPUX/osi_inode.c:1.8.2.2
*** openafs/src/afs/HPUX/osi_inode.c:1.8	Wed Jul 28 23:13:47 2004
--- openafs/src/afs/HPUX/osi_inode.c	Fri Feb 17 12:35:33 2006
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/HPUX/osi_inode.c,v 1.8 2004/07/29 03:13:47 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/HPUX/osi_inode.c,v 1.8.2.2 2006/02/17 17:35:33 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 128,133 ****
--- 128,134 ----
      int dummy;
      extern struct fileops vnodefops;
      register int code;
+     int fd;
  
      AFS_STATCNT(afs_syscall_iopen);
  
***************
*** 144,149 ****
--- 145,151 ----
  	iput(ip);
  	goto out;
      }
+     fd = u.u_r.r_val1;
      iunlock(ip);
  
      fp->f_ops = &vnodefops;
***************
*** 175,181 ****
       * called by falloc(), which is called above.
       */
      if (is_multithreaded(u.u_procp)) {
- 	int fd = (int)u.u_r.r_val1;
  	putf(fd);
      }
  
--- 177,182 ----
Index: openafs/src/afs/IRIX/osi_machdep.h
diff -c openafs/src/afs/IRIX/osi_machdep.h:1.7.2.2 openafs/src/afs/IRIX/osi_machdep.h:1.7.2.3
*** openafs/src/afs/IRIX/osi_machdep.h:1.7.2.2	Wed Apr 13 22:31:38 2005
--- openafs/src/afs/IRIX/osi_machdep.h	Thu Apr 13 17:09:55 2006
***************
*** 43,48 ****
--- 43,49 ----
  #define vfs_data vfs_bh.bh_first->bd_pdata
  #endif /* AFS_SGI64_ENV */
  
+ #define ifnet_flags(x) (x?(x)->if_flags:0)
  
  /*
   * Global lock, semaphore, mutex and state vector support.
Index: openafs/src/afs/LINUX/osi_file.c
diff -c openafs/src/afs/LINUX/osi_file.c:1.19.2.8 openafs/src/afs/LINUX/osi_file.c:1.19.2.9
*** openafs/src/afs/LINUX/osi_file.c:1.19.2.8	Mon Jul 11 15:29:56 2005
--- openafs/src/afs/LINUX/osi_file.c	Wed Feb 15 16:03:38 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.19.2.8 2005/07/11 19:29:56 shadow Exp $");
  
  #ifdef AFS_LINUX24_ENV
  #include "h/module.h" /* early to avoid printf->printk mapping */
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_file.c,v 1.19.2.9 2006/02/15 21:03:38 shadow Exp $");
  
  #ifdef AFS_LINUX24_ENV
  #include "h/module.h" /* early to avoid printf->printk mapping */
***************
*** 204,210 ****
--- 204,214 ----
  #ifdef STRUCT_INODE_HAS_I_ALLOC_SEM
      down_write(&inode->i_alloc_sem);
  #endif
+ #ifdef STRUCT_INODE_HAS_I_MUTEX
+     mutex_lock(&inode->i_mutex);
+ #else
      down(&inode->i_sem);
+ #endif
      newattrs.ia_size = asize;
      newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
  #if defined(AFS_LINUX24_ENV)
***************
*** 234,240 ****
--- 238,248 ----
      }
  #endif
      code = -code;
+ #ifdef STRUCT_INODE_HAS_I_MUTEX
+     mutex_unlock(&inode->i_mutex);
+ #else
      up(&inode->i_sem);
+ #endif
  #ifdef STRUCT_INODE_HAS_I_ALLOC_SEM
      up_write(&inode->i_alloc_sem);
  #endif
Index: openafs/src/afs/LINUX/osi_machdep.h
diff -c openafs/src/afs/LINUX/osi_machdep.h:1.22.2.11 openafs/src/afs/LINUX/osi_machdep.h:1.22.2.12
*** openafs/src/afs/LINUX/osi_machdep.h:1.22.2.11	Mon Jul 11 15:29:56 2005
--- openafs/src/afs/LINUX/osi_machdep.h	Thu Mar  9 16:41:54 2006
***************
*** 187,201 ****
  #define afs_linux_page_address(page) (afs_linux_page_offset + PAGE_SIZE * (page - mem_map))
  
  #if defined(__KERNEL__)
! #include "../h/sched.h"
! #include "linux/wait.h"
  
  extern struct semaphore afs_global_lock;
  extern int afs_global_owner;
  
  #define AFS_GLOCK() \
  do { \
! 	 down(&afs_global_lock); \
  	 if (afs_global_owner) \
  	     osi_Panic("afs_global_lock already held by pid %d", \
  		       afs_global_owner); \
--- 187,208 ----
  #define afs_linux_page_address(page) (afs_linux_page_offset + PAGE_SIZE * (page - mem_map))
  
  #if defined(__KERNEL__)
! #include <linux/version.h>
! #include <linux/sched.h>
! #include <linux/wait.h>
  
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+ extern struct mutex afs_global_lock;
+ #else
  extern struct semaphore afs_global_lock;
+ #define mutex_lock(lock) down(lock)
+ #define mutex_unlock(lock) up(lock)
+ #endif
  extern int afs_global_owner;
  
  #define AFS_GLOCK() \
  do { \
! 	 mutex_lock(&afs_global_lock); \
  	 if (afs_global_owner) \
  	     osi_Panic("afs_global_lock already held by pid %d", \
  		       afs_global_owner); \
***************
*** 209,218 ****
      if (!ISAFS_GLOCK()) \
  	osi_Panic("afs global lock not held at %s:%d", __FILE__, __LINE__); \
      afs_global_owner = 0; \
!     up(&afs_global_lock); \
  } while (0)
- 
- 
  #else
  #define AFS_GLOCK()
  #define AFS_GUNLOCK()
--- 216,223 ----
      if (!ISAFS_GLOCK()) \
  	osi_Panic("afs global lock not held at %s:%d", __FILE__, __LINE__); \
      afs_global_owner = 0; \
!     mutex_unlock(&afs_global_lock); \
  } while (0)
  #else
  #define AFS_GLOCK()
  #define AFS_GUNLOCK()
Index: openafs/src/afs/LINUX/osi_module.c
diff -c openafs/src/afs/LINUX/osi_module.c:1.52.2.19 openafs/src/afs/LINUX/osi_module.c:1.52.2.23
*** openafs/src/afs/LINUX/osi_module.c:1.52.2.19	Mon Jul 11 15:29:56 2005
--- openafs/src/afs/LINUX/osi_module.c	Thu Mar  9 16:41:54 2006
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_module.c,v 1.52.2.19 2005/07/11 19:29:56 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.23 2006/03/09 21:41:54 shadow Exp $");
  
  #include <linux/module.h> /* early to avoid printf->printk mapping */
  #include "afs/sysincludes.h"
***************
*** 24,30 ****
  #include "h/mm.h"
  
  #ifdef AFS_AMD64_LINUX20_ENV
! #include "../asm/ia32_unistd.h"
  #endif
  
  #include <linux/proc_fs.h>
--- 24,33 ----
  #include "h/mm.h"
  
  #ifdef AFS_AMD64_LINUX20_ENV
! #include <asm/ia32_unistd.h>
! #endif
! #ifdef AFS_SPARC64_LINUX20_ENV
! #include <linux/ioctl32.h>
  #endif
  
  #include <linux/proc_fs.h>
***************
*** 32,37 ****
--- 35,41 ----
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
  #include <linux/init.h>
  #include <linux/sched.h>
+ #include <linux/kernel.h>
  #endif
  
  #ifdef HAVE_KERNEL_LINUX_SEQ_FILE_H
***************
*** 44,50 ****
  static long get_page_offset(void);
  #endif
  
! #if defined(AFS_LINUX24_ENV)
  DECLARE_MUTEX(afs_global_lock);
  #else
  struct semaphore afs_global_lock = MUTEX;
--- 48,56 ----
  static long get_page_offset(void);
  #endif
  
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! DEFINE_MUTEX(afs_global_lock);
! #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
  DECLARE_MUTEX(afs_global_lock);
  #else
  struct semaphore afs_global_lock = MUTEX;
***************
*** 283,311 ****
      if (cmd != VIOC_SYSCALL && cmd != VIOC_SYSCALL32) return -EINVAL;
  
  #ifdef NEED_IOCTL32
  #ifdef AFS_SPARC64_LINUX24_ENV
      if (current->thread.flags & SPARC_FLAG_32BIT)
  #elif defined(AFS_SPARC64_LINUX20_ENV)
      if (current->tss.flags & SPARC_FLAG_32BIT)
  #elif defined(AFS_AMD64_LINUX20_ENV)
- #ifdef AFS_LINUX26_ENV
-     if (test_thread_flag(TIF_IA32))
- #else
      if (current->thread.flags & THREAD_IA32)
- #endif
  #elif defined(AFS_PPC64_LINUX20_ENV)
- #ifdef AFS_PPC64_LINUX26_ENV
-     if (current->thread_info->flags & _TIF_32BIT)
- #else /*Linux 2.6 */
      if (current->thread.flags & PPC_FLAG_32BIT)
- #endif
- #elif defined(AFS_S390X_LINUX26_ENV)
-     if (test_thread_flag(TIF_31BIT))
  #elif defined(AFS_S390X_LINUX20_ENV)
      if (current->thread.flags & S390_FLAG_31BIT)
  #else
  #error Not done for this linux type
! #endif
      {
  	if (copy_from_user(&sysargs32, (void *)arg,
  			   sizeof(struct afsprocdata32)))
--- 289,317 ----
      if (cmd != VIOC_SYSCALL && cmd != VIOC_SYSCALL32) return -EINVAL;
  
  #ifdef NEED_IOCTL32
+ #ifdef AFS_LINUX26_ENV 
+ #ifdef AFS_S390X_LINUX26_ENV
+     if (test_thread_flag(TIF_31BIT))
+ #elif AFS_AMD64_LINUX20_ENV
+     if (test_thread_flag(TIF_IA32))
+ #else
+     if (test_thread_flag(TIF_32BIT))
+ #endif /* AFS_S390X_LINUX26_ENV */
+ #else
  #ifdef AFS_SPARC64_LINUX24_ENV
      if (current->thread.flags & SPARC_FLAG_32BIT)
  #elif defined(AFS_SPARC64_LINUX20_ENV)
      if (current->tss.flags & SPARC_FLAG_32BIT)
  #elif defined(AFS_AMD64_LINUX20_ENV)
      if (current->thread.flags & THREAD_IA32)
  #elif defined(AFS_PPC64_LINUX20_ENV)
      if (current->thread.flags & PPC_FLAG_32BIT)
  #elif defined(AFS_S390X_LINUX20_ENV)
      if (current->thread.flags & S390_FLAG_31BIT)
  #else
  #error Not done for this linux type
! #endif /* AFS_LINUX26_ENV */
! #endif /* NEED_IOCTL32 */
      {
  	if (copy_from_user(&sysargs32, (void *)arg,
  			   sizeof(struct afsprocdata32)))
Index: openafs/src/afs/LINUX/osi_probe.c
diff -c openafs/src/afs/LINUX/osi_probe.c:1.1.2.6 openafs/src/afs/LINUX/osi_probe.c:1.1.2.9
*** openafs/src/afs/LINUX/osi_probe.c:1.1.2.6	Wed Apr  6 00:58:19 2005
--- openafs/src/afs/LINUX/osi_probe.c	Fri Apr  7 01:23:11 2006
***************
*** 64,69 ****
--- 64,72 ----
  #include <linux/init.h>
  #include <linux/unistd.h>
  #include <linux/mm.h>
+ #ifdef AFS_LINUX26_ENV
+ #include <scsi/scsi.h> /* for scsi_command_size */
+ #endif
  
  #if defined(AFS_PPC64_LINUX26_ENV)
  #include <asm/abs_addr.h>
***************
*** 114,129 ****
--- 117,144 ----
  
  /* Allow the user to specify sys_call_table addresses */
  static unsigned long sys_call_table_addr[4] = { 0,0,0,0 };
+ #ifdef module_param_array
+ module_param_array(sys_call_table_addr, long, NULL, 0);
+ #else
  MODULE_PARM(sys_call_table_addr, "1-4l");
+ #endif
  MODULE_PARM_DESC(sys_call_table_addr, "Location of system call tables");
  
  /* 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");
+ #endif
  MODULE_PARM_DESC(probe_carefully, "Probe for system call tables carefully");
  
  static int probe_ignore_syscalls[8] = { -1, -1, -1, -1, -1, -1, -1, -1 };
+ #ifdef module_param_array
+ module_param_array(probe_ignore_syscalls, int, NULL, 0);
+ #else
  MODULE_PARM(probe_ignore_syscalls, "1-8i");
+ #endif
  MODULE_PARM_DESC(probe_ignore_syscalls, "Syscalls to ignore in table checks");
  
  #ifdef OSI_PROBE_DEBUG
***************
*** 138,156 ****
--- 153,187 ----
   * 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");
+ #endif
  MODULE_PARM_DESC(probe_debug, "Debugging level");
  
  static unsigned long probe_debug_addr[4] = { 0,0,0,0 };
+ #ifdef module_param_array
+ module_param_array(probe_debug_addr, long, NULL, 0);
+ #else
  MODULE_PARM(probe_debug_addr, "1-4l");
+ #endif
  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");
+ #endif
  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");
+ #endif
  MODULE_PARM_DESC(probe_debug_tag, "Debugging output start tag");
  #endif
  
***************
*** 244,249 ****
--- 275,285 ----
      unsigned long try_base_mask;    /* base address bits to force to zero */
      unsigned long try_length;       /* default length for scan */
  
+     unsigned long alt_try_sect_sym;     /* symbol in section to try scanning */
+     unsigned long alt_try_base;         /* default base address for scan */
+     unsigned long alt_try_base_mask;    /* base address bits to force to zero */
+     unsigned long alt_try_length;       /* default length for scan */
+ 
      int n_zapped_syscalls;          /* number of unimplemented system calls */
      int *zapped_syscalls;           /* list of unimplemented system calls */
  
***************
*** 505,510 ****
--- 541,555 ----
      16384,
  #endif
  
+ #ifdef AFS_LINUX26_ENV
+     (unsigned long)scsi_command_size,
+     (unsigned long)scsi_command_size,
+     0x3ffff,
+     0x30000,
+ #else
+     0, 0, 0, 0,
+ #endif
+ 
      /* number and list of unimplemented system calls */
      ((sizeof(main_zapped_syscalls)/sizeof(main_zapped_syscalls[0])) - 1),
      main_zapped_syscalls,
***************
*** 592,597 ****
--- 637,652 ----
      0,
      (0x180000 / sizeof(unsigned long *)),
  
+ #ifdef AFS_LINUX26_ENV
+     (unsigned long)scsi_command_size,
+     (unsigned long)scsi_command_size,
+     0x3ffff,
+     0x30000,
+ #else
+     0, 0, 0, 0
+ #endif
+ 
+ 
      /* number and list of unimplemented system calls */
      ((sizeof(ia32_zapped_syscalls)/sizeof(ia32_zapped_syscalls[0])) - 1),
      ia32_zapped_syscalls,
***************
*** 721,726 ****
--- 776,790 ----
      16384,
  #endif
  
+ #ifdef AFS_LINUX26_ENV
+     (unsigned long)scsi_command_size,
+     (unsigned long)scsi_command_size,
+     0x3ffff,
+     0x30000,
+ #else
+     0, 0, 0, 0
+ #endif
+ 
      /* number and list of unimplemented system calls */
      ((sizeof(sct32_zapped_syscalls)/sizeof(sct32_zapped_syscalls[0])) - 1),
      sct32_zapped_syscalls,
***************
*** 807,812 ****
--- 871,885 ----
      0xfffff,
      0x20000,
  
+ #ifdef AFS_LINUX26_ENV
+     (unsigned long)scsi_command_size,
+     (unsigned long)scsi_command_size,
+     0x3ffff,
+     0x30000,
+ #else
+     0, 0, 0, 0
+ #endif
+ 
      /* number and list of unimplemented system calls */
      ((sizeof(emu_zapped_syscalls)/sizeof(emu_zapped_syscalls[0])) - 1),
      emu_zapped_syscalls,
***************
*** 1091,1096 ****
--- 1164,1229 ----
      }                           \
  } while (0)
  #endif
+ static void *scan_for_syscall_table(probectl *P, PROBETYPE *B, unsigned long L)
+ {
+     tryctl *T;
+     void *answer;
+ #if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+     void *answer2;
+ #endif
+ #ifdef OSI_PROBE_DEBUG
+     void *final_answer = 0;
+ #endif
+ #ifdef OSI_PROBE_DEBUG
+     if (probe_debug & 0x0007)
+ 	printk("<7>osi_probe: %s                      base=0x%lx, len=0x%lx\n",
+ 	       P->symbol, (unsigned long)B, L);
+     if (probe_debug & 0x0009) {
+ 	printk("<7>osi_probe: %s                      ktxt_lower_bound=0x%lx\n",
+ 	       P->symbol, ktxt_lower_bound);
+ 	printk("<7>osi_probe: %s                      NR_syscalls=%d\n",
+ 	       P->symbol, NR_syscalls);
+     }
+ #endif
+ 
+     for (T = P->trylist; T->name; T++) {
+ 	answer = try(P, T, B, L);
+ #if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+ 	answer2 = try(P, T, (PROBETYPE *)(2 + (void *)B), L);
+ #ifdef OSI_PROBE_DEBUG
+ 	if (probe_debug & 0x0003) {
+ 	    printk("<7>osi_probe: %s = 0x%016lx %s (even)\n",
+ 		   P->symbol, (unsigned long)(answer), T->name);
+ 	    printk("<7>osi_probe: %s = 0x%016lx %s (odd)\n",
+ 		   P->symbol, (unsigned long)(answer2), T->name);
+ 	}
+ #endif
+ 	if (answer && answer2) answer = 0;
+ 	else if (answer2) answer = answer2;
+ #endif
+ 	if (answer)
+ 	    return answer;
+     }
+ 
+     /* XXX more checks here */
+ 
+     answer = try_harder(P, B, L);
+ #if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
+     answer2 = try_harder(P, (PROBETYPE *)(2 + (void *)B), L);
+ #ifdef OSI_PROBE_DEBUG
+     if (probe_debug & 0x0005) {
+ 	printk("<7>osi_probe: %s = 0x%016lx pattern scan (even)\n",
+ 	       P->symbol, (unsigned long)(answer));
+ 	printk("<7>osi_probe: %s = 0x%016lx pattern scan (odd)\n",
+ 	       P->symbol, (unsigned long)(answer2));
+     }
+ #endif
+     if (answer && answer2) answer = 0;
+     else if (answer2) answer = answer2;
+ #endif
+     return answer;
+ }
+ 
  static void *do_find_syscall_table(probectl *P, char **method)
  {
  #ifdef OSI_PROBE_KALLSYMS
***************
*** 1103,1113 ****
  #endif
      PROBETYPE *B;
      unsigned long L;
-     tryctl *T;
      void *answer;
- #if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
-     void *answer2;
- #endif
  #ifdef OSI_PROBE_DEBUG
      void *final_answer = 0;
  #endif
--- 1236,1242 ----
***************
*** 1155,1215 ****
  	}
      }
  #endif
! 
! #ifdef OSI_PROBE_DEBUG
!     if (probe_debug & 0x0007)
! 	printk("<7>osi_probe: %s                      base=0x%lx, len=0x%lx\n",
! 	       P->symbol, (unsigned long)B, L);
!     if (probe_debug & 0x0009) {
! 	printk("<7>osi_probe: %s                      ktxt_lower_bound=0x%lx\n",
! 	       P->symbol, ktxt_lower_bound);
! 	printk("<7>osi_probe: %s                      NR_syscalls=%d\n",
! 	       P->symbol, NR_syscalls);
!     }
! #endif
! 
!     for (T = P->trylist; T->name; T++) {
! 	answer = try(P, T, B, L);
! #if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
! 	answer2 = try(P, T, (PROBETYPE *)(2 + (void *)B), L);
! #ifdef OSI_PROBE_DEBUG
! 	if (probe_debug & 0x0003) {
! 	    printk("<7>osi_probe: %s = 0x%016lx %s (even)\n",
! 		   P->symbol, (unsigned long)(answer), T->name);
! 	    printk("<7>osi_probe: %s = 0x%016lx %s (odd)\n",
! 		   P->symbol, (unsigned long)(answer2), T->name);
  	}
  #endif
! 	if (answer && answer2) answer = 0;
! 	else if (answer2) answer = answer2;
! #endif
!         check_result(answer, T->name);
      }
- 
-     /* XXX more checks here */
- 
-     answer = try_harder(P, B, L);
- #if defined(AFS_S390_LINUX20_ENV) || defined(AFS_S390X_LINUX20_ENV)
-     answer2 = try_harder(P, (PROBETYPE *)(2 + (void *)B), L);
  #ifdef OSI_PROBE_DEBUG
!     if (probe_debug & 0x0005) {
! 	printk("<7>osi_probe: %s = 0x%016lx pattern scan (even)\n",
! 	       P->symbol, (unsigned long)(answer));
! 	printk("<7>osi_probe: %s = 0x%016lx pattern scan (odd)\n",
! 	       P->symbol, (unsigned long)(answer2));
!     }
  #endif
!     if (answer && answer2) answer = 0;
!     else if (answer2) answer = answer2;
  #endif
!     check_result(answer, "pattern scan");
  
! #ifdef OSI_PROBE_DEBUG
!     return final_answer;
  #else
!     return 0;
  #endif
  }
  
  void *osi_find_syscall_table(int which)
  {
--- 1284,1349 ----
  	}
      }
  #endif
!    
!     answer = scan_for_syscall_table(P, B, L);
!     check_result(answer, "pattern scan");
!     B = (PROBETYPE *)((P->alt_try_base) & ~(P->alt_try_base_mask));
!     L = P->alt_try_length;
!     /* Now, see if the kernel will tell us something better than the default */
! #ifdef OSI_PROBE_KALLSYMS
!     if (kallsyms_address_to_symbol && P->alt_try_sect_sym) {
! 	ret = kallsyms_address_to_symbol(P->alt_try_sect_sym,
! 					 &mod_name, &mod_start, &mod_end,
! 					 &sec_name, &sec_start, &sec_end,
! 					 &sym_name, &sym_start, &sym_end);
! 	if (ret) {
! 	    B = (PROBETYPE *)sec_start;
! 	    L = (sec_end - sec_start) / sizeof(unsigned long);
  	}
+     }
  #endif
!     if (B && L) {
! 	answer = scan_for_syscall_table(P, B, L);
! 	check_result(answer, "pattern scan");
      }
  #ifdef OSI_PROBE_DEBUG
!     return final_answer;
! #else
!     return 0;
  #endif
! }
! 
! #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
!     pud_t *pud;
  #endif
!     pmd_t *pmd;
!     pte_t *pte;
  
!     if (pgd_none(*pgd))
! 	return 0;
! #ifdef PUD_SIZE
!     pud = pud_offset(pgd, address);
!     if (pud_none(*pud))
! 	return 0;
!     pmd = pmd_offset(pud, address);
  #else
!     pmd = pmd_offset(pgd, address);
  #endif
+     if (pmd_none(*pmd))
+ 	return 0;
+     if (pmd_large(*pmd))
+ 	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)
  {
***************
*** 1235,1240 ****
--- 1369,1381 ----
  	return 0;
      }
      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;
+     }
+ #endif
      return answer;
  }
  
Index: openafs/src/afs/LINUX/osi_syscall.c
diff -c openafs/src/afs/LINUX/osi_syscall.c:1.1.2.6 openafs/src/afs/LINUX/osi_syscall.c:1.1.2.7
*** openafs/src/afs/LINUX/osi_syscall.c:1.1.2.6	Mon May 23 17:16:10 2005
--- openafs/src/afs/LINUX/osi_syscall.c	Tue Nov  1 19:28:17 2005
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_syscall.c,v 1.1.2.6 2005/05/23 21:16:10 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.7 2005/11/02 00:28:17 shadow Exp $");
  
  #ifdef AFS_LINUX24_ENV
  #include <linux/module.h> /* early to avoid printf->printk mapping */
***************
*** 26,32 ****
  #include "h/mm.h"
  
  #ifdef AFS_AMD64_LINUX20_ENV
! #include "../asm/ia32_unistd.h"
  #endif
  
  #include <linux/proc_fs.h>
--- 26,32 ----
  #include "h/mm.h"
  
  #ifdef AFS_AMD64_LINUX20_ENV
! #include <asm/ia32_unistd.h>
  #endif
  
  #include <linux/proc_fs.h>
Index: openafs/src/afs/LINUX/osi_vfsops.c
diff -c openafs/src/afs/LINUX/osi_vfsops.c:1.29.2.10 openafs/src/afs/LINUX/osi_vfsops.c:1.29.2.12
*** openafs/src/afs/LINUX/osi_vfsops.c:1.29.2.10	Fri Aug 19 13:51:50 2005
--- openafs/src/afs/LINUX/osi_vfsops.c	Mon Nov 28 22:20:28 2005
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vfsops.c,v 1.29.2.10 2005/08/19 17:51:50 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.12 2005/11/29 03:20:28 shadow Exp $");
  
  #define __NO_VERSION__		/* don't define kernel_version in module.h */
  #include <linux/module.h> /* early to avoid printf->printk mapping */
***************
*** 324,330 ****
  
      if (vcp->vlruq.prev || vcp->vlruq.next)
  	osi_Panic("inode freed while on LRU");
!     if (vcp->hnext || vcp->vhnext)
  	osi_Panic("inode freed while still hashed");
  
  #if !defined(STRUCT_SUPER_HAS_ALLOC_INODE)
--- 324,330 ----
  
      if (vcp->vlruq.prev || vcp->vlruq.next)
  	osi_Panic("inode freed while on LRU");
!     if (vcp->hnext)
  	osi_Panic("inode freed while still hashed");
  
  #if !defined(STRUCT_SUPER_HAS_ALLOC_INODE)
***************
*** 343,354 ****
  {
      struct vcache *vcp = VTOAFS(ip);
  
      if (VREFCOUNT(vcp) == 2) {
- 	AFS_GLOCK();
  	if (VREFCOUNT(vcp) == 2)
  	    afs_InactiveVCache(vcp, NULL);
- 	AFS_GUNLOCK();
      }
  }
  
  /* afs_put_super
--- 343,354 ----
  {
      struct vcache *vcp = VTOAFS(ip);
  
+     AFS_GLOCK();
      if (VREFCOUNT(vcp) == 2) {
  	if (VREFCOUNT(vcp) == 2)
  	    afs_InactiveVCache(vcp, NULL);
      }
+     AFS_GUNLOCK();
  }
  
  /* afs_put_super
Index: openafs/src/afs/LINUX/osi_vnodeops.c
diff -c openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.36 openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.40
*** openafs/src/afs/LINUX/osi_vnodeops.c:1.81.2.36	Sun Sep  4 00:11:55 2005
--- openafs/src/afs/LINUX/osi_vnodeops.c	Wed Jan 11 16:38:30 2006
***************
*** 22,28 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/LINUX/osi_vnodeops.c,v 1.81.2.36 2005/09/04 04:11:55 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.40 2006/01/11 21:38:30 shadow Exp $");
  
  #include "afs/sysincludes.h"
  #include "afsincludes.h"
***************
*** 126,137 ****
      }
  
      ObtainWriteLock(&vcp->lock, 530);
-     vcp->m.Date = osi_Time();	/* set modification time */
      afs_FakeClose(vcp, credp);
-     if (code >= 0)
- 	code2 = afs_DoPartialWrite(vcp, &treq);
-     if (code2 && code >= 0)
- 	code = (ssize_t) - code2;
      ReleaseWriteLock(&vcp->lock);
  
      afs_Trace4(afs_iclSetp, CM_TRACE_WRITEOP, ICL_TYPE_POINTER, vcp,
--- 126,132 ----
***************
*** 884,894 ****
  afs_linux_lookup(struct inode *dip, struct dentry *dp)
  #endif
  {
-     struct vattr vattr;
      cred_t *credp = crref();
      struct vcache *vcp = NULL;
      const char *comp = dp->d_name.name;
-     struct dentry *res = NULL;
      struct inode *ip = NULL;
      int code;
  
--- 879,887 ----
***************
*** 899,922 ****
      code = afs_lookup(VTOAFS(dip), comp, &vcp, credp);
      
      if (vcp) {
! 	ip = AFSTOV(vcp);
  
  	afs_getattr(vcp, &vattr, credp);
  	afs_fill_inode(ip, &vattr);
      }
      dp->d_op = &afs_dentry_operations;
      dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
      AFS_GUNLOCK();
  #if defined(AFS_LINUX24_ENV)
      if (ip && S_ISDIR(ip->i_mode)) {
!             d_prune_aliases(ip);
!             res = d_find_alias(ip);
      }
-     if (res) {
- 	if (d_unhashed(res))
- 	    d_rehash(res);
- 	iput(ip);
-     } else
  #endif
      d_add(dp, ip);
  
--- 892,924 ----
      code = afs_lookup(VTOAFS(dip), comp, &vcp, credp);
      
      if (vcp) {
! 	struct vattr vattr;
  
+ 	ip = AFSTOV(vcp);
  	afs_getattr(vcp, &vattr, credp);
  	afs_fill_inode(ip, &vattr);
      }
      dp->d_op = &afs_dentry_operations;
      dp->d_time = hgetlo(VTOAFS(dip)->m.DataVersion);
      AFS_GUNLOCK();
+ 
  #if defined(AFS_LINUX24_ENV)
      if (ip && S_ISDIR(ip->i_mode)) {
! 	struct dentry *alias;
! 
! 	alias = d_find_alias(ip);
! 	if (alias) {
! 	    if (d_invalidate(alias) == 0) {
! 		dput(alias);
! 	    } else {
! 		iput(ip);
! #if defined(AFS_LINUX26_ENV)
! 		unlock_kernel();
! #endif
! 		return alias;
! 	    }
! 	}
      }
  #endif
      d_add(dp, ip);
  
***************
*** 928,937 ****
      /* It's ok for the file to not be found. That's noted by the caller by
       * seeing that the dp->d_inode field is NULL.
       */
- #if defined(AFS_LINUX24_ENV)
-     if (code == 0)
-         return res;
- #endif
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,10)
      if (code == ENOENT)
  	return ERR_PTR(0);
--- 930,935 ----
***************
*** 1374,1382 ****
      ip->i_size = vcp->m.Length;
      ip->i_blocks = ((vcp->m.Length + 1023) >> 10) << 1;
  
!     if (!code
! 	&& afs_stats_cmperf.cacheCurrDirtyChunks >
! 	afs_stats_cmperf.cacheMaxDirtyChunks) {
  	struct vrequest treq;
  
  	ObtainWriteLock(&vcp->lock, 533);
--- 1372,1378 ----
      ip->i_size = vcp->m.Length;
      ip->i_blocks = ((vcp->m.Length + 1023) >> 10) << 1;
  
!     if (!code) {
  	struct vrequest treq;
  
  	ObtainWriteLock(&vcp->lock, 533);
***************
*** 1414,1420 ****
--- 1410,1420 ----
  
  #if defined(AFS_LINUX26_ENV)
      if (PageReclaim(pp)) {
+ # if defined(WRITEPAGE_ACTIVATE)
  	return WRITEPAGE_ACTIVATE;
+ # else 
+ 	return AOP_WRITEPAGE_ACTIVATE;
+ # endif
      }
  #else
      if (PageLaunder(pp)) {
***************
*** 1475,1480 ****
--- 1475,1490 ----
      ip->i_size = vcp->m.Length;
      ip->i_blocks = ((vcp->m.Length + 1023) >> 10) << 1;
  
+     if (!code) {
+ 	struct vrequest treq;
+ 
+ 	ObtainWriteLock(&vcp->lock, 533);
+ 	vcp->m.Date = osi_Time();   /* set modification time */
+ 	if (!afs_InitReq(&treq, credp))
+ 	    code = afs_DoPartialWrite(vcp, &treq);
+ 	ReleaseWriteLock(&vcp->lock);
+     }
+ 
      code = code ? -code : count - tuio.uio_resid;
      afs_Trace4(afs_iclSetp, CM_TRACE_UPDATEPAGE, ICL_TYPE_POINTER, vcp,
  	       ICL_TYPE_POINTER, pp, ICL_TYPE_INT32, page_count(pp),
Index: openafs/src/afs/SOLARIS/osi_vnodeops.c
diff -c openafs/src/afs/SOLARIS/osi_vnodeops.c:1.20.2.3.2.1 openafs/src/afs/SOLARIS/osi_vnodeops.c:1.20.2.8
*** openafs/src/afs/SOLARIS/osi_vnodeops.c:1.20.2.3.2.1	Wed Oct 12 02:06:47 2005
--- openafs/src/afs/SOLARIS/osi_vnodeops.c	Mon Feb 13 13:39:11 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.20.2.3.2.1 2005/10/12 06:06:47 shadow Exp $");
  
  /*
   * SOLARIS/osi_vnodeops.c
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/SOLARIS/osi_vnodeops.c,v 1.20.2.8 2006/02/13 18:39:11 shadow Exp $");
  
  /*
   * SOLARIS/osi_vnodeops.c
***************
*** 266,272 ****
      register struct dcache *tdc;
      int i, s, pexists;
      int slot;
!     afs_size_t offset = 0, nlen;
      struct vrequest treq;
      afs_int32 mapForRead = 0, Code = 0;
      u_offset_t toffset;
--- 266,272 ----
      register struct dcache *tdc;
      int i, s, pexists;
      int slot;
!     afs_size_t offset, nlen = 0;
      struct vrequest treq;
      afs_int32 mapForRead = 0, Code = 0;
      u_offset_t toffset;
***************
*** 457,463 ****
--- 457,467 ----
  	    buf = pageio_setup(page, PAGESIZE, vp, B_READ);	/* allocate a buf structure */
  	    buf->b_edev = 0;
  	    buf->b_dev = 0;
+ #if defined(AFS_SUN56_ENV)
+ 	    buf->b_lblkno = lbtodb(toffset);
+ #else
  	    buf->b_blkno = btodb(toffset);
+ #endif
  	    bp_mapin(buf);	/* map it in to our address space */
  
  	    AFS_GLOCK();
***************
*** 685,691 ****
--- 689,699 ----
  	    return (ENOMEM);
  
  	tbuf->b_dev = 0;
+ #if defined(AFS_SUN56_ENV)
+ 	tbuf->b_lblkno = lbtodb(pages->p_offset);
+ #else
  	tbuf->b_blkno = btodb(pages->p_offset);
+ #endif
  	bp_mapin(tbuf);
  	AFS_GLOCK();
  	afs_Trace4(afs_iclSetp, CM_TRACE_PAGEOUTONE, ICL_TYPE_LONG, avc,
***************
*** 743,749 ****
  
      afs_Trace4(afs_iclSetp, CM_TRACE_VMRW, ICL_TYPE_POINTER, (afs_int32) avc,
  	       ICL_TYPE_LONG, (arw == UIO_WRITE ? 1 : 0), ICL_TYPE_OFFSET,
! 	       ICL_HANDLE_OFFSET(auio->uio_offset), ICL_TYPE_OFFSET,
  	       ICL_HANDLE_OFFSET(auio->uio_resid));
  
  #ifndef AFS_64BIT_CLIENT
--- 751,757 ----
  
      afs_Trace4(afs_iclSetp, CM_TRACE_VMRW, ICL_TYPE_POINTER, (afs_int32) avc,
  	       ICL_TYPE_LONG, (arw == UIO_WRITE ? 1 : 0), ICL_TYPE_OFFSET,
! 	       ICL_HANDLE_OFFSET(auio->uio_loffset), ICL_TYPE_OFFSET,
  	       ICL_HANDLE_OFFSET(auio->uio_resid));
  
  #ifndef AFS_64BIT_CLIENT
***************
*** 762,770 ****
       */
      afs_MaybeWakeupTruncateDaemon();
      while ((arw == UIO_WRITE)
! 	   && (afs_blocksUsed > (CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100)) {
  	if (afs_blocksUsed - afs_blocksDiscarded >
! 	    (CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100) {
  	    afs_WaitForCacheDrain = 1;
  	    afs_osi_Sleep(&afs_WaitForCacheDrain);
  	}
--- 770,778 ----
       */
      afs_MaybeWakeupTruncateDaemon();
      while ((arw == UIO_WRITE)
! 	   && (afs_blocksUsed > PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks))) {
  	if (afs_blocksUsed - afs_blocksDiscarded >
! 	    PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks)) {
  	    afs_WaitForCacheDrain = 1;
  	    afs_osi_Sleep(&afs_WaitForCacheDrain);
  	}
***************
*** 782,793 ****
  
      /* adjust parameters when appending files */
      if ((ioflag & IO_APPEND) && arw == UIO_WRITE) {
! #if	defined(AFS_SUN56_ENV)
! 	auio->uio_loffset = 0;
! #endif
  	auio->uio_offset = avc->m.Length;	/* write at EOF position */
      }
!     if (auio->uio_offset < 0 || (auio->uio_offset + auio->uio_resid) < 0) {
  	ReleaseWriteLock(&avc->lock);
  	afs_BozonUnlock(&avc->pvnLock, avc);
  	return EINVAL;
--- 790,802 ----
  
      /* adjust parameters when appending files */
      if ((ioflag & IO_APPEND) && arw == UIO_WRITE) {
! #if defined(AFS_SUN56_ENV)
! 	auio->uio_loffset = avc->m.Length;	/* write at EOF position */
! #else
  	auio->uio_offset = avc->m.Length;	/* write at EOF position */
+ #endif
      }
!     if (auio->afsio_offset < 0 || (auio->afsio_offset + auio->uio_resid) < 0) {
  	ReleaseWriteLock(&avc->lock);
  	afs_BozonUnlock(&avc->pvnLock, avc);
  	return EINVAL;
***************
*** 886,893 ****
  	 * call it with an offset based on blocks smaller than MAXBSIZE
  	 * (implying that it should be named BSIZE, since it is clearly both a
  	 * max and a min). */
! 	size = auio->afsio_resid;	/* transfer size */
! 	fileBase = auio->afsio_offset;	/* start file position for xfr */
  	pageBase = fileBase & ~(MAXBSIZE - 1);	/* file position of the page */
  	pageOffset = fileBase & (MAXBSIZE - 1);	/* xfr start's offset within page */
  	tsize = MAXBSIZE - pageOffset;	/* how much more fits in this page */
--- 895,903 ----
  	 * call it with an offset based on blocks smaller than MAXBSIZE
  	 * (implying that it should be named BSIZE, since it is clearly both a
  	 * max and a min). */
! 	size = auio->afsio_resid;       /* transfer size */     
! 	fileBase = ((arw == UIO_READ) && (origLength < auio->uio_offset)) ? 
! 	    origLength : auio->afsio_offset;  /* start file position for xfr */
  	pageBase = fileBase & ~(MAXBSIZE - 1);	/* file position of the page */
  	pageOffset = fileBase & (MAXBSIZE - 1);	/* xfr start's offset within page */
  	tsize = MAXBSIZE - pageOffset;	/* how much more fits in this page */
***************
*** 1233,1239 ****
  {
      register int code = 0;
  
!     if ((*noffp < 0 || *noffp > MAXOFF_T))
  	code = EINVAL;
      return code;
  }
--- 1243,1255 ----
  {
      register int code = 0;
  
! #ifndef AFS_64BIT_CLIENT
! # define __MAXOFF_T MAXOFF_T
! #else
! # define __MAXOFF_T MAXOFFSET_T
! #endif
! 
!     if ((*noffp < 0 || *noffp > __MAXOFF_T))
  	code = EINVAL;
      return code;
  }
Index: openafs/src/afs/SUNOS/osi_inode.h
diff -c openafs/src/afs/SUNOS/osi_inode.h:1.1 openafs/src/afs/SUNOS/osi_inode.h:1.1.8.1
*** openafs/src/afs/SUNOS/osi_inode.h:1.1	Wed Aug 21 15:23:16 2002
--- openafs/src/afs/SUNOS/osi_inode.h	Wed Mar 22 15:07:05 2006
***************
*** 1 ****
! #error kernel code not supported on SunOS 4 
--- 1 ----
! #error kernel code not supported on SunOS 4
Index: openafs/src/afs/VNOPS/afs_vnop_attrs.c
diff -c openafs/src/afs/VNOPS/afs_vnop_attrs.c:1.27.2.8 openafs/src/afs/VNOPS/afs_vnop_attrs.c:1.27.2.10
*** openafs/src/afs/VNOPS/afs_vnop_attrs.c:1.27.2.8	Mon Jul 11 15:29:59 2005
--- openafs/src/afs/VNOPS/afs_vnop_attrs.c	Sun Oct 23 02:31:23 2005
***************
*** 24,30 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.27.2.8 2005/07/11 19:29:59 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 24,30 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_attrs.c,v 1.27.2.10 2005/10/23 06:31:23 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 93,98 ****
--- 93,100 ----
      attrs->va_fsid = avc->v.v_vfsp->vfs_fsid.val[0];
  #elif defined(AFS_OSF_ENV)
      attrs->va_fsid = avc->v.v_mount->m_stat.f_fsid.val[0];
+ #elif defined(AFS_DARWIN80_ENV)
+     VATTR_RETURN(attrs, va_fsid, vfs_statfs(vnode_mount(AFSTOV(avc)))->f_fsid.val[0]);
  #elif defined(AFS_DARWIN70_ENV)
      attrs->va_fsid = avc->v->v_mount->mnt_stat.f_fsid.val[0];
  #else /* ! AFS_DARWIN70_ENV */
***************
*** 156,182 ****
       * Below return 0 (and not 1) blocks if the file is zero length. This conforms
       * better with the other filesystems that do return 0.      
       */
! #if !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
! #if !defined(AFS_HPUX_ENV)
! #ifdef	AFS_SUN5_ENV
!     attrs->va_nblocks =
! 	(attrs->va_size ? ((attrs->va_size + 1023) >> 10) << 1 : 0);
! #elif defined(AFS_SGI_ENV)
!     attrs->va_blocks = BTOBB(attrs->va_size);
! #else
!     attrs->va_blocks =
! 	(attrs->va_size ? ((attrs->va_size + 1023) >> 10) << 1 : 0);
! #endif
! #else /* !defined(AFS_HPUX_ENV) */
!     attrs->va_blocks = (attrs->va_size ? ((attrs->va_size + 1023) >> 10) : 0);
! #endif /* !defined(AFS_HPUX_ENV) */
! #else /* ! AFS_OSF_ENV && !AFS_DARWIN_ENV && !AFS_XBSD_ENV */
      attrs->va_bytes = (attrs->va_size ? (attrs->va_size + 1023) : 1024);
  #ifdef	va_bytes_rsv
      attrs->va_bytes_rsv = -1;
  #endif
! #endif /* ! AFS_OSF_ENV && !AFS_DARWIN_ENV && !AFS_XBSD_ENV */
! 
      return 0;
  }
  
--- 158,177 ----
       * Below return 0 (and not 1) blocks if the file is zero length. This conforms
       * better with the other filesystems that do return 0.      
       */
! #if defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
      attrs->va_bytes = (attrs->va_size ? (attrs->va_size + 1023) : 1024);
  #ifdef	va_bytes_rsv
      attrs->va_bytes_rsv = -1;
  #endif
! #elif defined(AFS_HPUX_ENV)
!     attrs->va_blocks = (attrs->va_size ? ((attrs->va_size + 1023)>>10) : 0);
! #elif defined(AFS_SGI_ENV)
!     attrs->va_blocks = BTOBB(attrs->va_size);
! #elif defined(AFS_SUN5_ENV)
!     attrs->va_nblocks = (attrs->va_size ? ((attrs->va_size + 1023)>>10)<<1:0);
! #else /* everything else */
!     attrs->va_blocks = (attrs->va_size ? ((attrs->va_size + 1023)>>10)<<1:0);
! #endif
      return 0;
  }
  
***************
*** 225,231 ****
  	return code;
      }
  #endif
! #if defined(AFS_DARWIN_ENV)
      if (avc->states & CUBCinit) {
  	code = afs_CopyOutAttrs(avc, attrs);
  	return code;
--- 220,226 ----
  	return code;
      }
  #endif
! #if defined(AFS_DARWIN_ENV) && !defined(AFS_DARWIN80_ENV)
      if (avc->states & CUBCinit) {
  	code = afs_CopyOutAttrs(avc, attrs);
  	return code;
***************
*** 297,305 ****
  			attrs->va_nodeid = ip->i_ino;	/* VTOI()? */
  		    }
  #else
! 		    if (AFSTOV(avc)->v_flag & VROOT) {
  			struct vnode *vp = AFSTOV(avc);
  
  			vp = vp->v_vfsp->vfs_vnodecovered;
  			if (vp) {	/* Ignore weird failures */
  #ifdef AFS_SGI62_ENV
--- 292,310 ----
  			attrs->va_nodeid = ip->i_ino;	/* VTOI()? */
  		    }
  #else
! 		    if (
! #ifdef AFS_DARWIN_ENV		    
! 			vnode_isvroot(AFSTOV(avc))
! #else
! 			AFSTOV(avc)->v_flag & VROOT
! #endif
! 			) {
  			struct vnode *vp = AFSTOV(avc);
  
+ #ifdef AFS_DARWIN80_ENV
+ 			/* XXX vp = vnode_mount(vp)->mnt_vnodecovered; */
+ 			vp = 0;
+ #else
  			vp = vp->v_vfsp->vfs_vnodecovered;
  			if (vp) {	/* Ignore weird failures */
  #ifdef AFS_SGI62_ENV
***************
*** 312,317 ****
--- 317,323 ----
  				attrs->va_nodeid = ip->i_number;
  #endif
  			}
+ #endif
  		    }
  #endif /* AFS_LINUX22_ENV */
  		}
***************
*** 333,339 ****
      register int mask;
      mask = 0;
      AFS_STATCNT(afs_VAttrToAS);
! #if	defined(AFS_AIX_ENV)
  /* Boy, was this machine dependent bogosity hard to swallow????.... */
      if (av->va_mode != -1) {
  #elif	defined(AFS_LINUX22_ENV)
--- 339,347 ----
      register int mask;
      mask = 0;
      AFS_STATCNT(afs_VAttrToAS);
! #if     defined(AFS_DARWIN80_ENV)
!     if (VATTR_IS_ACTIVE(av, va_mode)) {
! #elif	defined(AFS_AIX_ENV)
  /* Boy, was this machine dependent bogosity hard to swallow????.... */
      if (av->va_mode != -1) {
  #elif	defined(AFS_LINUX22_ENV)
***************
*** 353,359 ****
  	    ReleaseWriteLock(&avc->lock);
  	}
      }
! #if defined(AFS_LINUX22_ENV)
      if (av->va_mask & ATTR_GID) {
  #elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (av->va_mask & AT_GID) {
--- 361,369 ----
  	    ReleaseWriteLock(&avc->lock);
  	}
      }
! #if     defined(AFS_DARWIN80_ENV)
!     if (VATTR_IS_ACTIVE(av, va_gid)) {
! #elif defined(AFS_LINUX22_ENV)
      if (av->va_mask & ATTR_GID) {
  #elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (av->va_mask & AT_GID) {
***************
*** 371,377 ****
  	mask |= AFS_SETGROUP;
  	as->Group = av->va_gid;
      }
! #if defined(AFS_LINUX22_ENV)
      if (av->va_mask & ATTR_UID) {
  #elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (av->va_mask & AT_UID) {
--- 381,389 ----
  	mask |= AFS_SETGROUP;
  	as->Group = av->va_gid;
      }
! #if     defined(AFS_DARWIN80_ENV)
!     if (VATTR_IS_ACTIVE(av, va_uid)) {
! #elif defined(AFS_LINUX22_ENV)
      if (av->va_mask & ATTR_UID) {
  #elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (av->va_mask & AT_UID) {
***************
*** 389,395 ****
  	mask |= AFS_SETOWNER;
  	as->Owner = av->va_uid;
      }
! #if	defined(AFS_LINUX22_ENV)
      if (av->va_mask & ATTR_MTIME) {
  #elif	defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (av->va_mask & AT_MTIME) {
--- 401,409 ----
  	mask |= AFS_SETOWNER;
  	as->Owner = av->va_uid;
      }
! #if     defined(AFS_DARWIN80_ENV)
!     if (VATTR_IS_ACTIVE(av, va_modify_time)) {
! #elif	defined(AFS_LINUX22_ENV)
      if (av->va_mask & ATTR_MTIME) {
  #elif	defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (av->va_mask & AT_MTIME) {
***************
*** 466,472 ****
       * chmod) give it a shot; if it fails, we'll discard the status
       * info.
       */
! #if	defined(AFS_LINUX22_ENV)
      if (attrs->va_mask & ATTR_SIZE) {
  #elif	defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (attrs->va_mask & AT_SIZE) {
--- 480,488 ----
       * chmod) give it a shot; if it fails, we'll discard the status
       * info.
       */
! #if	defined(AFS_DARWIN80_ENV)
!     if (VATTR_IS_ACTIVE(attrs, va_data_size)) {
! #elif	defined(AFS_LINUX22_ENV)
      if (attrs->va_mask & ATTR_SIZE) {
  #elif	defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (attrs->va_mask & AT_SIZE) {
***************
*** 497,503 ****
  #if defined(AFS_SGI_ENV)
      AFS_RWLOCK((vnode_t *) avc, VRWLOCK_WRITE);
  #endif
! #if	defined(AFS_LINUX22_ENV)
      if (attrs->va_mask & ATTR_SIZE) {
  #elif	defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (attrs->va_mask & AT_SIZE) {
--- 513,521 ----
  #if defined(AFS_SGI_ENV)
      AFS_RWLOCK((vnode_t *) avc, VRWLOCK_WRITE);
  #endif
! #if	defined(AFS_DARWIN80_ENV)
!     if (VATTR_IS_ACTIVE(attrs, va_data_size)) {
! #elif	defined(AFS_LINUX22_ENV)
      if (attrs->va_mask & ATTR_SIZE) {
  #elif	defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
      if (attrs->va_mask & AT_SIZE) {
Index: openafs/src/afs/VNOPS/afs_vnop_create.c
diff -c openafs/src/afs/VNOPS/afs_vnop_create.c:1.16.2.5 openafs/src/afs/VNOPS/afs_vnop_create.c:1.16.2.7
*** openafs/src/afs/VNOPS/afs_vnop_create.c:1.16.2.5	Thu Jul 21 12:31:34 2005
--- openafs/src/afs/VNOPS/afs_vnop_create.c	Sat Oct 15 10:24:27 2005
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_create.c,v 1.16.2.5 2005/07/21 16:31:34 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 17,23 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_create.c,v 1.16.2.7 2005/10/15 14:24:27 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 179,185 ****
  		    code = EACCES;
  		    goto done;
  		}
! #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
  		if ((amode & VWRITE) || (attrs->va_mask & AT_SIZE))
  #else
  		if ((amode & VWRITE) || len != 0xffffffff)
--- 179,187 ----
  		    code = EACCES;
  		    goto done;
  		}
! #if defined(AFS_DARWIN80_ENV)
! 		if ((amode & VWRITE) || VATTR_IS_ACTIVE(attrs, va_data_size))
! #elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
  		if ((amode & VWRITE) || (attrs->va_mask & AT_SIZE))
  #else
  		if ((amode & VWRITE) || len != 0xffffffff)
***************
*** 196,202 ****
  			goto done;
  		    }
  		}
! #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
  		if (attrs->va_mask & AT_SIZE)
  #else
  		if (len != 0xffffffff)
--- 198,206 ----
  			goto done;
  		    }
  		}
! #if defined(AFS_DARWIN80_ENV)
! 		if (VATTR_IS_ACTIVE(attrs, va_data_size))
! #elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
  		if (attrs->va_mask & AT_SIZE)
  #else
  		if (len != 0xffffffff)
***************
*** 208,214 ****
  			goto done;
  		    }
  		    /* do a truncate */
! #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
  		    attrs->va_mask = AT_SIZE;
  #else
  		    VATTR_NULL(attrs);
--- 212,222 ----
  			goto done;
  		    }
  		    /* do a truncate */
! #if defined(AFS_DARWIN80_ENV)
! 		    VATTR_INIT(attrs);
! 		    VATTR_SET_SUPPORTED(attrs, va_data_size);
! 		    VATTR_SET_ACTIVE(attrs, va_data_size);
! #elif defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV)
  		    attrs->va_mask = AT_SIZE;
  #else
  		    VATTR_NULL(attrs);
***************
*** 492,500 ****
  	hset(avc->m.DataVersion, avers);
  #ifdef AFS_64BIT_CLIENT
  	FillInt64(avc->m.Length, astat->Length_hi, astat->Length);
! #else /* AFS_64BIT_ENV */
  	avc->m.Length = astat->Length;
! #endif /* AFS_64BIT_ENV */
  	avc->m.Date = astat->ClientModTime;
      }
      if (ok) {
--- 500,508 ----
  	hset(avc->m.DataVersion, avers);
  #ifdef AFS_64BIT_CLIENT
  	FillInt64(avc->m.Length, astat->Length_hi, astat->Length);
! #else /* AFS_64BIT_CLIENT */
  	avc->m.Length = astat->Length;
! #endif /* AFS_64BIT_CLIENT */
  	avc->m.Date = astat->ClientModTime;
      }
      if (ok) {
Index: openafs/src/afs/VNOPS/afs_vnop_flock.c
diff -c openafs/src/afs/VNOPS/afs_vnop_flock.c:1.24.2.3 openafs/src/afs/VNOPS/afs_vnop_flock.c:1.24.2.4
*** openafs/src/afs/VNOPS/afs_vnop_flock.c:1.24.2.3	Sun Apr  3 14:15:39 2005
--- openafs/src/afs/VNOPS/afs_vnop_flock.c	Mon Feb 27 15:35:12 2006
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_flock.c,v 1.24.2.3 2005/04/03 18:15:39 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 16,22 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_flock.c,v 1.24.2.4 2006/02/27 20:35:12 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 569,575 ****
  #endif
  	) && code != LOCK_UN)
  	code |= LOCK_NB;	/* non-blocking, s.v.p. */
! #if	defined(AFS_OSF_ENV)
      code = HandleFlock(avc, code, &treq, clid, 0 /*!onlymine */ );
  #elif defined(AFS_SGI_ENV)
      AFS_RWLOCK((vnode_t *) avc, VRWLOCK_WRITE);
--- 569,575 ----
  #endif
  	) && code != LOCK_UN)
  	code |= LOCK_NB;	/* non-blocking, s.v.p. */
! #if	defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
      code = HandleFlock(avc, code, &treq, clid, 0 /*!onlymine */ );
  #elif defined(AFS_SGI_ENV)
      AFS_RWLOCK((vnode_t *) avc, VRWLOCK_WRITE);
Index: openafs/src/afs/VNOPS/afs_vnop_lookup.c
diff -c openafs/src/afs/VNOPS/afs_vnop_lookup.c:1.50.2.10.2.2 openafs/src/afs/VNOPS/afs_vnop_lookup.c:1.50.2.18
*** openafs/src/afs/VNOPS/afs_vnop_lookup.c:1.50.2.10.2.2	Wed Oct 12 02:13:24 2005
--- openafs/src/afs/VNOPS/afs_vnop_lookup.c	Fri Feb 17 23:09:36 2006
***************
*** 18,24 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.50.2.10.2.2 2005/10/12 06:13:24 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 18,24 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_lookup.c,v 1.50.2.18 2006/02/18 04:09:36 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 249,255 ****
   *
   * Only issues RPCs if canblock is non-zero.
   */
! int
  afs_EvalFakeStat_int(struct vcache **avcp, struct afs_fakestat_state *state,
  		     struct vrequest *areq, int canblock)
  {
--- 249,255 ----
   *
   * Only issues RPCs if canblock is non-zero.
   */
! static int
  afs_EvalFakeStat_int(struct vcache **avcp, struct afs_fakestat_state *state,
  		     struct vrequest *areq, int canblock)
  {
***************
*** 291,297 ****
  	    do {
  		retry = 0;
  		ObtainWriteLock(&afs_xvcache, 597);
! 		root_vp = afs_FindVCache(tvc->mvid, &retry, 0);
  		if (root_vp && retry) {
  		    ReleaseWriteLock(&afs_xvcache);
  		    afs_PutVCache(root_vp);
--- 291,297 ----
  	    do {
  		retry = 0;
  		ObtainWriteLock(&afs_xvcache, 597);
! 		root_vp = afs_FindVCache(tvc->mvid, &retry, IS_WLOCK);
  		if (root_vp && retry) {
  		    ReleaseWriteLock(&afs_xvcache);
  		    afs_PutVCache(root_vp);
***************
*** 305,310 ****
--- 305,318 ----
  	    code = canblock ? ENOENT : 0;
  	    goto done;
  	}
+ #ifdef AFS_DARWIN80_ENV
+         root_vp->m.Type = VDIR;
+         AFS_GUNLOCK();
+         code = afs_darwin_finalizevnode(root_vp, NULL, NULL, 0);
+         AFS_GLOCK();
+         if (code) goto done;
+         vnode_ref(AFSTOV(root_vp));
+ #endif
  	if (tvolp) {
  	    /* Is this always kosher?  Perhaps we should instead use
  	     * NBObtainWriteLock to avoid potential deadlock.
***************
*** 563,568 ****
--- 571,579 ----
      int flagIndex = 0;		/* First file with bulk fetch flag set */
      int inlinebulk = 0;		/* Did we use InlineBulk RPC or not? */
      XSTATS_DECLS;
+ #ifdef AFS_DARWIN80_ENV
+     panic("bulkstatus doesn't work on AFS_DARWIN80_ENV. don't call it");
+ #endif
      /* first compute some basic parameters.  We dont want to prefetch more
       * than a fraction of the cache in any given call, and we want to preserve
       * a portion of the LRU queue in any event, so as to avoid thrashing
***************
*** 690,696 ****
  	    do {
  		retry = 0;
  		ObtainWriteLock(&afs_xvcache, 130);
! 		tvcp = afs_FindVCache(&tfid, &retry, 0 /* no stats | LRU */ );
  		if (tvcp && retry) {
  		    ReleaseWriteLock(&afs_xvcache);
  		    afs_PutVCache(tvcp);
--- 701,707 ----
  	    do {
  		retry = 0;
  		ObtainWriteLock(&afs_xvcache, 130);
! 		tvcp = afs_FindVCache(&tfid, &retry, IS_WLOCK /* no stats | LRU */ );
  		if (tvcp && retry) {
  		    ReleaseWriteLock(&afs_xvcache);
  		    afs_PutVCache(tvcp);
***************
*** 698,713 ****
  	    } while (tvcp && retry);
  	    if (!tvcp) {	/* otherwise, create manually */
  		tvcp = afs_NewVCache(&tfid, hostp);
! 		ObtainWriteLock(&tvcp->lock, 505);
! 		ReleaseWriteLock(&afs_xvcache);
! 		afs_RemoveVCB(&tfid);
! 		ReleaseWriteLock(&tvcp->lock);
  	    } else {
  		ReleaseWriteLock(&afs_xvcache);
  	    }
  	    if (!tvcp)
! 		goto done;	/* can't happen at present, more's the pity */
  
  	    /* WARNING: afs_DoBulkStat uses the Length field to store a
  	     * sequence number for each bulk status request. Under no
  	     * circumstances should afs_DoBulkStat store a sequence number
--- 709,744 ----
  	    } while (tvcp && retry);
  	    if (!tvcp) {	/* otherwise, create manually */
  		tvcp = afs_NewVCache(&tfid, hostp);
! 		if (tvcp)
! 		{
! 			ObtainWriteLock(&tvcp->lock, 505);
! 			ReleaseWriteLock(&afs_xvcache);
! 			afs_RemoveVCB(&tfid);
! 			ReleaseWriteLock(&tvcp->lock);
! 		} else {
! 			ReleaseWriteLock(&afs_xvcache);
! 		}
  	    } else {
  		ReleaseWriteLock(&afs_xvcache);
  	    }
  	    if (!tvcp)
! 	    {
! 		DRelease((struct buffer *)dirEntryp, 0);
! 		ReleaseReadLock(&dcp->lock);
! 		ReleaseReadLock(&adp->lock);
! 		afs_PutDCache(dcp);
! 		goto done;	/* can happen if afs_NewVCache fails */
! 	    }
  
+ #ifdef AFS_DARWIN80_ENV
+             if (tvcp->states & CVInit) {
+                  /* XXX don't have status yet, so creating the vnode is
+                     not yet useful. we would get CDeadVnode set, and the
+                     upcoming PutVCache will cause the vcache to be flushed &
+                     freed, which in turn means the bulkstatus results won't 
+                     be used */
+             }
+ #endif
  	    /* WARNING: afs_DoBulkStat uses the Length field to store a
  	     * sequence number for each bulk status request. Under no
  	     * circumstances should afs_DoBulkStat store a sequence number
***************
*** 1066,1072 ****
--- 1097,1107 ----
  }
  
  /* was: (AFS_DEC_ENV) || defined(AFS_OSF30_ENV) || defined(AFS_NCR_ENV) */
+ #ifdef AFS_DARWIN80_ENV
+ #define AFSDOBULK 0
+ #else
  static int AFSDOBULK = 1;
+ #endif
  
  int
  #ifdef AFS_OSF_ENV
***************
*** 1169,1175 ****
  	*avcp = tvc;
  	code = (tvc ? 0 : ENOENT);
  	hit = 1;
! 	if (tvc && !VREFCOUNT(tvc)) {
  	    osi_Panic("TT1");
  	}
  	if (code) {
--- 1204,1210 ----
  	*avcp = tvc;
  	code = (tvc ? 0 : ENOENT);
  	hit = 1;
! 	if (tvc && !VREFCOUNT_GT(tvc, 0)) {
  	    osi_Panic("TT1");
  	}
  	if (code) {
***************
*** 1202,1211 ****
  	ObtainReadLock(&afs_xvcache);
  	osi_vnhold(adp, 0);
  	ReleaseReadLock(&afs_xvcache);
  	code = 0;
  	*avcp = tvc = adp;
  	hit = 1;
! 	if (adp && !VREFCOUNT(adp)) {
  	    osi_Panic("TT2");
  	}
  	goto done;
--- 1237,1249 ----
  	ObtainReadLock(&afs_xvcache);
  	osi_vnhold(adp, 0);
  	ReleaseReadLock(&afs_xvcache);
+ #ifdef AFS_DARWIN80_ENV
+         vnode_get(AFSTOV(adp));
+ #endif
  	code = 0;
  	*avcp = tvc = adp;
  	hit = 1;
! 	if (adp && !VREFCOUNT_GT(adp, 0)) {
  	    osi_Panic("TT2");
  	}
  	goto done;
***************
*** 1489,1495 ****
  		}
  	    }
  	*avcp = tvc;
! 	if (tvc && !VREFCOUNT(tvc)) {
  	    osi_Panic("TT3");
  	}
  	code = 0;
--- 1527,1533 ----
  		}
  	    }
  	*avcp = tvc;
! 	if (tvc && !VREFCOUNT_GT(tvc, 0)) {
  	    osi_Panic("TT3");
  	}
  	code = 0;
***************
*** 1560,1567 ****
      }
      if (bulkcode)
  	code = bulkcode;
!     else
! 	code = afs_CheckCode(code, &treq, 19);
      if (code) {
  	/* If there is an error, make sure *avcp is null.
  	 * Alphas panic otherwise - defect 10719.
--- 1598,1605 ----
      }
      if (bulkcode)
  	code = bulkcode;
! 
!     code = afs_CheckCode(code, &treq, 19);
      if (code) {
  	/* If there is an error, make sure *avcp is null.
  	 * Alphas panic otherwise - defect 10719.
Index: openafs/src/afs/VNOPS/afs_vnop_read.c
diff -c openafs/src/afs/VNOPS/afs_vnop_read.c:1.26.2.2 openafs/src/afs/VNOPS/afs_vnop_read.c:1.26.2.4
*** openafs/src/afs/VNOPS/afs_vnop_read.c:1.26.2.2	Sun Apr 24 16:11:15 2005
--- openafs/src/afs/VNOPS/afs_vnop_read.c	Mon Feb 20 23:47:08 2006
***************
*** 19,25 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.26.2.2 2005/04/24 20:11:15 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 19,25 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_read.c,v 1.26.2.4 2006/02/21 04:47:08 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 60,67 ****
--- 60,72 ----
      afs_int32 trimlen;
      struct dcache *tdc = 0;
      afs_int32 error, trybusy = 1;
+ #ifdef AFS_DARWIN80_ENV
+     uio_t tuiop = NULL;
+ #else
      struct uio tuio;
+     struct uio *tuiop = &tuio;
      struct iovec *tvec;
+ #endif
      afs_int32 code;
      struct vrequest treq;
  
***************
*** 89,97 ****
      }
  #endif
  
      tvec = (struct iovec *)osi_AllocSmallSpace(sizeof(struct iovec));
!     totalLength = auio->afsio_resid;
!     filePos = auio->afsio_offset;
      afs_Trace4(afs_iclSetp, CM_TRACE_READ, ICL_TYPE_POINTER, avc,
  	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(filePos), ICL_TYPE_INT32,
  	       totalLength, ICL_TYPE_OFFSET,
--- 94,104 ----
      }
  #endif
  
+ #ifndef AFS_DARWIN80_ENV
      tvec = (struct iovec *)osi_AllocSmallSpace(sizeof(struct iovec));
! #endif
!     totalLength = AFS_UIO_RESID(auio);
!     filePos = AFS_UIO_OFFSET(auio);
      afs_Trace4(afs_iclSetp, CM_TRACE_READ, ICL_TYPE_POINTER, avc,
  	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(filePos), ICL_TYPE_INT32,
  	       totalLength, ICL_TYPE_OFFSET,
***************
*** 301,310 ****
  		len = tlen;
  	    if (len > AFS_ZEROS)
  		len = sizeof(afs_zeros);	/* and in 0 buffer */
  	    afsio_copy(auio, &tuio, tvec);
  	    trimlen = len;
  	    afsio_trim(&tuio, trimlen);
! 	    AFS_UIOMOVE(afs_zeros, trimlen, UIO_READ, &tuio, code);
  	    if (code) {
  		error = code;
  		break;
--- 308,322 ----
  		len = tlen;
  	    if (len > AFS_ZEROS)
  		len = sizeof(afs_zeros);	/* and in 0 buffer */
+ #ifdef AFS_DARWIN80_ENV
+ 	    trimlen = len;
+             tuiop = afsio_darwin_partialcopy(auio, trimlen);
+ #else
  	    afsio_copy(auio, &tuio, tvec);
  	    trimlen = len;
  	    afsio_trim(&tuio, trimlen);
! #endif
! 	    AFS_UIOMOVE(afs_zeros, trimlen, UIO_READ, tuiop, code);
  	    if (code) {
  		error = code;
  		break;
***************
*** 313,324 ****
  	    /* get the data from the mem cache */
  
  	    /* mung uio structure to be right for this transfer */
  	    afsio_copy(auio, &tuio, tvec);
  	    trimlen = len;
  	    afsio_trim(&tuio, trimlen);
  	    tuio.afsio_offset = offset;
  
! 	    code = afs_MemReadUIO(tdc->f.inode, &tuio);
  
  	    if (code) {
  		error = code;
--- 325,342 ----
  	    /* get the data from the mem cache */
  
  	    /* mung uio structure to be right for this transfer */
+ #ifdef AFS_DARWIN80_ENV
+ 	    trimlen = len;
+             tuiop = afsio_darwin_partialcopy(auio, trimlen);
+ 	    uio_setoffset(tuiop, offset);
+ #else
  	    afsio_copy(auio, &tuio, tvec);
  	    trimlen = len;
  	    afsio_trim(&tuio, trimlen);
  	    tuio.afsio_offset = offset;
+ #endif
  
! 	    code = afs_MemReadUIO(tdc->f.inode, tuiop);
  
  	    if (code) {
  		error = code;
***************
*** 326,332 ****
  	    }
  	}
  	/* otherwise we've read some, fixup length, etc and continue with next seg */
! 	len = len - tuio.afsio_resid;	/* compute amount really transferred */
  	trimlen = len;
  	afsio_skip(auio, trimlen);	/* update input uio structure */
  	totalLength -= len;
--- 344,350 ----
  	    }
  	}
  	/* otherwise we've read some, fixup length, etc and continue with next seg */
! 	len = len - AFS_UIO_RESID(tuiop);	/* compute amount really transferred */
  	trimlen = len;
  	afsio_skip(auio, trimlen);	/* update input uio structure */
  	totalLength -= len;
***************
*** 335,340 ****
--- 353,364 ----
  
  	if (len <= 0)
  	    break;		/* surprise eof */
+ #ifdef AFS_DARWIN80_ENV
+ 	if (tuiop) {
+ 	    uio_free(tuiop);
+ 	    tuiop = 0;
+ 	}
+ #endif
      }				/* the whole while loop */
  
      /*
***************
*** 359,365 ****
--- 383,394 ----
      }
      if (!noLock)
  	ReleaseReadLock(&avc->lock);
+ #ifdef AFS_DARWIN80_ENV
+     if (tuiop)
+        uio_free(tuiop);
+ #else
      osi_FreeSmallSpace(tvec);
+ #endif
      error = afs_CheckCode(error, &treq, 10);
      return error;
  }
***************
*** 448,455 ****
--- 477,489 ----
      afs_int32 trimlen;
      struct dcache *tdc = 0;
      afs_int32 error;
+ #ifdef AFS_DARWIN80_ENV
+     uio_t tuiop=NULL;
+ #else
      struct uio tuio;
+     struct uio *tuiop = &tuio;
      struct iovec *tvec;
+ #endif
      struct osi_file *tfile;
      afs_int32 code;
      int trybusy = 1;
***************
*** 483,491 ****
      }
  #endif
  
      tvec = (struct iovec *)osi_AllocSmallSpace(sizeof(struct iovec));
!     totalLength = auio->afsio_resid;
!     filePos = auio->afsio_offset;
      afs_Trace4(afs_iclSetp, CM_TRACE_READ, ICL_TYPE_POINTER, avc,
  	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(filePos), ICL_TYPE_INT32,
  	       totalLength, ICL_TYPE_OFFSET,
--- 517,527 ----
      }
  #endif
  
+ #ifndef AFS_DARWIN80_ENV
      tvec = (struct iovec *)osi_AllocSmallSpace(sizeof(struct iovec));
! #endif
!     totalLength = AFS_UIO_RESID(auio);
!     filePos = AFS_UIO_OFFSET(auio);
      afs_Trace4(afs_iclSetp, CM_TRACE_READ, ICL_TYPE_POINTER, avc,
  	       ICL_TYPE_OFFSET, ICL_HANDLE_OFFSET(filePos), ICL_TYPE_INT32,
  	       totalLength, ICL_TYPE_OFFSET,
***************
*** 686,695 ****
  		len = tlen;
  	    if (len > AFS_ZEROS)
  		len = sizeof(afs_zeros);	/* and in 0 buffer */
  	    afsio_copy(auio, &tuio, tvec);
  	    trimlen = len;
  	    afsio_trim(&tuio, trimlen);
! 	    AFS_UIOMOVE(afs_zeros, trimlen, UIO_READ, &tuio, code);
  	    if (code) {
  		error = code;
  		break;
--- 722,736 ----
  		len = tlen;
  	    if (len > AFS_ZEROS)
  		len = sizeof(afs_zeros);	/* and in 0 buffer */
+ #ifdef AFS_DARWIN80_ENV
+ 	    trimlen = len;
+             tuiop = afsio_darwin_partialcopy(auio, trimlen);
+ #else
  	    afsio_copy(auio, &tuio, tvec);
  	    trimlen = len;
  	    afsio_trim(&tuio, trimlen);
! #endif
! 	    AFS_UIOMOVE(afs_zeros, trimlen, UIO_READ, tuiop, code);
  	    if (code) {
  		error = code;
  		break;
***************
*** 712,722 ****
--- 753,770 ----
  #endif /* IHINT */
  
  		tfile = (struct osi_file *)osi_UFSOpen(tdc->f.inode);
+ #ifdef AFS_DARWIN80_ENV
+ 	    trimlen = len;
+             tuiop = afsio_darwin_partialcopy(auio, trimlen);
+ 	    uio_setoffset(tuiop, offset);
+ #else
  	    /* mung uio structure to be right for this transfer */
  	    afsio_copy(auio, &tuio, tvec);
  	    trimlen = len;
  	    afsio_trim(&tuio, trimlen);
  	    tuio.afsio_offset = offset;
+ #endif
+ 
  #if defined(AFS_AIX41_ENV)
  	    AFS_GUNLOCK();
  	    code =
***************
*** 790,795 ****
--- 838,847 ----
  	    AFS_GUNLOCK();
  	    code = osi_rdwr(tfile, &tuio, UIO_READ);
  	    AFS_GLOCK();
+ #elif defined(AFS_DARWIN80_ENV)
+ 	    AFS_GUNLOCK();
+ 	    code = VNOP_READ(tfile->vnode, tuiop, 0, afs_osi_ctxtp);
+ 	    AFS_GLOCK();
  #elif defined(AFS_DARWIN_ENV)
  	    AFS_GUNLOCK();
  	    VOP_LOCK(tfile->vnode, LK_EXCLUSIVE, current_proc());
***************
*** 826,832 ****
  	    }
  	}
  	/* otherwise we've read some, fixup length, etc and continue with next seg */
! 	len = len - tuio.afsio_resid;	/* compute amount really transferred */
  	trimlen = len;
  	afsio_skip(auio, trimlen);	/* update input uio structure */
  	totalLength -= len;
--- 878,884 ----
  	    }
  	}
  	/* otherwise we've read some, fixup length, etc and continue with next seg */
! 	len = len - AFS_UIO_RESID(tuiop);	/* compute amount really transferred */
  	trimlen = len;
  	afsio_skip(auio, trimlen);	/* update input uio structure */
  	totalLength -= len;
***************
*** 834,839 ****
--- 886,897 ----
  	filePos += len;
  	if (len <= 0)
  	    break;		/* surprise eof */
+ #ifdef AFS_DARWIN80_ENV
+ 	if (tuiop) {
+ 	    uio_free(tuiop);
+ 	    tuiop = 0;
+ 	}
+ #endif
      }
  
      /* if we make it here with tdc non-zero, then it is the last chunk we
***************
*** 854,860 ****
--- 912,923 ----
      if (!noLock)
  	ReleaseReadLock(&avc->lock);
  
+ #ifdef AFS_DARWIN80_ENV
+     if (tuiop)
+        uio_free(tuiop);
+ #else
      osi_FreeSmallSpace(tvec);
+ #endif
      error = afs_CheckCode(error, &treq, 13);
      return error;
  }
Index: openafs/src/afs/VNOPS/afs_vnop_readdir.c
diff -c openafs/src/afs/VNOPS/afs_vnop_readdir.c:1.24.2.6 openafs/src/afs/VNOPS/afs_vnop_readdir.c:1.24.2.8
*** openafs/src/afs/VNOPS/afs_vnop_readdir.c:1.24.2.6	Sun Oct  2 22:46:32 2005
--- openafs/src/afs/VNOPS/afs_vnop_readdir.c	Fri Nov 18 23:35:42 2005
***************
*** 23,29 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_readdir.c,v 1.24.2.6 2005/10/03 02:46:32 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 23,29 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_readdir.c,v 1.24.2.8 2005/11/19 04:35:42 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 143,149 ****
  #else
  struct min_direct {		/* miniature direct structure */
      /* If struct direct changes, this must too */
! #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
      afs_uint32 d_fileno;
      u_short d_reclen;
      u_char d_type;
--- 143,154 ----
  #else
  struct min_direct {		/* miniature direct structure */
      /* If struct direct changes, this must too */
! #if defined(AFS_DARWIN80_ENV)
!     ino_t d_fileno;
!     u_short d_reclen;
!     u_char d_type;
!     u_char d_namlen;
! #elif defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
      afs_uint32 d_fileno;
      u_short d_reclen;
      u_char d_type;
***************
*** 242,248 ****
      tfid.Fid.Unique = ntohl(ade->fid.vunique);
      if ((avc->states & CForeign) == 0 && (ntohl(ade->fid.vnode) & 1)) {
  	return DT_DIR;
!     } else if ((tvc = afs_FindVCache(&tfid, 0, 0))) {
  	if (tvc->mvstat) {
  	    afs_PutVCache(tvc);
  	    return DT_DIR;
--- 247,256 ----
      tfid.Fid.Unique = ntohl(ade->fid.vunique);
      if ((avc->states & CForeign) == 0 && (ntohl(ade->fid.vnode) & 1)) {
  	return DT_DIR;
!     }
!     ObtainReadLock(&afs_xvcache);
!     if ((tvc = afs_FindVCache(&tfid, 0, 0))) {
!         ReleaseReadLock(&afs_xvcache);
  	if (tvc->mvstat) {
  	    afs_PutVCache(tvc);
  	    return DT_DIR;
***************
*** 261,267 ****
  	    /* what other types does AFS support? */
  	} else
  	    afs_PutVCache(tvc);
!     }
      return DT_UNKNOWN;
  }
  #endif
--- 269,276 ----
  	    /* what other types does AFS support? */
  	} else
  	    afs_PutVCache(tvc);
!     } else
!         ReleaseReadLock(&afs_xvcache);
      return DT_UNKNOWN;
  }
  #endif
***************
*** 626,632 ****
  	*eofp = 0;
  #endif
      if (AfsLargeFileUio(auio)	/* file is large than 2 GB */
! 	||AfsLargeFileSize(auio->uio_offset, auio->uio_resid))
  	return EFBIG;
  
      if ((code = afs_InitReq(&treq, acred))) {
--- 635,641 ----
  	*eofp = 0;
  #endif
      if (AfsLargeFileUio(auio)	/* file is large than 2 GB */
! 	||AfsLargeFileSize(AFS_UIO_OFFSET(auio), AFS_UIO_RESID(auio)))
  	return EFBIG;
  
      if ((code = afs_InitReq(&treq, acred))) {
***************
*** 710,716 ****
      auio->uio_fpflags = 0;
  #endif
      while (code == 0) {
! 	origOffset = auio->afsio_offset;
  	/* scan for the next interesting entry scan for in-use blob otherwise up point at
  	 * this blob note that ode, if non-zero, also represents a held dir page */
  	if (!(us = BlobScan(tdc, (origOffset >> 5)))
--- 719,725 ----
      auio->uio_fpflags = 0;
  #endif
      while (code == 0) {
! 	origOffset = AFS_UIO_OFFSET(auio);
  	/* scan for the next interesting entry scan for in-use blob otherwise up point at
  	 * this blob note that ode, if non-zero, also represents a held dir page */
  	if (!(us = BlobScan(tdc, (origOffset >> 5)))
***************
*** 722,728 ****
  		sdirEntry->d_fileno =
  		    (avc->fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
  		FIXUPSTUPIDINODE(sdirEntry->d_fileno);
! 		sdirEntry->d_reclen = rlen = auio->afsio_resid;
  		sdirEntry->d_namlen = o_slen;
  #if defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
  		sdirEntry->d_off = origOffset;
--- 731,737 ----
  		sdirEntry->d_fileno =
  		    (avc->fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
  		FIXUPSTUPIDINODE(sdirEntry->d_fileno);
! 		sdirEntry->d_reclen = rlen = AFS_UIO_RESID(auio);
  		sdirEntry->d_namlen = o_slen;
  #if defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
  		sdirEntry->d_off = origOffset;
***************
*** 752,762 ****
  #if defined(AFS_SUN5_ENV)
  					len, origOffset);
  #else
! 					auio->afsio_resid, origOffset);
  #endif
  #endif /* AFS_HPUX_ENV */
  #if !defined(AFS_SUN5_ENV)
! 		auio->afsio_resid = 0;
  #endif
  	    } else {
  		/* nothin to hand over */
--- 761,771 ----
  #if defined(AFS_SUN5_ENV)
  					len, origOffset);
  #else
! 					AFS_UIO_RESID(auio), origOffset);
  #endif
  #endif /* AFS_HPUX_ENV */
  #if !defined(AFS_SUN5_ENV)
! 		AFS_UIO_SETRESID(auio, 0);
  #endif
  	    } else {
  		/* nothin to hand over */
***************
*** 780,788 ****
  #ifdef	AFS_SGI53_ENV
  	dirsiz =
  	    use64BitDirent ? DIRENTSIZE(n_slen) : IRIX5_DIRENTSIZE(n_slen);
! 	if (dirsiz >= (auio->afsio_resid - len)) {
  #else
! 	if (DIRSIZ_LEN(n_slen) >= (auio->afsio_resid - len)) {
  #endif /* AFS_SGI53_ENV */
  	    /* No can do no more now; ya know... at this time */
  	    DRelease((struct buffer *)nde, 0);	/* can't use this one. */
--- 789,797 ----
  #ifdef	AFS_SGI53_ENV
  	dirsiz =
  	    use64BitDirent ? DIRENTSIZE(n_slen) : IRIX5_DIRENTSIZE(n_slen);
! 	if (dirsiz >= (AFS_UIO_RESID(auio) - len)) {
  #else
! 	if (DIRSIZ_LEN(n_slen) >= (AFS_UIO_RESID(auio) - len)) {
  #endif /* AFS_SGI53_ENV */
  	    /* No can do no more now; ya know... at this time */
  	    DRelease((struct buffer *)nde, 0);	/* can't use this one. */
***************
*** 791,797 ****
  		sdirEntry->d_fileno =
  		    (avc->fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
  		FIXUPSTUPIDINODE(sdirEntry->d_fileno);
! 		sdirEntry->d_reclen = rlen = auio->afsio_resid;
  		sdirEntry->d_namlen = o_slen;
  #if defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
  		sdirEntry->d_off = origOffset;
--- 800,806 ----
  		sdirEntry->d_fileno =
  		    (avc->fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
  		FIXUPSTUPIDINODE(sdirEntry->d_fileno);
! 		sdirEntry->d_reclen = rlen = AFS_UIO_RESID(auio);
  		sdirEntry->d_namlen = o_slen;
  #if defined(AFS_SUN5_ENV) || defined(AFS_AIX32_ENV) || defined(AFS_HPUX100_ENV)
  		sdirEntry->d_off = origOffset;
***************
*** 819,830 ****
  #else /* AFS_HPUX_ENV */
  		code =
  		    afs_readdir_move(ode, avc, auio, o_slen,
! 				     auio->afsio_resid, origOffset);
  #endif /* AFS_HPUX_ENV */
  		/* this next line used to be AFSVFS40 or AIX 3.1, but is
  		 * really generic */
! 		auio->afsio_offset = origOffset;
! 		auio->afsio_resid = 0;
  	    } else {		/* trouble, can't give anything to the user! */
  		/* even though he has given us a buffer, 
  		 * even though we have something to give us,
--- 828,839 ----
  #else /* AFS_HPUX_ENV */
  		code =
  		    afs_readdir_move(ode, avc, auio, o_slen,
! 				     AFS_UIO_RESID(auio), origOffset);
  #endif /* AFS_HPUX_ENV */
  		/* this next line used to be AFSVFS40 or AIX 3.1, but is
  		 * really generic */
! 		AFS_UIO_SETOFFSET(auio, origOffset);
! 		AFS_UIO_SETRESID(auio, 0);
  	    } else {		/* trouble, can't give anything to the user! */
  		/* even though he has given us a buffer, 
  		 * even though we have something to give us,
***************
*** 885,892 ****
  	if (ode)
  	    DRelease((struct buffer *)ode, 0);
  	ode = nde;
! 	auio->afsio_offset =
! 	    (afs_int32) ((us + afs_dir_NameBlobs(nde->name)) << 5);
      }
      if (ode)
  	DRelease((struct buffer *)ode, 0);
--- 894,900 ----
  	if (ode)
  	    DRelease((struct buffer *)ode, 0);
  	ode = nde;
! 	AFS_UIO_SETOFFSET(auio, (afs_int32) ((us + afs_dir_NameBlobs(nde->name)) << 5));
      }
      if (ode)
  	DRelease((struct buffer *)ode, 0);
***************
*** 1000,1006 ****
      auio->uio_fpflags = 0;
  #endif
      while (code == 0) {
! 	origOffset = auio->afsio_offset;
  
  	/* scan for the next interesting entry scan for in-use blob otherwise up point at
  	 * this blob note that ode, if non-zero, also represents a held dir page */
--- 1008,1014 ----
      auio->uio_fpflags = 0;
  #endif
      while (code == 0) {
! 	origOffset = AFS_UIO_OFFSET(auio);
  
  	/* scan for the next interesting entry scan for in-use blob otherwise up point at
  	 * this blob note that ode, if non-zero, also represents a held dir page */
***************
*** 1013,1019 ****
  		sdirEntry->d_fileno =
  		    (avc->fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
  		FIXUPSTUPIDINODE(sdirEntry->d_fileno);
! 		sdirEntry->d_reclen = rlen = auio->afsio_resid;
  		sdirEntry->d_namlen = o_slen;
  		sdirEntry->d_off = origOffset;
  		AFS_UIOMOVE((char *)sdirEntry, sizeof(*sdirEntry), UIO_READ,
--- 1021,1027 ----
  		sdirEntry->d_fileno =
  		    (avc->fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
  		FIXUPSTUPIDINODE(sdirEntry->d_fileno);
! 		sdirEntry->d_reclen = rlen = AFS_UIO_RESID(auio);
  		sdirEntry->d_namlen = o_slen;
  		sdirEntry->d_off = origOffset;
  		AFS_UIOMOVE((char *)sdirEntry, sizeof(*sdirEntry), UIO_READ,
***************
*** 1040,1048 ****
  #else
  		code =
  		    afs_readdir_move(ode, avc, auio, o_slen,
! 				     auio->afsio_resid, origOffset);
  #endif /* AFS_HPUX_ENV */
! 		auio->afsio_resid = 0;
  	    } else {
  		/* nothin to hand over */
  	    }
--- 1048,1056 ----
  #else
  		code =
  		    afs_readdir_move(ode, avc, auio, o_slen,
! 				     AFS_UIO_RESID(auio), origOffset);
  #endif /* AFS_HPUX_ENV */
! 		AFS_UIO_SETRESID(auio, 0);
  	    } else {
  		/* nothin to hand over */
  	    }
***************
*** 1062,1068 ****
  #else
  	n_slen = strlen(nde->name);
  #endif
! 	if (NDIRSIZ_LEN(n_slen) >= (auio->afsio_resid - len)) {
  	    /* No can do no more now; ya know... at this time */
  	    DRelease(nde, 0);	/* can't use this one. */
  	    if (len) {
--- 1070,1076 ----
  #else
  	n_slen = strlen(nde->name);
  #endif
! 	if (NDIRSIZ_LEN(n_slen) >= (AFS_UIO_RESID(auio) - len)) {
  	    /* No can do no more now; ya know... at this time */
  	    DRelease(nde, 0);	/* can't use this one. */
  	    if (len) {
***************
*** 1070,1076 ****
  		sdirEntry->d_fileno =
  		    (avc->fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
  		FIXUPSTUPIDINODE(sdirEntry->d_fileno);
! 		sdirEntry->d_reclen = rlen = auio->afsio_resid;
  		sdirEntry->d_namlen = o_slen;
  		sdirEntry->d_off = origOffset;
  		AFS_UIOMOVE((char *)sdirEntry, sizeof(*sdirEntry), UIO_READ,
--- 1078,1084 ----
  		sdirEntry->d_fileno =
  		    (avc->fid.Fid.Volume << 16) + ntohl(ode->fid.vnode);
  		FIXUPSTUPIDINODE(sdirEntry->d_fileno);
! 		sdirEntry->d_reclen = rlen = AFS_UIO_RESID(auio);
  		sdirEntry->d_namlen = o_slen;
  		sdirEntry->d_off = origOffset;
  		AFS_UIOMOVE((char *)sdirEntry, sizeof(*sdirEntry), UIO_READ,
***************
*** 1096,1106 ****
  #else
  		code =
  		    afs_readdir_move(ode, avc, auio, o_slen,
! 				     auio->afsio_resid, origOffset);
  #endif /* AFS_HPUX_ENV */
  		/* this next line used to be AFSVFS40 or AIX 3.1, but is really generic */
! 		auio->afsio_offset = origOffset;
! 		auio->afsio_resid = 0;
  	    } else {		/* trouble, can't give anything to the user! */
  		/* even though he has given us a buffer, 
  		 * even though we have something to give us,
--- 1104,1114 ----
  #else
  		code =
  		    afs_readdir_move(ode, avc, auio, o_slen,
! 				     AFS_UIO_RESID(auio), origOffset);
  #endif /* AFS_HPUX_ENV */
  		/* this next line used to be AFSVFS40 or AIX 3.1, but is really generic */
! 		AFS_UIO_SETOFFSET(auio, origOffset);
! 		AFS_UIO_SETRESID(auio, 0);
  	    } else {		/* trouble, can't give anything to the user! */
  		/* even though he has given us a buffer, 
  		 * even though we have something to give us,
***************
*** 1153,1159 ****
  	if (ode)
  	    DRelease(ode, 0);
  	ode = nde;
! 	auio->afsio_offset = ((us + afs_dir_NameBlobs(nde->name)) << 5);
      }
      if (ode)
  	DRelease(ode, 0);
--- 1161,1167 ----
  	if (ode)
  	    DRelease(ode, 0);
  	ode = nde;
! 	AFS_UIO_OFFSET(auio) = ((us + afs_dir_NameBlobs(nde->name)) << 5);
      }
      if (ode)
  	DRelease(ode, 0);
Index: openafs/src/afs/VNOPS/afs_vnop_remove.c
diff -c openafs/src/afs/VNOPS/afs_vnop_remove.c:1.31.2.9 openafs/src/afs/VNOPS/afs_vnop_remove.c:1.31.2.16
*** openafs/src/afs/VNOPS/afs_vnop_remove.c:1.31.2.9	Mon May 30 00:05:44 2005
--- openafs/src/afs/VNOPS/afs_vnop_remove.c	Thu Mar  2 01:34:19 2006
***************
*** 21,27 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_remove.c,v 1.31.2.9 2005/05/30 04:05:44 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 21,27 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_remove.c,v 1.31.2.16 2006/03/02 06:34:19 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 349,354 ****
--- 349,356 ----
      if (tvc && osi_Active(tvc)) {
  	/* about to delete whole file, prefetch it first */
  	ReleaseWriteLock(&adp->lock);
+ 	if (tdc)
+ 	    ReleaseSharedLock(&tdc->lock);
  	ObtainWriteLock(&tvc->lock, 143);
  #if	defined(AFS_OSF_ENV)
  	afs_Wire(tvc, &treq);
***************
*** 357,381 ****
  #endif
  	ReleaseWriteLock(&tvc->lock);
  	ObtainWriteLock(&adp->lock, 144);
      }
  
      osi_dnlc_remove(adp, aname, tvc);
  
      Tadp1 = adp;
      Tadpr = VREFCOUNT(adp);
      Ttvc = tvc;
      Tnam = aname;
      Tnam1 = 0;
      if (tvc)
  	Ttvcr = VREFCOUNT(tvc);
  #ifdef	AFS_AIX_ENV
!     if (tvc && (VREFCOUNT(tvc) > 2) && tvc->opens > 0
! 	&& !(tvc->states & CUnlinked))
  #else
!     if (tvc && (VREFCOUNT(tvc) > 1) && tvc->opens > 0
! 	&& !(tvc->states & CUnlinked))
  #endif
-     {
  	char *unlname = afs_newname();
  
  	ReleaseWriteLock(&adp->lock);
--- 359,390 ----
  #endif
  	ReleaseWriteLock(&tvc->lock);
  	ObtainWriteLock(&adp->lock, 144);
+ 	/* Technically I don't think we need this back, but let's hold it 
+ 	   anyway; The "got" reference should actually be sufficient. */
+ 	if (tdc) 
+ 	    ObtainSharedLock(&tdc->lock, 640);
      }
  
      osi_dnlc_remove(adp, aname, tvc);
  
      Tadp1 = adp;
+ #ifndef AFS_DARWIN80_ENV
      Tadpr = VREFCOUNT(adp);
+ #endif
      Ttvc = tvc;
      Tnam = aname;
      Tnam1 = 0;
+ #ifndef AFS_DARWIN80_ENV
      if (tvc)
  	Ttvcr = VREFCOUNT(tvc);
+ #endif
  #ifdef	AFS_AIX_ENV
!     if (tvc && VREFCOUNT_GT(tvc, 2) && tvc->opens > 0
! 	&& !(tvc->states & CUnlinked)) {
  #else
!     if (tvc && VREFCOUNT_GT(tvc, 1) && tvc->opens > 0
! 	&& !(tvc->states & CUnlinked)) {
  #endif
  	char *unlname = afs_newname();
  
  	ReleaseWriteLock(&adp->lock);
***************
*** 384,390 ****
--- 393,404 ----
  	code = afsrename(adp, aname, adp, unlname, acred, &treq);
  	Tnam1 = unlname;
  	if (!code) {
+ 	    char *oldmvid = NULL;
+ 	    if (tvc->mvid) 
+ 		oldmvid = tvc->mvid;
  	    tvc->mvid = (struct VenusFid *)unlname;
+ 	    if (oldmvid)
+ 		osi_FreeSmallSpace(oldmvid);
  	    crhold(acred);
  	    if (tvc->uncred) {
  		crfree(tvc->uncred);
***************
*** 401,406 ****
--- 415,421 ----
  	code = afsremove(adp, tdc, tvc, aname, acred, &treq);
      }
      afs_PutFakeStat(&fakestate);
+     osi_Assert(!WriteLocked(&adp->lock) || (adp->lock.pid_writer != MyPidxx));
      return code;
  }
  
***************
*** 423,428 ****
--- 438,449 ----
  
      if (NBObtainWriteLock(&avc->lock, 423))
  	return 0;
+ #if defined(AFS_DARWIN80_ENV)
+     if (vnode_get(AFSTOV(avc))) {
+ 	ReleaseWriteLock(&avc->lock);
+ 	return 0;
+     }
+ #endif
  
      if (avc->mvid && (doit || (avc->states & CUnlinkedDel))) {
  	if ((code = afs_InitReq(&treq, avc->uncred))) {
***************
*** 436,442 ****
  	    cred = avc->uncred;
  	    avc->uncred = NULL;
  
! #ifdef AFS_DARWIN_ENV
  	    VREF(AFSTOV(avc));
  #else
  	    VN_HOLD(AFSTOV(avc));
--- 457,463 ----
  	    cred = avc->uncred;
  	    avc->uncred = NULL;
  
! #if defined(AFS_DARWIN_ENV) && !defined(AFS_DARWIN80_ENV)
  	    VREF(AFSTOV(avc));
  #else
  	    VN_HOLD(AFSTOV(avc));
***************
*** 472,477 ****
--- 493,501 ----
  	    crfree(cred);
  	}
      } else {
+ #if defined(AFS_DARWIN80_ENV)
+ 	vnode_put(AFSTOV(avc));
+ #endif
  	ReleaseWriteLock(&avc->lock);
      }
  
Index: openafs/src/afs/VNOPS/afs_vnop_rename.c
diff -c openafs/src/afs/VNOPS/afs_vnop_rename.c:1.16.2.7 openafs/src/afs/VNOPS/afs_vnop_rename.c:1.16.2.11
*** openafs/src/afs/VNOPS/afs_vnop_rename.c:1.16.2.7	Fri Jun 10 17:11:49 2005
--- openafs/src/afs/VNOPS/afs_vnop_rename.c	Fri Dec 23 19:21:45 2005
***************
*** 18,24 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_rename.c,v 1.16.2.7 2005/06/10 21:11:49 jaltman Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 18,24 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_rename.c,v 1.16.2.11 2005/12/24 00:21:45 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
Index: openafs/src/afs/VNOPS/afs_vnop_strategy.c
diff -c openafs/src/afs/VNOPS/afs_vnop_strategy.c:1.18.2.2 openafs/src/afs/VNOPS/afs_vnop_strategy.c:1.18.2.4
*** openafs/src/afs/VNOPS/afs_vnop_strategy.c:1.18.2.2	Sat Apr 23 20:58:06 2005
--- openafs/src/afs/VNOPS/afs_vnop_strategy.c	Wed Oct 12 02:17:27 2005
***************
*** 16,24 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_strategy.c,v 1.18.2.2 2005/04/24 00:58:06 shadow Exp $");
  
! #if !defined(AFS_HPUX_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV)
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 16,24 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_strategy.c,v 1.18.2.4 2005/10/12 06:17:27 shadow Exp $");
  
! #if !defined(AFS_HPUX_ENV) && !defined(AFS_SGI_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN80_ENV)
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 40,45 ****
--- 40,47 ----
  {
      register afs_int32 code;
      struct uio tuio;
+     struct uio *tuiop = &tuio;
+     struct iovec tiovec[1];
      register struct vcache *tvc = VTOAFS(abp->b_vp);
      register afs_int32 len = abp->b_bcount;
  #if	!defined(AFS_SUN5_ENV) && !defined(AFS_OSF_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_XBSD_ENV)
***************
*** 49,55 ****
      struct AFS_UCRED *credp = u.u_cred;
  #endif
  #endif
-     struct iovec tiovec[1];
  
      AFS_STATCNT(afs_ustrategy);
  #ifdef	AFS_AIX41_ENV
--- 51,56 ----
***************
*** 80,91 ****
  	tuio.afsio_iovcnt = 1;
  #if	defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_XBSD_ENV)
  #ifdef AFS_64BIT_CLIENT
  	tuio.afsio_offset = (afs_offs_t) dbtob(abp->b_blkno);
  #else /* AFS_64BIT_CLIENT */
  	tuio.afsio_offset = (u_int) dbtob(abp->b_blkno);
- #if	defined(AFS_SUN5_ENV)
- 	tuio._uio_offset._p._u = 0;
- #endif
  #endif /* AFS_64BIT_CLIENT */
  #else
  	tuio.afsio_offset = DEV_BSIZE * abp->b_blkno;
--- 81,93 ----
  	tuio.afsio_iovcnt = 1;
  #if	defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_XBSD_ENV)
  #ifdef AFS_64BIT_CLIENT
+ #ifdef AFS_SUN5_ENV
+ 	tuio.afsio_offset = (afs_offs_t) ldbtob(abp->b_lblkno);
+ #else
  	tuio.afsio_offset = (afs_offs_t) dbtob(abp->b_blkno);
+ #endif
  #else /* AFS_64BIT_CLIENT */
  	tuio.afsio_offset = (u_int) dbtob(abp->b_blkno);
  #endif /* AFS_64BIT_CLIENT */
  #else
  	tuio.afsio_offset = DEV_BSIZE * abp->b_blkno;
***************
*** 138,149 ****
  	tuio.afsio_iovcnt = 1;
  #if	defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV)
  #ifdef AFS_64BIT_CLIENT
  	tuio.afsio_offset = (afs_offs_t) dbtob(abp->b_blkno);
  #else /* AFS_64BIT_CLIENT */
  	tuio.afsio_offset = (u_int) dbtob(abp->b_blkno);
- #ifdef	AFS_SUN5_ENV
- 	tuio._uio_offset._p._u = 0;
- #endif
  #endif /* AFS_64BIT_CLIENT */
  #ifdef	AFS_SUN5_ENV
  #ifdef	AFS_SUN59_ENV
--- 140,152 ----
  	tuio.afsio_iovcnt = 1;
  #if	defined(AFS_OSF_ENV) || defined(AFS_SUN5_ENV)
  #ifdef AFS_64BIT_CLIENT
+ #ifdef AFS_SUN5_ENV
+ 	tuio.afsio_offset = (afs_offs_t) ldbtob(abp->b_lblkno);
+ #else
  	tuio.afsio_offset = (afs_offs_t) dbtob(abp->b_blkno);
+ #endif
  #else /* AFS_64BIT_CLIENT */
  	tuio.afsio_offset = (u_int) dbtob(abp->b_blkno);
  #endif /* AFS_64BIT_CLIENT */
  #ifdef	AFS_SUN5_ENV
  #ifdef	AFS_SUN59_ENV
Index: openafs/src/afs/VNOPS/afs_vnop_symlink.c
diff -c openafs/src/afs/VNOPS/afs_vnop_symlink.c:1.19.2.4 openafs/src/afs/VNOPS/afs_vnop_symlink.c:1.19.2.5
*** openafs/src/afs/VNOPS/afs_vnop_symlink.c:1.19.2.4	Sun Jan 30 22:49:15 2005
--- openafs/src/afs/VNOPS/afs_vnop_symlink.c	Fri Oct 14 22:33:12 2005
***************
*** 22,28 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_symlink.c,v 1.19.2.4 2005/01/31 03:49:15 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 22,28 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_symlink.c,v 1.19.2.5 2005/10/15 02:33:12 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 191,196 ****
--- 191,202 ----
       * no one can get a pointer to the new cache entry until we release 
       * the xvcache lock. */
      tvc = afs_NewVCache(&newFid, hostp);
+     if (!tvc)
+     {
+ 	code = -2;
+ 	ReleaseWriteLock(&afs_xvcache);
+ 	goto done;
+     }
      ObtainWriteLock(&tvc->lock, 157);
      ObtainWriteLock(&afs_xcbhash, 500);
      tvc->states |= CStatd;	/* have valid info */
Index: openafs/src/afs/VNOPS/afs_vnop_write.c
diff -c openafs/src/afs/VNOPS/afs_vnop_write.c:1.36.2.6 openafs/src/afs/VNOPS/afs_vnop_write.c:1.36.2.9
*** openafs/src/afs/VNOPS/afs_vnop_write.c:1.36.2.6	Sun Oct  2 22:55:33 2005
--- openafs/src/afs/VNOPS/afs_vnop_write.c	Mon Feb 27 15:37:47 2006
***************
*** 21,27 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.36.2.6 2005/10/03 02:55:33 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
--- 21,27 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/afs/VNOPS/afs_vnop_write.c,v 1.36.2.9 2006/02/27 20:37:47 shadow Exp $");
  
  #include "afs/sysincludes.h"	/* Standard vendor system headers */
  #include "afsincludes.h"	/* Afs-based standard headers */
***************
*** 105,112 ****
--- 105,117 ----
      volatile
  #endif
      afs_int32 error;
+ #ifdef AFS_DARWIN80_ENV
+     uio_t tuiop = NULL;
+ #else
      struct uio tuio;
+     struct uio *tuiop = &tuio;
      struct iovec *tvec;		/* again, should have define */
+ #endif
      register afs_int32 code;
      struct vrequest treq;
  
***************
*** 118,125 ****
      if ((code = afs_InitReq(&treq, acred)))
  	return code;
      /* otherwise we read */
!     totalLength = auio->afsio_resid;
!     filePos = auio->afsio_offset;
      error = 0;
      transferLength = 0;
      afs_Trace4(afs_iclSetp, CM_TRACE_WRITE, ICL_TYPE_POINTER, avc,
--- 123,130 ----
      if ((code = afs_InitReq(&treq, acred)))
  	return code;
      /* otherwise we read */
!     totalLength = AFS_UIO_RESID(auio);
!     filePos = AFS_UIO_OFFSET(auio);
      error = 0;
      transferLength = 0;
      afs_Trace4(afs_iclSetp, CM_TRACE_WRITE, ICL_TYPE_POINTER, avc,
***************
*** 141,148 ****
  	 */
  	osi_Assert(filePos <= avc->m.Length);
  	diff = avc->m.Length - filePos;
! 	auio->afsio_resid = MIN(totalLength, diff);
! 	totalLength = auio->afsio_resid;
      }
  #else
      if (aio & IO_APPEND) {
--- 146,153 ----
  	 */
  	osi_Assert(filePos <= avc->m.Length);
  	diff = avc->m.Length - filePos;
! 	AFS_UIO_SETRESID(auio, MIN(totalLength, diff));
! 	totalLength = AFS_UIO_RESID(auio);
      }
  #else
      if (aio & IO_APPEND) {
***************
*** 150,156 ****
  #if	defined(AFS_SUN56_ENV)
  	auio->uio_loffset = 0;
  #endif
! 	filePos = auio->afsio_offset = avc->m.Length;
      }
  #endif
      /*
--- 155,162 ----
  #if	defined(AFS_SUN56_ENV)
  	auio->uio_loffset = 0;
  #endif
! 	filePos = avc->m.Length;
! 	AFS_UIO_SETOFFSET(auio, filePos);
      }
  #endif
      /*
***************
*** 184,190 ****
--- 190,198 ----
      afs_FakeOpen(avc);
  #endif
      avc->states |= CDirty;
+ #ifndef AFS_DARWIN80_ENV
      tvec = (struct iovec *)osi_AllocSmallSpace(sizeof(struct iovec));
+ #endif
      while (totalLength > 0) {
  	/* 
  	 *  The following line is necessary because afs_GetDCache with
***************
*** 198,204 ****
  	    if (tdc)
  		ObtainWriteLock(&tdc->lock, 653);
  	} else if (afs_blocksUsed >
! 		   (CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100) {
  	    tdc = afs_FindDCache(avc, filePos);
  	    if (tdc) {
  		ObtainWriteLock(&tdc->lock, 654);
--- 206,212 ----
  	    if (tdc)
  		ObtainWriteLock(&tdc->lock, 653);
  	} else if (afs_blocksUsed >
! 		   PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks)) {
  	    tdc = afs_FindDCache(avc, filePos);
  	    if (tdc) {
  		ObtainWriteLock(&tdc->lock, 654);
***************
*** 212,221 ****
  	    if (!tdc) {
  		afs_MaybeWakeupTruncateDaemon();
  		while (afs_blocksUsed >
! 		       (CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100) {
  		    ReleaseWriteLock(&avc->lock);
  		    if (afs_blocksUsed - afs_blocksDiscarded >
! 			(CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100) {
  			afs_WaitForCacheDrain = 1;
  			afs_osi_Sleep(&afs_WaitForCacheDrain);
  		    }
--- 220,229 ----
  	    if (!tdc) {
  		afs_MaybeWakeupTruncateDaemon();
  		while (afs_blocksUsed >
! 		       PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks)) {
  		    ReleaseWriteLock(&avc->lock);
  		    if (afs_blocksUsed - afs_blocksDiscarded >
! 			PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks)) {
  			afs_WaitForCacheDrain = 1;
  			afs_osi_Sleep(&afs_WaitForCacheDrain);
  		    }
***************
*** 254,266 ****
  	     * as will fit */
  	    len = max - offset;
  	}
  	/* mung uio structure to be right for this transfer */
  	afsio_copy(auio, &tuio, tvec);
  	trimlen = len;
  	afsio_trim(&tuio, trimlen);
! 	tuio.afsio_offset = offset;
  
! 	code = afs_MemWriteUIO(tdc->f.inode, &tuio);
  	if (code) {
  	    void *mep;		/* XXX in prototype world is struct memCacheEntry * */
  	    error = code;
--- 262,282 ----
  	     * as will fit */
  	    len = max - offset;
  	}
+ 
+ #ifdef  AFS_DARWIN80_ENV
+         if (tuiop)
+ 	    uio_free(tuiop);
+ 	trimlen = len;
+ 	tuiop = afsio_darwin_partialcopy(auio, trimlen);
+ #else
  	/* mung uio structure to be right for this transfer */
  	afsio_copy(auio, &tuio, tvec);
  	trimlen = len;
  	afsio_trim(&tuio, trimlen);
! #endif
! 	AFS_UIO_SETOFFSET(tuiop, offset);
  
! 	code = afs_MemWriteUIO(tdc->f.inode, tuiop);
  	if (code) {
  	    void *mep;		/* XXX in prototype world is struct memCacheEntry * */
  	    error = code;
***************
*** 275,281 ****
  	    break;
  	}
  	/* otherwise we've written some, fixup length, etc and continue with next seg */
! 	len = len - tuio.afsio_resid;	/* compute amount really transferred */
  	tlen = len;
  	afsio_skip(auio, tlen);	/* advance auio over data written */
  	/* compute new file size */
--- 291,297 ----
  	    break;
  	}
  	/* otherwise we've written some, fixup length, etc and continue with next seg */
! 	len = len - AFS_UIO_RESID(tuiop);	/* compute amount really transferred */
  	tlen = len;
  	afsio_skip(auio, tlen);	/* advance auio over data written */
  	/* compute new file size */
***************
*** 323,329 ****
--- 339,349 ----
  	avc->vc_error = error;
      if (!noLock)
  	ReleaseWriteLock(&avc->lock);
+ #ifdef AFS_DARWIN80_ENV
+     uio_free(tuiop);
+ #else
      osi_FreeSmallSpace(tvec);
+ #endif
      error = afs_CheckCode(error, &treq, 6);
      return error;
  }
***************
*** 347,354 ****
--- 367,379 ----
      volatile
  #endif
      afs_int32 error;
+ #ifdef AFS_DARWIN80_ENV
+     uio_t tuiop = NULL;
+ #else
      struct uio tuio;
+     struct uio *tuiop = &tuio;
      struct iovec *tvec;		/* again, should have define */
+ #endif
      struct osi_file *tfile;
      register afs_int32 code;
      struct vrequest treq;
***************
*** 361,368 ****
      if ((code = afs_InitReq(&treq, acred)))
  	return code;
      /* otherwise we read */
!     totalLength = auio->afsio_resid;
!     filePos = auio->afsio_offset;
      error = 0;
      transferLength = 0;
      afs_Trace4(afs_iclSetp, CM_TRACE_WRITE, ICL_TYPE_POINTER, avc,
--- 386,393 ----
      if ((code = afs_InitReq(&treq, acred)))
  	return code;
      /* otherwise we read */
!     totalLength = AFS_UIO_RESID(auio);
!     filePos = AFS_UIO_OFFSET(auio);
      error = 0;
      transferLength = 0;
      afs_Trace4(afs_iclSetp, CM_TRACE_WRITE, ICL_TYPE_POINTER, avc,
***************
*** 384,391 ****
  	 */
  	osi_Assert(filePos <= avc->m.Length);
  	diff = avc->m.Length - filePos;
! 	auio->afsio_resid = MIN(totalLength, diff);
! 	totalLength = auio->afsio_resid;
      }
  #else
      if (aio & IO_APPEND) {
--- 409,416 ----
  	 */
  	osi_Assert(filePos <= avc->m.Length);
  	diff = avc->m.Length - filePos;
! 	AFS_UIO_SETRESID(auio, MIN(totalLength, diff));
! 	totalLength = AFS_UIO_RESID(auio);
      }
  #else
      if (aio & IO_APPEND) {
***************
*** 393,399 ****
  #if     defined(AFS_SUN56_ENV)
  	auio->uio_loffset = 0;
  #endif
! 	filePos = auio->afsio_offset = avc->m.Length;
      }
  #endif
      /*
--- 418,425 ----
  #if     defined(AFS_SUN56_ENV)
  	auio->uio_loffset = 0;
  #endif
! 	filePos = avc->m.Length;
! 	AFS_UIO_SETOFFSET(auio, avc->m.Length);
      }
  #endif
      /*
***************
*** 427,433 ****
--- 453,461 ----
      afs_FakeOpen(avc);
  #endif
      avc->states |= CDirty;
+ #ifndef AFS_DARWIN80_ENV
      tvec = (struct iovec *)osi_AllocSmallSpace(sizeof(struct iovec));
+ #endif
      while (totalLength > 0) {
  	/* 
  	 *  The following line is necessary because afs_GetDCache with
***************
*** 442,448 ****
  	    if (tdc)
  		ObtainWriteLock(&tdc->lock, 657);
  	} else if (afs_blocksUsed >
! 		   (CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100) {
  	    tdc = afs_FindDCache(avc, filePos);
  	    if (tdc) {
  		ObtainWriteLock(&tdc->lock, 658);
--- 470,476 ----
  	    if (tdc)
  		ObtainWriteLock(&tdc->lock, 657);
  	} else if (afs_blocksUsed >
! 		   PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks)) {
  	    tdc = afs_FindDCache(avc, filePos);
  	    if (tdc) {
  		ObtainWriteLock(&tdc->lock, 658);
***************
*** 456,465 ****
  	    if (!tdc) {
  		afs_MaybeWakeupTruncateDaemon();
  		while (afs_blocksUsed >
! 		       (CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100) {
  		    ReleaseWriteLock(&avc->lock);
  		    if (afs_blocksUsed - afs_blocksDiscarded >
! 			(CM_WAITFORDRAINPCT * afs_cacheBlocks) / 100) {
  			afs_WaitForCacheDrain = 1;
  			afs_osi_Sleep(&afs_WaitForCacheDrain);
  		    }
--- 484,493 ----
  	    if (!tdc) {
  		afs_MaybeWakeupTruncateDaemon();
  		while (afs_blocksUsed >
! 		       PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks)) {
  		    ReleaseWriteLock(&avc->lock);
  		    if (afs_blocksUsed - afs_blocksDiscarded >
! 			PERCENT(CM_WAITFORDRAINPCT, afs_cacheBlocks)) {
  			afs_WaitForCacheDrain = 1;
  			afs_osi_Sleep(&afs_WaitForCacheDrain);
  		    }
***************
*** 499,509 ****
  	     * as will fit */
  	    len = max - offset;
  	}
  	/* mung uio structure to be right for this transfer */
  	afsio_copy(auio, &tuio, tvec);
  	trimlen = len;
  	afsio_trim(&tuio, trimlen);
! 	tuio.afsio_offset = offset;
  #if defined(AFS_AIX41_ENV)
  	AFS_GUNLOCK();
  	code =
--- 527,546 ----
  	     * as will fit */
  	    len = max - offset;
  	}
+ 
+ #ifdef  AFS_DARWIN80_ENV
+ 	if (tuiop)
+ 	    uio_free(tuiop);
+ 	trimlen = len;
+ 	tuiop = afsio_darwin_partialcopy(auio, trimlen);
+ #else
  	/* mung uio structure to be right for this transfer */
  	afsio_copy(auio, &tuio, tvec);
  	trimlen = len;
  	afsio_trim(&tuio, trimlen);
! #endif
! 	AFS_UIO_SETOFFSET(tuiop, offset);
! 
  #if defined(AFS_AIX41_ENV)
  	AFS_GUNLOCK();
  	code =
***************
*** 563,568 ****
--- 600,609 ----
  	AFS_GUNLOCK();
  	code = osi_rdwr(tfile, &tuio, UIO_WRITE);
  	AFS_GLOCK();
+ #elif defined(AFS_DARWIN80_ENV)
+ 	AFS_GUNLOCK();
+ 	code = VNOP_WRITE(tfile->vnode, tuiop, 0, afs_osi_ctxtp);
+ 	AFS_GLOCK();
  #elif defined(AFS_DARWIN_ENV)
  	AFS_GUNLOCK();
  	VOP_LOCK(tfile->vnode, LK_EXCLUSIVE, current_proc());
***************
*** 600,606 ****
  	    break;
  	}
  	/* otherwise we've written some, fixup length, etc and continue with next seg */
! 	len = len - tuio.afsio_resid;	/* compute amount really transferred */
  	tlen = len;
  	afsio_skip(auio, tlen);	/* advance auio over data written */
  	/* compute new file size */
--- 641,647 ----
  	    break;
  	}
  	/* otherwise we've written some, fixup length, etc and continue with next seg */
! 	len = len - AFS_UIO_RESID(tuiop);	/* compute amount really transferred */
  	tlen = len;
  	afsio_skip(auio, tlen);	/* advance auio over data written */
  	/* compute new file size */
***************
*** 651,657 ****
--- 692,702 ----
  	avc->vc_error = error;
      if (!noLock)
  	ReleaseWriteLock(&avc->lock);
+ #ifdef AFS_DARWIN80_ENV
+     uio_free(tuiop);
+ #else
      osi_FreeSmallSpace(tvec);
+ #endif
  #ifndef	AFS_VM_RDWR_ENV
      /*
       * If write is implemented via VM, afs_fsync() is called from the high-level
Index: openafs/src/afsd/Makefile.in
diff -c openafs/src/afsd/Makefile.in:1.16.2.1 openafs/src/afsd/Makefile.in:1.16.2.2
*** openafs/src/afsd/Makefile.in:1.16.2.1	Sun Jan 30 23:13:57 2005
--- openafs/src/afsd/Makefile.in	Thu Mar  9 01:41:34 2006
***************
*** 9,15 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! LDFLAGS = ${XLDFLAGS}
  
  #
  # What to make
--- 9,15 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! LDFLAGS = ${XLDFLAGS} ${ARCHFLAGS}
  
  #
  # What to make
Index: openafs/src/afsd/afs.rc.darwin
diff -c openafs/src/afsd/afs.rc.darwin:1.6.2.1 openafs/src/afsd/afs.rc.darwin:1.6.2.2
*** openafs/src/afsd/afs.rc.darwin:1.6.2.1	Mon Apr  4 00:01:20 2005
--- openafs/src/afsd/afs.rc.darwin	Tue Feb 14 19:38:36 2006
***************
*** 41,54 ****
  {
      echo "Starting OpenAFS"
  
-     if [ "${NETWORKUP}" = "-NO-" ]; then exit; fi
- 
      if [ -f $AFSDOPT ]; then
  	OPTIONS=`cat $AFSDOPT`
      else
  	OPTIONS="$MEDIUM -fakestat"
      fi
  
  # Need the commands ps, awk, kill, sleep
      PATH=${PATH}${PATH:+:}/sbin:/bin:/usr/bin
  
--- 41,56 ----
  {
      echo "Starting OpenAFS"
  
      if [ -f $AFSDOPT ]; then
  	OPTIONS=`cat $AFSDOPT`
      else
  	OPTIONS="$MEDIUM -fakestat"
      fi
  
+     if [ "${NETWORKUP}" = "-NO-" ]; then
+         echo $OPTIONS | grep -e '-dynroot' || exit
+     fi
+ 
  # Need the commands ps, awk, kill, sleep
      PATH=${PATH}${PATH:+:}/sbin:/bin:/usr/bin
  
Index: openafs/src/afsd/afsd.c
diff -c openafs/src/afsd/afsd.c:1.43.2.10.4.1 openafs/src/afsd/afsd.c:1.43.2.17
*** openafs/src/afsd/afsd.c:1.43.2.10.4.1	Thu Oct 13 17:01:49 2005
--- openafs/src/afsd/afsd.c	Thu Mar 23 10:40:10 2006
***************
*** 47,53 ****
    *                system problems, which can only be ameliorated by changing
    *                NINODE (or equivalent) and rebuilding the kernel.
    *		   This option is now disabled.
!   *	-logfile   Place where to put the logfile (default in <cache>/etc/AFSLog.
    *	-waitclose make close calls always synchronous (slows em down, tho)
    *	-files_per_subdir [n]	number of files per cache subdir. (def=2048)
    *	-shutdown  Shutdown afs daemons
--- 47,54 ----
    *                system problems, which can only be ameliorated by changing
    *                NINODE (or equivalent) and rebuilding the kernel.
    *		   This option is now disabled.
!   *	-logfile   [OBSOLETE] Place where to put the logfile (default in
!   *                <cache>/etc/AFSLog.
    *	-waitclose make close calls always synchronous (slows em down, tho)
    *	-files_per_subdir [n]	number of files per cache subdir. (def=2048)
    *	-shutdown  Shutdown afs daemons
***************
*** 57,63 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.10.4.1 2005/10/13 21:01:49 shadow Exp $");
  
  #define VFS 1
  
--- 58,64 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsd/afsd.c,v 1.43.2.17 2006/03/23 15:40:10 shadow Exp $");
  
  #define VFS 1
  
***************
*** 155,160 ****
--- 156,164 ----
  #include <sys/resource.h>
  #endif
  #ifdef AFS_DARWIN_ENV
+ #ifdef AFS_DARWIN80_ENV
+ #include <sys/ioctl.h>
+ #endif
  #include <mach/mach.h>
  /* Symbols from the DiskArbitration framework */
  kern_return_t DiskArbStart(mach_port_t *);
***************
*** 185,191 ****
  
  
  #define CACHEINFOFILE   "cacheinfo"
- #define	AFSLOGFILE	"AFSLog"
  #define	DCACHEFILE	"CacheItems"
  #define	VOLINFOFILE	"VolumeItems"
  #define CELLINFOFILE	"CellItems"
--- 189,194 ----
***************
*** 230,243 ****
  afs_int32 enable_rxbind = 0;
  afs_int32 afs_shutdown = 0;
  afs_int32 cacheBlocks;		/*Num blocks in the cache */
! afs_int32 cacheFiles = 1000;	/*Optimal # of files in workstation cache */
! afs_int32 cacheStatEntries = 300;	/*Number of stat cache entries */
  char cacheBaseDir[1024];	/*Where the workstation AFS cache lives */
  char confDir[1024];		/*Where the workstation AFS configuration lives */
  char fullpn_DCacheFile[1024];	/*Full pathname of DCACHEFILE */
  char fullpn_VolInfoFile[1024];	/*Full pathname of VOLINFOFILE */
  char fullpn_CellInfoFile[1024];	/*Full pathanem of CELLINFOFILE */
- char fullpn_AFSLogFile[1024];	/*Full pathname of AFSLOGFILE */
  char fullpn_CacheInfo[1024];	/*Full pathname of CACHEINFO */
  char fullpn_VFile[1024];	/*Full pathname of data cache files */
  char *vFilePtr;			/*Ptr to the number part of above pathname */
--- 233,245 ----
  afs_int32 enable_rxbind = 0;
  afs_int32 afs_shutdown = 0;
  afs_int32 cacheBlocks;		/*Num blocks in the cache */
! afs_int32 cacheFiles;	/*Optimal # of files in workstation cache */
! afs_int32 cacheStatEntries;	/*Number of stat cache entries */
  char cacheBaseDir[1024];	/*Where the workstation AFS cache lives */
  char confDir[1024];		/*Where the workstation AFS configuration lives */
  char fullpn_DCacheFile[1024];	/*Full pathname of DCACHEFILE */
  char fullpn_VolInfoFile[1024];	/*Full pathname of VOLINFOFILE */
  char fullpn_CellInfoFile[1024];	/*Full pathanem of CELLINFOFILE */
  char fullpn_CacheInfo[1024];	/*Full pathname of CACHEINFO */
  char fullpn_VFile[1024];	/*Full pathname of data cache files */
  char *vFilePtr;			/*Ptr to the number part of above pathname */
***************
*** 246,251 ****
--- 248,254 ----
  int sawCacheBlocks = 0;
  int sawDCacheSize = 0;
  int sawBiod = 0;
+ int sawCacheStatEntries = 0;
  char cacheMountDir[1024];	/*Mount directory for AFS */
  char rootVolume[64] = "root.afs";	/*AFS root volume name */
  afs_int32 cacheSetTime = FALSE;	/*Keep checking time to avoid drift? */
***************
*** 260,267 ****
  static int nFilesPerDir = 2048;	/* # files per cache dir */
  static int nDaemons = 2;	/* Number of background daemons */
  static int chunkSize = 0;	/* 2^chunkSize bytes per chunk */
! static int dCacheSize = 300;	/* # of dcache entries */
! static int vCacheSize = 50;	/* # of volume cache entries */
  static int rootVolSet = 0;	/*True if root volume name explicitly set */
  int addrNum;			/*Cell server address index being printed */
  static int cacheFlags = 0;	/*Flags to cache manager */
--- 263,270 ----
  static int nFilesPerDir = 2048;	/* # files per cache dir */
  static int nDaemons = 2;	/* Number of background daemons */
  static int chunkSize = 0;	/* 2^chunkSize bytes per chunk */
! static int dCacheSize;		/* # of dcache entries */
! static int vCacheSize = 200;	/* # of volume cache entries */
  static int rootVolSet = 0;	/*True if root volume name explicitly set */
  int addrNum;			/*Cell server address index being printed */
  static int cacheFlags = 0;	/*Flags to cache manager */
***************
*** 459,465 ****
  	totalblks /= (1024 / bsize);
      }
  
!     mint = totalblks - ((totalblks * 5) / 100);
      if (cs > mint) {
  	printf
  	    ("Cache size (%d) must be less than 95%% of partition size (which is %d). Lower cache size\n",
--- 462,468 ----
  	totalblks /= (1024 / bsize);
      }
  
!     mint = totalblks / 100 * 95;
      if (cs > mint) {
  	printf
  	    ("Cache size (%d) must be less than 95%% of partition size (which is %d). Lower cache size\n",
***************
*** 587,593 ****
      /* Build the new cache subdirectory */
      sprintf(dir, "%s/D%d", basename, dirNum);
  
!     if (afsd_verbose)
  	printf("%s: Creating cache subdir '%s'\n", rn, dir);
  
      if ((ret = mkdir(dir, 0700)) != 0) {
--- 590,596 ----
      /* Build the new cache subdirectory */
      sprintf(dir, "%s/D%d", basename, dirNum);
  
!     if (afsd_debug)
  	printf("%s: Creating cache subdir '%s'\n", rn, dir);
  
      if ((ret = mkdir(dir, 0700)) != 0) {
***************
*** 657,663 ****
      int cfd;			/*File descriptor to AFS cache file */
      int closeResult;		/*Result of close() */
  
!     if (afsd_verbose)
  	printf("%s: Creating cache file '%s'\n", rn, fname);
      cfd = open(fname, createAndTrunc, ownerRWmode);
      if (cfd <= 0) {
--- 660,666 ----
      int cfd;			/*File descriptor to AFS cache file */
      int closeResult;		/*Result of close() */
  
!     if (afsd_debug)
  	printf("%s: Creating cache file '%s'\n", rn, fname);
      cfd = open(fname, createAndTrunc, ownerRWmode);
      if (cfd <= 0) {
***************
*** 689,701 ****
  CreateFileIfMissing(char *fullpn, int missing)
  {
      if (missing) {
- 	if (afsd_verbose)
- 	    printf("CreateFileIfMissing: Creating '%s'\n", fullpn);
  	if (CreateCacheFile(fullpn, NULL))
  	    printf("CreateFileIfMissing: Can't create '%s'\n", fullpn);
      }
  }
  
  /*-----------------------------------------------------------------------------
    * SweepAFSCache
    *
--- 692,717 ----
  CreateFileIfMissing(char *fullpn, int missing)
  {
      if (missing) {
  	if (CreateCacheFile(fullpn, NULL))
  	    printf("CreateFileIfMissing: Can't create '%s'\n", fullpn);
      }
  }
  
+ static void
+ UnlinkUnwantedFile(char *rn, char *fullpn_FileToDelete, char *fileToDelete)
+ {
+     if (unlink(fullpn_FileToDelete)) {
+ 	if ((errno == EISDIR || errno == EPERM) && *fileToDelete == 'D') {
+ 	    if (rmdir(fullpn_FileToDelete)) {
+ 		printf("%s: Can't rmdir '%s', errno is %d\n", rn,
+ 		       fullpn_FileToDelete, errno);
+ 	    }
+ 	} else
+ 	    printf("%s: Can't unlink '%s', errno is %d\n", rn,
+ 		   fullpn_FileToDelete, errno);
+     }
+ }
+ 
  /*-----------------------------------------------------------------------------
    * SweepAFSCache
    *
***************
*** 902,917 ****
  	    sprintf(fileToDelete, "%s", currp->d_name);
  	    if (afsd_verbose)
  		printf("%s: Deleting '%s'\n", rn, fullpn_FileToDelete);
! 	    if (unlink(fullpn_FileToDelete)) {
! 		if (errno == EISDIR && *fileToDelete == 'D') {
! 		    if (rmdir(fullpn_FileToDelete)) {
! 			printf("%s: Can't rmdir '%s', errno is %d\n", rn,
! 			       fullpn_FileToDelete, errno);
! 		    }
! 		} else
! 		    printf("%s: Can't unlink '%s', errno is %d\n", rn,
! 			   fullpn_FileToDelete, errno);
! 	    }
  	}
      }
  
--- 918,924 ----
  	    sprintf(fileToDelete, "%s", currp->d_name);
  	    if (afsd_verbose)
  		printf("%s: Deleting '%s'\n", rn, fullpn_FileToDelete);
! 	    UnlinkUnwantedFile(rn, fullpn_FileToDelete, fileToDelete);
  	}
      }
  
***************
*** 1021,1036 ****
  	/* Remove any directories >= maxDir -- they should be empty */
  	for (; highDir >= maxDir; highDir--) {
  	    sprintf(fileToDelete, "D%d", highDir);
! 	    if (unlink(fullpn_FileToDelete)) {
! 		if (errno == EISDIR && *fileToDelete == 'D') {
! 		    if (rmdir(fullpn_FileToDelete)) {
! 			printf("%s: Can't rmdir '%s', errno is %d\n", rn,
! 			       fullpn_FileToDelete, errno);
! 		    }
! 		} else
! 		    printf("%s: Can't unlink '%s', errno is %d\n", rn,
! 			   fullpn_FileToDelete, errno);
! 	    }
  	}
      }
  
--- 1028,1034 ----
  	/* Remove any directories >= maxDir -- they should be empty */
  	for (; highDir >= maxDir; highDir--) {
  	    sprintf(fileToDelete, "D%d", highDir);
! 	    UnlinkUnwantedFile(rn, fullpn_FileToDelete, fileToDelete);
  	}
      }
  
***************
*** 1071,1076 ****
--- 1069,1078 ----
  	    return "cannot use reiserfs as cache partition";
  	} else if  (statfsbuf.f_type == 0x58465342) { /* XFS_SUPER_MAGIC */
  	    return "cannot use xfs as cache partition";
+ 	} else if (statfsbuf.f_type == 0x01021994) {    /* TMPFS_SUPER_MAGIC */
+             return "cannot use tmpfs as cache partition";
+         } else if (statfsbuf.f_type != 0xEF53) {
+             return "must use ext2 or ext3 for cache partition";
  	}
      }
  #endif
***************
*** 1192,1204 ****
  }
  
  static
! ConfigCell(aci, arock, adir)
!      register struct afsconf_cell *aci;
!      char *arock;
!      struct afsconf_dir *adir;
  {
!     register int isHomeCell;
!     register int i, code;
      afs_int32 cellFlags = 0;
      afs_int32 hosts[MAXHOSTSPERCELL];
  
--- 1194,1203 ----
  }
  
  static
! ConfigCell(struct afsconf_cell *aci, char *arock, struct afsconf_dir *adir)
  {
!     int isHomeCell;
!     int i, code;
      afs_int32 cellFlags = 0;
      afs_int32 hosts[MAXHOSTSPERCELL];
  
***************
*** 1226,1235 ****
  }
  
  static
! ConfigCellAlias(aca, arock, adir)
!      register struct afsconf_cellalias *aca;
!      char *arock;
!      struct afsconf_dir *adir;
  {
      /* push the alias into the kernel */
      call_syscall(AFSOP_ADDCELLALIAS, aca->aliasName, aca->realName);
--- 1225,1232 ----
  }
  
  static
! ConfigCellAlias(struct afsconf_cellalias *aca,
! 		char *arock, struct afsconf_dir *adir)
  {
      /* push the alias into the kernel */
      call_syscall(AFSOP_ADDCELLALIAS, aca->aliasName, aca->realName);
***************
*** 1310,1322 ****
  #endif
  #endif
  
! mainproc(as, arock)
!      struct cmd_syndesc *as;
!      char *arock;
  {
      static char rn[] = "afsd";	/*Name of this routine */
!     register afs_int32 code;	/*Result of fork() */
!     register int i;
      int currVFile;		/*Current AFS cache file number passed in */
      int mountFlags;		/*Flags passed to mount() */
      int lookupResult;		/*Result of GetLocalCellName() */
--- 1307,1317 ----
  #endif
  #endif
  
! mainproc(struct cmd_syndesc *as, char *arock)
  {
      static char rn[] = "afsd";	/*Name of this routine */
!     afs_int32 code;		/*Result of fork() */
!     int i;
      int currVFile;		/*Current AFS cache file number passed in */
      int mountFlags;		/*Flags passed to mount() */
      int lookupResult;		/*Result of GetLocalCellName() */
***************
*** 1359,1372 ****
      if (as->parms[3].items) {
  	/* -stat */
  	cacheStatEntries = atoi(as->parms[3].items->data);
      }
      if (as->parms[4].items) {
  	/* -memcache */
  	cacheBaseDir[0] = '\0';
  	sawCacheBaseDir = 1;
  	cacheFlags |= AFSCALL_INIT_MEMCACHE;
- 	if (chunkSize == 0)
- 	    chunkSize = 13;
      }
      if (as->parms[5].items) {
  	/* -cachedir */
--- 1354,1366 ----
      if (as->parms[3].items) {
  	/* -stat */
  	cacheStatEntries = atoi(as->parms[3].items->data);
+ 	sawCacheStatEntries = 1;
      }
      if (as->parms[4].items) {
  	/* -memcache */
  	cacheBaseDir[0] = '\0';
  	sawCacheBaseDir = 1;
  	cacheFlags |= AFSCALL_INIT_MEMCACHE;
      }
      if (as->parms[5].items) {
  	/* -cachedir */
***************
*** 1442,1451 ****
  	strcpy(confDir, as->parms[17].items->data);
      }
      sprintf(fullpn_CacheInfo, "%s/%s", confDir, CACHEINFOFILE);
-     sprintf(fullpn_AFSLogFile, "%s/%s", confDir, AFSLOGFILE);
      if (as->parms[18].items) {
  	/* -logfile */
! 	strcpy(fullpn_AFSLogFile, as->parms[18].items->data);
      }
      if (as->parms[19].items) {
  	/* -waitclose */
--- 1436,1444 ----
  	strcpy(confDir, as->parms[17].items->data);
      }
      sprintf(fullpn_CacheInfo, "%s/%s", confDir, CACHEINFOFILE);
      if (as->parms[18].items) {
  	/* -logfile */
!         printf("afsd: Ignoring obsolete -logfile flag\n");
      }
      if (as->parms[19].items) {
  	/* -waitclose */
***************
*** 1488,1494 ****
      if (as->parms[25].items) {
  	/* -files_per_subdir */
  	int res = atoi(as->parms[25].items->data);
! 	if (res < 10 || res > 2 ^ 30) {
  	    printf
  		("afsd:invalid number of files per subdir, \"%s\". Ignored\n",
  		 as->parms[25].items->data);
--- 1481,1487 ----
      if (as->parms[25].items) {
  	/* -files_per_subdir */
  	int res = atoi(as->parms[25].items->data);
! 	if (res < 10 || res > (1 << 30)) {
  	    printf
  		("afsd:invalid number of files per subdir, \"%s\". Ignored\n",
  		 as->parms[25].items->data);
***************
*** 1562,1579 ****
  	exit(1);
      }
  
-     if ((logfd = fopen(fullpn_AFSLogFile, "r+")) == 0) {
- 	if (afsd_verbose)
- 	    printf("%s: Creating '%s'\n", rn, fullpn_AFSLogFile);
- 	if (CreateCacheFile(fullpn_AFSLogFile, NULL)) {
- 	    printf
- 		("%s: Can't create '%s' (You may want to use the -logfile option)\n",
- 		 rn, fullpn_AFSLogFile);
- 	    exit(1);
- 	}
-     } else
- 	fclose(logfd);
- 
      /* do some random computations in memcache case to get things to work
       * reasonably no matter which parameters you set.
       */
--- 1555,1560 ----
***************
*** 1581,1587 ****
--- 1562,1574 ----
  	/* memory cache: size described either as blocks or dcache entries, but
  	 * not both.
  	 */
+ 	if (filesSet) {
+ 	    fprintf(stderr, "%s: -files ignored with -memcache\n", rn);
+ 	}
  	if (sawDCacheSize) {
+ 	    if (chunkSize == 0) {
+ 		chunkSize = 13;	/* 8k default chunksize for memcache */
+ 	    }
  	    if (sawCacheBlocks) {
  		printf
  		    ("%s: can't set cache blocks and dcache size simultaneously when diskless.\n",
***************
*** 1589,1606 ****
  		exit(1);
  	    }
  	    /* compute the cache size based on # of chunks times the chunk size */
! 	    i = (chunkSize == 0 ? 13 : chunkSize);
! 	    i = (1 << i);	/* bytes per chunk */
  	    cacheBlocks = i * dCacheSize;
  	    sawCacheBlocks = 1;	/* so that ParseCacheInfoFile doesn't overwrite */
  	} else {
  	    /* compute the dcache size from overall cache size and chunk size */
! 	    i = (chunkSize == 0 ? 13 : chunkSize);
! 	    /* dCacheSize = (cacheBlocks << 10) / (1<<i); */
! 	    if (i > 10) {
! 		dCacheSize = (cacheBlocks >> (i - 10));
! 	    } else if (i < 10) {
! 		dCacheSize = (cacheBlocks << (10 - i));
  	    } else {
  		dCacheSize = cacheBlocks;
  	    }
--- 1576,1601 ----
  		exit(1);
  	    }
  	    /* compute the cache size based on # of chunks times the chunk size */
! 	    i = (1 << chunkSize);	/* bytes per chunk */
  	    cacheBlocks = i * dCacheSize;
  	    sawCacheBlocks = 1;	/* so that ParseCacheInfoFile doesn't overwrite */
  	} else {
+ 	    if (chunkSize == 0) {
+ 		/* Try to autotune the memcache chunksize based on size
+ 		 * of memcache. This is done on the assumption that approx
+ 		 * 1024 chunks is suitable, it's a balance between enough
+ 		 * chunks to be useful and ramping up nicely when using larger
+ 		 * memcache to improve bulk read/write performance
+ 		 */
+ 		for (i = 14;
+ 		     i <= 21 && (1 << i) / 1024 < (cacheBlocks / 1024); i++);
+ 		chunkSize = i - 1;
+ 	    }
  	    /* compute the dcache size from overall cache size and chunk size */
! 	    if (chunkSize > 10) {
! 		dCacheSize = (cacheBlocks >> (chunkSize - 10));
! 	    } else if (chunkSize < 10) {
! 		dCacheSize = (cacheBlocks << (10 - chunkSize));
  	    } else {
  		dCacheSize = cacheBlocks;
  	    }
***************
*** 1608,1615 ****
  	     * by ParseCacheInfoFile.
  	     */
  	}
! 	/* kernel computes # of dcache entries as min of cacheFiles and dCacheSize,
! 	 * so we now make them equal.
  	 */
  	cacheFiles = dCacheSize;
      } else {
--- 1603,1613 ----
  	     * by ParseCacheInfoFile.
  	     */
  	}
! 	if (afsd_verbose)
! 	    printf("%s: chunkSize autotuned to %d\n", rn, chunkSize);
! 
! 	/* kernel computes # of dcache entries as min of cacheFiles and
! 	 * dCacheSize, so we now make them equal.
  	 */
  	cacheFiles = dCacheSize;
      } else {
***************
*** 1618,1660 ****
  	 * but only if -files isn't given on the command line.
  	 * Don't let # files be so small as to prevent full utilization 
  	 * of the cache unless user has explicitly asked for it.
- 	 * average V-file is ~10K, according to tentative empirical studies.
  	 */
  	if (!filesSet) {
! 	    cacheFiles = cacheBlocks / 10;
! 	    if (cacheFiles < 100)
! 		cacheFiles = 100;
  	    /* Always allow more files than chunks.  Presume average V-file 
  	     * is ~67% of a chunk...  (another guess, perhaps Honeyman will
  	     * have a grad student write a paper).  i is KILOBYTES.
  	     */
! 	    i = 1 << (chunkSize ==
! 		      0 ? 6 : (chunkSize < 10 ? 0 : chunkSize - 10));
  	    cacheFiles = max(cacheFiles, 1.5 * (cacheBlocks / i));
  	    /* never permit more files than blocks, while leaving space for
  	     * VolumeInfo and CacheItems files.  VolumeInfo is usually 20K,
  	     * CacheItems is 50 Bytes / file (== 1K/20)
  	     */
- #define VOLINFOSZ 20
  #define CACHEITMSZ (cacheFiles / 20)
! #ifdef AFS_AIX_ENV
! 	    cacheFiles =
! 		min(cacheFiles, (cacheBlocks - VOLINFOSZ - CACHEITMSZ) / 4);
! #else
! 	    cacheFiles =
! 		min(cacheFiles, cacheBlocks - VOLINFOSZ - CACHEITMSZ);
! #endif
  	    if (cacheFiles < 100)
  		fprintf(stderr, "%s: WARNING: cache probably too small!\n",
  			rn);
  	}
  	if (!sawDCacheSize) {
! 	    if ((cacheFiles / 2) > dCacheSize)
! 		dCacheSize = cacheFiles / 2;
! 	    if (dCacheSize > 2000)
  		dCacheSize = 2000;
  	}
      }
  
      /*
       * Create and zero the inode table for the desired cache files.
--- 1616,1702 ----
  	 * but only if -files isn't given on the command line.
  	 * Don't let # files be so small as to prevent full utilization 
  	 * of the cache unless user has explicitly asked for it.
  	 */
+ 	if (chunkSize == 0) {
+ 	    /* Set chunksize to 256kB - 1MB depending on cache size */
+ 	    if (cacheBlocks < 500000) {
+ 		chunkSize = 18;
+ 	    } else if (cacheBlocks < 1000000) {
+ 		chunkSize = 19;
+ 	    } else {
+ 		chunkSize = 20;
+ 	    }
+ 	}
  	if (!filesSet) {
! 	    cacheFiles = cacheBlocks / 32;	/* Assume 32k avg filesize */
! 
! 	    cacheFiles = max(cacheFiles, 1000);
! 
  	    /* Always allow more files than chunks.  Presume average V-file 
  	     * is ~67% of a chunk...  (another guess, perhaps Honeyman will
  	     * have a grad student write a paper).  i is KILOBYTES.
  	     */
! 	    i = 1 << (chunkSize < 10 ? 0 : chunkSize - 10);
  	    cacheFiles = max(cacheFiles, 1.5 * (cacheBlocks / i));
+ 
  	    /* never permit more files than blocks, while leaving space for
  	     * VolumeInfo and CacheItems files.  VolumeInfo is usually 20K,
  	     * CacheItems is 50 Bytes / file (== 1K/20)
  	     */
  #define CACHEITMSZ (cacheFiles / 20)
! #define VOLINFOSZ 50		/* 40kB has been seen, be conservative */
! #define CELLINFOSZ 4		/* Assuming disk block size is 4k ... */
! #define INFOSZ (VOLINFOSZ+CELLINFOSZ+CACHEITMSZ)
! 
! 	    /* Sanity check: If the obtained number of disk cache files
! 	     * is larger than the number of available (4k) disk blocks, we're
! 	     * doing something wrong. Fail hard so we can fix the bug instead
! 	     * of silently hiding it like before */
! 
! 	    if (cacheFiles > (cacheBlocks - INFOSZ) / 4) {
! 		fprintf(stderr,
! 			"%s: ASSERT: cacheFiles %d  diskblocks %d\n",
! 			rn, cacheFiles, (cacheBlocks - INFOSZ) / 4);
! 		exit(1);
! 	    }
  	    if (cacheFiles < 100)
  		fprintf(stderr, "%s: WARNING: cache probably too small!\n",
  			rn);
+ 
+ 	    if (afsd_verbose)
+ 		printf("%s: cacheFiles autotuned to %d\n", rn, cacheFiles);
  	}
+ 	/* Sanity check chunkSize */
+ 	i = max(cacheBlocks / 1000, cacheBlocks / cacheFiles);
+ 	chunkSize = min(chunkSize, i);
+ 	chunkSize = max(chunkSize, 2);
+ 	if (afsd_verbose)
+ 	    printf("%s: chunkSize autotuned to %d\n", rn, chunkSize);
+ 
  	if (!sawDCacheSize) {
! 	    dCacheSize = cacheFiles / 2;
! 	    if (dCacheSize > 10000) {
! 		dCacheSize = 10000;
! 	    }
! 	    if (dCacheSize < 2000) {
  		dCacheSize = 2000;
+ 	    }
+ 	    if (afsd_verbose)
+ 		printf("%s: dCacheSize autotuned to %d\n", rn, dCacheSize);
  	}
      }
+     if (!sawCacheStatEntries) {
+ 	if (chunkSize <= 13) {
+ 	    cacheStatEntries = dCacheSize / 4;
+ 	} else if (chunkSize >= 16) {
+ 	    cacheStatEntries = dCacheSize * 1.5;
+ 	} else {
+ 	    cacheStatEntries = dCacheSize;
+ 	}
+ 	if (afsd_verbose)
+ 	    printf("%s: cacheStatEntries autotuned to %d\n", rn,
+ 		   cacheStatEntries);
+     }
  
      /*
       * Create and zero the inode table for the desired cache files.
***************
*** 1681,1687 ****
      vFilePtr = fullpn_VFile + strlen(fullpn_VFile);
  
      if  (!(cacheFlags & AFSCALL_INIT_MEMCACHE) && (fsTypeMsg = CheckCacheBaseDir(cacheBaseDir))) {
! 	printf("%s: WARNING: Cache dir check failed (%s)\n", rn, fsTypeMsg);
      }
  #if 0
      fputs(AFS_GOVERNMENT_MESSAGE, stdout);
--- 1723,1734 ----
      vFilePtr = fullpn_VFile + strlen(fullpn_VFile);
  
      if  (!(cacheFlags & AFSCALL_INIT_MEMCACHE) && (fsTypeMsg = CheckCacheBaseDir(cacheBaseDir))) {
! #ifdef AFS_SUN5_ENV
!         printf("%s: WARNING: Cache dir check failed (%s)\n", rn, fsTypeMsg);
! #else
! 	printf("%s: ERROR: Cache dir check failed (%s)\n", rn, fsTypeMsg);
! 	exit(1);
! #endif
      }
  #if 0
      fputs(AFS_GOVERNMENT_MESSAGE, stdout);
***************
*** 1793,1800 ****
  #endif
  
      code = call_syscall(AFSOP_BASIC_INIT, 1);
!     if (code)
  	printf("%s: Error %d in basic initialization.\n", rn, code);
  
      /*
       * Tell the kernel some basic information about the workstation's cache.
--- 1840,1849 ----
  #endif
  
      code = call_syscall(AFSOP_BASIC_INIT, 1);
!     if (code) {
  	printf("%s: Error %d in basic initialization.\n", rn, code);
+         exit(1);
+     }
  
      /*
       * Tell the kernel some basic information about the workstation's cache.
***************
*** 1982,2002 ****
  	call_syscall(AFSOP_VOLUMEINFO, fullpn_VolInfoFile);
  
      /*
-      * Pass the kernel the name of the afs logging file holding the volume
-      * information.
-      */
-     if (afsd_debug)
- 	printf("%s: Calling AFSOP_AFSLOG: volume info file is '%s'\n", rn,
- 	       fullpn_AFSLogFile);
- #if defined(AFS_SGI_ENV)
-     /* permit explicit -logfile argument to enable logging on memcache systems */
-     if (!(cacheFlags & AFSCALL_INIT_MEMCACHE) || as->parms[18].items)
- #else
-     if (!(cacheFlags & AFSCALL_INIT_MEMCACHE))	/* ... nor this ... */
- #endif
- 	call_syscall(AFSOP_AFSLOG, fullpn_AFSLogFile);
- 
-     /*
       * Give the kernel the names of the AFS files cached on the workstation's
       * disk.
       */
--- 2031,2036 ----
***************
*** 2108,2116 ****
  
  
  
! main(argc, argv)
!      int argc;
!      char **argv;
  {
      struct cmd_syndesc *ts;
  
--- 2142,2148 ----
  
  
  
! main(int argc, char **argv)
  {
      struct cmd_syndesc *ts;
  
***************
*** 2182,2188 ****
  		"Prefer backup volumes for mointpoints in backup volumes");
      cmd_AddParm(ts, "-rxbind", CMD_FLAG, CMD_OPTIONAL, "Bind the Rx socket (one interface only)");
      cmd_AddParm(ts, "-settime", CMD_FLAG, CMD_OPTIONAL,
!                "don't set the time");
      cmd_AddParm(ts, "-rxpck", CMD_SINGLE, CMD_OPTIONAL, "set rx_extraPackets to this value");
      return (cmd_Dispatch(argc, argv));
  }
--- 2214,2220 ----
  		"Prefer backup volumes for mointpoints in backup volumes");
      cmd_AddParm(ts, "-rxbind", CMD_FLAG, CMD_OPTIONAL, "Bind the Rx socket (one interface only)");
      cmd_AddParm(ts, "-settime", CMD_FLAG, CMD_OPTIONAL,
!                "set the time");
      cmd_AddParm(ts, "-rxpck", CMD_SINGLE, CMD_OPTIONAL, "set rx_extraPackets to this value");
      return (cmd_Dispatch(argc, argv));
  }
***************
*** 2307,2315 ****
--- 2339,2367 ----
      }
      else
  #endif
+ #ifdef AFS_DARWIN80_ENV
+     struct afssysargs syscall_data;
+     int fd = open(SYSCALL_DEV_FNAME,O_RDWR);
+     syscall_data.syscall = AFSCALL_CALL;
+     syscall_data.param1 = param1;
+     syscall_data.param2 = param2;
+     syscall_data.param3 = param3;
+     syscall_data.param4 = param4;
+     syscall_data.param5 = param5;
+     syscall_data.param6 = param6;
+     if(fd >= 0) {
+        error = ioctl(fd, VIOC_SYSCALL, &syscall_data);
+        close(fd);
+     } else {
+        error = -1;
+     }
+     if (!error)
+       error=syscall_data.retval;
+ #else
      error =
  	syscall(AFS_SYSCALL, AFSCALL_CALL, param1, param2, param3, param4,
  		param5, param6, param7);
+ #endif
  
      if (afsd_verbose)
  	printf("SScall(%d, %d, %d)=%d ", AFS_SYSCALL, AFSCALL_CALL, param1,
***************
*** 2378,2392 ****
      return (error);
  }
  
! vmountdata(vmtp, obj, stub, host, hostsname, info, args)
!      struct vmount *vmtp;
!      char *obj, *stub, *host, *hostsname, *info, *args;
  {
!     register struct data {
  	short vmt_off;
  	short vmt_size;
      } *vdp, *vdprev;
!     register int size;
  
      vdp = (struct data *)vmtp->vmt_data;
      vdp->vmt_off = sizeof(struct vmount);
--- 2430,2443 ----
      return (error);
  }
  
! vmountdata(struct vmount * vmtp, char *obj, char *stub, char *host,
! 	   char *hostsname, char *info, char *args)
  {
!     struct data {
  	short vmt_off;
  	short vmt_size;
      } *vdp, *vdprev;
!     int size;
  
      vdp = (struct data *)vmtp->vmt_data;
      vdp->vmt_off = sizeof(struct vmount);
Index: openafs/src/afsmonitor/afsmonitor.c
diff -c openafs/src/afsmonitor/afsmonitor.c:1.18.2.1 openafs/src/afsmonitor/afsmonitor.c:1.18.2.3
*** openafs/src/afsmonitor/afsmonitor.c:1.18.2.1	Sun Apr  3 14:15:42 2005
--- openafs/src/afsmonitor/afsmonitor.c	Thu Mar  9 01:41:34 2006
***************
*** 19,25 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmonitor.c,v 1.18.2.1 2005/04/03 18:15:42 shadow Exp $");
  
  #include <stdio.h>
  #include <math.h>
--- 19,25 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/afsmonitor/afsmonitor.c,v 1.18.2.3 2006/03/09 06:41:34 shadow Exp $");
  
  #include <stdio.h>
  #include <math.h>
***************
*** 272,278 ****
  
  
  
! #if !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN70_ENV) && !defined(AFS_NBSD20_ENV)
  /*	
          strcasestr(): Return first occurence of pattern s2 in s1, case 
  	insensitive. 
--- 272,278 ----
  
  
  
! #ifndef HAVE_STRCASESTR
  /*	
          strcasestr(): Return first occurence of pattern s2 in s1, case 
  	insensitive. 
***************
*** 3680,3686 ****
--- 3680,3690 ----
  	    }
  	    strncpy(curr_FS->hostName, he->h_name, HOST_NAME_LEN);	/* complete name */
  	    memcpy(&(curr_skt->sin_addr.s_addr), he->h_addr, 4);
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	    curr_skt->sin_family = AF_INET;		/*Internet family */
+ #else
  	    curr_skt->sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	    curr_skt->sin_port = htons(7000);	/*FileServer port */
  #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
  	    curr_skt->sin_len = sizeof(struct sockaddr_in);
***************
*** 3759,3765 ****
--- 3763,3773 ----
  	    }
  	    strncpy(curr_CM->hostName, he->h_name, HOST_NAME_LEN);	/* complete name */
  	    memcpy(&(curr_skt->sin_addr.s_addr), he->h_addr, 4);
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	    curr_skt->sin_family = AF_INET;		/*Internet family */
+ #else
  	    curr_skt->sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	    curr_skt->sin_port = htons(7001);	/*Cache Manager port */
  #ifdef STRUCT_SOCKADDR_HAS_SA_LEN
  	    curr_skt->sin_len = sizeof(struct sockaddr_in);
Index: openafs/src/aklog/Makefile.in
diff -c openafs/src/aklog/Makefile.in:1.1.2.4 openafs/src/aklog/Makefile.in:1.1.2.7
*** openafs/src/aklog/Makefile.in:1.1.2.4	Mon Jul 11 15:07:00 2005
--- openafs/src/aklog/Makefile.in	Tue Apr  4 20:13:44 2006
***************
*** 5,12 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! OPTMZ += @KRB5CFLAGS@ -DALLOW_REGISTER
! LIBS += @KRB5LIBS@
  AFSLIBS = ${TOP_LIBDIR}/libprot.a ${TOP_LIBDIR}/libubik.a \
  	  ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/librxkad.a \
  	  ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a \
--- 5,12 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! OPTMZ = @KRB5CFLAGS@ -DALLOW_REGISTER
! AKLIBS = ${LIBS} @KRB5LIBS@
  AFSLIBS = ${TOP_LIBDIR}/libprot.a ${TOP_LIBDIR}/libubik.a \
  	  ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/librxkad.a \
  	  ${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a \
***************
*** 16,47 ****
  SRCS=	aklog.c aklog_main.c  krb_util.c linked_list.c
  OBJS=   aklog.o aklog_main.o krb_util.o linked_list.o
  
! all: aklog
  
  aklog:	${OBJS} ${AFSLIBS}
! 	${CC} -o $@ ${CFLAGS} ${OBJS} ${LIBS} ${AFSLIBS} ${XLIBS}
  
  
  #
  # Installation targets
  #
  install: \
! 	${DESTDIR}${bindir}/aklog
  
  ${DESTDIR}${bindir}/aklog: aklog
  	${INSTALL} $? $@
  
  dest: \
! 	${DEST}/bin/aklog
  
  ${DEST}/bin/aklog: aklog
  	${INSTALL} $? $@
  
  #
  # Misc. targets
  #
  clean:
! 	$(RM) -f *.o ${OBJS} aklog
  
  include ../config/Makefile.version
  
--- 16,55 ----
  SRCS=	aklog.c aklog_main.c  krb_util.c linked_list.c
  OBJS=   aklog.o aklog_main.o krb_util.o linked_list.o
  
! all: aklog @ASETKEY@
  
  aklog:	${OBJS} ${AFSLIBS}
! 	${CC} -o $@ ${CFLAGS} ${OBJS} ${AKLIBS} ${AFSLIBS} ${XLIBS}
  
+ asetkey: asetkey.o ${AFSLIBS}
+ 	${CC} -o $@ ${CFLAGS} asetkey.o ${AKLIBS} ${AFSLIBS} ${XLIBS}
  
  #
  # Installation targets
  #
  install: \
! 	${DESTDIR}${bindir}/aklog ${DESTDIR}${afssrvbindir}/asetkey
  
  ${DESTDIR}${bindir}/aklog: aklog
  	${INSTALL} $? $@
  
+ ${DESTDIR}${afssrvbindir}/asetkey: @ASETKEY@
+ 	if test "x@ASETKEY@" != "x"; then ${INSTALL} $? $@; fi
+ 
  dest: \
! 	${DEST}/bin/aklog ${DEST}/root.server/usr/afs/bin/asetkey
  
  ${DEST}/bin/aklog: aklog
  	${INSTALL} $? $@
  
+ ${DEST}/root.server/usr/afs/bin/asetkey: @ASETKEY@
+ 	if test "x@ASETKEY@" != "x"; then ${INSTALL} $? $@; fi
+ 
  #
  # Misc. targets
  #
  clean:
! 	$(RM) -f *.o ${OBJS} aklog asetkey
  
  include ../config/Makefile.version
  
Index: openafs/src/aklog/aklog.h
diff -c openafs/src/aklog/aklog.h:1.1.2.4 openafs/src/aklog/aklog.h:1.1.2.5
*** openafs/src/aklog/aklog.h:1.1.2.4	Mon Jul 11 15:07:00 2005
--- openafs/src/aklog/aklog.h	Wed Apr  5 11:42:13 2006
***************
*** 1,5 ****
  /* 
!  * $Id: aklog.h,v 1.1.2.4 2005/07/11 19:07:00 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.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"
***************
*** 9,15 ****
  #define __AKLOG_H__
  
  #if !defined(lint) && !defined(SABER)
! static char *rcsid_aklog_h = "$Id: aklog.h,v 1.1.2.4 2005/07/11 19:07:00 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.5 2006/04/05 15:42:13 shadow Exp $";
  #endif /* lint || SABER */
  
  #include <krb5.h>
***************
*** 54,60 ****
  struct ktext {
      unsigned int length;
      unsigned char dat[MAX_KTXT_LEN];
!     u_int32_t mbz;
  };
  
  struct credentials {
--- 54,60 ----
  struct ktext {
      unsigned int length;
      unsigned char dat[MAX_KTXT_LEN];
!     afs_uint32 mbz;
  };
  
  struct credentials {
Index: openafs/src/aklog/aklog_main.c
diff -c openafs/src/aklog/aklog_main.c:1.1.2.10 openafs/src/aklog/aklog_main.c:1.1.2.12
*** openafs/src/aklog/aklog_main.c:1.1.2.10	Mon Jul 18 22:51:53 2005
--- openafs/src/aklog/aklog_main.c	Wed Apr  5 11:42:13 2006
***************
*** 1,5 ****
  /* 
!  * $Id: aklog_main.c,v 1.1.2.10 2005/07/19 02:51:53 jaltman Exp $
   *
   * Copyright 1990,1991 by the Massachusetts Institute of Technology
   * For distribution and copying rights, see the file "mit-copyright.h"
--- 1,5 ----
  /* 
!  * $Id: aklog_main.c,v 1.1.2.12 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"
***************
*** 7,15 ****
  
  #if !defined(lint) && !defined(SABER)
  static char *rcsid =
! 	"$Id: aklog_main.c,v 1.1.2.10 2005/07/19 02:51:53 jaltman Exp $";
  #endif /* lint || SABER */
  
  #include <stdio.h>
  #include <string.h>
  #include <ctype.h>
--- 7,16 ----
  
  #if !defined(lint) && !defined(SABER)
  static char *rcsid =
! 	"$Id: aklog_main.c,v 1.1.2.12 2006/04/05 15:42:13 shadow Exp $";
  #endif /* lint || SABER */
  
+ #include <afsconfig.h>
  #include <stdio.h>
  #include <string.h>
  #include <ctype.h>
***************
*** 70,76 ****
--- 71,79 ----
  
  #else /* !WINDOWS */
  #include <afs/stds.h>
+ #ifndef HAVE_KERBEROSV_HEIM_ERR_H
  #include <afs/com_err.h>
+ #endif
  
  #include <afs/param.h>
  #ifdef AFS_SUN5_ENV
Index: openafs/src/aklog/asetkey.c
diff -c /dev/null openafs/src/aklog/asetkey.c:1.4.2.4
*** /dev/null	Fri Apr 14 09:27:28 2006
--- openafs/src/aklog/asetkey.c	Mon Apr  3 15:45:26 2006
***************
*** 0 ****
--- 1,139 ----
+ /*
+  * $Id: asetkey.c,v 1.4.2.4 2006/04/03 19:45:26 shadow Exp $
+  *
+  * asetkey - Manipulates an AFS KeyFile
+  *
+  * Updated for Kerberos 5
+  */
+ 
+ #include <afsconfig.h>
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <netinet/in.h>
+ #include <netdb.h>
+ #ifdef HAVE_MEMORY_H
+ #include <memory.h>
+ #endif /* HAVE_MEMORY_H */
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #else /* HAVE_STRING_H */
+ #ifdef HAVE_STRINGS_H
+ #include <strings.h>
+ #endif /* HAVE_STRINGS_H */
+ #endif /* HAVE_STRING_H */
+ 
+ #include <krb5.h>
+ 
+ #include <afs/stds.h>
+ #include <afs/com_err.h>
+ #include <afs/cellconfig.h>
+ #include <afs/keys.h>
+ #include <afs/dirpath.h>
+ 
+ int
+ main(int argc, char *argv[])
+ {
+     struct afsconf_dir *tdir;
+     register long code;
+     const char *confdir;
+ 
+     if (argc == 1) {
+ 	fprintf(stderr, "%s: usage is '%s <opcode> options, e.g.\n",
+ 		argv[0], argv[0]);
+ 	fprintf(stderr, "\t%s add <kvno> <keyfile> <princ>\n", argv[0]);
+ 	fprintf(stderr, "\t%s delete <kvno>\n", argv[0]);
+ 	fprintf(stderr, "\t%s list\n", argv[0]);
+ 	exit(1);
+     }
+ 
+     confdir = AFSDIR_SERVER_ETC_DIRPATH;
+ 
+     tdir = afsconf_Open(confdir);
+     if (!tdir) {
+ 	fprintf(stderr, "%s: can't initialize conf dir '%s'\n", argv[0],
+ 		confdir);
+ 	exit(1);
+     }
+     if (strcmp(argv[1], "add")==0) {
+ 	krb5_context context;
+ 	krb5_principal principal;
+ 	krb5_keyblock *key;
+ 	krb5_error_code retval;
+ 	int kvno;
+ 
+ 	if (argc != 5) {
+ 	    fprintf(stderr, "%s add: usage is '%s add <kvno> <keyfile> "
+ 		    "<princ>\n", argv[0], argv[0]);
+ 	    exit(1);
+ 	}
+ 
+ 	krb5_init_context(&context);
+ 
+ 	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);
+ 	}
+ 
+ 	if (key->length != 8) {
+ 		fprintf(stderr, "Key length should be 8, but is really %d!\n",
+ 		       key->length);
+ 		exit(1);
+ 	}
+ 
+ 	code = afsconf_AddKey(tdir, kvno, (char *) key->contents, 1);
+ 	if (code) {
+ 	    fprintf(stderr, "%s: failed to set key, code %d.\n", argv[0], code);
+ 	    exit(1);
+ 	}
+ 	krb5_free_principal(context, principal);
+ 	krb5_free_keyblock(context, key);
+     }
+     else if (strcmp(argv[1], "delete")==0) {
+ 	long kvno;
+ 	if (argc != 3) {
+ 	    fprintf(stderr, "%s delete: usage is '%s delete <kvno>\n",
+ 		    argv[0], argv[0]);
+ 	    exit(1);
+ 	}
+ 	kvno = atoi(argv[2]);
+ 	code = afsconf_DeleteKey(tdir, kvno);
+ 	if (code) {
+ 	    fprintf(stderr, "%s: failed to delete key %d, (code %d)\n",
+ 		    argv[0], kvno, code);
+ 	    exit(1);
+ 	}
+     }
+     else if (strcmp(argv[1], "list") == 0) {
+ 	struct afsconf_keys tkeys;
+ 	register int i, j;
+ 	
+ 	code = afsconf_GetKeys(tdir, &tkeys);
+ 	if (code) {
+ 	    fprintf(stderr, "%s: failed to get keys, code %d\n", argv[0], code);
+ 	    exit(1);
+ 	}
+ 	for(i=0;i<tkeys.nkeys;i++) {
+ 	    if (tkeys.key[i].kvno != -1) {
+ 		printf("kvno %4d: key is: ", tkeys.key[i].kvno);
+ 		for (j = 0; j < 8; j++)
+ 			printf("%02x", (unsigned char) tkeys.key[i].key[j]);
+ 		printf("\n");
+ 	    }
+ 	}
+ 	printf("All done.\n");
+     }
+     else {
+ 	fprintf(stderr, "%s: unknown operation '%s', type '%s' for "
+ 		"assistance\n", argv[0], argv[1], argv[0]);
+ 	exit(1);
+     }
+     exit(0);
+ }
Index: openafs/src/audit/Makefile.in
diff -c openafs/src/audit/Makefile.in:1.8 openafs/src/audit/Makefile.in:1.8.2.1
*** openafs/src/audit/Makefile.in:1.8	Thu Apr 17 11:05:59 2003
--- openafs/src/audit/Makefile.in	Thu Mar  9 01:41:36 2006
***************
*** 15,21 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  all: ${TOP_LIBDIR}/libaudit.a ${TOP_INCDIR}/afs/audit.h
  
--- 15,21 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-I. -I${srcdir} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  all: ${TOP_LIBDIR}/libaudit.a ${TOP_INCDIR}/afs/audit.h
  
Index: openafs/src/audit/audit.c
diff -c openafs/src/audit/audit.c:1.8.2.6 openafs/src/audit/audit.c:1.8.2.8
*** openafs/src/audit/audit.c:1.8.2.6	Fri Jul 29 10:32:10 2005
--- openafs/src/audit/audit.c	Mon Feb 13 12:57:26 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/audit/audit.c,v 1.8.2.6 2005/07/29 14:32:10 shadow Exp $");
  
  #include <fcntl.h>
  #include <stdarg.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/audit/audit.c,v 1.8.2.8 2006/02/13 17:57:26 jaltman Exp $");
  
  #include <fcntl.h>
  #include <stdarg.h>
***************
*** 257,262 ****
--- 257,285 ----
  	fprintf(out, "\n");
  }
  
+ #ifdef AFS_PTHREAD_ENV
+ static pthread_mutex_t audit_lock;
+ static volatile afs_int32   audit_lock_initialized = 0;
+ static pthread_once_t audit_lock_once = PTHREAD_ONCE_INIT;
+ 
+ static void
+ osi_audit_init_lock(void)
+ {
+     pthread_mutex_init(&audit_lock, NULL);
+     audit_lock_initialized = 1;
+ }
+ #endif
+ 
+ void
+ osi_audit_init(void)
+ {
+ #ifdef AFS_PTHREAD_ENV
+     if (!audit_lock_initialized) {
+ 	pthread_once(&audit_lock_once, osi_audit_init_lock);
+     }
+ #endif /* AFS_PTHREAD_ENV */
+ }
+ 
  /* ************************************************************************** */
  /* The routine that acually does the audit call.
   * ************************************************************************** */
***************
*** 268,287 ****
  #ifdef AFS_AIX32_ENV
      afs_int32 code;
      afs_int32 err;
  #endif
      int result;
- 
      va_list vaList;
! #ifdef AFS_AIX32_ENV
!     static struct Lock audbuflock = { 0, 0, 0, 0,
  #ifdef AFS_PTHREAD_ENV
! 	PTHREAD_MUTEX_INITIALIZER,
! 	PTHREAD_COND_INITIALIZER,
! 	PTHREAD_COND_INITIALIZER
  #endif /* AFS_PTHREAD_ENV */
-     };
-     static char BUFFER[32768];
- #endif
  
      if ((osi_audit_all < 0) || (osi_echo_trail < 0))
  	osi_audit_check();
--- 291,307 ----
  #ifdef AFS_AIX32_ENV
      afs_int32 code;
      afs_int32 err;
+     static char BUFFER[32768];
  #endif
      int result;
      va_list vaList;
! 
  #ifdef AFS_PTHREAD_ENV
!     /* i'm pretty sure all the server apps now call osi_audit_init(),
!      * but to be extra careful we'll leave this assert in here for a 
!      * while to make sure */
!     assert(audit_lock_initialized);
  #endif /* AFS_PTHREAD_ENV */
  
      if ((osi_audit_all < 0) || (osi_echo_trail < 0))
  	osi_audit_check();
***************
*** 312,319 ****
  	break;
      }
  
  #ifdef AFS_AIX32_ENV
-     ObtainWriteLock(&audbuflock);
      bufferPtr = BUFFER;
  
      /* Put the error code into the buffer list */
--- 332,341 ----
  	break;
      }
  
+ #ifdef AFS_PTHREAD_ENV
+     pthread_mutex_lock(&audit_lock);
+ #endif
  #ifdef AFS_AIX32_ENV
      bufferPtr = BUFFER;
  
      /* Put the error code into the buffer list */
***************
*** 340,346 ****
  	    printf("Error while writing audit entry: %d.\n", errno);
      }
  #endif /* notdef */
-     ReleaseWriteLock(&audbuflock);
  #else
      if (auditout) {
  	va_start(vaList, errCode);
--- 362,367 ----
***************
*** 348,353 ****
--- 369,377 ----
  	fflush(auditout);
      }
  #endif
+ #ifdef AFS_PTHREAD_ENV
+     pthread_mutex_unlock(&audit_lock);
+ #endif
  
      return 0;
  }
Index: openafs/src/audit/audit.h
diff -c openafs/src/audit/audit.h:1.5.2.4 openafs/src/audit/audit.h:1.5.2.5
*** openafs/src/audit/audit.h:1.5.2.4	Thu Jul 14 23:25:38 2005
--- openafs/src/audit/audit.h	Mon Feb 13 12:56:49 2006
***************
*** 292,294 ****
--- 292,296 ----
  int osi_audit(char *audEvent, afs_int32 errCode, ...);
  int osi_auditU(struct rx_call *call, char *audEvent, int errCode, ...);
  int osi_audit_file(FILE *out);
+ void osi_audit_init(void);
+ 
Index: openafs/src/auth/cellconfig.c
diff -c openafs/src/auth/cellconfig.c:1.40.2.2 openafs/src/auth/cellconfig.c:1.40.2.6
*** openafs/src/auth/cellconfig.c:1.40.2.2	Sun Apr  3 14:15:43 2005
--- openafs/src/auth/cellconfig.c	Tue Mar 28 13:42:57 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/cellconfig.c,v 1.40.2.2 2005/04/03 18:15:43 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/pthread_glock.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/auth/cellconfig.c,v 1.40.2.6 2006/03/28 18:42:57 shadow Exp $");
  
  #include <afs/stds.h>
  #include <afs/pthread_glock.h>
***************
*** 736,745 ****
  		     struct afsconf_cell *acellInfo)
  {
      afs_int32 code;
!     int tservice, i;
!     size_t len;
      unsigned char answer[1024];
      unsigned char *p;
      char realCellName[256];
      char host[256];
      int server_num = 0;
--- 736,746 ----
  		     struct afsconf_cell *acellInfo)
  {
      afs_int32 code;
!     int tservice, i, len;
      unsigned char answer[1024];
      unsigned char *p;
+     char *dotcellname;
+     int cellnamelength;
      char realCellName[256];
      char host[256];
      int server_num = 0;
***************
*** 749,757 ****
       * replaced with a more fine-grained lock just for the resolver
       * operations.
       */
!     LOCK_GLOBAL_MUTEX;
!     len = res_search(acellName, C_IN, T_AFSDB, answer, sizeof(answer));
!     UNLOCK_GLOBAL_MUTEX;
      if (len < 0)
  	return AFSCONF_NOTFOUND;
  
--- 750,774 ----
       * replaced with a more fine-grained lock just for the resolver
       * operations.
       */
! 
!     if ( ! strchr(acellName,'.') ) {
!        cellnamelength=strlen(acellName);
!        dotcellname=malloc(cellnamelength+2);
!        memcpy(dotcellname,acellName,cellnamelength);
!        dotcellname[cellnamelength]='.';
!        dotcellname[cellnamelength+1]=0;
!        LOCK_GLOBAL_MUTEX;
! 	    len = res_search(dotcellname, C_IN, T_AFSDB, answer, sizeof(answer));
!        if ( len < 0 ) {
!           len = res_search(acellName, C_IN, T_AFSDB, answer, sizeof(answer));
!        }
!        UNLOCK_GLOBAL_MUTEX;
!        free(dotcellname);
!     } else {
!        LOCK_GLOBAL_MUTEX;
! 	    len = res_search(acellName, C_IN, T_AFSDB, answer, sizeof(answer));
!        UNLOCK_GLOBAL_MUTEX;
!     }
      if (len < 0)
  	return AFSCONF_NOTFOUND;
  
***************
*** 1109,1114 ****
--- 1126,1138 ----
  
      /* convert key structure to host order */
      tstr->nkeys = ntohl(tstr->nkeys);
+ 
+     if (code < sizeof(afs_int32) + (tstr->nkeys*sizeof(struct afsconf_key))) {
+ 	tstr->nkeys = 0;
+ 	UNLOCK_GLOBAL_MUTEX;
+ 	return 0;
+     }
+ 
      for (fd = 0; fd < tstr->nkeys; fd++)
  	tstr->key[fd].kvno = ntohl(tstr->key[fd].kvno);
  
Index: openafs/src/auth/test/Makefile.in
diff -c openafs/src/auth/test/Makefile.in:1.5 openafs/src/auth/test/Makefile.in:1.5.8.1
*** openafs/src/auth/test/Makefile.in:1.5	Wed Oct 31 23:59:35 2001
--- openafs/src/auth/test/Makefile.in	Thu Mar  9 01:41:36 2006
***************
*** 12,18 ****
  LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L${DESTDIR}/lib/rx
  LIBS= -lauth -lsys -lrx -llwp -lafsutil ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${XCFLAGS}
  
  tests all: testcellconf ktctest
  
--- 12,18 ----
  LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L${DESTDIR}/lib/rx
  LIBS= -lauth -lsys -lrx -llwp -lafsutil ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${XCFLAGS} ${ARCHFLAGS}
  
  tests all: testcellconf ktctest
  
Index: openafs/src/bozo/bosserver.c
diff -c openafs/src/bozo/bosserver.c:1.23.2.5 openafs/src/bozo/bosserver.c:1.23.2.7
*** openafs/src/bozo/bosserver.c:1.23.2.5	Mon Jul 11 15:08:36 2005
--- openafs/src/bozo/bosserver.c	Tue Feb 21 23:09:29 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/bozo/bosserver.c,v 1.23.2.5 2005/07/11 19:08:36 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.7 2006/02/22 04:09:29 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 718,723 ****
--- 718,724 ----
      struct ktc_encryptionKey tkey;
      int i;
      char namebuf[AFSDIR_PATH_MAX];
+     int rxMaxMTU = -1;
  #ifndef AFS_NT40_ENV
      int nofork = 0;
      struct stat sb;
***************
*** 743,748 ****
--- 744,750 ----
      sigaction(SIGSEGV, &nsa, NULL);
      sigaction(SIGABRT, &nsa, NULL);
  #endif
+     osi_audit_init();
  #ifdef BOS_RESTRICTED_MODE
      signal(SIGFPE, bozo_insecureme);
  #endif
***************
*** 811,816 ****
--- 813,832 ----
  	    bozo_isrestricted = 1;
  	}
  #endif
+ 	else if (!strcmp(argv[i], "-rxmaxmtu")) {
+ 	    if ((i + 1) >= argc) {
+ 		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
+ 		exit(1); 
+ 	    }
+ 	    rxMaxMTU = atoi(argv[++i]);
+ 	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) || 
+ 		(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
+ 		printf("rxMaxMTU %d% invalid; must be between %d-%d\n",
+ 			rxMaxMTU, RX_MIN_PACKET_SIZE, 
+ 			RX_MAX_PACKET_DATA_SIZE);
+ 		exit(1);
+ 	    }
+ 	}
  	else if (strcmp(argv[code], "-auditlog") == 0) {
  	    int tempfd, flags;
  	    FILE *auditout;
***************
*** 848,859 ****
--- 864,877 ----
  #ifndef AFS_NT40_ENV
  	    printf("Usage: bosserver [-noauth] [-log] "
  		   "[-auditlog <log path>] "
+ 		   "[-rxmaxmtu <bytes>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-nofork] " "[-help]\n");
  #else
  	    printf("Usage: bosserver [-noauth] [-log] "
  		   "[-auditlog <log path>] "
+ 		   "[-rxmaxmtu <bytes>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
  #endif
***************
*** 1005,1010 ****
--- 1023,1032 ----
      /* Disable jumbograms */
      rx_SetNoJumbo();
  
+     if (rxMaxMTU != -1) {
+ 	rx_SetMaxMTU(rxMaxMTU);
+     }
+ 
      tservice = rx_NewService( /* port */ 0, /* service id */ 1,
  			     /*service name */ "bozo",
  			     /* security classes */
Index: openafs/src/bozo/test/Makefile.in
diff -c openafs/src/bozo/test/Makefile.in:1.6 openafs/src/bozo/test/Makefile.in:1.6.8.1
*** openafs/src/bozo/test/Makefile.in:1.6	Wed Oct 31 23:59:36 2001
--- openafs/src/bozo/test/Makefile.in	Thu Mar  9 01:41:37 2006
***************
*** 11,17 ****
  INCDIRS=-I${TOP_INCDIR} -I..
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  all: testproc smail-notifier
  
--- 11,17 ----
  INCDIRS=-I${TOP_INCDIR} -I..
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  all: testproc smail-notifier
  
Index: openafs/src/budb/server.c
diff -c openafs/src/budb/server.c:1.14.2.1 openafs/src/budb/server.c:1.14.2.2
*** openafs/src/budb/server.c:1.14.2.1	Mon Jul 11 15:08:36 2005
--- openafs/src/budb/server.c	Mon Feb 13 12:57:27 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/server.c,v 1.14.2.1 2005/07/11 19:08:36 shadow Exp $");
  
  #include <fcntl.h>
  #include <sys/stat.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/budb/server.c,v 1.14.2.2 2006/02/13 17:57:27 jaltman Exp $");
  
  #include <fcntl.h>
  #include <sys/stat.h>
***************
*** 395,400 ****
--- 395,401 ----
      sigaction(SIGSEGV, &nsa, NULL);
      sigaction(SIGABRT, &nsa, NULL);
  #endif
+     osi_audit_init();
      osi_audit(BUDB_StartEvent, 0, AUD_END);
  
      initialize_BUDB_error_table();
Index: openafs/src/cf/kerberos.m4
diff -c openafs/src/cf/kerberos.m4:1.1.2.7 openafs/src/cf/kerberos.m4:1.1.2.8
*** openafs/src/cf/kerberos.m4:1.1.2.7	Mon Jul 11 15:16:42 2005
--- openafs/src/cf/kerberos.m4	Mon Apr  3 15:45:27 2006
***************
*** 1,5 ****
  dnl
! dnl $Id: kerberos.m4,v 1.1.2.7 2005/07/11 19:16:42 shadow Exp $
  dnl
  dnl Kerberos autoconf glue
  dnl
--- 1,5 ----
  dnl
! dnl $Id: kerberos.m4,v 1.1.2.8 2006/04/03 19:45:27 shadow Exp $
  dnl
  dnl Kerberos autoconf glue
  dnl
***************
*** 60,65 ****
--- 60,66 ----
  	LIBS="$LIBS $KRB5LIBS"
  	AC_CHECK_FUNCS([add_to_error_table add_error_table krb5_princ_size krb5_principal_get_comp_string krb5_524_convert_creds krb524_convert_creds_kdc])
  	AC_CHECK_HEADERS([kerberosIV/krb.h])
+ 	AC_CHECK_HEADERS([kerberosV/heim_err.h])
  
  AC_MSG_CHECKING(for krb5_creds.keyblock existence)
  AC_CACHE_VAL(ac_cv_krb5_creds_keyblock_exists,
***************
*** 94,100 ****
--- 95,110 ----
  	CPPFLAGS="$save_CPPFLAGS"
  	LIBS="$save_LIBS"
  fi
+ 
+ if test "$ac_cv_header_kerberosV_heim_err_h" = "yes"; then
+     ASETKEY=
+ else
+     ASETKEY=asetkey
+ fi
+ 
  AC_SUBST(BUILD_KRB5)
  AC_SUBST(KRB5CFLAGS)
  AC_SUBST(KRB5LIBS)
+ AC_SUBST(ASETKEY)
+ 
  ])dnl
Index: openafs/src/cf/linux-test1.m4
diff -c openafs/src/cf/linux-test1.m4:1.3.2.2 openafs/src/cf/linux-test1.m4:1.3.2.3
*** openafs/src/cf/linux-test1.m4:1.3.2.2	Wed Aug 10 15:23:19 2005
--- openafs/src/cf/linux-test1.m4	Thu Jan 26 10:58:35 2006
***************
*** 1,7 ****
  AC_DEFUN([LINUX_INODE_SETATTR_RETURN_TYPE],[
  AC_MSG_CHECKING(for inode_setattr return type)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_func_inode_setattr_returns_int,
  [
  AC_TRY_COMPILE(
--- 1,7 ----
  AC_DEFUN([LINUX_INODE_SETATTR_RETURN_TYPE],[
  AC_MSG_CHECKING(for inode_setattr return type)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_func_inode_setattr_returns_int,
  [
  AC_TRY_COMPILE(
***************
*** 18,24 ****
  AC_DEFUN([LINUX_WRITE_INODE_RETURN_TYPE],[
  AC_MSG_CHECKING(for write_inode return type)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_func_write_inode_returns_int,
  [
  AC_TRY_COMPILE(
--- 18,24 ----
  AC_DEFUN([LINUX_WRITE_INODE_RETURN_TYPE],[
  AC_MSG_CHECKING(for write_inode return type)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_func_write_inode_returns_int,
  [
  AC_TRY_COMPILE(
***************
*** 34,40 ****
  
  AC_DEFUN([LINUX_IOP_NAMEIDATA],[
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_MSG_CHECKING(whether inode_operations.create takes a nameidata)
  AC_CACHE_VAL(ac_cv_linux_func_i_create_takes_nameidata,
  [
--- 34,40 ----
  
  AC_DEFUN([LINUX_IOP_NAMEIDATA],[
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_MSG_CHECKING(whether inode_operations.create takes a nameidata)
  AC_CACHE_VAL(ac_cv_linux_func_i_create_takes_nameidata,
  [
***************
*** 102,108 ****
  
  AC_DEFUN([LINUX_AOP_WRITEBACK_CONTROL],[
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_MSG_CHECKING(whether address_space_operations.writepage takes a writeback_control)
  AC_CACHE_VAL(ac_cv_linux_func_a_writepage_takes_writeback_control,
  [
--- 102,108 ----
  
  AC_DEFUN([LINUX_AOP_WRITEBACK_CONTROL],[
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_MSG_CHECKING(whether address_space_operations.writepage takes a writeback_control)
  AC_CACHE_VAL(ac_cv_linux_func_a_writepage_takes_writeback_control,
  [
***************
*** 124,130 ****
  
  AC_DEFUN([LINUX_REFRIGERATOR],[
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_MSG_CHECKING(whether refrigerator takes PF_FREEZE)
  AC_CACHE_VAL(ac_cv_linux_func_refrigerator_takes_pf_freeze,
  [
--- 124,130 ----
  
  AC_DEFUN([LINUX_REFRIGERATOR],[
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_MSG_CHECKING(whether refrigerator takes PF_FREEZE)
  AC_CACHE_VAL(ac_cv_linux_func_refrigerator_takes_pf_freeze,
  [
Index: openafs/src/cf/linux-test2.m4
diff -c openafs/src/cf/linux-test2.m4:1.9.2.2 openafs/src/cf/linux-test2.m4:1.9.2.3
*** openafs/src/cf/linux-test2.m4:1.9.2.2	Fri Jul 29 10:49:51 2005
--- openafs/src/cf/linux-test2.m4	Thu Jan 26 10:58:35 2006
***************
*** 1,7 ****
  AC_DEFUN([LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK], [
  AC_MSG_CHECKING(for gfp_mask in struct address_space)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_gfp_mask, 
  [
  AC_TRY_COMPILE(
--- 1,7 ----
  AC_DEFUN([LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK], [
  AC_MSG_CHECKING(for gfp_mask in struct address_space)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_gfp_mask, 
  [
  AC_TRY_COMPILE(
***************
*** 16,22 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_BYTES], [
  AC_MSG_CHECKING(for i_bytes in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_bytes, 
  [
  AC_TRY_COMPILE(
--- 16,22 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_BYTES], [
  AC_MSG_CHECKING(for i_bytes in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_bytes, 
  [
  AC_TRY_COMPILE(
***************
*** 31,37 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM], [
  AC_MSG_CHECKING(for i_alloc_sem in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_alloc_sem,
  [
  AC_TRY_COMPILE(
--- 31,37 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM], [
  AC_MSG_CHECKING(for i_alloc_sem in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_alloc_sem,
  [
  AC_TRY_COMPILE(
***************
*** 46,52 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM], [
  AC_MSG_CHECKING(for i_truncate_sem in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_truncate_sem,
  [
  AC_TRY_COMPILE(
--- 46,52 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM], [
  AC_MSG_CHECKING(for i_truncate_sem in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_truncate_sem,
  [
  AC_TRY_COMPILE(
***************
*** 61,67 ****
  AC_DEFUN([LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK], [
  AC_MSG_CHECKING(for page_lock in struct address_space)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_page_lock, 
  [
  AC_TRY_COMPILE(
--- 61,67 ----
  AC_DEFUN([LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK], [
  AC_MSG_CHECKING(for page_lock in struct address_space)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_address_space_has_page_lock, 
  [
  AC_TRY_COMPILE(
Index: openafs/src/cf/linux-test3.m4
diff -c openafs/src/cf/linux-test3.m4:1.8.2.8 openafs/src/cf/linux-test3.m4:1.8.2.9
*** openafs/src/cf/linux-test3.m4:1.8.2.8	Mon Jul 11 15:41:27 2005
--- openafs/src/cf/linux-test3.m4	Thu Jan 26 10:58:35 2006
***************
*** 85,91 ****
  AC_DEFUN([LINUX_KERNEL_SOCK_CREATE],[
  AC_MSG_CHECKING(for 5th argument in sock_create found in some SELinux kernels)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_kernel_sock_create_v,
  [
  AC_TRY_COMPILE(
--- 85,91 ----
  AC_DEFUN([LINUX_KERNEL_SOCK_CREATE],[
  AC_MSG_CHECKING(for 5th argument in sock_create found in some SELinux kernels)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -D__KERNEL__ -DKBUILD_BASENAME=\\"libafs\\" $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_kernel_sock_create_v,
  [
  AC_TRY_COMPILE(
***************
*** 101,107 ****
  AC_DEFUN([LINUX_KERNEL_PAGE_FOLLOW_LINK],[
  AC_MSG_CHECKING(for page_follow_link_light vs page_follow_link)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-default -Werror-implicit-function-declaration -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_kernel_page_follow_link,
  [
  AC_TRY_COMPILE(
--- 101,107 ----
  AC_DEFUN([LINUX_KERNEL_PAGE_FOLLOW_LINK],[
  AC_MSG_CHECKING(for page_follow_link_light vs page_follow_link)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-default -Werror-implicit-function-declaration -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_kernel_page_follow_link,
  [
  AC_TRY_COMPILE(
Index: openafs/src/cf/linux-test4.m4
diff -c openafs/src/cf/linux-test4.m4:1.20.2.7 openafs/src/cf/linux-test4.m4:1.20.2.9
*** openafs/src/cf/linux-test4.m4:1.20.2.7	Mon Jul 11 15:30:01 2005
--- openafs/src/cf/linux-test4.m4	Tue Feb 14 19:32:54 2006
***************
*** 1,7 ****
  AC_DEFUN([LINUX_COMPLETION_H_EXISTS], [
  AC_MSG_CHECKING(for linux/completion.h existance)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_completion_h_exists,
  [
  AC_TRY_COMPILE(
--- 1,7 ----
  AC_DEFUN([LINUX_COMPLETION_H_EXISTS], [
  AC_MSG_CHECKING(for linux/completion.h existance)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_completion_h_exists,
  [
  AC_TRY_COMPILE(
***************
*** 21,27 ****
  AC_DEFUN([LINUX_DEFINES_FOR_EACH_PROCESS], [
  AC_MSG_CHECKING(for defined for_each_process)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_defines_for_each_process,
  [
  AC_TRY_COMPILE(
--- 21,27 ----
  AC_DEFUN([LINUX_DEFINES_FOR_EACH_PROCESS], [
  AC_MSG_CHECKING(for defined for_each_process)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_defines_for_each_process,
  [
  AC_TRY_COMPILE(
***************
*** 38,44 ****
  AC_DEFUN([LINUX_DEFINES_PREV_TASK], [
  AC_MSG_CHECKING(for defined prev_task)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_defines_prev_task,
  [
  AC_TRY_COMPILE(
--- 38,44 ----
  AC_DEFUN([LINUX_DEFINES_PREV_TASK], [
  AC_MSG_CHECKING(for defined prev_task)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_defines_prev_task,
  [
  AC_TRY_COMPILE(
***************
*** 55,61 ****
  AC_DEFUN([LINUX_EXPORTS_INIT_MM], [
  AC_MSG_CHECKING(for exported init_mm)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_init_mm,
  [
  AC_TRY_COMPILE(
--- 55,61 ----
  AC_DEFUN([LINUX_EXPORTS_INIT_MM], [
  AC_MSG_CHECKING(for exported init_mm)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_init_mm,
  [
  AC_TRY_COMPILE(
***************
*** 72,78 ****
  AC_DEFUN([LINUX_EXPORTS_KALLSYMS_ADDRESS], [
  AC_MSG_CHECKING(for exported kallsyms_address_to_symbol)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_address,
  [
  AC_TRY_COMPILE(
--- 72,78 ----
  AC_DEFUN([LINUX_EXPORTS_KALLSYMS_ADDRESS], [
  AC_MSG_CHECKING(for exported kallsyms_address_to_symbol)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_address,
  [
  AC_TRY_COMPILE(
***************
*** 89,95 ****
  AC_DEFUN([LINUX_EXPORTS_KALLSYMS_SYMBOL], [
  AC_MSG_CHECKING(for exported kallsyms_symbol_to_address)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_symbol,
  [
  AC_TRY_COMPILE(
--- 89,95 ----
  AC_DEFUN([LINUX_EXPORTS_KALLSYMS_SYMBOL], [
  AC_MSG_CHECKING(for exported kallsyms_symbol_to_address)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_kallsyms_symbol,
  [
  AC_TRY_COMPILE(
***************
*** 106,112 ****
  AC_DEFUN([LINUX_EXPORTS_SYS_CALL_TABLE], [
  AC_MSG_CHECKING(for exported sys_call_table)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_sys_call_table,
  [
  AC_TRY_COMPILE(
--- 106,112 ----
  AC_DEFUN([LINUX_EXPORTS_SYS_CALL_TABLE], [
  AC_MSG_CHECKING(for exported sys_call_table)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_sys_call_table,
  [
  AC_TRY_COMPILE(
***************
*** 123,129 ****
  AC_DEFUN([LINUX_EXPORTS_IA32_SYS_CALL_TABLE], [
  AC_MSG_CHECKING(for exported ia32_sys_call_table)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_ia32_sys_call_table,
  [
  AC_TRY_COMPILE(
--- 123,129 ----
  AC_DEFUN([LINUX_EXPORTS_IA32_SYS_CALL_TABLE], [
  AC_MSG_CHECKING(for exported ia32_sys_call_table)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_ia32_sys_call_table,
  [
  AC_TRY_COMPILE(
***************
*** 140,146 ****
  AC_DEFUN([LINUX_EXPORTS_SYS_CHDIR], [
  AC_MSG_CHECKING(for exported sys_chdir)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_sys_chdir,
  [
  AC_TRY_COMPILE(
--- 140,146 ----
  AC_DEFUN([LINUX_EXPORTS_SYS_CHDIR], [
  AC_MSG_CHECKING(for exported sys_chdir)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_sys_chdir,
  [
  AC_TRY_COMPILE(
***************
*** 157,163 ****
  AC_DEFUN([LINUX_EXPORTS_SYS_CLOSE], [
  AC_MSG_CHECKING(for exported sys_close)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_sys_close,
  [
  AC_TRY_COMPILE(
--- 157,163 ----
  AC_DEFUN([LINUX_EXPORTS_SYS_CLOSE], [
  AC_MSG_CHECKING(for exported sys_close)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_sys_close,
  [
  AC_TRY_COMPILE(
***************
*** 174,180 ****
  AC_DEFUN([LINUX_EXPORTS_SYS_WAIT4], [
  AC_MSG_CHECKING(for exported sys_wait4)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_sys_wait4,
  [
  AC_TRY_COMPILE(
--- 174,180 ----
  AC_DEFUN([LINUX_EXPORTS_SYS_WAIT4], [
  AC_MSG_CHECKING(for exported sys_wait4)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_exports_sys_wait4,
  [
  AC_TRY_COMPILE(
***************
*** 191,197 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_CDEV], [
  AC_MSG_CHECKING(for i_cdev in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
  [
  AC_TRY_COMPILE(
--- 191,197 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_CDEV], [
  AC_MSG_CHECKING(for i_cdev in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
  [
  AC_TRY_COMPILE(
***************
*** 207,214 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DEVICES], [
  AC_MSG_CHECKING(for i_devices in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
! AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_cdev, 
  [
  AC_TRY_COMPILE(
  [#include <linux/fs.h>],
--- 207,214 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DEVICES], [
  AC_MSG_CHECKING(for i_devices in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
! AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_devices, 
  [
  AC_TRY_COMPILE(
  [#include <linux/fs.h>],
***************
*** 223,229 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS], [
  AC_MSG_CHECKING(for i_dirty_data_buffers in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers, 
  [
  AC_TRY_COMPILE(
--- 223,229 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS], [
  AC_MSG_CHECKING(for i_dirty_data_buffers in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers, 
  [
  AC_TRY_COMPILE(
***************
*** 239,245 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK], [
  AC_MSG_CHECKING(for inotify_lock in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_lock, 
  [
  AC_TRY_COMPILE(
--- 239,245 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK], [
  AC_MSG_CHECKING(for inotify_lock in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_lock, 
  [
  AC_TRY_COMPILE(
***************
*** 254,260 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM], [
  AC_MSG_CHECKING(for inotify_sem in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_sem, 
  [
  AC_TRY_COMPILE(
--- 254,260 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM], [
  AC_MSG_CHECKING(for inotify_sem in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_inotify_sem, 
  [
  AC_TRY_COMPILE(
***************
*** 270,276 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD], [
  AC_MSG_CHECKING(for i_mapping_overload in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mapping_overload, 
  [
  AC_TRY_COMPILE(
--- 270,276 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD], [
  AC_MSG_CHECKING(for i_mapping_overload in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mapping_overload, 
  [
  AC_TRY_COMPILE(
***************
*** 286,292 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MMAP_SHARED], [
  AC_MSG_CHECKING(for i_mmap_shared in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mmap_shared,
  [
  AC_TRY_COMPILE(
--- 286,292 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MMAP_SHARED], [
  AC_MSG_CHECKING(for i_mmap_shared in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mmap_shared,
  [
  AC_TRY_COMPILE(
***************
*** 299,308 ****
  CPPFLAGS="$save_CPPFLAGS"])
  
  
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SECURITY], [
  AC_MSG_CHECKING(for i_security in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_security, 
  [
  AC_TRY_COMPILE(
--- 299,324 ----
  CPPFLAGS="$save_CPPFLAGS"])
  
  
+ AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MUTEX], [
+ AC_MSG_CHECKING(for i_mutex in struct inode)
+ save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
+ AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_mutex, 
+ [
+ AC_TRY_COMPILE(
+ [#include <linux/fs.h>],
+ [struct inode _inode;
+ printf("%d\n", _inode.i_mutex);], 
+ ac_cv_linux_fs_struct_inode_has_i_mutex=yes,
+ ac_cv_linux_fs_struct_inode_has_i_mutex=no)])
+ AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mutex)
+ CPPFLAGS="$save_CPPFLAGS"])
+ 
+ 
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SECURITY], [
  AC_MSG_CHECKING(for i_security in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_security, 
  [
  AC_TRY_COMPILE(
***************
*** 318,324 ****
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST], [
  AC_MSG_CHECKING(for i_sb_list in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_sb_list, 
  [
  AC_TRY_COMPILE(
--- 334,340 ----
  AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST], [
  AC_MSG_CHECKING(for i_sb_list in struct inode)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_inode_has_i_sb_list, 
  [
  AC_TRY_COMPILE(
***************
*** 334,340 ****
  AC_DEFUN([LINUX_RECALC_SIGPENDING_ARG_TYPE],[
  AC_MSG_CHECKING(for recalc_sigpending arg type)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_func_recalc_sigpending_takes_void,
  [
  AC_TRY_COMPILE(
--- 350,356 ----
  AC_DEFUN([LINUX_RECALC_SIGPENDING_ARG_TYPE],[
  AC_MSG_CHECKING(for recalc_sigpending arg type)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_func_recalc_sigpending_takes_void,
  [
  AC_TRY_COMPILE(
***************
*** 349,355 ****
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT], [
  AC_MSG_CHECKING(for parent in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_parent,
  [
  AC_TRY_COMPILE(
--- 365,371 ----
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT], [
  AC_MSG_CHECKING(for parent in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_parent,
  [
  AC_TRY_COMPILE(
***************
*** 365,371 ****
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT], [
  AC_MSG_CHECKING(for real_parent in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_real_parent,
  [
  AC_TRY_COMPILE(
--- 381,387 ----
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT], [
  AC_MSG_CHECKING(for real_parent in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_real_parent,
  [
  AC_TRY_COMPILE(
***************
*** 381,387 ****
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG], [
  AC_MSG_CHECKING(for sig in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sig,
  [
  AC_TRY_COMPILE(
--- 397,403 ----
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG], [
  AC_MSG_CHECKING(for sig in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sig,
  [
  AC_TRY_COMPILE(
***************
*** 396,402 ****
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK], [
  AC_MSG_CHECKING(for sigmask_lock in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sigmask_lock,
  [
  AC_TRY_COMPILE(
--- 412,418 ----
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK], [
  AC_MSG_CHECKING(for sigmask_lock in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sigmask_lock,
  [
  AC_TRY_COMPILE(
***************
*** 411,417 ****
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND], [
  AC_MSG_CHECKING(for sighand in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sighand,
  [
  AC_TRY_COMPILE(
--- 427,433 ----
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND], [
  AC_MSG_CHECKING(for sighand in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_sighand,
  [
  AC_TRY_COMPILE(
***************
*** 426,432 ****
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM], [
  AC_MSG_CHECKING(for rlim in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_rlim,
  [
  AC_TRY_COMPILE(
--- 442,448 ----
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM], [
  AC_MSG_CHECKING(for rlim in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_rlim,
  [
  AC_TRY_COMPILE(
***************
*** 441,447 ****
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM], [
  AC_MSG_CHECKING(for signal->rlim in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_signal_rlim,
  [
  AC_TRY_COMPILE(
--- 457,463 ----
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM], [
  AC_MSG_CHECKING(for signal->rlim in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_signal_rlim,
  [
  AC_TRY_COMPILE(
***************
*** 456,462 ****
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE], [
  AC_MSG_CHECKING(for exit_state in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_exit_state,
  [
  AC_TRY_COMPILE(
--- 472,478 ----
  AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE], [
  AC_MSG_CHECKING(for exit_state in struct task_struct)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_sched_struct_task_struct_has_exit_state,
  [
  AC_TRY_COMPILE(
***************
*** 471,477 ****
  AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [
  AC_MSG_CHECKING(for alloc_inode in struct super_operations)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_super_has_alloc_inode, 
  [
  AC_TRY_COMPILE(
--- 487,493 ----
  AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [
  AC_MSG_CHECKING(for alloc_inode in struct super_operations)
  save_CPPFLAGS="$CPPFLAGS"
! CPPFLAGS="-I${LINUX_KERNEL_PATH}/include -I${LINUX_KERNEL_PATH}/include/asm/mach-${SUBARCH} -DKBUILD_BASENAME=\"libafs\" -D__KERNEL__ $CPPFLAGS"
  AC_CACHE_VAL(ac_cv_linux_fs_struct_super_has_alloc_inode, 
  [
  AC_TRY_COMPILE(
Index: openafs/src/cf/osconf.m4
diff -c openafs/src/cf/osconf.m4:1.51.2.16 openafs/src/cf/osconf.m4:1.51.2.25
*** openafs/src/cf/osconf.m4:1.51.2.16	Wed Apr 27 23:07:30 2005
--- openafs/src/cf/osconf.m4	Thu Mar  9 01:41:38 2006
***************
*** 208,213 ****
--- 208,214 ----
  		MT_LIBS="-pthread"
  		PAM_CFLAGS="-O2 -pipe -fPIC"
  		SHLIB_LDFLAGS="-shared -Xlinker -x"
+ 		SHLIB_LINKER="${MT_CC} -shared"
  		TXLIBS="-lncurses"
  		XCFLAGS="-O2 -pipe"
  		YACC="byacc"
***************
*** 219,224 ****
--- 220,226 ----
  		MT_LIBS="-lpthread" # XXX -pthread soon
  		PAM_CFLAGS="-O2 -pipe -fPIC"
  		SHLIB_LDFLAGS="-shared -Xlinker -x"
+ 		SHLIB_LINKER="${MT_CC} -shared"
  		TXLIBS="/usr/lib/libcurses.so"
  		XCFLAGS="-O2 -pipe"
  		YACC="yacc"
***************
*** 230,235 ****
--- 232,238 ----
  		MT_LIBS=""
  		PAM_CFLAGS="-O2 -pipe -fPIC"
  		SHLIB_LDFLAGS="-shared -Xlinker -x"
+ 		SHLIB_LINKER="${MT_CC} -shared"
  		TXLIBS="/usr/lib/libcurses.so"
  		XCFLAGS="-O2 -pipe"
  		YACC="bison -y"
***************
*** 370,375 ****
--- 373,379 ----
  		PAM_CFLAGS="-O2 -pipe -fpic"
  		SHLIB_CFLAGS="-fpic"
  		SHLIB_LDFLAGS="-shared -Xlinker -x"
+ 		SHLIB_LINKER="${MT_CC} -shared"
  		TXLIBS="/usr/lib/libcurses.a"
  		XCFLAGS="-O2"
  		YACC="yacc"
***************
*** 393,398 ****
--- 397,404 ----
  		LEX="lex -l"
  		REGEX_OBJ="regex.o"
  		XCFLAGS="-traditional-cpp"
+ 		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_darwin_13)
***************
*** 401,406 ****
--- 407,414 ----
  		LWP_OPTMZ="-O2"
  		REGEX_OBJ="regex.o"
  		XCFLAGS="-no-cpp-precomp"
+ 		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_darwin_14)
***************
*** 409,414 ****
--- 417,424 ----
  		LWP_OPTMZ="-O2"
  		REGEX_OBJ="regex.o"
  		XCFLAGS="-no-cpp-precomp"
+ 		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_darwin_60)
***************
*** 418,423 ****
--- 428,435 ----
  		REGEX_OBJ="regex.o"
  		XCFLAGS="-no-cpp-precomp"
  		TXLIBS="-lncurses"
+ 		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_darwin_70)
***************
*** 431,449 ****
  		XCFLAGS="-no-cpp-precomp"
  		TXLIBS="-lncurses"
  		EXTRA_VLIBOBJS="fstab.o"
  		;;
  
! 	ppc_darwin_80)
  		AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
  		LEX="lex -l"
! 		MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS}'
  		KROOT=
  		KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
! 		LWP_OPTMZ="-O2"
  		REGEX_OBJ="regex.o"
- 		XCFLAGS="-no-cpp-precomp"
  		TXLIBS="-lncurses"
  		EXTRA_VLIBOBJS="fstab.o"
  		;;
  
  	ppc_linux*)
--- 443,483 ----
  		XCFLAGS="-no-cpp-precomp"
  		TXLIBS="-lncurses"
  		EXTRA_VLIBOBJS="fstab.o"
+ 		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
! 	*_darwin_80)
  		AFSD_LDFLAGS="-F/System/Library/PrivateFrameworks -framework DiskArbitration"
  		LEX="lex -l"
! 		MT_CFLAGS='-DAFS_PTHREAD_ENV -D_REENTRANT ${XCFLAGS} ${ARCHFLAGS}'
  		KROOT=
  		KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
! 		KERN_OPTMZ="-Os"
! 		LWP_OPTMZ="-Os"
! 		OPTMZ="-Os"
  		REGEX_OBJ="regex.o"
  		TXLIBS="-lncurses"
  		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=
+ 		KINCLUDES='-I$(KROOT)/System/Library/Frameworks/Kernel.framework/Headers'
+ 		LD="cc"
+ 		KERN_OPTMZ="-Os"
+ 		LWP_OPTMZ="-Os"
+ 		OPTMZ="-Os"
+ 		REGEX_OBJ="regex.o"
+ 		TXLIBS="-lncurses"
+ 		EXTRA_VLIBOBJS="fstab.o"
+ 		SHLIB_LINKER="${MT_CC} -dynamiclib"
+ 		SHLIB_SUFFIX="dylib"
  		;;
  
  	ppc_linux*)
***************
*** 556,562 ****
  
  	s390x_linux24|s390x_linux26)
  		CC="gcc"
! 		CCOBJ="gcc"
  		LD="ld"
  		KERN_OPTMZ=-O2
  		LEX="flex -l"
--- 590,596 ----
  
  	s390x_linux24|s390x_linux26)
  		CC="gcc"
! 		CCOBJ="gcc -fPIC"
  		LD="ld"
  		KERN_OPTMZ=-O2
  		LEX="flex -l"
***************
*** 633,652 ****
  		SHLIB_LINKER="${CC} -shared"
  		;;
  
! 	sparc64_linux22)
! 		KERN_OPTMZ=-O2
! 		LEX="flex -l"
! 		MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
! 		MT_LIBS="-lpthread"
! 		PAM_CFLAGS="-O2 -Dlinux -DLINUX_PAM -fPIC"
! 		SHLIB_LDFLAGS="-shared -Xlinker -x"
! 		TXLIBS="-lncurses"
! 		XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
! 		YACC="bison -y"
! 		SHLIB_LINKER="${MT_CC} -shared"
! 		;;
! 
! 	sparc64_linux24)
  		KERN_OPTMZ=-O2
  		LEX="flex -l"
  		MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
--- 667,673 ----
  		SHLIB_LINKER="${CC} -shared"
  		;;
  
! 	sparc64_linux*)
  		KERN_OPTMZ=-O2
  		LEX="flex -l"
  		MT_CFLAGS='-DAFS_PTHREAD_ENV -pthread -D_REENTRANT ${XCFLAGS}'
***************
*** 655,660 ****
--- 676,683 ----
  		SHLIB_LDFLAGS="-shared -Xlinker -x"
  		TXLIBS="-lncurses"
  		XCFLAGS="-O2 -D_LARGEFILE64_SOURCE"
+ 		XCFLAGS64="-O2 -D_LARGEFILE64_SOURCE -m64"
+ 		XLDFLAGS64="-m64"
  		YACC="bison -y"
  		SHLIB_LINKER="${MT_CC} -shared"
  		;;
***************
*** 701,706 ****
--- 724,730 ----
  		XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
  		LD="/usr/ccs/bin/ld"
  		SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+ 		LWP_OPTMZ="-g"
  		;;
  
  	sun4x_56)
***************
*** 721,726 ****
--- 745,751 ----
  		XLIBKVM="-lkvm"
  		XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
  		SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+ 		LWP_OPTMZ="-g"
  		;;
  
  	sun4x_57)
***************
*** 742,747 ****
--- 767,773 ----
  		XLIBKVM="-lkvm"
  		XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
  		SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+ 		LWP_OPTMZ="-g"
  		;;
  
  	sun4x_58)
***************
*** 763,768 ****
--- 789,795 ----
  		XLIBKVM="-lkvm"
  		XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
  		SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+ 		LWP_OPTMZ="-g"
  		;;
  
  	sun4x_59)
***************
*** 784,789 ****
--- 811,817 ----
  		XLIBKVM="-lkvm"
  		XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
  		SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+ 		LWP_OPTMZ="-g"
  		;;
  
  	sun4x_510)
***************
*** 805,810 ****
--- 833,839 ----
  		XLIBKVM="-lkvm"
  		XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
  		SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
+ 		LWP_OPTMZ="-g"
  		;;
  
  	sunx86_57)
Index: openafs/src/cmd/test/Makefile.in
diff -c openafs/src/cmd/test/Makefile.in:1.7 openafs/src/cmd/test/Makefile.in:1.7.2.1
*** openafs/src/cmd/test/Makefile.in:1.7	Tue Oct 15 23:58:30 2002
--- openafs/src/cmd/test/Makefile.in	Thu Mar  9 01:41:39 2006
***************
*** 14,20 ****
  
  INCDIRS=  -I${SRCDIR}/include -I${SRCDIR}/include/afs -I..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  all: test
  test tests: ctest dtest itest
--- 14,20 ----
  
  INCDIRS=  -I${SRCDIR}/include -I${SRCDIR}/include/afs -I..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  all: test
  test tests: ctest dtest itest
Index: openafs/src/comerr/test/Makefile.in
diff -c openafs/src/comerr/test/Makefile.in:1.6 openafs/src/comerr/test/Makefile.in:1.6.8.1
*** openafs/src/comerr/test/Makefile.in:1.6	Wed Oct 31 23:59:42 2001
--- openafs/src/comerr/test/Makefile.in	Thu Mar  9 01:41:39 2006
***************
*** 6,12 ****
  INCDIRS=-I${TOP_INCDIR} -I..
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} -lcom_err ${XCFLAGS}
  
  all: test
  
--- 6,12 ----
  INCDIRS=-I${TOP_INCDIR} -I..
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} -lcom_err ${XCFLAGS} ${ARCHFLAGS}
  
  all: test
  
Index: openafs/src/config/Makefile.config.in
diff -c openafs/src/config/Makefile.config.in:1.10 openafs/src/config/Makefile.config.in:1.10.2.1
*** openafs/src/config/Makefile.config.in:1.10	Sun May  9 23:19:01 2004
--- openafs/src/config/Makefile.config.in	Thu Mar  9 01:41:42 2006
***************
*** 125,132 ****
  COMMON_INCL=-I${TOP_OBJDIR}/src/config -I. -I${srcdir} -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -I${TOP_INCDIR}/rx -I${TOP_OBJDIR} -I${TOP_SRCDIR} -I${TOP_OBJDIR}/src
  COMMON_CFLAGS=${DBG} ${OPTMZ} ${COMMON_INCL}
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS}
! LDFLAGS=${XLDFLAGS}
  
  .c.o:
  	$(CCOBJ) $(CFLAGS) -c $<
--- 125,132 ----
  COMMON_INCL=-I${TOP_OBJDIR}/src/config -I. -I${srcdir} -I${TOP_INCDIR} -I${TOP_INCDIR}/afs -I${TOP_INCDIR}/rx -I${TOP_OBJDIR} -I${TOP_SRCDIR} -I${TOP_OBJDIR}/src
  COMMON_CFLAGS=${DBG} ${OPTMZ} ${COMMON_INCL}
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS}
! LDFLAGS=${XLDFLAGS} ${ARCHFLAGS}
  
  .c.o:
  	$(CCOBJ) $(CFLAGS) -c $<
Index: openafs/src/config/Makefile.i386_djgpp
diff -c openafs/src/config/Makefile.i386_djgpp:1.7 openafs/src/config/Makefile.i386_djgpp:1.7.8.1
*** openafs/src/config/Makefile.i386_djgpp:1.7	Wed Oct 31 23:59:43 2001
--- openafs/src/config/Makefile.i386_djgpp	Thu Mar  9 01:41:42 2006
***************
*** 16,22 ****
  #PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
  # Put -O2 here to _ensure_ all Makefiles pick it up.
  XCFLAGS= ${DBG} -Dfds_bits=fd_bits -DAFS_AFSDB_ENV -DAFS_FREELANCE_CLIENT
! MT_CFLAGS=${XCFLAGS}
  XLDFLAGS=
  SHLIB_LDFLAGS = -shared -Xlinker -x
  SHLIB_SUFFIX=so
--- 16,22 ----
  #PAM_CFLAGS = -O2 -Dlinux -DLINUX_PAM -fPIC
  # Put -O2 here to _ensure_ all Makefiles pick it up.
  XCFLAGS= ${DBG} -Dfds_bits=fd_bits -DAFS_AFSDB_ENV -DAFS_FREELANCE_CLIENT
! MT_CFLAGS=${XCFLAGS} ${ARCHFLAGS}
  XLDFLAGS=
  SHLIB_LDFLAGS = -shared -Xlinker -x
  SHLIB_SUFFIX=so
Index: openafs/src/config/Makefile.in
diff -c openafs/src/config/Makefile.in:1.14 openafs/src/config/Makefile.in:1.14.2.1
*** openafs/src/config/Makefile.in:1.14	Sat Jan 11 02:34:04 2003
--- openafs/src/config/Makefile.in	Thu Mar  9 01:41:42 2006
***************
*** 8,14 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${DBG} ${OPTMZ} -I${TOP_INCDIR} -I. ${XCFLAGS}
  
  INST=$(RM) -f $@; $(CP) $? $@
  
--- 8,14 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${DBG} ${OPTMZ} -I${TOP_INCDIR} -I. ${XCFLAGS} ${ARCHFLAGS}
  
  INST=$(RM) -f $@; $(CP) $? $@
  
Index: openafs/src/config/NTMakefile
diff -c openafs/src/config/NTMakefile:1.15.2.2 openafs/src/config/NTMakefile:1.15.2.3
*** openafs/src/config/NTMakefile:1.15.2.2	Sun Jun 12 11:56:49 2005
--- openafs/src/config/NTMakefile	Sun Mar  5 22:16:41 2006
***************
*** 230,235 ****
--- 230,238 ----
  !	IF (!EXIST($(OJT)\volser))
  		$(MKDIR) $(OJT)\volser
  !	ENDIF
+ !	IF (!EXIST($(OJT)\xstat))
+ 		$(MKDIR) $(OJT)\xstat
+ !	ENDIF
  !	IF (!EXIST($(OJT)\WINNT))
  		$(MKDIR) $(OJT)\WINNT
  !	ENDIF
Index: openafs/src/config/NTMakefile.amd64_w2k
diff -c openafs/src/config/NTMakefile.amd64_w2k:1.1.2.20.2.4 openafs/src/config/NTMakefile.amd64_w2k:1.1.2.32
*** openafs/src/config/NTMakefile.amd64_w2k:1.1.2.20.2.4	Wed Oct 19 16:15:22 2005
--- openafs/src/config/NTMakefile.amd64_w2k	Sun Apr  9 01:01:58 2006
***************
*** 80,86 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0008
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 80,86 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0101
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/NTMakefile.i386_nt40
diff -c openafs/src/config/NTMakefile.i386_nt40:1.46.2.35.2.4 openafs/src/config/NTMakefile.i386_nt40:1.46.2.47
*** openafs/src/config/NTMakefile.i386_nt40:1.46.2.35.2.4	Wed Oct 19 16:15:22 2005
--- openafs/src/config/NTMakefile.i386_nt40	Sun Apr  9 01:01:58 2006
***************
*** 80,86 ****
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0008
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 80,86 ----
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0101
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/NTMakefile.i386_w2k
diff -c openafs/src/config/NTMakefile.i386_w2k:1.1.2.21.2.4 openafs/src/config/NTMakefile.i386_w2k:1.1.2.34
*** openafs/src/config/NTMakefile.i386_w2k:1.1.2.21.2.4	Wed Oct 19 16:15:22 2005
--- openafs/src/config/NTMakefile.i386_w2k	Sun Apr  9 01:01:58 2006
***************
*** 78,85 ****
  LIB = $(AFSDEV_LIB)
  
  #define used in WinNT/2000 installation and program version display
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0008
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
--- 78,86 ----
  LIB = $(AFSDEV_LIB)
  
  #define used in WinNT/2000 installation and program version display
+ AFSPRODUCT_VER_MAJOR=1
  AFSPRODUCT_VER_MINOR=4
! AFSPRODUCT_VER_PATCH=0101
  AFSPRODUCT_VER_BUILD=0
  
  AFSPRODUCT_VERSION=$(AFSPRODUCT_VER_MAJOR).$(AFSPRODUCT_VER_MINOR).$(AFSPRODUCT_VER_PATCH)
Index: openafs/src/config/afs_args.h
diff -c openafs/src/config/afs_args.h:1.13.2.6 openafs/src/config/afs_args.h:1.13.2.7
*** openafs/src/config/afs_args.h:1.13.2.6	Tue Jun 21 16:13:54 2005
--- openafs/src/config/afs_args.h	Wed Oct  5 01:58:34 2005
***************
*** 204,208 ****
--- 204,223 ----
   
  #endif
  
+ #ifdef AFS_DARWIN80_ENV
+ struct afssysargs {
+      unsigned long syscall;
+      unsigned long param1;
+      unsigned long param2;
+      unsigned long param3;
+      unsigned long param4;
+      unsigned long param5;
+      unsigned long param6;
+      unsigned long retval;
+ };
+ #define VIOC_SYSCALL_TYPE 'C' 
+ #define VIOC_SYSCALL _IOWR(VIOC_SYSCALL_TYPE,1,struct afssysargs)
+ #define SYSCALL_DEV_FNAME "/dev/openafs_ioctl"
+ #endif
  
  #endif /* _AFS_ARGS_H_ */
Index: openafs/src/config/afs_sysnames.h
diff -c openafs/src/config/afs_sysnames.h:1.50.2.16 openafs/src/config/afs_sysnames.h:1.50.2.23
*** openafs/src/config/afs_sysnames.h:1.50.2.16	Mon May 23 17:17:41 2005
--- openafs/src/config/afs_sysnames.h	Wed Mar 15 11:16:36 2006
***************
*** 58,63 ****
--- 58,67 ----
  #define SYS_NAME_ID_ppc_darwin_14        505
  #define SYS_NAME_ID_ppc_darwin_60        506
  #define SYS_NAME_ID_ppc_darwin_70        507
+ #define SYS_NAME_ID_ppc_darwin_80        508
+ #define SYS_NAME_ID_x86_darwin_80        509
+ #define SYS_NAME_ID_ppc_darwin_90        510
+ #define SYS_NAME_ID_x86_darwin_90        511
  
  #define SYS_NAME_ID_next_mach20		 601
  #define SYS_NAME_ID_next_mach30		 602
***************
*** 155,160 ****
--- 159,165 ----
  #define SYS_NAME_ID_s390_linux2         1900
  #define SYS_NAME_ID_s390_linux22        1901
  #define SYS_NAME_ID_s390_linux24        1902
+ #define SYS_NAME_ID_s390_linux26        1907
  #define SYS_NAME_ID_s390x_linux2         1903
  #define SYS_NAME_ID_s390x_linux22        1904
  #define SYS_NAME_ID_s390x_linux24        1905
***************
*** 206,211 ****
--- 211,217 ----
  #define SYS_NAME_ID_macppc_nbsd20	2524
  #define SYS_NAME_ID_i386_nbsd21		2525
  #define SYS_NAME_ID_i386_nbsd30		2526
+ #define SYS_NAME_ID_amd64_nbsd20	2527
  
  #define SYS_NAME_ID_i386_obsd31		2600
  #define SYS_NAME_ID_i386_obsd32		2601
***************
*** 214,219 ****
--- 220,226 ----
  #define SYS_NAME_ID_i386_obsd35		2604
  #define SYS_NAME_ID_i386_obsd36		2605
  #define SYS_NAME_ID_i386_obsd37		2606
+ #define SYS_NAME_ID_i386_obsd38		2607
  
  #define SYS_NAME_ID_amd64_linux2        2700
  #define SYS_NAME_ID_amd64_linux22       2701
***************
*** 232,240 ****
  
  #define SYS_NAME_ID_amd64_fbsd_53        3008
  
! #define SYS_NAME_ID_amd64_w2k           3100
  
! #define SYS_NAME_ID_i64_w2k             3200
  
  /*
   * Placeholder to keep system-wide standard flags since this file is included by all 
--- 239,247 ----
  
  #define SYS_NAME_ID_amd64_fbsd_53        3008
  
! #define SYS_NAME_ID_amd64_w2k           3400
  
! #define SYS_NAME_ID_i64_w2k             3500
  
  /*
   * Placeholder to keep system-wide standard flags since this file is included by all 
Index: openafs/src/config/linux-version
diff -c openafs/src/config/linux-version:1.3 openafs/src/config/linux-version:1.3.20.1
*** openafs/src/config/linux-version:1.3	Fri Dec  1 17:52:01 2000
--- openafs/src/config/linux-version	Thu Mar 23 10:50:21 2006
***************
*** 40,54 ****
  for VERS in $LINUX_VERS ; do
  	dir=$LINUX_SRCDIR$VERS
  	if [ ! -d $dir ] ; then
  		echo "ERROR: Cannot build for Linux kernel $VERS: $dir does not exist."
  		errors=true
  		continue
  	fi
  	header=$LINUX_SRCDIR$VERS/include/linux/version.h
  	if [ ! -f $header ] ; then
! 	    echo "ERROR: Cannot build for Linux kernel $VERS: $header does not exist."
! 	    errors=true
! 	    continue
  	fi
  
  	vers=`fgrep UTS_RELEASE $LINUX_SRCDIR$VERS/include/linux/version.h |
--- 40,60 ----
  for VERS in $LINUX_VERS ; do
  	dir=$LINUX_SRCDIR$VERS
  	if [ ! -d $dir ] ; then
+ 	    dir=$LINUX_SRCDIR
+ 	    if [ ! -d $dir ] ; then
  		echo "ERROR: Cannot build for Linux kernel $VERS: $dir does not exist."
  		errors=true
  		continue
+       	    fi
  	fi
  	header=$LINUX_SRCDIR$VERS/include/linux/version.h
  	if [ ! -f $header ] ; then
! 	    header=$LINUX_SRCDIR/include/linux/version.h
! 	    if [ ! -f $header ] ; then
! 	        echo "ERROR: Cannot build for Linux kernel $VERS: $header does not exist."
! 	        errors=true
! 	        continue
! 	    fi
  	fi
  
  	vers=`fgrep UTS_RELEASE $LINUX_SRCDIR$VERS/include/linux/version.h |
Index: openafs/src/config/param.amd64_nbsd20.h
diff -c /dev/null openafs/src/config/param.amd64_nbsd20.h:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:28 2006
--- openafs/src/config/param.amd64_nbsd20.h	Sat Oct 15 10:17:51 2005
***************
*** 0 ****
--- 1,21 ----
+ #ifndef AFS_AMD64_PARAM_H
+ #define AFS_AMD64_PARAM_H
+ 
+ #define AFS_X86_XBSD_ENV 1
+ #define AFS_X86_ENV 1
+ #define AFSLITTLE_ENDIAN 1
+ 
+ #define SYS_NAME       "amd64_nbsd20"
+ #define SYS_NAME_ID    SYS_NAME_ID_amd64_nbsd20
+ 
+ #define AFS_64BITPOINTER_ENV  1
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #endif /* !defined(UKERNEL) */
+ 
+ #endif /* AFS_AMD64_PARAM_H */
Index: openafs/src/config/param.hp_ux11i.h
diff -c openafs/src/config/param.hp_ux11i.h:1.4 openafs/src/config/param.hp_ux11i.h:1.4.2.1
*** openafs/src/config/param.hp_ux11i.h:1.4	Mon Aug  9 00:07:33 2004
--- openafs/src/config/param.hp_ux11i.h	Wed Nov  2 00:31:39 2005
***************
*** 26,31 ****
--- 26,32 ----
  #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
  #define AFS_64BIT_CLIENT	1
  #define AFS_64BITPOINTER_ENV	1	/* pointers are 64 bits. */
+ #define AFS_64BIT_IOPS_ENV      1
  
  #include <afs/afs_sysnames.h>
  
Index: openafs/src/config/param.i386_linux26.h
diff -c openafs/src/config/param.i386_linux26.h:1.3.2.2 openafs/src/config/param.i386_linux26.h:1.3.2.3
*** openafs/src/config/param.i386_linux26.h:1.3.2.2	Sun Apr 24 20:02:18 2005
--- openafs/src/config/param.i386_linux26.h	Fri Mar 31 00:53:00 2006
***************
*** 86,91 ****
--- 86,96 ----
  #define SYS_NAME       "i386_linux26"
  #define SYS_NAME_ID    SYS_NAME_ID_i386_linux26
  
+ #ifdef __GLIBC__
+ #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 3)
+ #define USE_UCONTEXT
+ #endif
+ #endif
  #endif /* AFS_PARAM_H */
  
  
Index: openafs/src/config/param.i386_obsd38.h
diff -c /dev/null openafs/src/config/param.i386_obsd38.h:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:28 2006
--- openafs/src/config/param.i386_obsd38.h	Thu Oct 13 13:55:35 2005
***************
*** 0 ****
--- 1,66 ----
+ /*
+  * Jim Rees, University of Michigan CITI
+  */
+ 
+ #ifndef	AFS_PARAM_H
+ #define	AFS_PARAM_H
+ 
+ #ifndef IGNORE_STDS_H
+ #include <sys/param.h>
+ #endif
+ 
+ #define SYS_NAME		"i386_obsd38"
+ #define SYS_NAME_ID		SYS_NAME_ID_i386_obsd38
+ 
+ #define AFS_XBSD_ENV		1	/* {Free,Open,Net}BSD */
+ #define AFS_X86_XBSD_ENV	1
+ 
+ #define AFS_NAMEI_ENV		1	/* User space interface to file system */
+ #define AFS_64BIT_ENV		1
+ #define AFS_64BIT_CLIENT	1
+ #define AFS_64BIT_IOPS_ENV	1	/* Needed for NAMEI */
+ #define AFS_OBSD_ENV		1
+ #define AFS_OBSD34_ENV		1
+ #define AFS_OBSD35_ENV		1
+ #define AFS_OBSD36_ENV		1
+ #define AFS_OBSD37_ENV		1
+ #define AFS_OBSD38_ENV		1
+ #define AFS_NONFSTRANS		1
+ #define AFS_VM_RDWR_ENV		1
+ #define AFS_VFS_ENV		1
+ #define AFS_VFSINCL_ENV		1
+ 
+ #define FTRUNC O_TRUNC
+ 
+ #define AFS_SYSCALL		208
+ #define AFS_MOUNT_AFS		"afs"
+ 
+ #define RXK_LISTENER_ENV	1
+ #define AFS_GCPAGS	        0	/* if nonzero, garbage collect PAGs */
+ #define AFS_USE_GETTIMEOFDAY    1	/* use gettimeofday to implement rx clock */
+ 
+ #define AFSLITTLE_ENDIAN	1
+ 
+ #ifndef IGNORE_STDS_H
+ #include <afs/afs_sysnames.h>
+ #endif
+ 
+ /* Extra kernel definitions (from kdefs file) */
+ #ifdef _KERNEL
+ #define AFS_GLOBAL_SUNLOCK	1
+ #define	AFS_SHORTGID		0	/* are group id's short? */
+ 
+ #if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__)
+ enum vcexcl { NONEXCL, EXCL };
+ 
+ #ifndef MIN
+ #define MIN(A,B) ((A) < (B) ? (A) : (B))
+ #endif
+ #ifndef MAX
+ #define MAX(A,B) ((A) > (B) ? (A) : (B))
+ #endif
+ 
+ #endif /* ! ASSEMBLER & ! __LANGUAGE_ASSEMBLY__ */
+ #endif /* _KERNEL */
+ 
+ #endif /* AFS_PARAM_H */
Index: openafs/src/config/param.nbsd21.h
diff -c openafs/src/config/param.nbsd21.h:1.1.2.1 openafs/src/config/param.nbsd21.h:1.1.2.2
*** openafs/src/config/param.nbsd21.h:1.1.2.1	Tue Dec  7 00:56:52 2004
--- openafs/src/config/param.nbsd21.h	Sun Dec 11 14:00:19 2005
***************
*** 29,35 ****
  #define AFS_HAVE_FFS            1	/* Use system's ffs. */
  
  #if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
! #if __NetBSD_Version__ >= 200040000
  #define AFS_HAVE_STATVFS    1	/* System supports statvfs */
  #else
  #define AFS_HAVE_STATVFS    0	/* System doesn't supports statvfs */
--- 29,35 ----
  #define AFS_HAVE_FFS            1	/* Use system's ffs. */
  
  #if	!defined(ASSEMBLER) && !defined(__LANGUAGE_ASSEMBLY__) && !defined(IGNORE_STDS_H)
! #if __NetBSD_Version__ >= 299000900
  #define AFS_HAVE_STATVFS    1	/* System supports statvfs */
  #else
  #define AFS_HAVE_STATVFS    0	/* System doesn't supports statvfs */
Index: openafs/src/config/param.ppc_darwin_70.h
diff -c openafs/src/config/param.ppc_darwin_70.h:1.4.2.1 openafs/src/config/param.ppc_darwin_70.h:1.4.2.2
*** openafs/src/config/param.ppc_darwin_70.h:1.4.2.1	Mon Apr  4 00:01:21 2005
--- openafs/src/config/param.ppc_darwin_70.h	Tue Nov 29 00:02:24 2005
***************
*** 64,70 ****
  #define va_nodeid       va_fileid
  #define vfs_vnodecovered mnt_vnodecovered
  #define direct          dirent
! #define vnode_t         struct vnode
  
  //#define VN_RELE(vp)     vrele(((struct vnode *)(vp)))
  //#define VN_HOLD(vp)     VREF(((struct vnode *)(vp)))
--- 64,71 ----
  #define va_nodeid       va_fileid
  #define vfs_vnodecovered mnt_vnodecovered
  #define direct          dirent
! #define vnode_t         struct vnode *
! #define mount_t         struct mount *
  
  //#define VN_RELE(vp)     vrele(((struct vnode *)(vp)))
  //#define VN_HOLD(vp)     VREF(((struct vnode *)(vp)))
Index: openafs/src/config/param.ppc_darwin_80.h
diff -c openafs/src/config/param.ppc_darwin_80.h:1.1.2.1 openafs/src/config/param.ppc_darwin_80.h:1.1.2.5
*** openafs/src/config/param.ppc_darwin_80.h:1.1.2.1	Tue Apr 19 12:03:06 2005
--- openafs/src/config/param.ppc_darwin_80.h	Thu Mar  9 01:41:42 2006
***************
*** 7,15 ****
  #define AFS_ENV                 1
  #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
  #define AFS_64BIT_CLIENT        1
! #define AFS_64BIT_IOPS_ENV 1
! #define AFS_PPC_ENV 1
! #define AFS_VFSINCL_ENV 1
  
  #include <afs/afs_sysnames.h>
  
--- 7,21 ----
  #define AFS_ENV                 1
  #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
  #define AFS_64BIT_CLIENT        1
! #define AFS_64BIT_IOPS_ENV	1
! #if defined(__ppc__)
! #define AFS_PPC_ENV		1
! #elif defined(__i386__)
! #define AFS_X86_ENV		1
! #else
! #error Unsupported architecture
! #endif
! #define AFS_VFSINCL_ENV		1
  
  #include <afs/afs_sysnames.h>
  
***************
*** 28,45 ****
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #define sys_ppc_darwin_12   1
! #define sys_ppc_darwin_13   1
! #define sys_ppc_darwin_14   1
! #define sys_ppc_darwin_60   1
! #define sys_ppc_darwin_70   1
! #define sys_ppc_darwin_80   1
! #define SYS_NAME        "ppc_darwin_80"
! #define SYS_NAME_ID     SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN   1
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
! #define AFS_GCPAGS                1	/* if nonzero, garbage collect PAGs */
  #define RXK_LISTENER_ENV         1
  
  #ifdef KERNEL
--- 34,65 ----
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #if defined(__ppc__)
! #define sys_ppc_darwin_12	1
! #define sys_ppc_darwin_13	1
! #define sys_ppc_darwin_14	1
! #define sys_ppc_darwin_60	1
! #define sys_ppc_darwin_70	1
! #define sys_ppc_darwin_80	1
! #define SYS_NAME		"ppc_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN		1
! #elif defined(__i386__)
! #define sys_x86_darwin_12	1
! #define sys_x86_darwin_13	1
! #define sys_x86_darwin_14	1
! #define sys_x86_darwin_60	1
! #define sys_x86_darwin_70	1
! #define sys_x86_darwin_80	1
! #define SYS_NAME		"x86_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_80
! #define AFSLITTLE_ENDIAN	1
! #else
! #error Unsupported architecture
! #endif
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
! #define AFS_GCPAGS               0
  #define RXK_LISTENER_ENV         1
  
  #ifdef KERNEL
***************
*** 57,64 ****
  #define AFS_UIOUSER     UIO_USERSPACE
  #define AFS_CLBYTES     CLBYTES
  #define osi_GetTime(x)  microtime(x)
! #define AFS_KALLOC(x)   kalloc(x)
! #define AFS_KFREE(x,y)  kfree(x,y)
  #define v_count         v_usecount
  #define v_vfsp          v_mount
  #define vfs_bsize       mnt_stat.f_bsize
--- 77,84 ----
  #define AFS_UIOUSER     UIO_USERSPACE
  #define AFS_CLBYTES     CLBYTES
  #define osi_GetTime(x)  microtime(x)
! #define AFS_KALLOC(x)   _MALLOC(x, M_TEMP, M_WAITOK)
! #define AFS_KFREE(x,y)  _FREE(x,M_TEMP)
  #define v_count         v_usecount
  #define v_vfsp          v_mount
  #define vfs_bsize       mnt_stat.f_bsize
***************
*** 66,75 ****
  #define va_nodeid       va_fileid
  #define vfs_vnodecovered mnt_vnodecovered
  #define direct          dirent
- #define vnode_t         struct vnode
  
- //#define VN_RELE(vp)     vrele(((struct vnode *)(vp)))
- //#define VN_HOLD(vp)     VREF(((struct vnode *)(vp)))
  #define BIND_8_COMPAT
  
  #endif
--- 86,92 ----
***************
*** 85,91 ****
  #define AFS_VFSINCL_ENV 1	/* NOBODY uses this.... */
  #define AFS_ENV                 1
  #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
! #define AFS_PPC_ENV 1
  
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_ENV
--- 102,114 ----
  #define AFS_VFSINCL_ENV 1	/* NOBODY uses this.... */
  #define AFS_ENV                 1
  #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
! #if defined(__ppc__)
! #define AFS_PPC_ENV		1
! #elif defined(__i386__)
! #define AFS_X86_ENV		1
! #else
! #error Unsupported architecture
! #endif
  
  #include <afs/afs_sysnames.h>
  #define AFS_USERSPACE_ENV
***************
*** 103,117 ****
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #define sys_ppc_darwin_12   1
! #define sys_ppc_darwin_13   1
! #define sys_ppc_darwin_14   1
! #define sys_ppc_darwin_60   1
! #define sys_ppc_darwin_70   1
! #define sys_ppc_darwin_80   1
! #define SYS_NAME        "ppc_darwin_80"
! #define SYS_NAME_ID     SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN   1
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_UIOSYS      UIO_SYSSPACE
--- 126,154 ----
  #define AFS_MOUNT_AFS    "afs"
  
  /* Machine / Operating system information */
! #if defined(__ppc__)
! #define sys_ppc_darwin_12	1
! #define sys_ppc_darwin_13	1
! #define sys_ppc_darwin_14	1
! #define sys_ppc_darwin_60	1
! #define sys_ppc_darwin_70	1
! #define sys_ppc_darwin_80	1
! #define SYS_NAME		"ppc_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_80
! #define AFSBIG_ENDIAN		1
! #elif defined(__i386__)
! #define sys_x86_darwin_12	1
! #define sys_x86_darwin_13	1
! #define sys_x86_darwin_14	1
! #define sys_x86_darwin_60	1
! #define sys_x86_darwin_70	1
! #define sys_x86_darwin_80	1
! #define SYS_NAME		"x86_darwin_80"
! #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_80
! #define AFSLITTLE_ENDIAN	1
! #else
! #error Unsupported architecture
! #endif
  #define AFS_HAVE_FFS    1	/* Use system's ffs. */
  
  #define AFS_UIOSYS      UIO_SYSSPACE
Index: openafs/src/config/param.ppc_darwin_90.h
diff -c /dev/null openafs/src/config/param.ppc_darwin_90.h:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:28 2006
--- openafs/src/config/param.ppc_darwin_90.h	Thu Mar  9 01:41:42 2006
***************
*** 0 ****
--- 1,184 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ #define AFS_ENV                 1
+ #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
+ #define AFS_64BIT_CLIENT        1
+ #define AFS_64BIT_IOPS_ENV	1
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_VFSINCL_ENV		1
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_DARWIN_ENV
+ #define AFS_DARWIN13_ENV
+ #define AFS_DARWIN14_ENV
+ #define AFS_DARWIN60_ENV
+ #define AFS_DARWIN70_ENV
+ #define AFS_DARWIN80_ENV
+ #define AFS_DARWIN90_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define AFS_NAMEI_ENV 1
+ #define DARWIN_REFBASE 3
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #define sys_ppc_darwin_12	1
+ #define sys_ppc_darwin_13	1
+ #define sys_ppc_darwin_14	1
+ #define sys_ppc_darwin_60	1
+ #define sys_ppc_darwin_70	1
+ #define sys_ppc_darwin_80	1
+ #define sys_ppc_darwin_90	1
+ #define SYS_NAME		"ppc_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_90
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define sys_x86_darwin_90	1
+ #define SYS_NAME		"x86_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_90
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_HAVE_FFS    1	/* Use system's ffs. */
+ 
+ #define AFS_GCPAGS               0
+ #define RXK_LISTENER_ENV         1
+ 
+ #ifdef KERNEL
+ #undef MACRO_BEGIN
+ #undef MACRO_END
+ #include <kern/macro_help.h>
+ #define AFS_GLOBAL_SUNLOCK        1
+ #define AFS_VFS34       1	/* What is VFS34??? */
+ #define afsio_iov       uio_iov
+ #define afsio_iovcnt    uio_iovcnt
+ #define afsio_offset    uio_offset
+ #define afsio_seg       uio_segflg
+ #define afsio_resid     uio_resid
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ #define AFS_CLBYTES     CLBYTES
+ #define osi_GetTime(x)  microtime(x)
+ #define AFS_KALLOC(x)   _MALLOC(x, M_TEMP, M_WAITOK)
+ #define AFS_KFREE(x,y)  _FREE(x,M_TEMP)
+ #define v_count         v_usecount
+ #define v_vfsp          v_mount
+ #define vfs_bsize       mnt_stat.f_bsize
+ #define vfs_fsid        mnt_stat.f_fsid
+ #define va_nodeid       va_fileid
+ #define vfs_vnodecovered mnt_vnodecovered
+ #define direct          dirent
+ 
+ #define BIND_8_COMPAT
+ 
+ #endif
+ #endif /* AFS_PARAM_H */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ #define AFS_VFSINCL_ENV 1	/* NOBODY uses this.... */
+ #define AFS_ENV                 1
+ #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ 
+ #include <afs/afs_sysnames.h>
+ #define AFS_USERSPACE_ENV
+ #define AFS_USR_DARWIN_ENV
+ #define AFS_USR_DARWIN13_ENV
+ #define AFS_USR_DARWIN14_ENV
+ #define AFS_USR_DARWIN60_ENV
+ #define AFS_USR_DARWIN70_ENV
+ #define AFS_USR_DARWIN80_ENV
+ #define AFS_USR_DARWIN90_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define DARWIN_REFBASE 0
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #define sys_ppc_darwin_12	1
+ #define sys_ppc_darwin_13	1
+ #define sys_ppc_darwin_14	1
+ #define sys_ppc_darwin_60	1
+ #define sys_ppc_darwin_70	1
+ #define sys_ppc_darwin_80	1
+ #define sys_ppc_darwin_90	1
+ #define SYS_NAME		"ppc_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_90
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define sys_x86_darwin_90	1
+ #define SYS_NAME		"x86_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_90
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_HAVE_FFS    1	/* Use system's ffs. */
+ 
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ 
+ #define AFS_GCPAGS                0	/* if nonzero, garbage collect PAGs */
+ #define RXK_LISTENER_ENV          1
+ 
+ #define AFS_VFS34       1	/* What is VFS34??? */
+ #define afsio_iov       uio_iov
+ #define afsio_iovcnt    uio_iovcnt
+ #define afsio_offset    uio_offset
+ #define afsio_seg       uio_segflg
+ #define afsio_resid     uio_resid
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ #define        VATTR_NULL      usr_vattr_null
+ 
+ #define AFS_DIRENT
+ #ifndef CMSERVERPREF
+ #define CMSERVERPREF
+ #endif
+ 
+ #define BIND_8_COMPAT
+ #endif /* AFS_PARAM_H */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/config/param.s390_linux26.h
diff -c /dev/null openafs/src/config/param.s390_linux26.h:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:28 2006
--- openafs/src/config/param.s390_linux26.h	Wed Mar 15 11:16:36 2006
***************
*** 0 ****
--- 1,162 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ /*
+  * Copyright 2000, International Business Machines Corporation and others.
+  * All Rights Reserved.
+  * 
+  * This software has been released under the terms of the IBM Public
+  * License.  For details, see the LICENSE file in the top-level source
+  * directory or online at http://www.openafs.org/dl/license10.html
+  */
+ 
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+  * it's a judgment call. If something is obviously s390 specific, use that
+  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+  * in the sysname is the current version of the client. This takes into
+  * account the perferred OS user space configuration as well as the kernel.
+  */
+ 
+ #define AFS_LINUX20_ENV 1
+ #define AFS_LINUX22_ENV	1
+ #define AFS_LINUX24_ENV	1
+ #define AFS_LINUX26_ENV	1
+ #define AFS_S390_LINUX20_ENV    1
+ #define AFS_S390_LINUX22_ENV	1
+ #define AFS_S390_LINUX24_ENV	1
+ #define AFS_S390_LINUX26_ENV	1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 137
+ #define AFS_64BIT_ENV	1
+ #define AFS_64BIT_CLIENT	1
+ #define AFS_64BIT_IOPS_ENV  1
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ 
+ #if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+ #include <linux/threads.h>
+ 
+ #include <linux/config.h>
+ #ifdef CONFIG_SMP
+ #undef CONFIG_SMP
+ #endif
+ /* Using "AFS_SMP" to map to however many #define's are required to get
+  * MP to compile for Linux
+  */
+ #ifdef AFS_SMP
+ #define CONFIG_SMP 1
+ #ifndef CONFIG_S390_LOCAL_APIC
+ #define CONFIG_S390_LOCAL_APIC 1
+ #endif
+ #ifndef __SMP__
+ #define __SMP__
+ #endif
+ #endif
+ #define AFS_GLOBAL_SUNLOCK
+ #if defined(MODULE) && defined(CONFIG_MODVERSIONS)
+ #define MODVERSIONS
+ // #include <linux/modversions.h>
+ #endif
+ #endif /* __KERNEL__  && !DUMP_KERNEL */
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS       2	/* Set to Userdisabled, allow sysctl to override */
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME	"s390_linux26"
+ #define SYS_NAME_ID	SYS_NAME_ID_s390_linux26
+ #define AFSBIG_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV	    1	/* read/write implemented via VM */
+ #define AFS_USE_GETTIMEOFDAY       1	/* use gettimeofday to implement rx clock */
+ 
+ #ifdef KERNEL
+ #ifndef MIN
+ #define MIN(A,B) ((A) < (B) ? (A) : (B))
+ #endif
+ #ifndef MAX
+ #define MAX(A,B) ((A) > (B) ? (A) : (B))
+ #endif
+ #endif /* KERNEL */
+ 
+ #endif /* AFS_PARAM_H */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ /* 
+  * Copyright 2000, International Business Machines Corporation and others.
+  * All Rights Reserved.
+  * 
+  * This software has been released under the terms of the IBM Public
+  * License.  For details, see the LICENSE file in the top-level source
+  * directory or online at http://www.openafs.org/dl/license10.html
+  */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ /* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+  * it's a judgment call. If something is obviously s390 specific, use that
+  * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+  * in the sysname is the current version of the client. This takes into
+  * account the perferred OS user space configuration as well as the kernel.
+  */
+ 
+ #define UKERNEL			1	/* user space kernel */
+ #define AFS_ENV			1
+ #define AFS_USR_LINUX20_ENV     1
+ #define AFS_USR_LINUX22_ENV	1
+ #define AFS_USR_LINUX24_ENV	1
+ #define AFS_USR_LINUX26_ENV	1
+ #define AFS_NONFSTRANS 1
+ 
+ #define AFS_MOUNT_AFS "afs"	/* The name of the filesystem type. */
+ #define AFS_SYSCALL 137
+ #define AFS_64BIT_IOPS_ENV  1
+ #define AFS_NAMEI_ENV     1	/* User space interface to file system */
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_USERSPACE_IP_ADDR 1
+ #define RXK_LISTENER_ENV 1
+ #define AFS_GCPAGS		0	/* if nonzero, garbage collect PAGs */
+ 
+ 
+ /* Machine / Operating system information */
+ #define SYS_NAME	"s390_linux26"
+ #define SYS_NAME_ID	SYS_NAME_ID_s390_linux26
+ #define AFSBIG_ENDIAN    1
+ #define AFS_HAVE_FFS        1	/* Use system's ffs. */
+ #define AFS_HAVE_STATVFS    0	/* System doesn't support statvfs */
+ #define AFS_VM_RDWR_ENV	    1	/* read/write implemented via VM */
+ 
+ #define	afsio_iov	uio_iov
+ #define	afsio_iovcnt	uio_iovcnt
+ #define	afsio_offset	uio_offset
+ #define	afsio_seg	uio_segflg
+ #define	afsio_fmode	uio_fmode
+ #define	afsio_resid	uio_resid
+ #define	AFS_UIOSYS	1
+ #define	AFS_UIOUSER	UIO_USERSPACE
+ #define	AFS_CLBYTES	MCLBYTES
+ #define	AFS_MINCHANGE	2
+ #define	VATTR_NULL	usr_vattr_null
+ 
+ #define AFS_DIRENT
+ #ifndef CMSERVERPREF
+ #define CMSERVERPREF
+ #endif
+ 
+ #endif /* AFS_PARAM_H */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/config/param.sparc64_linux26.h
diff -c openafs/src/config/param.sparc64_linux26.h:1.1.4.2 openafs/src/config/param.sparc64_linux26.h:1.1.4.3
*** openafs/src/config/param.sparc64_linux26.h:1.1.4.2	Mon May 23 17:16:10 2005
--- openafs/src/config/param.sparc64_linux26.h	Mon Jan 30 13:19:39 2006
***************
*** 59,66 ****
  #define CONFIG_SMP 1
  #endif
  #define __SMP__
- #define AFS_GLOBAL_SUNLOCK
  #endif
  
  #endif /* __KERNEL__  && !DUMP_KERNEL */
  #include <afs/afs_sysnames.h>
--- 59,66 ----
  #define CONFIG_SMP 1
  #endif
  #define __SMP__
  #endif
+ #define AFS_GLOBAL_SUNLOCK
  
  #endif /* __KERNEL__  && !DUMP_KERNEL */
  #include <afs/afs_sysnames.h>
Index: openafs/src/config/param.sun4x_510.h
diff -c openafs/src/config/param.sun4x_510.h:1.2.2.3 openafs/src/config/param.sun4x_510.h:1.2.2.6
*** openafs/src/config/param.sun4x_510.h:1.2.2.3	Sun Apr  3 14:15:48 2005
--- openafs/src/config/param.sun4x_510.h	Fri Dec 23 20:09:53 2005
***************
*** 24,36 ****
  #define AFS_BOZONLOCK_ENV       1
  
  #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
- /*
-  * Only define on 64 bit kernel, until problems with 32 bit
-  * and large file support are resolved
-  */
- #if defined(__sparcv9)
  #define AFS_64BIT_CLIENT	1	
- #endif
  
  #define AFS_HAVE_FLOCK_SYSID	1
  
--- 24,30 ----
***************
*** 79,85 ****
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt		uio_iovcnt
! #define	afsio_offset		uio_offset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode		uio_fmode
  #define	afsio_resid		uio_resid
--- 73,79 ----
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt		uio_iovcnt
! #define	afsio_offset		uio_loffset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode		uio_fmode
  #define	afsio_resid		uio_resid
***************
*** 87,93 ****
  #define	AFS_UIOUSER		UIO_USERSPACE
  #define	AFS_CLBYTES		MCLBYTES
  #define	AFS_MINCHANGE		2
! #define	osi_GetTime(x)		uniqtime(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
--- 81,87 ----
  #define	AFS_UIOUSER		UIO_USERSPACE
  #define	AFS_CLBYTES		MCLBYTES
  #define	AFS_MINCHANGE		2
! #define	osi_GetTime(x)		uniqtime32(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
***************
*** 99,115 ****
  #define AFS_64BIT_INO   	1
  #endif
  
- /**
-   * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-   * use 32 bit quantities for time in afs, we now use uniqtime32
-   */
- #if defined(AFS_SUN57_64BIT_ENV)
- #undef osi_GetTime
- #define osi_GetTime(x)		uniqtime32(x)
- #endif
- 
- 
- 
  #define	AFS_KALLOC(n)		kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
  #define	AFS_KFREE		kmem_free
--- 93,98 ----
Index: openafs/src/config/param.sun4x_56.h
diff -c openafs/src/config/param.sun4x_56.h:1.10.2.1 openafs/src/config/param.sun4x_56.h:1.10.2.3
*** openafs/src/config/param.sun4x_56.h:1.10.2.1	Sun Apr  3 14:15:48 2005
--- openafs/src/config/param.sun4x_56.h	Thu Oct 13 11:16:58 2005
***************
*** 13,20 ****
  #ifndef	AFS_PARAM_H
  #define	AFS_PARAM_H
  
- #include <afs/afs_sysnames.h>
- 
  #define AFS_VFS_ENV	1
  /* Used only in vfsck code; is it needed any more???? */
  
--- 13,18 ----
***************
*** 33,43 ****
--- 31,46 ----
  #define RXK_LISTENER_ENV   1
  #define AFS_GCPAGS		1	/* if nonzero, garbage collect PAGs */
  
+ #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
+ #define AFS_64BIT_CLIENT	1
+ 
  #define	AFS_3DISPARES		1	/* Utilize the 3 available disk inode 'spares' */
  #define	AFS_SYSCALL		105
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
+ #include <afs/afs_sysnames.h>
+ 
  /* File system entry (used if mount.h doesn't define MOUNT_AFS */
  #define AFS_MOUNT_AFS	 "afs"
  
***************
*** 69,75 ****
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_offset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
--- 72,78 ----
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_loffset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
Index: openafs/src/config/param.sun4x_57.h
diff -c openafs/src/config/param.sun4x_57.h:1.9.2.1 openafs/src/config/param.sun4x_57.h:1.9.2.4
*** openafs/src/config/param.sun4x_57.h:1.9.2.1	Sun Apr  3 14:15:48 2005
--- openafs/src/config/param.sun4x_57.h	Fri Dec 23 20:09:53 2005
***************
*** 30,35 ****
--- 30,36 ----
  #define AFS_BOZONLOCK_ENV       1
  
  #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
+ #define AFS_64BIT_CLIENT	1
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
***************
*** 73,79 ****
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_offset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
--- 74,80 ----
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_loffset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
***************
*** 81,87 ****
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
--- 82,88 ----
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime32(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
***************
*** 93,109 ****
  #define AFS_64BIT_INO   	1
  #endif
  
- /**
-   * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-   * use 32 bit quantities for time in afs, we now use uniqtime32
-   */
- #if defined(AFS_SUN57_64BIT_ENV)
- #undef osi_GetTime
- #define osi_GetTime(x)  uniqtime32(x)
- #endif
- 
- 
- 
  #define	AFS_KALLOC(n)	kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
  #define	AFS_KFREE	kmem_free
--- 94,99 ----
Index: openafs/src/config/param.sun4x_58.h
diff -c openafs/src/config/param.sun4x_58.h:1.11.2.2 openafs/src/config/param.sun4x_58.h:1.11.2.5
*** openafs/src/config/param.sun4x_58.h:1.11.2.2	Sun Apr  3 14:15:48 2005
--- openafs/src/config/param.sun4x_58.h	Fri Dec 23 20:09:53 2005
***************
*** 22,34 ****
  #define AFS_BOZONLOCK_ENV       1
  
  #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
- /*
-  * Only define on 64 bit kernel, until problems with 32 bit
-  * and large file support are resolved
-  */
- #if defined(__sparcv9)
  #define AFS_64BIT_CLIENT	1	
- #endif
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
--- 22,28 ----
***************
*** 77,83 ****
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_offset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
--- 71,77 ----
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_loffset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
***************
*** 85,91 ****
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
--- 79,85 ----
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime32(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
***************
*** 97,113 ****
  #define AFS_64BIT_INO   	1
  #endif
  
- /**
-   * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-   * use 32 bit quantities for time in afs, we now use uniqtime32
-   */
- #if defined(AFS_SUN57_64BIT_ENV)
- #undef osi_GetTime
- #define osi_GetTime(x)  uniqtime32(x)
- #endif
- 
- 
- 
  #define	AFS_KALLOC(n)	kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
  #define	AFS_KFREE	kmem_free
--- 91,96 ----
Index: openafs/src/config/param.sun4x_59.h
diff -c openafs/src/config/param.sun4x_59.h:1.5.2.2 openafs/src/config/param.sun4x_59.h:1.5.2.5
*** openafs/src/config/param.sun4x_59.h:1.5.2.2	Sun Apr  3 14:15:48 2005
--- openafs/src/config/param.sun4x_59.h	Fri Dec 23 20:09:53 2005
***************
*** 23,35 ****
  #define AFS_BOZONLOCK_ENV       1
  
  #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
- /*
-  * Only define on 64 bit kernel, until problems with 32 bit
-  * and large file support are resolved
-  */
- #if defined(__sparcv9)
  #define AFS_64BIT_CLIENT	1	
- #endif
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
--- 23,29 ----
***************
*** 78,84 ****
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_offset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
--- 72,78 ----
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_loffset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
***************
*** 86,92 ****
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
--- 80,86 ----
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime32(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
***************
*** 98,114 ****
  #define AFS_64BIT_INO   	1
  #endif
  
- /**
-   * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-   * use 32 bit quantities for time in afs, we now use uniqtime32
-   */
- #if defined(AFS_SUN57_64BIT_ENV)
- #undef osi_GetTime
- #define osi_GetTime(x)  uniqtime32(x)
- #endif
- 
- 
- 
  #define	AFS_KALLOC(n)	kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
  #define	AFS_KFREE	kmem_free
--- 92,97 ----
Index: openafs/src/config/param.sunx86_510.h
diff -c openafs/src/config/param.sunx86_510.h:1.2.2.5 openafs/src/config/param.sunx86_510.h:1.2.2.8
*** openafs/src/config/param.sunx86_510.h:1.2.2.5	Tue Apr 19 12:03:13 2005
--- openafs/src/config/param.sunx86_510.h	Fri Dec 23 20:09:53 2005
***************
*** 34,39 ****
--- 34,40 ----
  #define AFS_X86_ENV		1
  
  #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
+ #define AFS_64BIT_CLIENT	1	
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
***************
*** 82,88 ****
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt		uio_iovcnt
! #define	afsio_offset		uio_offset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode		uio_fmode
  #define	afsio_resid		uio_resid
--- 83,89 ----
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt		uio_iovcnt
! #define	afsio_offset		uio_loffset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode		uio_fmode
  #define	afsio_resid		uio_resid
***************
*** 90,96 ****
  #define	AFS_UIOUSER		UIO_USERSPACE
  #define	AFS_CLBYTES		MCLBYTES
  #define	AFS_MINCHANGE		2
! #define	osi_GetTime(x)		uniqtime(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
--- 91,97 ----
  #define	AFS_UIOUSER		UIO_USERSPACE
  #define	AFS_CLBYTES		MCLBYTES
  #define	AFS_MINCHANGE		2
! #define	osi_GetTime(x)		uniqtime32(x)
  
  /**
    * These defines are for the 64 bit Solaris 7 port
***************
*** 100,119 ****
  #if defined(__amd64)
  #define	AFS_SUN57_64BIT_ENV	1
  #define AFS_64BIT_INO   	1
- #define AFS_64BIT_CLIENT	1	
- #endif
- 
- /**
-   * Solaris 7 64 bit has two versions of uniqtime. Since we consistently
-   * use 32 bit quantities for time in afs, we now use uniqtime32
-   */
- #if defined(AFS_SUN57_64BIT_ENV)
- #undef osi_GetTime
- #define osi_GetTime(x)		uniqtime32(x)
  #endif
  
- 
- 
  #define	AFS_KALLOC(n)		kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
  #define	AFS_KFREE		kmem_free
--- 101,108 ----
***************
*** 151,157 ****
  
  #define AFS_64BIT_ENV           1
  
- 
  #include <afs/afs_sysnames.h>
  
  #if 0
--- 140,145 ----
Index: openafs/src/config/param.sunx86_57.h
diff -c openafs/src/config/param.sunx86_57.h:1.4.2.2 openafs/src/config/param.sunx86_57.h:1.4.2.5
*** openafs/src/config/param.sunx86_57.h:1.4.2.2	Tue Apr 19 12:03:13 2005
--- openafs/src/config/param.sunx86_57.h	Fri Dec 23 20:09:53 2005
***************
*** 32,37 ****
--- 32,38 ----
  #define AFS_X86_ENV		1
  
  #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
+ #define AFS_64BIT_CLIENT	1
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
***************
*** 76,82 ****
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_offset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
--- 77,83 ----
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_loffset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
***************
*** 84,90 ****
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime(x)
  
  #define	AFS_KALLOC(n)	kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
--- 85,91 ----
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime32(x)
  
  #define	AFS_KALLOC(n)	kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
***************
*** 143,151 ****
  #define AFS_MOUNT_AFS	 1
  
  /* Machine / Operating system information */
! #define sys_sun4x_55	1
! #define SYS_NAME	"sun4x_55"
! #define SYS_NAME_ID	SYS_NAME_ID_sun4x_55
  #define AFSLITTLE_ENDIAN	1
  #define AFS_HAVE_FFS            1	/* Use system's ffs. */
  #define AFS_HAVE_STATVFS      0	/* System doesn't support statvfs */
--- 144,152 ----
  #define AFS_MOUNT_AFS	 1
  
  /* Machine / Operating system information */
! #define sys_sunx86_57	1
! #define SYS_NAME	"sunx86_57"
! #define SYS_NAME_ID	SYS_NAME_ID_sunx86_57
  #define AFSLITTLE_ENDIAN	1
  #define AFS_HAVE_FFS            1	/* Use system's ffs. */
  #define AFS_HAVE_STATVFS      0	/* System doesn't support statvfs */
Index: openafs/src/config/param.sunx86_58.h
diff -c openafs/src/config/param.sunx86_58.h:1.6.2.2 openafs/src/config/param.sunx86_58.h:1.6.2.5
*** openafs/src/config/param.sunx86_58.h:1.6.2.2	Tue Apr 19 12:03:13 2005
--- openafs/src/config/param.sunx86_58.h	Fri Dec 23 20:09:53 2005
***************
*** 33,38 ****
--- 33,39 ----
  #define AFS_X86_ENV		1
  
  #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
+ #define AFS_64BIT_CLIENT	1
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
***************
*** 81,87 ****
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_offset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
--- 82,88 ----
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_loffset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
***************
*** 89,95 ****
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime(x)
  
  #define	AFS_KALLOC(n)	kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
--- 90,96 ----
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime32(x)
  
  #define	AFS_KALLOC(n)	kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
***************
*** 148,156 ****
  #define AFS_MOUNT_AFS	 1
  
  /* Machine / Operating system information */
! #define sys_sun4x_55	1
! #define SYS_NAME	"sun4x_55"
! #define SYS_NAME_ID	SYS_NAME_ID_sun4x_55
  #define AFSLITTLE_ENDIAN	1
  #define AFS_HAVE_FFS            1	/* Use system's ffs. */
  #define AFS_HAVE_STATVFS      0	/* System doesn't support statvfs */
--- 149,157 ----
  #define AFS_MOUNT_AFS	 1
  
  /* Machine / Operating system information */
! #define sys_sunx86_58	1
! #define SYS_NAME	"sunx86_58"
! #define SYS_NAME_ID	SYS_NAME_ID_sunx86_58
  #define AFSLITTLE_ENDIAN	1
  #define AFS_HAVE_FFS            1	/* Use system's ffs. */
  #define AFS_HAVE_STATVFS      0	/* System doesn't support statvfs */
Index: openafs/src/config/param.sunx86_59.h
diff -c openafs/src/config/param.sunx86_59.h:1.2.2.2 openafs/src/config/param.sunx86_59.h:1.2.2.5
*** openafs/src/config/param.sunx86_59.h:1.2.2.2	Tue Apr 19 12:03:13 2005
--- openafs/src/config/param.sunx86_59.h	Fri Dec 23 20:09:53 2005
***************
*** 34,39 ****
--- 34,40 ----
  #define AFS_X86_ENV		1
  
  #define AFS_64BIT_ENV		1	/* Defines afs_int32 as int, not long. */
+ #define AFS_64BIT_CLIENT	1
  
  #define AFS_HAVE_FLOCK_SYSID    1
  
***************
*** 82,88 ****
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_offset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
--- 83,89 ----
  /*#define	AFS_USEBUFFERS	1*/
  #define	afsio_iov		uio_iov
  #define	afsio_iovcnt	uio_iovcnt
! #define	afsio_offset	uio_loffset
  #define	afsio_seg		uio_segflg
  #define	afsio_fmode	uio_fmode
  #define	afsio_resid	uio_resid
***************
*** 90,96 ****
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime(x)
  
  #define	AFS_KALLOC(n)	kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
--- 91,97 ----
  #define	AFS_UIOUSER	UIO_USERSPACE
  #define	AFS_CLBYTES	MCLBYTES
  #define	AFS_MINCHANGE	2
! #define	osi_GetTime(x)	uniqtime32(x)
  
  #define	AFS_KALLOC(n)	kmem_alloc(n, KM_SLEEP)
  #define AFS_KALLOC_NOSLEEP(n)   kmem_alloc(n, KM_NOSLEEP)
Index: openafs/src/config/param.x86_darwin_80.h
diff -c /dev/null openafs/src/config/param.x86_darwin_80.h:1.1.2.3
*** /dev/null	Fri Apr 14 09:27:29 2006
--- openafs/src/config/param.x86_darwin_80.h	Thu Mar  9 01:41:42 2006
***************
*** 0 ****
--- 1,178 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ #define AFS_ENV                 1
+ #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
+ #define AFS_64BIT_CLIENT        1
+ #define AFS_64BIT_IOPS_ENV	1
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_VFSINCL_ENV		1
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_DARWIN_ENV
+ #define AFS_DARWIN13_ENV
+ #define AFS_DARWIN14_ENV
+ #define AFS_DARWIN60_ENV
+ #define AFS_DARWIN70_ENV
+ #define AFS_DARWIN80_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define AFS_NAMEI_ENV 1
+ #define DARWIN_REFBASE 3
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #define sys_ppc_darwin_12	1
+ #define sys_ppc_darwin_13	1
+ #define sys_ppc_darwin_14	1
+ #define sys_ppc_darwin_60	1
+ #define sys_ppc_darwin_70	1
+ #define sys_ppc_darwin_80	1
+ #define SYS_NAME		"ppc_darwin_80"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_80
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define SYS_NAME		"x86_darwin_80"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_80
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_HAVE_FFS    1	/* Use system's ffs. */
+ 
+ #define AFS_GCPAGS               0
+ #define RXK_LISTENER_ENV         1
+ 
+ #ifdef KERNEL
+ #undef MACRO_BEGIN
+ #undef MACRO_END
+ #include <kern/macro_help.h>
+ #define AFS_GLOBAL_SUNLOCK        1
+ #define AFS_VFS34       1	/* What is VFS34??? */
+ #define afsio_iov       uio_iov
+ #define afsio_iovcnt    uio_iovcnt
+ #define afsio_offset    uio_offset
+ #define afsio_seg       uio_segflg
+ #define afsio_resid     uio_resid
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ #define AFS_CLBYTES     CLBYTES
+ #define osi_GetTime(x)  microtime(x)
+ #define AFS_KALLOC(x)   _MALLOC(x, M_TEMP, M_WAITOK)
+ #define AFS_KFREE(x,y)  _FREE(x,M_TEMP)
+ #define v_count         v_usecount
+ #define v_vfsp          v_mount
+ #define vfs_bsize       mnt_stat.f_bsize
+ #define vfs_fsid        mnt_stat.f_fsid
+ #define va_nodeid       va_fileid
+ #define vfs_vnodecovered mnt_vnodecovered
+ #define direct          dirent
+ 
+ #define BIND_8_COMPAT
+ 
+ #endif
+ #endif /* AFS_PARAM_H */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ #define AFS_VFSINCL_ENV 1	/* NOBODY uses this.... */
+ #define AFS_ENV                 1
+ #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ 
+ #include <afs/afs_sysnames.h>
+ #define AFS_USERSPACE_ENV
+ #define AFS_USR_DARWIN_ENV
+ #define AFS_USR_DARWIN13_ENV
+ #define AFS_USR_DARWIN14_ENV
+ #define AFS_USR_DARWIN60_ENV
+ #define AFS_USR_DARWIN70_ENV
+ #define AFS_USR_DARWIN80_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define DARWIN_REFBASE 0
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #define sys_ppc_darwin_12	1
+ #define sys_ppc_darwin_13	1
+ #define sys_ppc_darwin_14	1
+ #define sys_ppc_darwin_60	1
+ #define sys_ppc_darwin_70	1
+ #define sys_ppc_darwin_80	1
+ #define SYS_NAME		"ppc_darwin_80"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_80
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define SYS_NAME		"x86_darwin_80"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_80
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_HAVE_FFS    1	/* Use system's ffs. */
+ 
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ 
+ #define AFS_GCPAGS                0	/* if nonzero, garbage collect PAGs */
+ #define RXK_LISTENER_ENV          1
+ 
+ #define AFS_VFS34       1	/* What is VFS34??? */
+ #define afsio_iov       uio_iov
+ #define afsio_iovcnt    uio_iovcnt
+ #define afsio_offset    uio_offset
+ #define afsio_seg       uio_segflg
+ #define afsio_resid     uio_resid
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ #define        VATTR_NULL      usr_vattr_null
+ 
+ #define AFS_DIRENT
+ #ifndef CMSERVERPREF
+ #define CMSERVERPREF
+ #endif
+ 
+ #define BIND_8_COMPAT
+ #endif /* AFS_PARAM_H */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/config/param.x86_darwin_90.h
diff -c /dev/null openafs/src/config/param.x86_darwin_90.h:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:29 2006
--- openafs/src/config/param.x86_darwin_90.h	Thu Mar  9 01:41:42 2006
***************
*** 0 ****
--- 1,184 ----
+ #ifndef UKERNEL
+ /* This section for kernel libafs compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ #define AFS_ENV                 1
+ #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
+ #define AFS_64BIT_CLIENT        1
+ #define AFS_64BIT_IOPS_ENV	1
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_VFSINCL_ENV		1
+ 
+ #include <afs/afs_sysnames.h>
+ 
+ #define AFS_DARWIN_ENV
+ #define AFS_DARWIN13_ENV
+ #define AFS_DARWIN14_ENV
+ #define AFS_DARWIN60_ENV
+ #define AFS_DARWIN70_ENV
+ #define AFS_DARWIN80_ENV
+ #define AFS_DARWIN90_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define AFS_NAMEI_ENV 1
+ #define DARWIN_REFBASE 3
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #define sys_ppc_darwin_12	1
+ #define sys_ppc_darwin_13	1
+ #define sys_ppc_darwin_14	1
+ #define sys_ppc_darwin_60	1
+ #define sys_ppc_darwin_70	1
+ #define sys_ppc_darwin_80	1
+ #define sys_ppc_darwin_90	1
+ #define SYS_NAME		"ppc_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_90
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define sys_x86_darwin_90	1
+ #define SYS_NAME		"x86_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_90
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_HAVE_FFS    1	/* Use system's ffs. */
+ 
+ #define AFS_GCPAGS               0
+ #define RXK_LISTENER_ENV         1
+ 
+ #ifdef KERNEL
+ #undef MACRO_BEGIN
+ #undef MACRO_END
+ #include <kern/macro_help.h>
+ #define AFS_GLOBAL_SUNLOCK        1
+ #define AFS_VFS34       1	/* What is VFS34??? */
+ #define afsio_iov       uio_iov
+ #define afsio_iovcnt    uio_iovcnt
+ #define afsio_offset    uio_offset
+ #define afsio_seg       uio_segflg
+ #define afsio_resid     uio_resid
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ #define AFS_CLBYTES     CLBYTES
+ #define osi_GetTime(x)  microtime(x)
+ #define AFS_KALLOC(x)   _MALLOC(x, M_TEMP, M_WAITOK)
+ #define AFS_KFREE(x,y)  _FREE(x,M_TEMP)
+ #define v_count         v_usecount
+ #define v_vfsp          v_mount
+ #define vfs_bsize       mnt_stat.f_bsize
+ #define vfs_fsid        mnt_stat.f_fsid
+ #define va_nodeid       va_fileid
+ #define vfs_vnodecovered mnt_vnodecovered
+ #define direct          dirent
+ 
+ #define BIND_8_COMPAT
+ 
+ #endif
+ #endif /* AFS_PARAM_H */
+ 
+ #else /* !defined(UKERNEL) */
+ 
+ /* This section for user space compiles only */
+ 
+ #ifndef AFS_PARAM_H
+ #define AFS_PARAM_H
+ 
+ #define AFS_VFSINCL_ENV 1	/* NOBODY uses this.... */
+ #define AFS_ENV                 1
+ #define AFS_64BIT_ENV           1	/* Defines afs_int32 as int, not long. */
+ #if defined(__ppc__)
+ #define AFS_PPC_ENV		1
+ #elif defined(__i386__)
+ #define AFS_X86_ENV		1
+ #else
+ #error Unsupported architecture
+ #endif
+ 
+ #include <afs/afs_sysnames.h>
+ #define AFS_USERSPACE_ENV
+ #define AFS_USR_DARWIN_ENV
+ #define AFS_USR_DARWIN13_ENV
+ #define AFS_USR_DARWIN14_ENV
+ #define AFS_USR_DARWIN60_ENV
+ #define AFS_USR_DARWIN70_ENV
+ #define AFS_USR_DARWIN80_ENV
+ #define AFS_USR_DARWIN90_ENV
+ #define AFS_NONFSTRANS
+ #define AFS_SYSCALL             230
+ #define DARWIN_REFBASE 0
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS    "afs"
+ 
+ /* Machine / Operating system information */
+ #if defined(__ppc__)
+ #define sys_ppc_darwin_12	1
+ #define sys_ppc_darwin_13	1
+ #define sys_ppc_darwin_14	1
+ #define sys_ppc_darwin_60	1
+ #define sys_ppc_darwin_70	1
+ #define sys_ppc_darwin_80	1
+ #define sys_ppc_darwin_90	1
+ #define SYS_NAME		"ppc_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_ppc_darwin_90
+ #define AFSBIG_ENDIAN		1
+ #elif defined(__i386__)
+ #define sys_x86_darwin_12	1
+ #define sys_x86_darwin_13	1
+ #define sys_x86_darwin_14	1
+ #define sys_x86_darwin_60	1
+ #define sys_x86_darwin_70	1
+ #define sys_x86_darwin_80	1
+ #define sys_x86_darwin_90	1
+ #define SYS_NAME		"x86_darwin_90"
+ #define SYS_NAME_ID		SYS_NAME_ID_x86_darwin_90
+ #define AFSLITTLE_ENDIAN	1
+ #else
+ #error Unsupported architecture
+ #endif
+ #define AFS_HAVE_FFS    1	/* Use system's ffs. */
+ 
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ 
+ #define AFS_GCPAGS                0	/* if nonzero, garbage collect PAGs */
+ #define RXK_LISTENER_ENV          1
+ 
+ #define AFS_VFS34       1	/* What is VFS34??? */
+ #define afsio_iov       uio_iov
+ #define afsio_iovcnt    uio_iovcnt
+ #define afsio_offset    uio_offset
+ #define afsio_seg       uio_segflg
+ #define afsio_resid     uio_resid
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ #define        VATTR_NULL      usr_vattr_null
+ 
+ #define AFS_DIRENT
+ #ifndef CMSERVERPREF
+ #define CMSERVERPREF
+ #endif
+ 
+ #define BIND_8_COMPAT
+ #endif /* AFS_PARAM_H */
+ 
+ #endif /* !defined(UKERNEL) */
Index: openafs/src/des/andrew-conf.h
diff -c openafs/src/des/andrew-conf.h:1.16 openafs/src/des/andrew-conf.h:1.16.2.2
*** openafs/src/des/andrew-conf.h:1.16	Tue Feb  3 01:23:37 2004
--- openafs/src/des/andrew-conf.h	Thu Mar  9 01:41:43 2006
***************
*** 37,43 ****
  #error unknown osf
  #endif
  #else
! #if	defined(AFS_X86_ENV)
  #include "conf-bsd-ncr.h"
  #else
  #ifdef AFS_NT40_ENV
--- 37,43 ----
  #error unknown osf
  #endif
  #else
! #if	defined(AFS_X86_ENV) && !defined(AFS_DARWIN_ENV)
  #include "conf-bsd-ncr.h"
  #else
  #ifdef AFS_NT40_ENV
***************
*** 93,100 ****
  #endif /* AFS_PPC_LINUX20_ENV */
  #endif /* AFS_PARISC_LINUX24_ENV */
  #else
! #if defined(AFS_DARWIN_ENV) && defined(AFS_PPC_ENV)
! #include "conf-ppc-darwin.h"
  #else
  Sorry,
      you lose.
--- 93,100 ----
  #endif /* AFS_PPC_LINUX20_ENV */
  #endif /* AFS_PARISC_LINUX24_ENV */
  #else
! #if defined(AFS_DARWIN_ENV)
! #include "conf-darwin.h"
  #else
  Sorry,
      you lose.
Index: openafs/src/des/conf-darwin.h
diff -c /dev/null openafs/src/des/conf-darwin.h:1.1.2.3
*** /dev/null	Fri Apr 14 09:27:29 2006
--- openafs/src/des/conf-darwin.h	Thu Mar  9 01:41:43 2006
***************
*** 0 ****
--- 1,16 ----
+ #define BITS32
+ #define BIG
+ #undef BSDUNIX
+ #if defined(__ppc__)
+ #define MSBFIRST
+ #elif defined(__i386__)
+ #define LSBFIRST
+ #else
+ #error "MSBFIRST or LSBFIRST undefined"
+ #endif
+ #define MUSTALIGN
+ #if !defined(KERNEL) && defined(AFS_DARWIN80_ENV)
+ extern int _darwin_swap_long_bytes_bit_number(afs_uint32 x);
+ extern char *_darwin_whichstr[];
+ extern int _darwin_which;
+ #endif /* !KERNEL && AFS_DARWIN80_ENV */
Index: openafs/src/des/make_fp.c
diff -c openafs/src/des/make_fp.c:1.6 openafs/src/des/make_fp.c:1.6.2.1
*** openafs/src/des/make_fp.c:1.6	Tue Jul 15 19:15:00 2003
--- openafs/src/des/make_fp.c	Thu Mar  9 01:41:43 2006
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_fp.c,v 1.6 2003/07/15 23:15:00 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_fp.c,v 1.6.2.1 2006/03/09 06:41:43 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
***************
*** 27,32 ****
--- 27,37 ----
  gen(FILE * stream)
  {
      register int i;
+ #ifdef AFS_DARWIN80_ENV
+     int j;
+ 
+ #define swap_long_bytes_bit_number _darwin_swap_long_bytes_bit_number
+ #endif /* AFS_DARWIN80_ENV */
  
      /* clear the output */
      fprintf(stream, "    L2 = 0; R2 = 0;\n");
***************
*** 41,46 ****
--- 46,57 ----
  #define SWAP(i,j) \
      swap_long_bytes_bit_number(swap_bit_pos_0_to_ansi((unsigned)i)-j)
  
+ #ifdef AFS_DARWIN80_ENV
+   for(j = 0;; j++) {
+     fprintf(stream, _darwin_whichstr[j]);
+     if (j == 2)
+ 	break;
+ #endif /* AFS_DARWIN80_ENV */
      /* first setup FP */
      fprintf(stream, "/* FP operations */\n/* first left to left */\n");
  
***************
*** 67,70 ****
--- 78,85 ----
      for (i = 32; i <= 63; i++)
  	if (FP[i] >= 32)
  	    test_set(stream, "R1", FP[i] - 32, "R2", SWAP(i, 32));
+ #ifdef AFS_DARWIN80_ENV
+     _darwin_which = !_darwin_which;
+   }
+ #endif /* AFS_DARWIN80_ENV */
  }
Index: openafs/src/des/make_ip.c
diff -c openafs/src/des/make_ip.c:1.7 openafs/src/des/make_ip.c:1.7.2.1
*** openafs/src/des/make_ip.c:1.7	Tue Jul 15 19:15:00 2003
--- openafs/src/des/make_ip.c	Thu Mar  9 01:41:43 2006
***************
*** 12,18 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_ip.c,v 1.7 2003/07/15 23:15:00 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
--- 12,18 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_ip.c,v 1.7.2.1 2006/03/09 06:41:43 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
***************
*** 31,40 ****
--- 31,51 ----
  gen(FILE * stream)
  {
      register int i;
+ #ifdef AFS_DARWIN80_ENV
+     int j;
+ 
+ #define swap_long_bytes_bit_number _darwin_swap_long_bytes_bit_number
+ #endif /* AFS_DARWIN80_ENV */
  
      /* clear the output */
      fprintf(stream, "    L2 = 0; R2 = 0;\n");
  
+ #ifdef AFS_DARWIN80_ENV
+   for(j = 0;; j++) {
+     fprintf(stream, _darwin_whichstr[j]);
+     if (j == 2)
+ 	break;
+ #endif /* AFS_DARWIN80_ENV */
      /* first setup IP */
      fprintf(stream, "/* IP operations */\n/* first left to left */\n");
  
***************
*** 60,64 ****
--- 71,79 ----
      for (i = 32; i <= 63; i++)
  	if (IP[i] >= 32)
  	    test_set(stream, "R1", SWAP(IP[i] - 32), "R2", i - 32);
+ #ifdef AFS_DARWIN80_ENV
+     _darwin_which = !_darwin_which;
+   }
+ #endif /* AFS_DARWIN80_ENV */
      exit(0);
  }
Index: openafs/src/des/make_p.c
diff -c openafs/src/des/make_p.c:1.5 openafs/src/des/make_p.c:1.5.2.1
*** openafs/src/des/make_p.c:1.5	Tue Jul 15 19:15:00 2003
--- openafs/src/des/make_p.c	Thu Mar  9 01:41:43 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_p.c,v 1.5 2003/07/15 23:15:00 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/make_p.c,v 1.5.2.1 2006/03/09 06:41:43 shadow Exp $");
  
  #include <mit-cpyright.h>
  #include <stdio.h>
***************
*** 39,44 ****
--- 39,57 ----
      fprintf(stream, "    P_temp = R1;\n");
      fprintf(stream, "    P_temp_p = (unsigned char *) &P_temp;\n");
  
+ #ifdef AFS_DARWIN80_ENV
+     fprintf(stream, "#if defined(__i386__)\n");
+     fprintf(stream, "    R2 = P_prime[0][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[2][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[3][*P_temp_p];\n");
+     fprintf(stream, "#elif defined(__ppc__)\n");
+     fprintf(stream, "    R2 = P_prime[3][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[2][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
+     fprintf(stream, "    R2 |= P_prime[0][*P_temp_p];\n");
+     fprintf(stream, "#else\n#error Unsupported architecture\n#endif\n");
+ #else /* !AFS_DARWIN80_ENV */
  #ifdef	LSBFIRST
      fprintf(stream, "    R2 = P_prime[0][*P_temp_p++];\n");
      fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
***************
*** 50,54 ****
--- 63,68 ----
      fprintf(stream, "    R2 |= P_prime[1][*P_temp_p++];\n");
      fprintf(stream, "    R2 |= P_prime[0][*P_temp_p];\n");
  #endif /* MSBFIRST */
+ #endif /* !AFS_DARWIN80_ENV */
  #endif /* BIG */
  }
Index: openafs/src/des/misc.c
diff -c openafs/src/des/misc.c:1.7 openafs/src/des/misc.c:1.7.2.1
*** openafs/src/des/misc.c:1.7	Tue Jul 15 19:15:00 2003
--- openafs/src/des/misc.c	Thu Mar  9 01:41:43 2006
***************
*** 14,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/misc.c,v 1.7 2003/07/15 23:15:00 shadow Exp $");
  
  #include <mit-cpyright.h>
  #ifndef KERNEL
--- 14,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/des/misc.c,v 1.7.2.1 2006/03/09 06:41:43 shadow Exp $");
  
  #include <mit-cpyright.h>
  #ifndef KERNEL
***************
*** 270,275 ****
--- 270,304 ----
  #endif /* MSBFIRST */
  }
  
+ #if !defined(KERNEL) && defined(AFS_DARWIN80_ENV)
+ char *_darwin_whichstr[] = {
+     "#if defined(__ppc__)\n",
+     "#elif defined(__i386__)\n",
+     "#else\n#error architecture unsupported\n#endif\n"
+ };
+ int _darwin_which = 1;
+ 
+ int
+ _darwin_swap_long_bytes_bit_number(afs_uint32 x)
+ {
+     /*
+      * given a bit number (0-31) from a vax, swap the byte part of the
+      * bit number to change the byte ordering to mSBFIRST type
+      */
+ 
+     afs_uint32 y, z;
+ 
+     if (!_darwin_which)
+ 	return x;
+ 
+     y = x / 8;			/* initial byte component */
+     z = x % 8;			/* bit within byte */
+ 
+     x = (3 - y) * 8 + z;
+     return x;
+ }
+ #endif /* !KERNEL && AFS_DARWIN80_ENV */
+ 
  void
  test_set(FILE * stream, const char *src, int testbit, const char *dest,
  	 int setbit)
Index: openafs/src/des/test/Makefile.in
diff -c openafs/src/des/test/Makefile.in:1.8 openafs/src/des/test/Makefile.in:1.8.2.1
*** openafs/src/des/test/Makefile.in:1.8	Tue Oct 15 23:58:36 2002
--- openafs/src/des/test/Makefile.in	Thu Mar  9 01:41:44 2006
***************
*** 1,7 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  #  Test programs
  PROGS = \
--- 1,7 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  #  Test programs
  PROGS = \
***************
*** 9,15 ****
  	testit \
  	verify
  
! LDFLAGS = ${XLDFLAGS}
  
  LIBS=\
  	${TOP_LIBDIR}/libdes.a \
--- 9,15 ----
  	testit \
  	verify
  
! LDFLAGS = ${XLDFLAGS} ${ARCHFLAGS}
  
  LIBS=\
  	${TOP_LIBDIR}/libdes.a \
Index: openafs/src/dir/dir.c
diff -c openafs/src/dir/dir.c:1.21.2.2 openafs/src/dir/dir.c:1.21.2.3
*** openafs/src/dir/dir.c:1.21.2.2	Mon Jul 11 15:27:28 2005
--- openafs/src/dir/dir.c	Wed Oct  5 01:58:37 2005
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/dir/dir.c,v 1.21.2.2 2005/07/11 19:27:28 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.3 2005/10/05 05:58:37 shadow Exp $");
  
  #ifdef KERNEL
  #if !defined(UKERNEL)
***************
*** 32,38 ****
  #include "h/kernel.h"
  #endif
  #endif
! #if	defined(AFS_SUN56_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_FBSD_ENV)
  #include "afs/sysincludes.h"
  #endif
  #if !defined(AFS_SGI64_ENV) && !defined(AFS_DARWIN60_ENV)
--- 32,38 ----
  #include "h/kernel.h"
  #endif
  #endif
! #if	defined(AFS_SUN56_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_FBSD_ENV) || defined(AFS_DARWIN80_ENV)
  #include "afs/sysincludes.h"
  #endif
  #if !defined(AFS_SGI64_ENV) && !defined(AFS_DARWIN60_ENV)
Index: openafs/src/dir/test/Makefile.in
diff -c openafs/src/dir/test/Makefile.in:1.6 openafs/src/dir/test/Makefile.in:1.6.2.1
*** openafs/src/dir/test/Makefile.in:1.6	Mon Nov 11 16:23:15 2002
--- openafs/src/dir/test/Makefile.in	Thu Mar  9 01:41:44 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  LIBS = ${srcdir}/lib/libdir.a ${srcdir}/lib/util.a  ${srcdir}/lib/liblwp.a
! CFLAGS=${OPTMZ} -I${TOP_INCDIR} -I${srcdir} -I${TOP_OBJDIR}/src/config ${XCFLAGS}
  
  OBJS=test-salvage.o physio.o dtest.o
  
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  LIBS = ${srcdir}/lib/libdir.a ${srcdir}/lib/util.a  ${srcdir}/lib/liblwp.a
! CFLAGS=${OPTMZ} -I${TOP_INCDIR} -I${srcdir} -I${TOP_OBJDIR}/src/config ${XCFLAGS} ${ARCHFLAGS}
  
  OBJS=test-salvage.o physio.o dtest.o
  
Index: openafs/src/fsint/common.xg
diff -c openafs/src/fsint/common.xg:1.5 openafs/src/fsint/common.xg:1.5.2.1
*** openafs/src/fsint/common.xg:1.5	Tue Mar  4 11:19:48 2003
--- openafs/src/fsint/common.xg	Thu Mar  9 11:28:59 2006
***************
*** 127,132 ****
--- 127,133 ----
  const AFS_XSTATSCOLL_CALL_INFO = 0;	 /*FS call counting & info*/
  const AFS_XSTATSCOLL_PERF_INFO = 1;	 /*FS performance info*/
  const AFS_XSTATSCOLL_FULL_PERF_INFO = 2; /*Full FS performance info*/
+ const AFS_XSTATSCOLL_CBSTATS = 3;	 /*Callback package counters */
  
  typedef afs_uint32 VolumeId;
  typedef afs_uint32 VolId;
Index: openafs/src/fsprobe/fsprobe_test.c
diff -c openafs/src/fsprobe/fsprobe_test.c:1.8 openafs/src/fsprobe/fsprobe_test.c:1.8.2.1
*** openafs/src/fsprobe/fsprobe_test.c:1.8	Tue Jul 15 19:15:09 2003
--- openafs/src/fsprobe/fsprobe_test.c	Thu Mar  9 01:41:45 2006
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/fsprobe/fsprobe_test.c,v 1.8 2003/07/15 23:15:09 shadow Exp $");
  
  #ifdef HAVE_STRING_H
  #include <string.h>
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/fsprobe/fsprobe_test.c,v 1.8.2.1 2006/03/09 06:41:45 shadow Exp $");
  
  #ifdef HAVE_STRING_H
  #include <string.h>
***************
*** 171,177 ****
--- 171,181 ----
      /*
       * Fill in the socket array for bigbird, vice1, and vice2.
       */
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+     FSSktArray[0].sin_family = AF_INET;		/*Internet family */
+ #else
      FSSktArray[0].sin_family = htons(AF_INET);	/*Internet family */
+ #endif
      FSSktArray[0].sin_port = htons(7000);	/*FileServer port */
      he = hostutil_GetHostByName("servername1");
      if (he == NULL) {
***************
*** 180,186 ****
--- 184,194 ----
      }
      memcpy(&(FSSktArray[0].sin_addr.s_addr), he->h_addr, 4);
  
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+     FSSktArray[1].sin_family = AF_INET;		/*Internet address family */
+ #else
      FSSktArray[1].sin_family = htons(AF_INET);	/*Internet address family */
+ #endif
      FSSktArray[1].sin_port = htons(7000);	/*FileServer port */
      he = hostutil_GetHostByName("servername2");
      if (he == NULL) {
***************
*** 189,195 ****
--- 197,207 ----
      }
      memcpy(&(FSSktArray[1].sin_addr.s_addr), he->h_addr, 4);
  
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+     FSSktArray[2].sin_family = AF_INET;		/*Internet address family */
+ #else
      FSSktArray[2].sin_family = htons(AF_INET);	/*Internet address family */
+ #endif
      FSSktArray[2].sin_port = htons(7000);	/*FileServer port */
      he = hostutil_GetHostByName("servername3");
      if (he == NULL) {
Index: openafs/src/kauth/kaserver.c
diff -c openafs/src/kauth/kaserver.c:1.17.2.1 openafs/src/kauth/kaserver.c:1.17.2.2
*** openafs/src/kauth/kaserver.c:1.17.2.1	Mon Jul 11 15:08:37 2005
--- openafs/src/kauth/kaserver.c	Mon Feb 13 12:57:28 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaserver.c,v 1.17.2.1 2005/07/11 19:08:37 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/kaserver.c,v 1.17.2.2 2006/02/13 17:57:28 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 198,203 ****
--- 198,205 ----
      sigaction(SIGABRT, &nsa, NULL);
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
+     osi_audit_init();
+ 
      if (argc == 0) {
        usage:
  	printf("Usage: kaserver [-noAuth] [-fastKeys] [-database <dbpath>] "
Index: openafs/src/kauth/rebuild.c
diff -c openafs/src/kauth/rebuild.c:1.11 openafs/src/kauth/rebuild.c:1.11.2.1
*** openafs/src/kauth/rebuild.c:1.11	Tue Jul 15 19:15:17 2003
--- openafs/src/kauth/rebuild.c	Mon Mar 20 08:39:11 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/rebuild.c,v 1.11 2003/07/15 23:15:17 shadow Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/kauth/rebuild.c,v 1.11.2.1 2006/03/20 13:39:11 jaltman Exp $");
  
  #include <sys/types.h>
  #include <sys/stat.h>
***************
*** 123,128 ****
--- 123,129 ----
      int i;
      char Time[100];
      struct tm *tm_p;
+     time_t tt;
  
      printf("\n");
  
***************
*** 171,177 ****
      if (entry->flags & KAFOLDKEYS)
  	return;
  
!     tm_p = localtime((time_t *) & entry->user_expiration);
      if (tm_p)
  	strftime(Time, 100, "%m/%d/%Y %H:%M", tm_p);
  
--- 172,179 ----
      if (entry->flags & KAFOLDKEYS)
  	return;
  
!     tt = entry->user_expiration;
!     tm_p = localtime(&tt);
      if (tm_p)
  	strftime(Time, 100, "%m/%d/%Y %H:%M", tm_p);
  
***************
*** 285,292 ****
      if (strcmp(flags, "") != 0)
  	fprintf(out, " -flags %s", &flags[1]);
      if (entryp->user_expiration != 0xffffffff) {
! 	strftime(Time, 50, "%m/%d/%Y %H:%M",
! 		 localtime((time_t *) & entryp->user_expiration));
  	fprintf(out, " -expiration '%s'", Time);
      }
      fprintf(out, " -lifetime %u", entryp->max_ticket_lifetime);
--- 287,294 ----
      if (strcmp(flags, "") != 0)
  	fprintf(out, " -flags %s", &flags[1]);
      if (entryp->user_expiration != 0xffffffff) {
! 	time_t tt = entryp->user_expiration;
! 	strftime(Time, 50, "%m/%d/%Y %H:%M",localtime(&tt));
  	fprintf(out, " -expiration '%s'", Time);
      }
      fprintf(out, " -lifetime %u", entryp->max_ticket_lifetime);
Index: openafs/src/kauth/test/Makefile.in
diff -c openafs/src/kauth/test/Makefile.in:1.6 openafs/src/kauth/test/Makefile.in:1.6.8.1
*** openafs/src/kauth/test/Makefile.in:1.6	Wed Oct 31 23:59:53 2001
--- openafs/src/kauth/test/Makefile.in	Thu Mar  9 01:41:46 2006
***************
*** 12,18 ****
  LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L..
  LIBS= -llwp -ldes -lrxkad -lauth -lcmd -lubik -lprot -lsys -lrx -lcom_err -lkauth
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  
  # the only tests _known_ to work are multiklog and the tcl scripts.
--- 12,18 ----
  LDIRS= -L${DESTDIR}/lib -L${DESTDIR}/lib/afs -L..
  LIBS= -llwp -ldes -lrxkad -lauth -lcmd -lubik -lprot -lsys -lrx -lcom_err -lkauth
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  
  # the only tests _known_ to work are multiklog and the tcl scripts.
Index: openafs/src/libacl/test/Makefile.in
diff -c openafs/src/libacl/test/Makefile.in:1.6 openafs/src/libacl/test/Makefile.in:1.6.8.1
*** openafs/src/libacl/test/Makefile.in:1.6	Wed Oct 31 23:59:54 2001
--- openafs/src/libacl/test/Makefile.in	Thu Mar  9 01:41:47 2006
***************
*** 12,18 ****
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  LIBS= -lacl -lprot -lubik -lrx -llwp -lauth -lrxkad -lsys ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  all: acltest
  
--- 12,18 ----
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  LIBS= -lacl -lprot -lubik -lrx -llwp -lauth -lrxkad -lsys ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  all: acltest
  
Index: openafs/src/libadmin/vos/afs_vosAdmin.c
diff -c openafs/src/libadmin/vos/afs_vosAdmin.c:1.9.10.2 openafs/src/libadmin/vos/afs_vosAdmin.c:1.9.2.1
*** openafs/src/libadmin/vos/afs_vosAdmin.c:1.9.10.2	Thu Oct 13 14:29:41 2005
--- openafs/src/libadmin/vos/afs_vosAdmin.c	Tue Oct 25 02:35:55 2005
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/afs_vosAdmin.c,v 1.9.10.2 2005/10/13 18:29:41 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.1 2005/10/25 06:35:55 shadow Exp $");
  
  #include <afs/stds.h>
  #include <stdio.h>
***************
*** 1975,1985 ****
  	if (!ValidateVolumeName(volumeName, &tst)) {
  	    goto fail_vos_VLDBGet;
  	}
! 	if (!VLDB_GetEntryByName(c_handle, volumeName, &entry, &tst)) {
  	    goto fail_vos_VLDBGet;
  	}
      } else {
! 	if (!VLDB_GetEntryByID(c_handle, *volumeId, -1, &entry, &tst)) {
  	    goto fail_vos_VLDBGet;
  	}
      }
--- 1975,1985 ----
  	if (!ValidateVolumeName(volumeName, &tst)) {
  	    goto fail_vos_VLDBGet;
  	}
! 	if (!aVLDB_GetEntryByName(c_handle, volumeName, &entry, &tst)) {
  	    goto fail_vos_VLDBGet;
  	}
      } else {
! 	if (!aVLDB_GetEntryByID(c_handle, *volumeId, -1, &entry, &tst)) {
  	    goto fail_vos_VLDBGet;
  	}
      }
***************
*** 2919,2925 ****
       * Check that the volume doesn't already exist
       */
  
!     if (VLDB_GetEntryByName(c_handle, volumeName, &vinfo, &tst)) {
  	tst = ADMVOSVOLUMENAMEDUP;
  	goto fail_vos_VolumeCreate;
      }
--- 2919,2925 ----
       * Check that the volume doesn't already exist
       */
  
!     if (aVLDB_GetEntryByName(c_handle, volumeName, &vinfo, &tst)) {
  	tst = ADMVOSVOLUMENAMEDUP;
  	goto fail_vos_VolumeCreate;
      }
***************
*** 3067,3073 ****
       * Retrieve the entry
       */
  
!     if (!VLDB_GetEntryByID(c_handle, readWriteVolumeId, -1, &entry, &tst)) {
  	goto fail_vos_VolumeRename;
      }
  
--- 3067,3073 ----
       * Retrieve the entry
       */
  
!     if (!aVLDB_GetEntryByID(c_handle, readWriteVolumeId, -1, &entry, &tst)) {
  	goto fail_vos_VolumeRename;
      }
  
***************
*** 3261,3267 ****
       */
  
      if (volumeId != NULL) {
! 	if (!VLDB_GetEntryByID(c_handle, *volumeId, -1, &entry, &tst)) {
  	    goto fail_vos_VolumeRestore;
  	}
  	volid = *volumeId;
--- 3261,3267 ----
       */
  
      if (volumeId != NULL) {
! 	if (!aVLDB_GetEntryByID(c_handle, *volumeId, -1, &entry, &tst)) {
  	    goto fail_vos_VolumeRestore;
  	}
  	volid = *volumeId;
***************
*** 3289,3295 ****
  	close(fd);
      }
  
!     if (!VLDB_GetEntryByName(c_handle, volumeName, &entry, &tst)) {
  	restoreflags = RV_FULLRST;
      } else if (Lp_GetRwIndex(c_handle, &entry, 0) == -1) {
  	restoreflags = RV_FULLRST;
--- 3289,3295 ----
  	close(fd);
      }
  
!     if (!aVLDB_GetEntryByName(c_handle, volumeName, &entry, &tst)) {
  	restoreflags = RV_FULLRST;
      } else if (Lp_GetRwIndex(c_handle, &entry, 0) == -1) {
  	restoreflags = RV_FULLRST;
Index: openafs/src/libadmin/vos/vosutils.c
diff -c openafs/src/libadmin/vos/vosutils.c:1.10 openafs/src/libadmin/vos/vosutils.c:1.10.2.2
*** openafs/src/libadmin/vos/vosutils.c:1.10	Sun Dec  7 17:49:32 2003
--- openafs/src/libadmin/vos/vosutils.c	Tue Oct 25 02:35:56 2005
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vosutils.c,v 1.10 2003/12/07 22:49:32 jaltman 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.2 2005/10/25 06:35:56 shadow Exp $");
  
  #include "vosutils.h"
  #include "vsprocs.h"
***************
*** 133,139 ****
  }
  
  int
! VLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid,
  		  afs_int32 voltype, struct nvldbentry *entryp,
  		  afs_status_p st)
  {
--- 133,139 ----
  }
  
  int
! aVLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid,
  		  afs_int32 voltype, struct nvldbentry *entryp,
  		  afs_status_p st)
  {
***************
*** 171,177 ****
  }
  
  int
! VLDB_GetEntryByName(afs_cell_handle_p cellHandle, const char *namep,
  		    struct nvldbentry *entryp, afs_status_p st)
  {
      struct vldbentry oentry;
--- 171,177 ----
  }
  
  int
! aVLDB_GetEntryByName(afs_cell_handle_p cellHandle, const char *namep,
  		    struct nvldbentry *entryp, afs_status_p st)
  {
      struct vldbentry oentry;
***************
*** 412,418 ****
      afs_status_t tst;
      int i, index = -1;
  
!     if (!VLDB_GetEntryByID(cellHandle, volid, -1, rentry, &tst)) {
  	rc = 0;
  	goto fail_GetVolumeInfo;
      }
--- 412,418 ----
      afs_status_t tst;
      int i, index = -1;
  
!     if (!aVLDB_GetEntryByID(cellHandle, volid, -1, rentry, &tst)) {
  	rc = 0;
  	goto fail_GetVolumeInfo;
      }
Index: openafs/src/libadmin/vos/vosutils.h
diff -c openafs/src/libadmin/vos/vosutils.h:1.5.10.2 openafs/src/libadmin/vos/vosutils.h:1.5.2.1
*** openafs/src/libadmin/vos/vosutils.h:1.5.10.2	Thu Oct 13 14:29:41 2005
--- openafs/src/libadmin/vos/vosutils.h	Tue Oct 25 02:35:56 2005
***************
*** 15,26 ****
  extern int VLDB_CreateEntry(afs_cell_handle_p cellHandle,
  			    struct nvldbentry *entryp, afs_status_p st);
  
! extern int VLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid,
  			     afs_int32 voltype, struct nvldbentry *entryp,
  			     afs_status_p st);
  
  
! extern int VLDB_GetEntryByName(afs_cell_handle_p cellHandle,
  			       const char *namep, struct nvldbentry *entryp,
  			       afs_status_p st);
  
--- 15,26 ----
  extern int VLDB_CreateEntry(afs_cell_handle_p cellHandle,
  			    struct nvldbentry *entryp, afs_status_p st);
  
! extern int aVLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_int32 volid,
  			     afs_int32 voltype, struct nvldbentry *entryp,
  			     afs_status_p st);
  
  
! extern int aVLDB_GetEntryByName(afs_cell_handle_p cellHandle,
  			       const char *namep, struct nvldbentry *entryp,
  			       afs_status_p st);
  
Index: openafs/src/libadmin/vos/vsprocs.c
diff -c openafs/src/libadmin/vos/vsprocs.c:1.11.10.2 openafs/src/libadmin/vos/vsprocs.c:1.11.2.1
*** openafs/src/libadmin/vos/vsprocs.c:1.11.10.2	Thu Oct 13 14:29:41 2005
--- openafs/src/libadmin/vos/vsprocs.c	Tue Oct 25 02:35:56 2005
***************
*** 22,28 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/libadmin/vos/vsprocs.c,v 1.11.10.2 2005/10/13 18:29:41 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.1 2005/10/25 06:35:56 shadow Exp $");
  
  #include "vsprocs.h"
  #include "vosutils.h"
***************
*** 239,245 ****
      } else {
  	islocked = 1;
  
! 	if (!VLDB_GetEntryByID(cellHandle, volumeId, avoltype, &entry, &tst)) {
  	    goto fail_UV_DeleteVolume;
  	}
  
--- 239,245 ----
      } else {
  	islocked = 1;
  
! 	if (!aVLDB_GetEntryByID(cellHandle, volumeId, avoltype, &entry, &tst)) {
  	    goto fail_UV_DeleteVolume;
  	}
  
***************
*** 427,433 ****
      backupId = 0;
      newVol = 0;
  
!     if (!VLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) {
  	goto fail_UV_MoveVolume;
      }
  
--- 427,433 ----
      backupId = 0;
      newVol = 0;
  
!     if (!aVLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) {
  	goto fail_UV_MoveVolume;
      }
  
***************
*** 443,449 ****
      }
      islocked = 1;
  
!     if (!VLDB_GetEntryByID(cellHandle, afromvol, RWVOL, &entry, &tst)) {
  	goto fail_UV_MoveVolume;
      }
  
--- 443,449 ----
      }
      islocked = 1;
  
!     if (!aVLDB_GetEntryByID(cellHandle, afromvol, RWVOL, &entry, &tst)) {
  	goto fail_UV_MoveVolume;
      }
  
***************
*** 890,896 ****
  	AFSVolEndTrans(fromconn, fromtid, &rcode);
      }
  
!     if (!VLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) {
  	goto done;
      }
  
--- 890,896 ----
  	AFSVolEndTrans(fromconn, fromtid, &rcode);
      }
  
!     if (!aVLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) {
  	goto done;
      }
  
***************
*** 1005,1011 ****
  
      /* the calls to VLDB will succeed only if avolid is a RW volume,
       * since we are following the RW hash chain for searching */
!     if (!VLDB_GetEntryByID(cellHandle, avolid, RWVOL, &entry, &tst)) {
  	goto fail_UV_BackupVolume;
      }
  
--- 1005,1011 ----
  
      /* the calls to VLDB will succeed only if avolid is a RW volume,
       * since we are following the RW hash chain for searching */
!     if (!aVLDB_GetEntryByID(cellHandle, avolid, RWVOL, &entry, &tst)) {
  	goto fail_UV_BackupVolume;
      }
  
***************
*** 1026,1032 ****
  	vldblocked = 1;
  
  	/* Reread the vldb entry */
! 	if (!VLDB_GetEntryByID(cellHandle, avolid, RWVOL, &entry, &tst)) {
  	    goto fail_UV_BackupVolume;
  	}
      }
--- 1026,1032 ----
  	vldblocked = 1;
  
  	/* Reread the vldb entry */
! 	if (!aVLDB_GetEntryByID(cellHandle, avolid, RWVOL, &entry, &tst)) {
  	    goto fail_UV_BackupVolume;
  	}
      }
***************
*** 1503,1509 ****
      islocked = 1;
  
      /* Get the vldb entry in readable format */
!     if (!VLDB_GetEntryByID(cellHandle, afromvol, RWVOL, &entry, &tst)) {
  	goto fail_UV_ReleaseVolume;
      }
  
--- 1503,1509 ----
      islocked = 1;
  
      /* Get the vldb entry in readable format */
!     if (!aVLDB_GetEntryByID(cellHandle, afromvol, RWVOL, &entry, &tst)) {
  	goto fail_UV_ReleaseVolume;
      }
  
***************
*** 2118,2124 ****
      fromcall = (struct rx_call *)0;
  
      islocked = 0;
!     if (!VLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) {
  	goto fail_UV_DumpVolume;
      }
  
--- 2118,2124 ----
      fromcall = (struct rx_call *)0;
  
      islocked = 0;
!     if (!aVLDB_GetEntryByID(cellHandle, afromvol, -1, &entry, &tst)) {
  	goto fail_UV_DumpVolume;
      }
  
***************
*** 2329,2335 ****
      pvolid = tovolid;
      toconn = UV_Bind(cellHandle, toserver, AFSCONF_VOLUMEPORT);
      if (pvolid == 0) {		/*alot a new id if needed */
! 	VLDB_GetEntryByName(cellHandle, tovolname, &entry, &tst);
  	if (tst == VL_NOENT) {
  	    tst =
  		ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &pvolid);
--- 2329,2335 ----
      pvolid = tovolid;
      toconn = UV_Bind(cellHandle, toserver, AFSCONF_VOLUMEPORT);
      if (pvolid == 0) {		/*alot a new id if needed */
! 	aVLDB_GetEntryByName(cellHandle, tovolname, &entry, &tst);
  	if (tst == VL_NOENT) {
  	    tst =
  		ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &pvolid);
***************
*** 2450,2456 ****
  	/* Volume was restored on the file server, update the 
  	 * VLDB to reflect the change.
  	 */
! 	VLDB_GetEntryByID(cellHandle, pvolid, RWVOL, &entry, &tst);
  	if (tst && tst != VL_NOENT && tst != VL_ENTDELETED) {
  	    goto fail_UV_RestoreVolume;
  	}
--- 2450,2456 ----
  	/* Volume was restored on the file server, update the 
  	 * VLDB to reflect the change.
  	 */
! 	aVLDB_GetEntryByID(cellHandle, pvolid, RWVOL, &entry, &tst);
  	if (tst && tst != VL_NOENT && tst != VL_ENTDELETED) {
  	    goto fail_UV_RestoreVolume;
  	}
***************
*** 2613,2619 ****
      }
      islocked = 1;
  
!     if (!VLDB_GetEntryByID(cellHandle, volid, RWVOL, &entry, &tst)) {
  	goto fail_UV_AddSite;
      }
      if (!ISNAMEVALID(entry.name)) {
--- 2613,2619 ----
      }
      islocked = 1;
  
!     if (!aVLDB_GetEntryByID(cellHandle, volid, RWVOL, &entry, &tst)) {
  	goto fail_UV_AddSite;
      }
      if (!ISNAMEVALID(entry.name)) {
***************
*** 2692,2698 ****
      }
      islocked = 1;
  
!     if (!VLDB_GetEntryByID(cellHandle, volid, RWVOL, &entry, &tst)) {
  	goto fail_UV_RemoveSite;
      }
      if (!Lp_ROMatch(cellHandle, &entry, server, part, &tst)) {
--- 2692,2698 ----
      }
      islocked = 1;
  
!     if (!aVLDB_GetEntryByID(cellHandle, volid, RWVOL, &entry, &tst)) {
  	goto fail_UV_RemoveSite;
      }
      if (!Lp_ROMatch(cellHandle, &entry, server, part, &tst)) {
***************
*** 3006,3012 ****
  	    maxVolid += temp2;
  
  	}
! 	VLDB_GetEntryByID(cellHandle, elem.ids[RWVOL], RWVOL, &entry, &tst);
  	if (tst && (tst != VL_NOENT)) {
  	    noError = 0;
  	    totalCE++;
--- 3006,3012 ----
  	    maxVolid += temp2;
  
  	}
! 	aVLDB_GetEntryByID(cellHandle, elem.ids[RWVOL], RWVOL, &entry, &tst);
  	if (tst && (tst != VL_NOENT)) {
  	    noError = 0;
  	    totalCE++;
***************
*** 3495,3501 ****
  	}
  	islocked = 1;
  
! 	if (!VLDB_GetEntryByID
  	    (cellHandle, entry->volumeId[RWVOL], RWVOL, entry, &tst)) {
  	    goto fail_CheckVldb;
  	}
--- 3495,3501 ----
  	}
  	islocked = 1;
  
! 	if (!aVLDB_GetEntryByID
  	    (cellHandle, entry->volumeId[RWVOL], RWVOL, entry, &tst)) {
  	    goto fail_CheckVldb;
  	}
Index: openafs/src/libafs/Makefile.common.in
diff -c openafs/src/libafs/Makefile.common.in:1.21.2.2 openafs/src/libafs/Makefile.common.in:1.21.2.3
*** openafs/src/libafs/Makefile.common.in:1.21.2.2	Sun Apr  3 15:32:41 2005
--- openafs/src/libafs/Makefile.common.in	Thu Mar  9 01:41:47 2006
***************
*** 47,55 ****
  	$(CC) $(COMMON_INCLUDE) $(CFLAGS) -P -c $<
  
  .c.o:
! 	$(CC) $(COMMON_INCLUDE) $(CFLAGS) $(KERN_DBG) -c $<
! CRULE_NOOPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS) -c $?
! CRULE_OPT=	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS) -c $?
  
  system:	all
  
--- 47,55 ----
  	$(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
  
***************
*** 254,260 ****
  rx_rdwr.o: $(TOP_SRC_RX)/rx_rdwr.c
  	$(CRULE_OPT)
  afs_uuid.o: $(TOP_SRCDIR)/util/uuid.c
! 	$(CRULE_OPT) -o afs_uuid.o
  xdr_afsuuid.o: $(TOP_SRCDIR)/rx/xdr_afsuuid.c
  	$(CRULE_OPT)
  
--- 254,260 ----
  rx_rdwr.o: $(TOP_SRC_RX)/rx_rdwr.c
  	$(CRULE_OPT)
  afs_uuid.o: $(TOP_SRCDIR)/util/uuid.c
! 	$(CRULE_OPT)
  xdr_afsuuid.o: $(TOP_SRCDIR)/rx/xdr_afsuuid.c
  	$(CRULE_OPT)
  
***************
*** 268,274 ****
  afs_daemons.o: $(TOP_SRC_AFS)/afs_daemons.c
  	$(CRULE_NOOPT)
  afs_dir.o: 	$(TOP_SRCDIR)/dir/dir.c
! 	$(CRULE_NOOPT) -o afs_dir.o
  AFS_component_version_number.o: AFS_component_version_number.c
  	$(CRULE_NOOPT)
  afs_lock.o: $(TOP_SRC_AFS)/afs_lock.c
--- 268,274 ----
  afs_daemons.o: $(TOP_SRC_AFS)/afs_daemons.c
  	$(CRULE_NOOPT)
  afs_dir.o: 	$(TOP_SRCDIR)/dir/dir.c
! 	$(CRULE_NOOPT)
  AFS_component_version_number.o: AFS_component_version_number.c
  	$(CRULE_NOOPT)
  afs_lock.o: $(TOP_SRC_AFS)/afs_lock.c
***************
*** 337,344 ****
  	$(CRULE_NOOPT)
  Kvldbint.cs.o: ${TOP_OBJ_VLSERVER}/Kvldbint.cs.c
  	$(CRULE_NOOPT)
  Kvldbint.xdr.o: ${TOP_OBJ_VLSERVER}/Kvldbint.xdr.c
! 	$(CRULE_NOOPT) -DAFS_UUID_XG
  rx_kmutex.o: $(TOP_SRC_RX)/${MKAFS_OSTYPE}/rx_kmutex.c
  	$(CRULE_NOOPT)
  rx_knet.o: $(TOP_SRC_RX)/${MKAFS_OSTYPE}/rx_knet.c
--- 337,345 ----
  	$(CRULE_NOOPT)
  Kvldbint.cs.o: ${TOP_OBJ_VLSERVER}/Kvldbint.cs.c
  	$(CRULE_NOOPT)
+ CFLAGS-Kvldbint.xdr.o= -DAFS_UUID_XG
  Kvldbint.xdr.o: ${TOP_OBJ_VLSERVER}/Kvldbint.xdr.c
! 	$(CRULE_NOOPT)
  rx_kmutex.o: $(TOP_SRC_RX)/${MKAFS_OSTYPE}/rx_kmutex.c
  	$(CRULE_NOOPT)
  rx_knet.o: $(TOP_SRC_RX)/${MKAFS_OSTYPE}/rx_knet.c
***************
*** 347,362 ****
  	$(CRULE_NOOPT)
  
  # Files which do not contain NFS translator code.
  afs_call.o: $(TOP_SRC_AFS)/afs_call.c
! 	$(CRULE_NOOPT) -DAFS_NONFSTRANS
  afs_pioctl.o: $(TOP_SRC_AFS)/afs_pioctl.c
! 	$(CRULE_NOOPT) -DAFS_NONFSTRANS
  
  # NFS Translator versions of the above code.
  afs_call_nfs.o:	$(TOP_SRC_AFS)/afs_call.c
! 	$(CRULE_NOOPT) -o afs_call_nfs.o
  afs_pioctl_nfs.o:	$(TOP_SRC_AFS)/afs_pioctl.c
! 	$(CRULE_NOOPT) -o afs_pioctl_nfs.o
  
  # Files which are specific to particular architectures/targets
  # but have common build rules. Place here instead of duplicating
--- 348,365 ----
  	$(CRULE_NOOPT)
  
  # Files which do not contain NFS translator code.
+ CFLAGS-afs_call.o= -DAFS_NONFSTRANS
  afs_call.o: $(TOP_SRC_AFS)/afs_call.c
! 	$(CRULE_NOOPT)
! CFLAGS-afs_pioctl.o= -DAFS_NONFSTRANS
  afs_pioctl.o: $(TOP_SRC_AFS)/afs_pioctl.c
! 	$(CRULE_NOOPT)
  
  # NFS Translator versions of the above code.
  afs_call_nfs.o:	$(TOP_SRC_AFS)/afs_call.c
! 	$(CRULE_NOOPT)
  afs_pioctl_nfs.o:	$(TOP_SRC_AFS)/afs_pioctl.c
! 	$(CRULE_NOOPT)
  
  # Files which are specific to particular architectures/targets
  # but have common build rules. Place here instead of duplicating
***************
*** 371,384 ****
  	$(CRULE_NOOPT)
  osi_misc.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_misc.c
  	$(CRULE_NOOPT)
  osi_vfsops_nfs.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
! 	$(CRULE_NOOPT) -o osi_vfsops_nfs.o \
! 	-DAFS_WRAPPER=${LIBAFS}_wrapper \
! 	-DAFS_CONF_DATA=${LIBAFS}_conf_data
  osi_vfsops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
! 	$(CRULE_NOOPT) -DAFS_NONFSTRANS \
! 	-DAFS_WRAPPER=${LIBAFSNONFS}_wrapper \
! 	-DAFS_CONF_DATA=${LIBAFSNONFS}_conf_data
  osi_vm.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vm.c
  	$(CRULE_NOOPT)
  osi_vnodeops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vnodeops.c
--- 374,385 ----
  	$(CRULE_NOOPT)
  osi_misc.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_misc.c
  	$(CRULE_NOOPT)
+ CFLAGS-osi_vfsops_nfs.o= -DAFS_WRAPPER=${LIBAFS}_wrapper -DAFS_CONF_DATA=${LIBAFS}_conf_data
  osi_vfsops_nfs.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
! 	$(CRULE_NOOPT)
! CFLAGS-osi_vfsops.o= -DAFS_NONFSTRANS -DAFS_WRAPPER=${LIBAFSNONFS}_wrapper -DAFS_CONF_DATA=${LIBAFSNONFS}_conf_data
  osi_vfsops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vfsops.c
! 	$(CRULE_NOOPT)
  osi_vm.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vm.c
  	$(CRULE_NOOPT)
  osi_vnodeops.o: $(TOP_SRCDIR)/afs/$(MKAFS_OSTYPE)/osi_vnodeops.c
Index: openafs/src/libafs/MakefileProto.DARWIN.in
diff -c openafs/src/libafs/MakefileProto.DARWIN.in:1.21.2.1 openafs/src/libafs/MakefileProto.DARWIN.in:1.21.2.5
*** openafs/src/libafs/MakefileProto.DARWIN.in:1.21.2.1	Tue Apr 19 12:03:07 2005
--- openafs/src/libafs/MakefileProto.DARWIN.in	Thu Mar  9 01:41:47 2006
***************
*** 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.1 2005/04/19 16:03:07 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.5 2006/03/09 06:41:47 shadow Exp $
  # 
  # MakefileProto for Digital Unix systems
  #
***************
*** 33,38 ****
--- 33,67 ----
  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)
+ endif
+ <all -ppc_darwin_80 -x86_darwin_80 -ppc_darwin_90 -x86_darwin_90>
+ MODLD=$(LD)
+ CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS)
  <ppc_darwin_70>
  KOPTS=-static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
  <ppc_darwin_60>
***************
*** 40,47 ****
  <ppc_darwin_14 ppc_darwin_13 ppc_darwin_12>
  KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
  <all>
! CFLAGS=${KINCLUDES} -I. -I.. -I${TOP_OBJDIR}/src/config $(DEFINES) $(KDEFS) $(KOPTS) ${DBUG} ${OPTMZ}
! KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.Framework/Headers
  
  
  # Name of directory to hold object files and libraries.
--- 69,75 ----
  <ppc_darwin_14 ppc_darwin_13 ppc_darwin_12>
  KOPTS=-no-precomp -static -fno-common -finline -fno-keep-inline-functions -force_cpusubtype_ALL -msoft-float -mlong-branch 
  <all>
! KINCLUDES=-I${KROOT}/System/Library/Frameworks/Kernel.framework/Headers
  
  
  # Name of directory to hold object files and libraries.
***************
*** 54,74 ****
  
  include Makefile.common
  
  setup:
  	-mkdir $(KOBJ)
  	-$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
  	ln -fs ../Makefile $(KOBJ)/Makefile
  	ln -fs ../Makefile.common $(KOBJ)/Makefile.common
  	ln -fs ../config $(KOBJ)/config
! 	-$(RM) -f  h net netinet rpc ufs nfs  machine sys vm mach kern
! 	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/net net
! 	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/machine machine
! 	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/netinet netinet
! 	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/nfs nfs
! 	-ln -fs /usr/include/rpc rpc
! 	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys sys
! 	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/ufs ufs
  	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys h
  
  
  # Below this line are targets when in the COMMON directory:
--- 82,116 ----
  
  include Makefile.common
  
+ <ppc_darwin_80 x86_darwin_80 ppc_darwin_90 x86_darwin_90>
+ ifeq ($(ARCH_ppc),yes)
+ ifeq ($(ARCH_x86),yes)
+ # override suffix rule; unfortunately, this causes a warning message
+ .c.o:
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.ppc.o,$@) -c $<
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.x86.o,$@) -c $<
+ 	lipo -create $(patsubst %.o,%.ppc.o,$@) $(patsubst %.o,%.x86.o,$@) -output $@
+ CRULE_NOOPT= \
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.ppc.o,$@) -c $? && \
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.x86.o,$@) -c $? && \
+ 	lipo -create $(patsubst %.o,%.ppc.o,$@) $(patsubst %.o,%.x86.o,$@) -output $@
+ CRULE_OPT= \
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_ppc) $(CFLAGS-$@) -o $(patsubst %.o,%.ppc.o,$@) -c $? && \
+ 	$(CC) $(COMMON_INCLUDE) $(KERN_DBG) $(KERN_OPTMZ) $(CFLAGS_x86) $(CFLAGS-$@) -o $(patsubst %.o,%.x86.o,$@) -c $? && \
+ 	lipo -create $(patsubst %.o,%.ppc.o,$@) $(patsubst %.o,%.x86.o,$@) -output $@
+ endif
+ endif
+ <all>
+ 
  setup:
  	-mkdir $(KOBJ)
  	-$(RM) $(KOBJ)/Makefile $(KOBJ)/Makefile.common $(KOBJ)/config
  	ln -fs ../Makefile $(KOBJ)/Makefile
  	ln -fs ../Makefile.common $(KOBJ)/Makefile.common
  	ln -fs ../config $(KOBJ)/config
! 	-$(RM) -f  h rpc
  	-ln -fs $(KROOT)/System/Library/Frameworks/Kernel.framework/Headers/sys h
+ 	-ln -fs /usr/include/rpc rpc
  
  
  # Below this line are targets when in the COMMON directory:
***************
*** 98,104 ****
  
  
  ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
! 	$(LD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS} -lcc_kext
  
  ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
! 	$(LD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS} -lcc_kext
--- 140,146 ----
  
  
  ${LIBAFS}: $(AFSAOBJS) $(AFSNFSOBJS)
! 	$(MODLD) -r -o ${LIBAFS} ${AFSAOBJS} ${AFSNFSOBJS} -lcc_kext
  
  ${LIBAFSNONFS}:  $(AFSAOBJS) $(AFSNONFSOBJS)
! 	$(MODLD) -r -o ${LIBAFSNONFS} ${AFSAOBJS} ${AFSNONFSOBJS} -lcc_kext
Index: openafs/src/libafs/MakefileProto.LINUX.in
diff -c openafs/src/libafs/MakefileProto.LINUX.in:1.40.2.11 openafs/src/libafs/MakefileProto.LINUX.in:1.40.2.13
*** openafs/src/libafs/MakefileProto.LINUX.in:1.40.2.11	Mon Jul 25 14:32:15 2005
--- openafs/src/libafs/MakefileProto.LINUX.in	Thu Dec  1 10:19:38 2005
***************
*** 140,154 ****
  
  ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
  	$(RM) -f h 
! 	ln -fs ${LINUX_KERNEL_PATH}/include/linux h 
  	$(RM) -f linux 
  	ln -fs ${LINUX_KERNEL_PATH}/include/linux linux 
  	$(RM) -f net 
  	ln -fs ${LINUX_KERNEL_PATH}/include/net net 
- 	$(RM) -f netinet 
- 	ln -fs ${LINUX_KERNEL_PATH}/include/linux netinet 
- 	$(RM) -f sys
- 	ln -fs ${LINUX_KERNEL_PATH}/include/linux sys
  	$(RM) -f asm-generic
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-generic asm-generic
  	$(RM) -f asm
--- 140,160 ----
  
  ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
  	$(RM) -f h 
! 	$(RM) -f sys
! 	$(RM) -f netinet 
! 	if [ -d ${LINUX_KERNEL_PATH}/include2 ] ; then                  \
! 	    ln -fs ${LINUX_KERNEL_PATH}/include2/asm/../linux h       ; \
! 	    ln -fs ${LINUX_KERNEL_PATH}/include2/asm/../linux sys     ; \
! 	    ln -fs ${LINUX_KERNEL_PATH}/include2/asm/../linux netinet ; \
! 	else                                                            \
! 	    ln -fs ${LINUX_KERNEL_PATH}/include/linux h               ; \
! 	    ln -fs ${LINUX_KERNEL_PATH}/include/linux sys             ; \
! 	    ln -fs ${LINUX_KERNEL_PATH}/include/linux netinet         ; \
! 	fi
  	$(RM) -f linux 
  	ln -fs ${LINUX_KERNEL_PATH}/include/linux linux 
  	$(RM) -f net 
  	ln -fs ${LINUX_KERNEL_PATH}/include/net net 
  	$(RM) -f asm-generic
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-generic asm-generic
  	$(RM) -f asm
***************
*** 165,171 ****
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-x86_64 asm
  <s390_linux22 s390_linux24 s390_linux26 s390x_linux26>
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-s390 asm
! <s390x_linux22 s390x_linux24>
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-s390x asm
  <ppc_linux22 ppc_linux24 ppc_linux26>
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-ppc asm 
--- 171,177 ----
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-x86_64 asm
  <s390_linux22 s390_linux24 s390_linux26 s390x_linux26>
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-s390 asm
! <s390x_linux22 s390x_linux24 s390x_linux26>
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-s390x asm
  <ppc_linux22 ppc_linux24 ppc_linux26>
  	ln -fs ${LINUX_KERNEL_PATH}/include/asm-ppc asm 
Index: openafs/src/libafs/afs.ppc_darwin_70.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.2.2.7.2.1 openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.2.2.9
*** openafs/src/libafs/afs.ppc_darwin_70.plist.in:1.2.2.7.2.1	Thu Oct 20 17:13:05 2005
--- openafs/src/libafs/afs.ppc_darwin_70.plist.in	Mon Apr 10 16:29:39 2006
***************
*** 15,25 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.0</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.0</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
--- 15,25 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.1</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.1</string>
  	<key>OSBundleLibraries</key>
  	<dict>
  		<key>com.apple.kernel.bsd</key>
Index: openafs/src/libafs/afs.ppc_darwin_80.plist.in
diff -c openafs/src/libafs/afs.ppc_darwin_80.plist.in:1.1.2.1.4.1 openafs/src/libafs/afs.ppc_darwin_80.plist.in:1.1.2.4
*** openafs/src/libafs/afs.ppc_darwin_80.plist.in:1.1.2.1.4.1	Thu Oct 20 17:13:05 2005
--- openafs/src/libafs/afs.ppc_darwin_80.plist.in	Mon Apr 10 16:29:39 2006
***************
*** 15,31 ****
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.0</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.0</string>
  	<key>OSBundleLibraries</key>
  	<dict>
! 		<key>com.apple.kernel.bsd</key>
  		<string>8.0.0</string>
! 		<key>com.apple.kernel.mach</key>
  		<string>8.0.0</string>
  	</dict>
  </dict>
  </plist>
--- 15,33 ----
  	<key>CFBundlePackageType</key>
  	<string>KEXT</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.1</string>
  	<key>CFBundleSignature</key>
  	<string>????</string>
  	<key>CFBundleVersion</key>
! 	<string>1.4.1</string>
  	<key>OSBundleLibraries</key>
  	<dict>
! 		<key>com.apple.kpi.bsd</key>
  		<string>8.0.0</string>
! 		<key>com.apple.kpi.mach</key>
  		<string>8.0.0</string>
+ 		<key>com.apple.kpi.libkern</key>
+ 		<string>8.0</string>
  	</dict>
  </dict>
  </plist>
Index: openafs/src/libafs/afs.ppc_darwin_90.plist.in
diff -c /dev/null openafs/src/libafs/afs.ppc_darwin_90.plist.in:1.1.2.3
*** /dev/null	Fri Apr 14 09:27:29 2006
--- openafs/src/libafs/afs.ppc_darwin_90.plist.in	Mon Apr 10 16:29:39 2006
***************
*** 0 ****
--- 1,33 ----
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+ <plist version="0.9">
+ <dict>
+ 	<key>CFBundleDevelopmentRegion</key>
+ 	<string>English</string>
+ 	<key>CFBundleExecutable</key>
+ 	<string>afs</string>
+ 	<key>CFBundleIdentifier</key>
+ 	<string>org.openafs.filesystems.afs</string>
+ 	<key>CFBundleInfoDictionaryVersion</key>
+ 	<string>8.0</string>
+ 	<key>CFBundleName</key>
+ 	<string>afs</string>
+ 	<key>CFBundlePackageType</key>
+ 	<string>KEXT</string>
+ 	<key>CFBundleShortVersionString</key>
+ 	<string>1.4.1</string>
+ 	<key>CFBundleSignature</key>
+ 	<string>????</string>
+ 	<key>CFBundleVersion</key>
+ 	<string>1.4.1</string>
+ 	<key>OSBundleLibraries</key>
+ 	<dict>
+ 		<key>com.apple.kpi.bsd</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.mach</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.libkern</key>
+ 		<string>8.0</string>
+ 	</dict>
+ </dict>
+ </plist>
Index: openafs/src/libafs/afs.x86_darwin_80.plist.in
diff -c /dev/null openafs/src/libafs/afs.x86_darwin_80.plist.in:1.1.2.3
*** /dev/null	Fri Apr 14 09:27:29 2006
--- openafs/src/libafs/afs.x86_darwin_80.plist.in	Mon Apr 10 16:29:39 2006
***************
*** 0 ****
--- 1,33 ----
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+ <plist version="0.9">
+ <dict>
+ 	<key>CFBundleDevelopmentRegion</key>
+ 	<string>English</string>
+ 	<key>CFBundleExecutable</key>
+ 	<string>afs</string>
+ 	<key>CFBundleIdentifier</key>
+ 	<string>org.openafs.filesystems.afs</string>
+ 	<key>CFBundleInfoDictionaryVersion</key>
+ 	<string>8.0</string>
+ 	<key>CFBundleName</key>
+ 	<string>afs</string>
+ 	<key>CFBundlePackageType</key>
+ 	<string>KEXT</string>
+ 	<key>CFBundleShortVersionString</key>
+ 	<string>1.4.1</string>
+ 	<key>CFBundleSignature</key>
+ 	<string>????</string>
+ 	<key>CFBundleVersion</key>
+ 	<string>1.4.1</string>
+ 	<key>OSBundleLibraries</key>
+ 	<dict>
+ 		<key>com.apple.kpi.bsd</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.mach</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.libkern</key>
+ 		<string>8.0</string>
+ 	</dict>
+ </dict>
+ </plist>
Index: openafs/src/libafs/afs.x86_darwin_90.plist.in
diff -c /dev/null openafs/src/libafs/afs.x86_darwin_90.plist.in:1.1.2.3
*** /dev/null	Fri Apr 14 09:27:29 2006
--- openafs/src/libafs/afs.x86_darwin_90.plist.in	Mon Apr 10 16:29:39 2006
***************
*** 0 ****
--- 1,33 ----
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
+ <plist version="0.9">
+ <dict>
+ 	<key>CFBundleDevelopmentRegion</key>
+ 	<string>English</string>
+ 	<key>CFBundleExecutable</key>
+ 	<string>afs</string>
+ 	<key>CFBundleIdentifier</key>
+ 	<string>org.openafs.filesystems.afs</string>
+ 	<key>CFBundleInfoDictionaryVersion</key>
+ 	<string>8.0</string>
+ 	<key>CFBundleName</key>
+ 	<string>afs</string>
+ 	<key>CFBundlePackageType</key>
+ 	<string>KEXT</string>
+ 	<key>CFBundleShortVersionString</key>
+ 	<string>1.4.1</string>
+ 	<key>CFBundleSignature</key>
+ 	<string>????</string>
+ 	<key>CFBundleVersion</key>
+ 	<string>1.4.1</string>
+ 	<key>OSBundleLibraries</key>
+ 	<dict>
+ 		<key>com.apple.kpi.bsd</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.mach</key>
+ 		<string>8.0.0</string>
+ 		<key>com.apple.kpi.libkern</key>
+ 		<string>8.0</string>
+ 	</dict>
+ </dict>
+ </plist>
Index: openafs/src/libafsauthent/Makefile.in
diff -c openafs/src/libafsauthent/Makefile.in:1.9.2.3 openafs/src/libafsauthent/Makefile.in:1.9.2.4
*** openafs/src/libafsauthent/Makefile.in:1.9.2.3	Mon Aug  8 11:39:22 2005
--- openafs/src/libafsauthent/Makefile.in	Sat Oct 15 11:21:16 2005
***************
*** 70,76 ****
  	rmtsys.xdr.o \
  	rmtsys.cs.o \
  	afssyscalls.o \
! 	rmtsysnet.o
  
  PTSERVEROBJS = \
  	ptclient.o \
--- 70,78 ----
  	rmtsys.xdr.o \
  	rmtsys.cs.o \
  	afssyscalls.o \
! 	rmtsysnet.o \
! 	glue.o \
! 	setpag.o
  
  PTSERVEROBJS = \
  	ptclient.o \
***************
*** 244,249 ****
--- 246,257 ----
  rmtsysnet.o: ${SYS}/rmtsysnet.c
  	${CCRULE}
  
+ glue.o: ${SYS}/glue.c
+ 	${CCRULE}
+ 
+ setpag.o: ${SYS}/setpag.c
+ 	${CCRULE}
+ 
  clean:
  	$(RM) -f *.o *.a libafsauthent*
  
Index: openafs/src/libafsrpc/Makefile.in
diff -c openafs/src/libafsrpc/Makefile.in:1.29.2.6 openafs/src/libafsrpc/Makefile.in:1.29.2.7
*** openafs/src/libafsrpc/Makefile.in:1.29.2.6	Mon Aug  8 11:39:22 2005
--- openafs/src/libafsrpc/Makefile.in	Sun Mar  5 19:33:23 2006
***************
*** 272,278 ****
  #
  #   $ what /opt/langtools/bin/pxdb32
  #   /opt/langtools/bin/pxdb32:
! #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.29.2.6 $
  #
  # The problem occurs when -g and -O are both used when compiling des.c.
  # The simplest way to work around the problem is to leave out either -g or -O.
--- 272,278 ----
  #
  #   $ what /opt/langtools/bin/pxdb32
  #   /opt/langtools/bin/pxdb32:
! #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.29.2.7 $
  #
  # The problem occurs when -g and -O are both used when compiling des.c.
  # The simplest way to work around the problem is to leave out either -g or -O.
***************
*** 363,369 ****
  		${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
  		${AS} -o syscall.o syscall.i; \
  		$(RM) -f syscall.ss syscall.i;; \
! 	 *fbsd* | *nbsd* ) \
  		touch syscall.o ;; \
  	 *) \
  		/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
--- 363,369 ----
  		${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${SYS}/syscall.s; \
  		${AS} -o syscall.o syscall.i; \
  		$(RM) -f syscall.ss syscall.i;; \
! 	 *bsd* ) \
  		touch syscall.o ;; \
  	 *) \
  		/lib/cpp  ${SFLAGS} ${SYS}/syscall.s syscall.ss; \
Index: openafs/src/libuafs/MakefileProto.DARWIN.in
diff -c openafs/src/libuafs/MakefileProto.DARWIN.in:1.9 openafs/src/libuafs/MakefileProto.DARWIN.in:1.9.2.1
*** openafs/src/libuafs/MakefileProto.DARWIN.in:1.9	Sun Apr 18 02:10:33 2004
--- openafs/src/libuafs/MakefileProto.DARWIN.in	Thu Mar  9 01:41:48 2006
***************
*** 13,24 ****
  CC = cc
  DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
  KOPTS=
! CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG} $(XCFLAGS)
! OPTF=-O
  # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
  
! TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV
! TEST_LDFLAGS=
  TEST_LIBS=
  
  LIBUAFS = libuafs.a
--- 13,24 ----
  CC = cc
  DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
  KOPTS=
! CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG} $(XCFLAGS) $(ARCHFLAGS)
! OPTF=-Os
  # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
  
! TEST_CFLAGS=-D_REENTRANT -DAFS_PTHREAD_ENV $(XCFLAGS) $(ARCHFLAGS)
! TEST_LDFLAGS=$(XLDFLAGS) $(ARCHFLAGS)
  TEST_LIBS=
  
  LIBUAFS = libuafs.a
Index: openafs/src/libuafs/MakefileProto.LINUX.in
diff -c openafs/src/libuafs/MakefileProto.LINUX.in:1.10 openafs/src/libuafs/MakefileProto.LINUX.in:1.10.2.1
*** openafs/src/libuafs/MakefileProto.LINUX.in:1.10	Sun Apr 18 02:10:33 2004
--- openafs/src/libuafs/MakefileProto.LINUX.in	Fri Oct 14 22:14:15 2005
***************
*** 17,23 ****
  # System specific build commands and flags
  DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
  KOPTS=
! CFLAGS=-I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG}
  OPTF=-O
  # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
  
--- 17,29 ----
  # System specific build commands and flags
  DEFINES= -D_REENTRANT -DKERNEL -DUKERNEL
  KOPTS=
! SYS_NAME=@AFS_SYSNAME@
! ifeq (${SYS_NAME}, ppc64_linux26)
! CFLAGS=-fPIC
! else
! CFLAGS=
! endif
! CFLAGS+= -I. -I.. -I${TOP_OBJDIR}/src/config ${FSINCLUDES} $(DEFINES) $(KOPTS) ${DBG}
  OPTF=-O
  # WEBOPTS = -I../nsapi -DNETSCAPE_NSAPI -DNET_SSL -DXP_UNIX -DMCC_HTTPD
  
Index: openafs/src/log/tokens.c
diff -c openafs/src/log/tokens.c:1.6.2.1 openafs/src/log/tokens.c:1.6.2.2
*** openafs/src/log/tokens.c:1.6.2.1	Mon Jul 11 15:46:16 2005
--- openafs/src/log/tokens.c	Wed Mar 15 13:29:03 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/tokens.c,v 1.6.2.1 2005/07/11 19:46:16 shadow Exp $");
  
  #include <stdio.h>
  #ifdef	AFS_AIX32_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/log/tokens.c,v 1.6.2.2 2006/03/15 18:29:03 shadow Exp $");
  
  #include <stdio.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 54,60 ****
      time_t current_time;	/*Current time of day */
      time_t tokenExpireTime;	/*When token expires */
      char *expireString;		/*Char string of expiration time */
!     char UserName[16];		/*Printable user name */
      struct ktc_principal serviceName, clientName;	/* service name for ticket */
      struct ktc_token token;	/* the token we're printing */
  
--- 54,60 ----
      time_t current_time;	/*Current time of day */
      time_t tokenExpireTime;	/*When token expires */
      char *expireString;		/*Char string of expiration time */
!     char UserName[MAXKTCNAMELEN * 2 + 2]; /*Printable user name */
      struct ktc_principal serviceName, clientName;	/* service name for ticket */
      struct ktc_token token;	/* the token we're printing */
  
Index: openafs/src/log/test/Makefile.in
diff -c openafs/src/log/test/Makefile.in:1.6 openafs/src/log/test/Makefile.in:1.6.8.1
*** openafs/src/log/test/Makefile.in:1.6	Thu Nov  1 00:00:15 2001
--- openafs/src/log/test/Makefile.in	Thu Mar  9 01:41:49 2006
***************
*** 14,20 ****
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  LIBS= -lauth -lrxkad -ldes -lsys -lrx -llwp -lcmd -lafsutil ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS}
  
  all: testlog gettoktest
  
--- 14,20 ----
  LDIRS=-L${TOP_LIBDIR} -L${DESTDIR}/lib/afs -L..
  LIBS= -lauth -lrxkad -ldes -lsys -lrx -llwp -lcmd -lafsutil ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${LIBS} ${XCFLAGS} ${ARCHFLAGS}
  
  all: testlog gettoktest
  
Index: openafs/src/lwp/Makefile.in
diff -c openafs/src/lwp/Makefile.in:1.29.2.6 openafs/src/lwp/Makefile.in:1.29.2.8
*** openafs/src/lwp/Makefile.in:1.29.2.6	Sun Feb 20 20:12:10 2005
--- openafs/src/lwp/Makefile.in	Thu Mar  9 01:41:50 2006
***************
*** 10,16 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${LWP_DBG} ${LWP_OPTMZ} ${XCFLAGS} ${COMMON_INCL}
  
  LIBOBJS=lwp.o process.o lock.o iomgr.o timer.o fasttime.o preempt.o \
  	waitkey.o threadname.o AFS_component_version_number.o
--- 10,16 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${LWP_DBG} ${LWP_OPTMZ} ${XCFLAGS} ${ARCHFLAGS} ${COMMON_INCL}
  
  LIBOBJS=lwp.o process.o lock.o iomgr.o timer.o fasttime.o preempt.o \
  	waitkey.o threadname.o AFS_component_version_number.o
***************
*** 29,39 ****
  
  # This is required so sgi_64+ does not try to build this file.
  process.s:
! 	echo Nothing to be done for process.s
  
  # Making process.o for $(SYS_NAME)
  process.o	: process.s process.i386.s process.c
! 	@case "$(SYS_NAME)" in \
  	pmax_he1) \
  		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} process.s;; \
  	sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5* ) \
--- 29,39 ----
  
  # This is required so sgi_64+ does not try to build this file.
  process.s:
! 	@echo Nothing to be done for process.s
  
  # Making process.o for $(SYS_NAME)
  process.o	: process.s process.i386.s process.c
! 	@set -x; case "$(SYS_NAME)" in \
  	pmax_he1) \
  		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} process.s;; \
  	sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5* ) \
***************
*** 43,49 ****
  	sgi_5* ) \
  		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
  	sgi_61 | sgi_62 | sgi_63 ) \
! 		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
  	s390_*) \
  		/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390.s >process.ss; \
  		${AS} -ahlns process.ss -o process.o >process.lst; \
--- 43,49 ----
  	sgi_5* ) \
  		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
  	sgi_61 | sgi_62 | sgi_63 ) \
! 		$(CCOBJ) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} ${ARCHFLAGS} -I${TOP_INCDIR} -KPIC -G0  ${srcdir}/process.s;; \
  	s390_*) \
  		/lib/cpp -P -I${TOP_INCDIR} ${srcdir}/process.s390.s >process.ss; \
  		${AS} -ahlns process.ss -o process.o >process.lst; \
***************
*** 53,59 ****
  		${AS} -ahlns process.ss -o process.o >process.lst; \
  		$(RM) process.ss ;; \
  	*_darwin* ) \
! 		$(CC) ${LWP_DBG} ${LWP_OPTMZ} -c ${XCFLAGS} -I${TOP_INCDIR} ${srcdir}/process.s;; \
  	i386_*bsd*) \
  		cp ${srcdir}/process.i386.s process.S ; \
  		${CCOBJ} -DIGNORE_STDS_H -E -I${srcdir} -I${TOP_INCDIR} process.S > process.ss ; \
--- 53,82 ----
  		${AS} -ahlns process.ss -o process.o >process.lst; \
  		$(RM) process.ss ;; \
  	*_darwin* ) \
! 		ppc=`echo "${ARCHFLAGS}" | grep -q -w ppc && echo yes` ; \
! 		i386=`echo "${ARCHFLAGS}" | grep -q -w i386 && echo yes` ; \
! 		if [ -z "$${ppc}" -a -z "$${i386}" ] ; then \
! 			if [ `arch` = ppc ] ; then \
! 				ppc=yes ; \
! 			else \
! 				i386=yes ; \
! 			fi ; \
! 		fi ; \
! 		if [ -n "$${ppc}" ] ; then \
! 			$(CC) ${LWP_DBG} ${LWP_OPTMZ} -c -arch ppc -I${TOP_INCDIR} ${srcdir}/process.s -o process.ppc.o ; \
! 			if [ -z "$${i386}" ] ; then \
! 				${MV} process.ppc.o process.o ; \
! 			fi ; \
! 		fi ; \
! 		if [ -n "$${i386}" ] ; then \
! 			$(CC) -x assembler-with-cpp -c -arch i386 -I${TOP_INCDIR} -I${srcdir} ${srcdir}/process.i386.s -o process.i386.o ; \
! 			if [ -z "$${ppc}" ] ; then \
! 				${MV} process.i386.o process.o ; \
! 			fi ; \
! 		fi ; \
! 		if [ -n "$${ppc}" -a -n "$${i386}" ] ; then \
! 			lipo -create process.ppc.o process.i386.o -output process.o ;\
! 		fi ;; \
  	i386_*bsd*) \
  		cp ${srcdir}/process.i386.s process.S ; \
  		${CCOBJ} -DIGNORE_STDS_H -E -I${srcdir} -I${TOP_INCDIR} process.S > process.ss ; \
Index: openafs/src/lwp/lwp.c
diff -c openafs/src/lwp/lwp.c:1.27.2.6 openafs/src/lwp/lwp.c:1.27.2.7
*** openafs/src/lwp/lwp.c:1.27.2.6	Mon Jul 11 14:59:55 2005
--- openafs/src/lwp/lwp.c	Thu Mar  9 01:41:50 2006
***************
*** 17,23 ****
  #include <afsconfig.h>
  #include <afs/param.h>
  
! RCSID("$Header: /cvs/openafs/src/lwp/lwp.c,v 1.27.2.6 2005/07/11 18:59:55 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.7 2006/03/09 06:41:50 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
***************
*** 80,85 ****
--- 80,87 ----
  #ifdef __s390__
  #define MINFRAME    96
  #define STACK_ALIGN 8
+ #elif defined(AFS_DARWIN_ENV)
+ #define STACK_ALIGN 16
  #else
  #define STACK_ALIGN 4
  #endif
***************
*** 297,303 ****
--- 299,309 ----
  	    return LWP_ENOMEM;
  	}
  	if (stacksize < MINSTACK)
+ #ifdef AFS_DARWIN_ENV
+ 	    stacksize = 1008;
+ #else /* !AFS_DARWIN_ENV */
  	    stacksize = 1000;
+ #endif /* !AFS_DARWIN_ENV */
  	else
  	    stacksize =
  		STACK_ALIGN * ((stacksize + STACK_ALIGN - 1) / STACK_ALIGN);
***************
*** 342,353 ****
  	stackptr -= stacksize;
  	stackmemory = stackptr;
  #else
! 	if ((stackmemory = (char *)malloc(stacksize + 7)) == NULL) {
  	    Set_LWP_RC();
  	    return LWP_ENOMEM;
  	}
  	/* Round stack pointer to byte boundary */
  	stackptr = (char *)(8 * (((long)stackmemory + 7) / 8));
  #endif
  	if (priority < 0 || priority >= MAX_PRIORITIES) {
  	    Set_LWP_RC();
--- 348,368 ----
  	stackptr -= stacksize;
  	stackmemory = stackptr;
  #else
! #ifdef AFS_DARWIN_ENV
! 	if ((stackmemory = (char *)malloc(stacksize + STACK_ALIGN - 1)) == NULL)
! #else /* !AFS_DARWIN_ENV */
! 	if ((stackmemory = (char *)malloc(stacksize + 7)) == NULL)
! #endif /* !AFS_DARWIN_ENV */
! 	{
  	    Set_LWP_RC();
  	    return LWP_ENOMEM;
  	}
  	/* Round stack pointer to byte boundary */
+ #ifdef AFS_DARWIN_ENV
+ 	stackptr = (char *)(STACK_ALIGN * (((long)stackmemory + STACK_ALIGN - 1) / STACK_ALIGN));
+ #else /* !AFS_DARWIN_ENV */
  	stackptr = (char *)(8 * (((long)stackmemory + 7) / 8));
+ #endif /* !AFS_DARWIN_ENV */
  #endif
  	if (priority < 0 || priority >= MAX_PRIORITIES) {
  	    Set_LWP_RC();
***************
*** 372,379 ****
--- 387,398 ----
  		    stackptr + MINFRAME);
  #else
  #if defined(AFS_SGI62_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ #ifdef sys_x86_darwin_80
+ 	savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 16 - sizeof(void *));	/* 16 = 2 * jmp_buf_type */
+ #else /* !sys_x86_darwin_80 */
  	/* Need to have the sp on an 8-byte boundary for storing doubles. */
  	savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 16);	/* 16 = 2 * jmp_buf_type */
+ #endif /* !sys_x86_darwin_80 */
  #else
  #if defined(AFS_SPARC64_LINUX20_ENV) || defined(AFS_SPARC_LINUX20_ENV)
  	savecontext(Create_Process_Part2, &temp2->context, stackptr + stacksize - 0x40);	/* lomgjmp does something
Index: openafs/src/lwp/process.c
diff -c openafs/src/lwp/process.c:1.21 openafs/src/lwp/process.c:1.21.2.2
*** openafs/src/lwp/process.c:1.21	Tue Feb  3 01:23:38 2004
--- openafs/src/lwp/process.c	Fri Mar 31 00:53:01 2006
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/lwp/process.c,v 1.21 2004/02/03 06:23:38 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.2 2006/03/31 05:53:01 shadow Exp $");
  
  #include <stdio.h>
  #include <assert.h>
***************
*** 33,60 ****
  afs_int32
  savecontext(char (*ep) (), struct lwp_context *savearea, char *newsp)
  {
! #if defined(AFS_IA64_LINUX20_ENV)
!     register unsigned long sp __asm__("r12");
! #elif defined(AFS_AMD64_LINUX24_ENV)
!     register unsigned long sp __asm__("sp");
! #elif defined(AFS_HPUX1122_ENV)
! /* don't need anything special, will use
!  * ucontext.uc_stack.ss_sp as it matches r12.
!  * This should also work for Linux,
!  * but dont have system to test DEE
!  */
! #else
! #error	"You need to update stack pointer register for this platform"
  #endif
  
      PRE_Block = 1;
  
      savearea->state = 0;
      getcontext(&savearea->ucontext);
! #if defined(AFS_HPUX1122_ENV)
!     savearea->topstack = savearea->ucontext.uc_stack.ss_sp;
  #else
!     savearea->topstack = sp;
  #endif
      switch (savearea->state) {
      case 0:
--- 33,51 ----
  afs_int32
  savecontext(char (*ep) (), struct lwp_context *savearea, char *newsp)
  {
! #if defined(AFS_LINUX20_ENV)
!     /* getcontext does not export stack info */
!     int stackvar;
  #endif
  
      PRE_Block = 1;
  
      savearea->state = 0;
      getcontext(&savearea->ucontext);
! #if defined(AFS_LINUX20_ENV)
!     savearea->topstack = &stackvar;
  #else
!     savearea->topstack = savearea->ucontext.uc_stack.ss_sp;
  #endif
      switch (savearea->state) {
      case 0:
***************
*** 98,104 ****
  # else
  #  define LWP_SP JB_SP
  # endif
! #elif	defined(AFS_HPUX_ENV)
  #define	LWP_SP	1
  #elif	defined(AFS_LINUX20_ENV)
  #if defined(AFS_PPC_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
--- 89,95 ----
  # else
  #  define LWP_SP JB_SP
  # endif
! #elif	defined(AFS_HPUX_ENV) || defined(AFS_PARISC_LINUX24_ENV)
  #define	LWP_SP	1
  #elif	defined(AFS_LINUX20_ENV)
  #if defined(AFS_PPC_LINUX20_ENV) || defined(AFS_PPC64_LINUX20_ENV)
Index: openafs/src/lwp/process.i386.s
diff -c openafs/src/lwp/process.i386.s:1.5.2.1 openafs/src/lwp/process.i386.s:1.5.2.3
*** openafs/src/lwp/process.i386.s:1.5.2.1	Wed Aug 25 03:00:41 2004
--- openafs/src/lwp/process.i386.s	Fri Feb 17 12:27:54 2006
***************
*** 59,68 ****
  L1:
  	jmp	*f(%ebp)			/* ebx = &f */
  
- /* Shouldn't be here....*/
- 
- 	call	_C_LABEL(abort)
- 
  /*
   * returnto(area2)
   *	struct savearea *area2;
--- 59,64 ----
***************
*** 83,88 ****
  	popl	%ebp
  	ret
  
- /* I see, said the blind man, as he picked up his hammer and saw! */
- 	pushl	$1234
- 	call	_C_LABEL(abort)
--- 79,81 ----
Index: openafs/src/lwp/test/Makefile.in
diff -c openafs/src/lwp/test/Makefile.in:1.3 openafs/src/lwp/test/Makefile.in:1.3.8.1
*** openafs/src/lwp/test/Makefile.in:1.3	Thu Nov  1 00:00:20 2001
--- openafs/src/lwp/test/Makefile.in	Thu Mar  9 01:41:50 2006
***************
*** 11,17 ****
  INCDIRS= -I.. -I${DESTDIR}/include 
  LIBS= ../liblwp.a
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${XCFLAGS}
  
  system noversion: test
  
--- 11,17 ----
  INCDIRS= -I.. -I${DESTDIR}/include 
  LIBS= ../liblwp.a
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${LDIRS} ${XCFLAGS} ${ARCHFLAGS}
  
  system noversion: test
  
Index: openafs/src/lwp/test/selsubs.c
diff -c openafs/src/lwp/test/selsubs.c:1.8 openafs/src/lwp/test/selsubs.c:1.8.2.1
*** openafs/src/lwp/test/selsubs.c:1.8	Tue Jul 15 19:15:47 2003
--- openafs/src/lwp/test/selsubs.c	Mon Mar 20 08:41:32 2006
***************
*** 29,35 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/lwp/test/selsubs.c,v 1.8 2003/07/15 23:15:47 shadow Exp $");
  
  
  #include "lwp.h"
--- 29,35 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/lwp/test/selsubs.c,v 1.8.2.1 2006/03/20 13:41:32 jaltman Exp $");
  
  
  #include "lwp.h"
***************
*** 150,155 ****
--- 150,156 ----
      struct timeval now;
      struct timezone tz;
      struct tm *ltime;
+     time_t tt;
      int code;
      PROCESS pid;
      extern char *program;
***************
*** 157,163 ****
      code = gettimeofday(&now, &tz);
      assert(code == 0);
  
!     ltime = localtime((time_t *) & now.tv_sec);
  
      LWP_CurrentProcess(&pid);
      fprintf(stderr, "%s 0x%x %02d:%02d:%02d.%d: ", program ? program : "",
--- 158,165 ----
      code = gettimeofday(&now, &tz);
      assert(code == 0);
  
!     tt = now.tv_sec;
!     ltime = localtime(&tt);
  
      LWP_CurrentProcess(&pid);
      fprintf(stderr, "%s 0x%x %02d:%02d:%02d.%d: ", program ? program : "",
Index: openafs/src/man/afs_ftpd.1
diff -c openafs/src/man/afs_ftpd.1:1.1 openafs/src/man/afs_ftpd.1:removed
*** openafs/src/man/afs_ftpd.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/afs_ftpd.1	Fri Apr 14 09:27:29 2006
***************
*** 1,69 ****
- ftpd (AFS version)         AFS Commands      ftpd (AFS version)
- 
- 
- NAME
- 
-    ftpd  (AFS  version) -- initialize  Internet  File Transfer
- 
-                        Protocol server.
- 
- 
-    /usr/etc/ftpd  [-d]  [-l]  [-ttimeout]
- 
- DESCRIPTION
- 
-    Functions like the standard UNIX ftpd, except that  it  also
-    authenticates   the  issuer  of  the  ftp  command  (who  is
-    presumably  working  on   a   remote   machine)   with   the
-    Authentication  Server  in  the local cell (the home cell of
-    the machine where ftpd is running).  The  authentication  is
-    based  on  the  user  name  and password provided at the ftp
-    prompts on the remote machine.  The  Cache  Manager  on  the
-    machine   running  ftpd  stores  the  newly  created  token,
-    identifying it by PAG rather than by the user's UNIX UID.
- 
-    The issuer of ftp may be working in a foreign cell, as  long
-    as the user name and password provided are valid in the cell
-    where ftpd is running.
- 
-    If the user name under which ftp is issued does not exist in
-    the  Authentication  Database  for  the  cell  where ftpd is
-    running, or the issuer provides  the  wrong  password,  then
-    ftpd  logs the user into the UNIX file system of the machine
-    where ftpd is running.  The  success  of  this  local  login
-    depends  on  the  user  name appearing in the local password
-    file and on the user providing the correct  local  password.
-    In  the case of a local login, AFS server processes consider
-    the issuer of ftp to be anonymous.
- 
-    In the configuration recommended  by  Transarc  Corporation,
-    the  AFS  version  of  ftpd  is substituted for the standard
-    version (only one of the versions can run at  a  time).  The
-    administrator then has two choices:
- 
-       - name the binary for the AFS version something like
-         ftpd.afs, leaving the standard  version  as  ftpd.
-         Change   inetd.conf  to  refer  to  ftpd.afs;  the
-         standard version is not referenced.
- 
-       - name the binary  for  the  AFS  version  ftpd  and
-         rename  the  binary  for  the  standard version to
-         something like ftpd.old.  No change to  inetd.conf
-         is  necessary,  but  it is not as obvious that the
-         standard version of ftpd is no longer in use.
- 
- ARGUMENTS
- 
-    See the UNIX manual page for ftpd.
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    See the UNIX manual page for ftpd.
- 
- MORE INFORMATION
- 
-    UNIX manual page for ftp
- 
-    UNIX manual page for ftpd
--- 0 ----
Index: openafs/src/man/afs_inetd.1
diff -c openafs/src/man/afs_inetd.1:1.1 openafs/src/man/afs_inetd.1:removed
*** openafs/src/man/afs_inetd.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/afs_inetd.1	Fri Apr 14 09:27:29 2006
***************
*** 1,163 ****
- inetd (AFS version)        AFS Commands     inetd (AFS version)
- 
- 
- NAME
- 
-    inetd (AFS version) -- initialize Internet service daemon.
- 
- 
-    /etc/inetd  [-d]  [<configfile>]
- 
- DESCRIPTION
- 
-    Functions  like  the  standard  UNIX  inetd  in  invoking an
-    Internet service daemon (itself called "inetd") that handles
-    remotely-issued  commands.    The AFS inetd enables users of
-    the remote services it supports to access those services  as
-    authenticated   AFS   users,  provided  that  the  supported
-    services are also AFS versions capable of passing AFS tokens
-    (authentication   information).      Examples  of  supported
-    services are rcp and rsh.
- 
-    AFS inetd can service the  standard  UNIX  versions  of  the
-    remote  services,  but  it  is  instead recommended that the
-    standard UNIX version of inetd be run in parallel  with  the
-    AFS  version.  Name the AFS version something like inetd.afs
-    and use it to service requests from  AFS-modified  programs;
-    use  standard  inetd  to service requests from standard UNIX
-    programs.  This  separation  requires  using  two  different
-    inetd.conf      files,      as      described     in     the
-    REQUIREMENTS/RESTRICTIONS section.
- 
- REQUIREMENTS/RESTRICTIONS
- 
-    Several  configuration  changes  are  necessary  for   token
-    passing  to  work  correctly  with the AFS version of inetd.
-    There may be other UNIX-based requirements/restrictions  not
-    mentioned   here;  consult  the  UNIX  manual  page.    (One
-    important restriction is that there can be no blank lines in
-    the configuration file other than at the end.)
- 
-    The  requirements/restrictions  include the following.  They
-    assume that inetd.afs is running in parallel  with  standard
-    inetd.
- 
-       - For  token  passing to work, the request must come
-         from the AFS version of the remote  service  (such
-         as  AFS rcp or AFS rsh).  If the remote service is
-         the  standard  UNIX  version,  it  will  not  pass
-         tokens.    The  issuer  of  the  remote command is
-         authenticated only in the local UNIX file  system,
-         not  with  AFS, so the AFS server processes in the
-         local cell consider the issuer to be anonymous.
- 
-       - The machine's reboot configuration  file  (/etc/rc
-         or equivalent) should be altered so that it starts
-         both standard inetd and inetd.afs.
- 
-       - An AFS-specific inetd.conf  file,  perhaps  called
-         inetd.conf.afs,   should   exist   alongside   the
-         standard  one.    When   initializing   inetd.afs,
-         specify  this  configuration  file rather than the
-         standard one.
- 
-         Each line in the inetd.conf.afs file must  include
- 
- 
- 
-         an  additional  field,  fifth  from  the  left, to
-         specify the identity under which the program is to
-         run.   The normal choice is "root."  The following
-         sample shows the only lines that should appear  in
-         this file:
- 
-             ta-rauth stream tcp nowait root internal
-             shell    stream tcp nowait root /usr/etc/r
-             login    stream tcp nowait root /usr/etc/r
- 
-         Substitute   appropriate  values  for  the  binary
-         locations and names on the shell and login  lines.
-         Include  the login line only if the AFS version of
-         login is also in use in the cell; otherwise, refer
-         to  login  in the standard inetd.conf instead.  In
-         addition, if the inetd.cond.afs file is used on  a
-         machine  with  a  Sun  system type, change rshd to
-         in.rshd and change rlogind.afs  to  in.rlogind.afs
-         on the shell and login lines, respectively.
- 
-       - The   standard  inetd.conf  (referred  to  by  the
-         standard inetd) should be altered: comment out the
-         shell  line and, if the AFS version of login is in
-         use in the cell, the login line.    References  to
-         these  programs  appear in inetd.conf.afs instead.
-         Retain the login line if AFS login  is  not  being
-         used.    Alter  the  ftp  line to refer to the AFS
-         version of ftpd, if it  was  substituted  for  the
-         standard  version.   Do not insert the extra fifth
-         column into standard inetd.conf  if  it  does  not
-         already  appear  there.    See the EXAMPLE section
-         below for an illustration.
- 
-       - The  following  two  lines  must  appear  in   the
-         /etc/services  file  on  the machine running inetd
-         (as well as on the machine running modified rcp or
-         rsh).    On  NeXT  machines, this information must
-         appear in the  NetInfo  database  rather  than  in
-         /etc/services.
- 
-            auth 113/tcp authentication
-            ta-rauth 601/tcp rauth
- 
- ARGUMENTS
- 
-    See the UNIX manual page for inetd.
- 
- EXAMPLE
- 
-    The  following  are  sample  inetd.conf.afs  and  inetd.conf
-    files, appropriate for use  when  inetd.afs  is  running  in
-    parallel  with standard inetd and AFS login is being used in
-    the  cell.    Changes   to   standard   inetd.conf   include
-    referencing   the   AFS  version  of  the  ftpd  binary  and
-    commenting out shell and login.  The example inetd.conf does
-    not  include  the  extra  fifth  column.    Do not use these
-    examples without modifying them appropriately for the  local
-    machine type or cell.
- 
- 
- 
-        # AFS version of Internet server configuration datab
-        #(EXAMPLE ONLY)
-        #
-        ta-rauth stream tcp nowait root internal
-        shell    stream tcp nowait root /usr/etc/rshd
-        login    stream tcp nowait root /usr/etc/rlogind.afs
- 
- 
- 
-        # Standard version of Internet server configuration
-        #(EXAMPLE ONLY)
-        #
-        ftp     stream  tcp     nowait  /etc/ftpd.afs   ftpd
-        telnet  stream  tcp     nowait  /etc/telnetd    teln
-        #shell  stream  tcp     nowait  /etc/rshd       rshd
-        #login  stream  tcp     nowait  /etc/rlogind    rlog
-        finger  stream  tcp     nowait  /usr/etc/fingd  fing
-        uucp    stream  tcp     nowait  /etc/uucpd      uucp
-        exec    stream  tcp     nowait  /etc/rexecd     rexe
-        comsat  dgram   udp     wait    /etc/comsat     coms
-        talk    dgram   udp     wait    /etc/talkd      talk
-        ntalk   dgram   udp     wait    /usr/etc/ntalkd talk
-        time    dgram   udp     wait    /etc/miscd      time
- 
- PRIVILEGE REQUIRED
- 
-    See the UNIX manual page for inetd.
- 
- MORE INFORMATION
- 
-    rcp (AFS version)
- 
-    rsh (AFS version)
- 
-    UNIX manual page for inetd
--- 0 ----
Index: openafs/src/man/afs_login.1
diff -c openafs/src/man/afs_login.1:1.1 openafs/src/man/afs_login.1:removed
*** openafs/src/man/afs_login.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/afs_login.1	Fri Apr 14 09:27:29 2006
***************
*** 1,204 ****
- login (AFS version)        AFS Commands     login (AFS version)
- 
- 
- NAME
- 
-    login (AFS version) -- login to AFS and UNIX file systems.
- 
- 
-    login [<user name>]
- 
-    Authenticates  the issuer with the AFS Authentication Server
-    in the local cell  and  logs  him  or  her  into  the  local
-    machine's UNIX file system.  More precisely, AFS login:
- 
-       - creates a new "process authentication group" (PAG)
-         associated with the issuer and the  command  shell
-         where  the  command  is issued.  A PAG is a number
-         guaranteed to identify the issuer uniquely to  the
-         local  Cache  Manager.  The Cache Manager uses the
-         PAG, instead of the issuer's UNIX UID, to identify
-         him  or  her  in  the credential structure that it
-         creates to track each user.
- 
-       - authenticates the user with the AFS Authentication
-         Server and obtains a "token"; the other AFS server
-         processes in the cell accept the token as  partial
-         proof that the user is a legitimate AFS user.  The
-         Cache Manager stores the token in  the  credential
-         structure  along  with the PAG, and presents it to
-         AFS server processes as necessary.
- 
-       - logs the user into the local UNIX file system
- 
-    The lifetime of the token resulting from this command is the
-    smallest of the following:
- 
-       - the  "maximum  ticket  lifetime"  recorded  in the
-         "afs" entry in the Authentication Database.    The
-         default  is 100 hours.  Administrators can inspect
-         this value using kas examine, and change it  using
-         kas setfields.
- 
-       - the  "maximum  ticket  lifetime"  recorded  in the
-         issuer's  Authentication  Database  entry.     The
-         default  is  25  hours for user entries created by
-         the AFS 3.1 or later version of the Authentication
-         Server,  and 100 hours for user entries created by
-         the AFS 3.0 version of the Authentication  Server.
-         Administrators  and  the  user himself/herself can
-         inspect  this   value   using   kas examine,   and
-         administrators can change it using kas setfields.
- 
-       - the  "maximum  ticket  lifetime"  recorded  in the
-         "krbtgt.CELLNAME"  entry  in  the   Authentication
-         Database;  this  entry  corresponds to the ticket-
-         granting ticket used internally in generating  the
-         token.  The default is 720 hours (30 days).
- 
-    If  none  of  these  defaults  have  been  changed, then the
-    standard  token  lifetime  is  25  hours  for  users   whose
-    Authentication  Database entries were created by the AFS 3.1
-    or later version of the Authentication Server, and 100 hours
-    for users whose Authentication Database entries were created
-    by the AFS 3.0 version of the Authentication  Server.    The
- 
- 
- 
-    user  can  issue  klog  to  request a token with a different
-    lifetime.
- 
-    Using a PAG instead of the UNIX UID to distinguish users has
-    two advantages.
- 
-       - It  means  that  processes  spawned  by  the  user
-         inherit the PAG and so share the token; thus  they
-         gain  access  to  AFS  as  the authenticated user.
-         This is important in many environments where,  for
-         example,  printer  and  other  daemons  run  under
-         identities (such as "root") that  the  AFS  server
-         processes  recognize  only  as  anonymous.  Unless
-         PAGs  are  used,  such   daemons   cannot   access
-         information   in   directories  protected  against
-         system:anyuser.
- 
-       - It closes  a  potential  security  loophole:  UNIX
-         allows  anyone  already  logged  in as "root" on a
-         machine to assume any other  identity  by  issuing
-         su.    If the credential structure were identified
-         by a UNIX UID rather than a PAG, then assuming the
-         same  UID  would mean being able to use the token,
-         too.  Use of a PAG  as  an  identifier  eliminates
-         that possibility.
- 
-    The  process  of  authenticating with the AFS Authentication
-    Server is as follows:
- 
-       1. The login program checks the user's entry in  the
-          local /etc/passwd file.
- 
-          If  no  entry  exists,  or  if  an asterisk ( * )
-          appears in the password field, the login  attempt
-          fails.
- 
-          If the entry exists, the attempt proceeds to step
-          LOGIN.PAG.
- 
-       2. The  login  program  invokes  the  command   that
-          creates a PAG.
- 
-       3. The  login program converts the password provided
-          by the user into an encryption key and encrypts a
-          packet of data with the key.  It sends the packet
-          to   an   AFS   Authentication   Server.      The
-          Authentication  Server  decrypts  the packet and,
-          depending  on  the  success  of  the  decryption,
-          judges  the  password to be correct or incorrect.
-          (Consult the AFS System Administrator's Guide for
-          more  information  on the "mutual authentication"
-          procedure used to verify  the  password  in  this
-          step.)
- 
-          If  the Authentication Server judges the password
-          incorrect, the  user  does  not  receive  an  AFS
-          token.  The attempt proceeds to step LOGIN.LOCAL.
-          If the Authentication Server judges the  password
-          correct,  it  issues a token to the user as proof
-          of AFS authentication.  The  login  program  also
-          logs  the  user  into the local UNIX file system.
- 
- 
- 
-          Step LOGIN.LOCAL is skipped.
- 
-       4. If no AFS token was granted in step 3, the  login
-          programattempts  to  log  the user into the local
-          UNIX  file  system,  by  comparing  the  password
-          provided to the local password file (/etc/passwd,
-          for instance).
- 
-          If the provided password  is  incorrect,  or  the
-          password   field   in  the  local  password  file
-          contains  anything  other  than  a   13-character
-          UNIX-encrypted  password  string,  then the login
-          attempt fails.
- 
-          If the password is correct, the  user  is  logged
-          into  the  local  UNIX  file  system  only.  (The
-          success of this attempt and the  failure  of  the
-          AFS authentication implies that the AFS and local
-          passwords  are  different  and  that  the  issuer
-          provided the latter.)
- 
- WARNINGS
- 
-    Each  PAG  uses two of the memory slots that the kernel uses
-    to record the UNIX groups associated with a user.   If  none
-    of  these  slots are available, the PAG creation fails.  The
-    use of two group slots per PAG does not  present  a  problem
-    with  most  operating  systems, which make at least 16 slots
-    available.
- 
-    The AFS version of  login  is  based  on  the  Berkeley  4.3
-    Distribution  and  does  not  include  the modified features
-    included in some proprietary versions of login.
- 
-    The AFS version of login works only on  machines  that  have
-    run afsd.
- 
- ARGUMENTS
- 
-    See  the  UNIX  manual page for login.  The AFS version does
-    not impose any  stronger  restrictions  on  acceptable  user
-    names than does the UNIX file system.
- 
- OUTPUT
- 
-    To distinguish the AFS version of login from other versions,
-    one  of  the  following  banners  appears  on  standard  out
-    (stdout) when the command executes successfully.
- 
-       AFS 3.0 Login
- 
-    or
- 
-       AFS 3.2 (R) Login
- 
-    Various  error  messages  appear if the login attempt is not
-    successful.  The "login:" prompt normally returns  following
-    the  error  messages, giving the user another chance to type
-    the password correctly.
- 
- PRIVILEGE REQUIRED
- 
- 
- 
-    None.
- 
- 
- 
- MORE INFORMATION
- 
-    rlogind (AFS version)
- 
-    UNIX manual page for login
--- 0 ----
Index: openafs/src/man/afs_rcp.1
diff -c openafs/src/man/afs_rcp.1:1.1 openafs/src/man/afs_rcp.1:removed
*** openafs/src/man/afs_rcp.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/afs_rcp.1	Fri Apr 14 09:27:29 2006
***************
*** 1,134 ****
- rcp (AFS version)          AFS Commands       rcp (AFS version)
- 
- 
- NAME
- 
-    rcp (AFS version) -- copy file on remote machine.
- 
- 
-                                                  +
-    rcp [-p] <file1> <file2>  rcp [-r] [-p] <file>  <directory>
- 
- DESCRIPTION
- 
-    Functions  like  the standard UNIX rcp, except it allows the
-    issuer to use the remote machine's Cache Manager  to  access
-    AFS  files as an authenticated AFS user.  The command passes
-    a copy of the AFS token which the  issuer  obtained  on  the
-    local  machine  to  the remote machine's Cache Manager.  The
-    remote Cache Manager can use the token to gain authenticated
-    access to AFS.
- 
-    Token  passing  is most effective if both the remote machine
-    and local machine belong to the same cell, because  rcp  can
-    pass  only  one token even if the user has several tokensMit
-    passes the token that is marked [1] in the output  from  the
-    tokens  command.  If the remote and local machine are not in
-    the same cell, the possibilities are:
- 
-       - the token passed is for  the  cell  to  which  the
-         remote  machine  belongs.  The issuer accesses the
-         remote cell's AFS file tree  as  an  authenticated
-         AFS user, but is considered anonymous in the local
-         cell.    This  means  that  the  issuer  can  only
-         exercise    the    access    rights   granted   to
-         system:anyuser in the local AFS file  tree.    For
-         instance,  a file being copied into the local cell
-         can only be copied into a UNIX directory or an AFS
-         directory  where  system:anyuser  has  the  INSERT
-         right.
- 
-       - the token passed is for  the  cell  to  which  the
-         local  machine  belongs.   The issuer accesses the
-         remote cell's AFS file tree as anonymous,  and  so
-         can  only  exercise  the  access rights granted to
-         system:anyuser.
- 
-    In addition to running the AFS version of the rcp binary  on
-    the   machine   where  the  rcp  command  is  issued,  other
-    configuration changes are necessary  for  token  passing  to
-    work  properly.    See the REQUIREMENTS/RESTRICTIONS section
-    for a list.
- 
-    The AFS version of  rcp  is  compatible  with  the  standard
-    inetd,  but  token passing works only if the AFS versions of
-    both programs are being used.    If  only  one  of  them  is
-    modified,  the  issuer  will  access  AFS  files through the
-    remote machine as anonymous.
- 
- WARNINGS
- 
-    AFS rcp does  not  allow  "third  party  copies",  in  which
-    neither  source  nor  target file is on the current machine.
-    Standard UNIX rcp claims to provide this functionality.
- 
-    The protections required on the .rhosts file  in  order  for
- 
- 
- 
-    token   passing   to   work   with  this  command  (see  the
-    REQUIREMENTS/RESTRICTIONS section) are the opposite of those
-    necessary for token creation to work with the AFS version of
-    rlogind.
- 
-    For security's sake, use the AFS  version  of  rcp  only  in
-    conjunction  with  PAGs,  either by using the AFS version of
-    login or always issuing pagsh before obtaining tokens.
- 
- REQUIREMENTS/RESTRICTIONS
- 
-    Several  configuration  requirements  and  restrictions  are
-    necessary  for  token passing to work correctly with the AFS
-    version of rcp.  Some of these are also necessary  with  the
-    standard  UNIX  version,  but  are included here because the
-    issuer accustomed to AFS protections may not consider  them.
-    There  may be other UNIX-based requirements/restrictions not
-    mentioned  here;  consult  the  UNIX  manual  page.     (One
-    important  one  is  that  no stty commands may appear in the
-    issuer's shell initialization file, such as .cshrc.)
- 
-    The requirements/restrictions for token passing include  the
-    following.
- 
-       - The  local machine must be running the AFS version
-         of rcp, with the rcp binary file locally installed
-         to grant setuid privilege to the owner, "root".
- 
-       - The remote machine must be running the AFS version
-         of inetd.
- 
-       - The  following  two  lines  must  appear  in   the
-         /etc/services  file  on the local machine (as well
-         as on the remote machine running modified  inetd).
-         On  NeXT machines, this information must appear in
-         the NetInfo database rather than in /etc/services.
- 
-            auth 113/tcp authentication
-            ta-rauth 601/tcp rauth
- 
-       - If rcp is to consult an .rhosts file on the remote
-         machine,  the  file  must have UNIX protections no
-         more liberal than -rw-r--r--.  If .rhosts  resides
-         in   a  user  home  directory  in  AFS,  the  home
-         directory must also  grant  the  LOOKUP  and  READ
-         rights to system:anyuser.
- 
- ARGUMENTS
- 
-    Consult the UNIX manual page for rcp.
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    inetd (AFS version)
- 
-    UNIX manual page for rcp
- 
-    rlogind (AFS version)
- 
- 
- 
-    tokens
--- 0 ----
Index: openafs/src/man/afs_rlogind.1
diff -c openafs/src/man/afs_rlogind.1:1.1 openafs/src/man/afs_rlogind.1:removed
*** openafs/src/man/afs_rlogind.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/afs_rlogind.1	Fri Apr 14 09:27:29 2006
***************
*** 1,91 ****
- rlogind (AFS version)      AFS Commands   rlogind (AFS version)
- 
- 
- NAME
- 
-    rlogind (AFS version) -- initialize remote login server.
- 
- 
-    /etc/rlogind
- 
- DESCRIPTION
- 
-    Functions  like the standard UNIX rlogind, except that it is
-    appropriate only for cells using  the  AFS  version  of  the
-    login program supplied by Transarc Corporation.
- 
-    The  AFS  modifications to rlogind are strictly internal and
-    are necessary so that remote AFS authentication is  possible
-    with the rlogin command.  When a user issues rlogin, the AFS
-    version of rlogind running on the remote machine invokes the
-    AFS  version of login; the user therefore obtains AFS tokens
-    on the remote machine.
- 
-    In the configuration recommended  by  Transarc  Corporation,
-    the  AFS  version of rlogind is substituted for the standard
-    versionMbut only if the AFS version of login is  also  being
-    used  in the cell. (Only one version of rlogind can run on a
-    machine at a time.)  The administrator then has two choices:
- 
-       - name the binary for the AFS version something like
-         rlogind.afs,   leaving  the  standard  version  as
-         rlogind.  Refer to rlogind.afs  in  inetd.conf.afs
-         (the  AFS  version of inetd.conf), and comment out
-         the reference  to  standard  rlogind  in  standard
-         inetd.conf.
- 
-       - name  the  binary  for the AFS version rlogind and
-         rename the binary  for  the  standard  version  to
-         something  like  rlogind.old.  Refer to rlogind in
-         inetd.conf.afs (the AFS  version  of  inetd.conf),
-         and  comment  out  the  reference  to  rlogind  in
-         standard inetd.conf.
- 
- WARNINGS
- 
-    The AFS version of rlogind is  not  available  for  the  AIX
-    2.2.1  operating  system.  (AIX  2.2.1  does not include the
-    standard rlogind either.)
- 
-    Do not install the AFS version of rlogind if the AFS version
-    of login is not being used in the cell.
- 
-    Remote AFS authentication is possible with rlogin only if
- 
-    EITHER no .rhosts file exists on the machine where rlogind
-    is running
- 
-    OR .rhosts exists on the machine where rlogind is running, b
-    has mode bits more liberal than -rw-r--r--.  If .rhosts has
-    mode bits as restrictive as -rw-r--r--, then rlogind logs th
-    issuer of the remote rlogin command into the local UNIX file
-    system without prompting for a password.  The issuer does no
-    tokens (authenticate with AFS), because that requires provid
-    password.  The user can, however, obtain tokens by issuing p
- 
- 
- 
-    and klog after establishing the connection.
- 
-    The  protection  required  on  .rhosts for token creation to
-    work properly are exactly opposite those necessary  for  the
-    AFS  versions of rcp and rsh to handle tokens properly.  The
-    recommended solution is to configure .rhosts so that rcp and
-    rsh work properly and to use telnet instead of rlogin.
- 
-    No  modifications  to  rlogin  itself  are necessary for AFS
-    authentication to work.
- 
- PRIVILEGE REQUIRED
- 
-    See the UNIX manual page for rlogind.
- 
- MORE INFORMATION
- 
-    login (AFS version)
- 
-    rcp (AFS version)
- 
-    UNIX manual page for rlogind
- 
-    rsh (AFS version)
--- 0 ----
Index: openafs/src/man/afs_rsh.1
diff -c openafs/src/man/afs_rsh.1:1.1 openafs/src/man/afs_rsh.1:removed
*** openafs/src/man/afs_rsh.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/afs_rsh.1	Fri Apr 14 09:27:29 2006
***************
*** 1,109 ****
- rsh (AFS version)          AFS Commands       rsh (AFS version)
- 
- 
- NAME
- 
-    rsh (AFS version) -- open shell on remote machine.
- 
- 
-    rsh host [-l <username>] [-n] <command>  host [-l
-    <username>] [-n] <command>
- 
- DESCRIPTION
- 
-    Functions  like the standard UNIX rsh, except that it allows
-    the issuer to execute commands on the remote machine  as  an
-    authenticated  AFS  user.   The command passes a copy of the
-    AFS token that the issuer has obtained on the local  machine
-    to  the  remote  machine's  Cache Manager.  The remote Cache
-    Manager can use the token to have the issuer  recognized  as
-    an authenticated AFS user.
- 
-    Token  passing  is most effective if both the remote machine
-    and local machine belong to the same cell, because  rsh  can
-    pass  only  one token even if the user has severalMit passes
-    the token that is marked [1] in the output from  the  tokens
-    command.    If  the  remote and local machine are not in the
-    same cell, the token should be for the  cell  to  which  the
-    remote  machine  belongs,  so  that the remote cell's server
-    processes will recognize the issuer as authenticated.
- 
-    In addition to running the AFS version of the rsh binary  on
-    the   machine   where  the  rsh  command  is  issued,  other
-    configuration changes are necessary  for  token  passing  to
-    work  properly.    See the REQUIREMENTS/RESTRICTIONS section
-    for a list.
- 
-    The AFS version of  rsh  is  compatible  with  the  standard
-    inetd,  but  token passing only works if the AFS versions of
-    both programs are being used.    If  only  one  of  them  is
-    modified,  the  issuer  will  access  AFS  files through the
-    remote machine as anonymous.
- 
- WARNINGS
- 
-    The protections required  on  the  .rhosts  file  for  token
-    passing  to  work  correctly  with  this  command  (see  the
-    REQUIREMENTS/RESTRICTIONS section) are the opposite of those
-    necessary  for token creation to work correctly with the AFS
-    version of rlogind.
- 
-    For security's sake, use the AFS  version  of  rsh  only  in
-    conjunction  with  PAGs,  either by using the AFS version of
-    login or always issuing pagsh before obtaining tokens.
- 
- REQUIREMENTS/RESTRICTIONS
- 
-    Several  configuration  requirements  and  restrictions  are
-    necessary  for  token passing to work correctly with the AFS
-    version of rsh.  Some of these are also necessary  with  the
-    standard  UNIX  version,  but  are included here because the
-    issuer used to AFS protections may not be inclined to  think
-    of    them.        There    may    be    other    UNIX-based
-    requirements/restrictions not mentioned  here;  consult  the
-    UNIX  manual  page.    (One  important  one  is that no stty
- 
- 
- 
-    commands may appear in  the  issuer's  shell  initialization
-    file, such as .cshrc.)
- 
-    The  requirements/restrictions for token passing include the
-    following.
- 
-       - The local machine must be running the AFS  version
-         of  rsh, with the binary file locally installed to
-         grant setuid privilege to the owner, "root".
- 
-       - The remote machine must be running the AFS version
-         of inetd.
- 
-       - The   following  two  lines  must  appear  in  the
-         /etc/services file on the local machine  (as  well
-         as  on the remote machine running modified inetd).
-         On NeXT machines, this information must appear  in
-         the NetInfo database rather than in /etc/services.
- 
-            auth 113/tcp authentication
-            ta-rauth 601/tcp rauth
- 
-       - If rsh is to consult an .rhosts file on the remote
-         machine, the file must have  UNIX  protections  no
-         more  liberal than -rw-r--r--.  If .rhosts resides
-         in  a  user  home  directory  in  AFS,  the   home
-         directory  must  also  grant  the  LOOKUP and READ
-         rights to system:anyuser.
- 
- ARGUMENTS
- 
-    Consult the UNIX manual page for rsh.
- 
- MORE INFORMATION
- 
-    inetd (AFS version)
- 
-    UNIX manual page for rsh
- 
-    rlogind (AFS version)
- 
-    tokens
--- 0 ----
Index: openafs/src/man/afsd.1
diff -c openafs/src/man/afsd.1:1.1 openafs/src/man/afsd.1:removed
*** openafs/src/man/afsd.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/afsd.1	Fri Apr 14 09:27:29 2006
***************
*** 1,462 ****
- afsd                       AFS Commands                   afsd
- 
- 
- NAME
- 
-    afsd  -- initialize   Cache   Manager   and  start  related
- 
-                        daemons.
- 
- 
-    afsd  [-blocks <number of cache blocks>] [-files <number of
-    cache files>]
-    [-stat <number of status cache entries>] [-rootvol <root
-    volume>]
-    [-cachedir <cache directory>]  [-mountdir <AFS mount
-    directory>]
-    [-verbose]  [-debug]  [-nosettime]
-    [-daemons <number of background daemons>]  [-rmtsys]
-    [-memcache]  [-dcache <# entries>]  [-chunksize <chunk
-    exponent>]
- 
- ACCEPTABLE ABBREVIATIONS
- 
-    This command does not use the syntax conventions of the  AFS
-    command  suites.    Therefore,  "afsd"  and all switches and
-    flags must be typed in full.
- 
- DESCRIPTION
- 
-    Initializes the Cache Manager on an AFS  client  machine  by
-    transferring   AFS-related  configuration  information  into
-    kernel  memory  and  starting   several   daemons.      More
-    specifically, afsd
- 
-       - sets  a  field in kernel memory that defines which
-         cell  the  machine  belongs  to.      Some   Cache
-         Manager-internal   operations   and  system  calls
-         consult this field to learn which cell to  execute
-         in.    (The  AFS  command  interpreters  refer  to
-         /usr/vice/etc/ThisCell instead.)
- 
-         This information is transferred  into  the  kernel
-         from the file /usr/vice/etc/ThisCell and cannot be
-         changed until afsd runs again.
- 
-       - places in kernel memory  the  names  and  Internet
-         addresses  of  the database server machines in the
-         local cell and (optionally) foreign  cells.    The
-         appearance of a cell's database server machines in
-         this list enables the  Cache  Manager  to  contact
-         them and so to access files in the cell.  Omission
-         of a cell from this list, or incorrect information
-         about  its  database server machines, prevents the
-         Cache Manager from accessing files in it.
- 
-         This information is transferred  into  the  kernel
-         from  the  file  /usr/vice/etc/CellServDB.   After
-         initialization, use the  fs   newcell  command  to
-         change  the kernel-resident list without having to
-         reboot.
- 
-       - determines whether the cache  is  on  disk  or  in
-         machine  memory.    The  default  is to use a disk
-         cache.  If the  -memcache  argument  is  provided,
- 
- 
- 
-         space  is allocated in machine memory for caching,
-         and disk space is not used even if the machine has
-         a disk.
- 
-       - defines  the  name  of  the  local  disk directory
-         devoted to caching, when -memcache  is  not  used.
-         If  necessary, afsd creates the directory (as long
-         as its parent directory  exists).    It  does  not
-         remove  from  the disk the directory that formerly
-         served this function, if any.
- 
-         The     second     field     in      the      file
-         /usr/vice/etc/cacheinfo  is  the  source  for this
-         name, and the standard value  is  /usr/vice/cache.
-         Use  the  -cachedir argument to override the value
-         from cacheinfo.
- 
-       - sets the size of the  cache,  for  both  disk  and
-         memory caches.
- 
-         The  afsd  program consults the third field in the
-         file /usr/vice/etc/cacheinfo to learn the  default
-         cache  size  in kilobyte blocks.  The value should
-         not exceed 90% to 95% of the disk space  available
-         on  the  cache partition (with a disk cache) or of
-         the machine's memory (with a memory cache).   This
-         is   because   the   cache  implementation  itself
-         requires a small amount of disk or machine memory.
- 
-         For either a disk or memory cache, use the -blocks
-         argument to override the value from cacheinfo.
- 
-         For  a  memory cache, the issuer can also override
-         the cacheinfo value by providing either
- 
-            * both -dcache  and  -chunksize,  to  set  both
-              number  of dcache entries and chunk size (see
-              below for definition  of  these  parameters).
-              In   this   case,  afsd  derives  cache  size
-              (overriding   the   cacheinfo    value)    by
-              multiplying  the  two  values.    Using  this
-              combination  is  not   recommended,   as   it
-              requires    the   issuer   to   perform   the
-              calculation  beforehand  to   determine   the
-              resulting cache size.
- 
-            * -dcache by itself. In this case, afsd derives
-              cache size (overriding the  cacheinfo  value)
-              by  multiplying  -dcache by the default chunk
-              size of 8 kilobytes.  Using this argument  is
-              not recommended, as it requires the issuer to
-              perform   the   calculation   beforehand   to
-              determine the resulting cache size.
- 
-         For  a  disk cache, the value defined in cacheinfo
-         or with -blocks is  an  absolute  upper  limit  on
-         cache  size;  values  provided for other arguments
-         cannot result in a larger cache.
- 
-         After  initialization,  use   fs setcachesize   to
-         change  the size of a disk cache without having to
- 
- 
- 
-         reboot;  the  value  set  with  that  command   is
-         overridden   the   next   time  afsd  runs.    The
-         fs setcachesize command does not work  for  memory
-         caches.  Instead, the machine must be rebooted.
- 
-       - sets  the  size  of  each  "chunk"  of data in the
-         cache, and by implication the amount of data  that
-         the Cache Manager requests at a time from the File
-         Server (how much data per "fetch" RPC,  since  AFS
-         uses partial file transfer).
- 
-         For a disk cache, each chunk is called a "V file",
-         so this parameter sets the maximum size of each  V
-         file;  the default is 64 kilobytes.  See below for
-         more on V files.
- 
-         For a memory cache, each chunk is a collection  of
-         memory blocks allocated together, so this sets the
-         size  of  each  collection;  the  default   is   8
-         kilobytes.
- 
-         For  both  types  of  cache,  use  the  -chunksize
-         argument to change the default  chunk  size.    To
-         guarantee proper chunk sizes, the integer provided
-         is used as an exponent on the number  2;  see  the
-         ARGUMENTS  section  for  details.    For  a memory
-         cache, if total cache size divided by  chunk  size
-         leaves a remainder, afsd rounds down the number of
-         dcache entries. resulting in  a  slightly  smaller
-         cache (see below for more on dcache entries).
- 
-       - sets  the number of empty "V files" created in the
-         cache directory for a disk cache.  Each file is  a
-         cache  chunk, and the Cache Manager caches data in
-         them as needed.  By default,  each  "V"  file  can
-         accommodate  up  to 64 kilobytes of data, since 64
-         kilobytes is the default  size  of  a  disk  cache
-         chunk.
- 
-         A  memory cache cannot use V files because it does
-         not use disk memory; instead the number of  chunks
-         is  equivalent  to  the number of "dcache entries"
-         (see below).
- 
-         The default number of V files  is  1000;  use  the
-         -files  argument to override it.  Since by default
-         each V file can accommodate 64 kilobytes, the only
-         reason  to increase from the default of 1000 is if
-         the cache size is greater than about 64  megabytes
-         (or  the  chunk  size  has  been  changed with the
-         -chunksize argument discussed above).
- 
-       - sets the number of "dcache entries"  allocated  in
-         machine  memory  for storing information about the
-         chunks in the cache.
- 
-         With     a     disk      cache,      the      file
-         /usr/vice/cache/CacheItems  on  disk  contains one
-         entry for each V file.   Some  of  the  CacheItems
-         entries,  by default 100, are duplicated as dcache
-         entries in machine memory for quicker access.
- 
- 
- 
-         With a memory cache, there is no CacheItems  file,
-         so  all  information about cache chunks must be in
-         memory as dcache  entries.    There  must  be  one
-         dcache entry for each cache chunk, so for a memory
-         cache number of dcache entries  equals  number  of
-         cache  chunks.    There  is  no  default number of
-         dcache entries for a memory cache;  instead,  afsd
-         derives it by dividing cache size by chunk size.
- 
-         Use  the  -dcache  argument  to  set the number of
-         dcache entries.    This  is  not  recommended  for
-         either  type  of  cache.  Increasing the number of
-         dcache  entries  for  a  disk  cache  may  improve
-         performance  marginally  because  more entries are
-         retrieved from memory rather than from  disk,  but
-         is  not  generally necessary.  Using this argument
-         is not recommended for a memory cache  because  it
-         requires the issuer to pre-calculate cache size by
-         multiplying this value times  chunk  size  (either
-         the   default   8   kilobytes   or  the  value  of
-         -chunksize).
- 
-       - sets the number of  "stat"  entries  available  in
-         machine  memory  for  caching  status  information
-         about cached AFS files.
- 
-         The default is 300;  use  the  -stat  argument  to
-         override the default.
- 
-       - defines  the  directory in the machine's file name
-         space at which the AFS file tree is mounted.
- 
-         The     first     field      in      the      file
-         /usr/vice/etc/cacheinfo  is  the  source  for  the
-         default directory name.   The  standard  value  is
-         /afs.   Use the -mountdir argument to override the
-         value from cacheinfo.
- 
-       - defines which volume corresponds to  the  root  of
-         the AFS file tree.
- 
-         The default is root.afs; use the -rootvol argument
-         to override it.  Note  that  although  the  volume
-         name  should  be  given  in the "base" (ReadWrite)
-         form, the  Cache  Manager  retains  its  bias  for
-         accessing  the  ReadOnly  version of the volumeMin
-         the  default  case,  root.afs.readonlyMif  it   is
-         available.
- 
-       - randomly  selects  a  file  server  machine in the
-         local cell as the source for the  "correct"  time.
-         Every  five minutes thereafter, the local clock is
-         adjusted (if necessary) to match the  file  server
-         machine's clock.
- 
-         Use  the  -nosettime  flag  to  prevent  afsd from
-         selecting a time standard.   This  is  recommended
-         only  on file server machines that are also acting
-         as clients.  File  server  machines  maintain  the
-         correct  time  using  the  Network  Time  Protocol
-         Daemon instead.
- 
- 
- 
-    In addition to setting cache configuration parameters,  afsd
-    starts  up  the  following  three types of daemons.  On most
-    system types, these daemons appear as  nameless  entries  in
-    the output of the ps command:
- 
-       - a  "callback"  daemon  that handles callbacks.  It
-         also  responds  to  the  File  Server's   periodic
-         probes,  which  check  that  the client machine is
-         still alive.
- 
-       - a  "maintenance"  daemon  that  performs   routine
-         periodic maintenance tasks, including
- 
-            * performing garbage collection
- 
-            * synchronizing files
- 
-            * probing the fileserver process on file server
-              machines every few minutes
- 
-            * refreshing information from ReadOnly  volumes
-              once per hour
- 
-            * doing  delayed  writes for NFS clients if the
-              machine is running the NFS/AFS Translator
- 
-            * keeping the machine's clock synchronized with
-              the chosen file server machine's
- 
-       - "background"  daemons  that improve performance by
-         pre-fetching  files  and   performing   background
-         (delayed) writes of saved data into AFS.
- 
-         The  default  number  of  background daemons is 2,
-         usually enough to  handle  up  to  5  simultaneous
-         users  of  the machine.  Use the -daemons argument
-         to increase the number of background  daemons,  if
-         the  machine  serves  more  users.  No more than 6
-         background daemons should ever be necessary.
- 
-    The default number of daemons is four (one callback  daemon,
-    one  maintenance  daemon,  and two background daemons).  The
-    issuer can alter only the number of background daemons; afsd
-    always  initializes  one callback daemon and one maintenance
-    daemon.
- 
-    AFS includes three configuration scripts that can be used to
-    modify  some  Cache  Manager  parameters on a client machine
-    that uses a disk cache.  Named  rc.afsd.small,  rc.afsd.med,
-    and   rc.afsd.large,   the   configuration  scripts  specify
-    suitable, predefined values for the  afsd  command's  -stat,
-    -dcache,  -daemons,  and  -volumes  switches.    They define
-    increasingly greater values for these switches according  to
-    the  configuration  and usage patterns of the client machine
-    on which the afsd command is run.  Refer to the  AFS  System
-    Administrator's Guide for more information about the scripts
-    and how to use them.
- 
- ARGUMENTS
- 
-    -blocks   specifies the number of kilobyte blocks to be made
- 
- 
- 
-              available  for  caching  in  the  machine's  cache
-              directory (for a disk  cache)  or  memory  (for  a
-              memory  cache),  overriding the default defined in
-              the third field of  /usr/vice/etc/cacheinfo.    It
-              should  not  exceed 90% to 95% of the actual space
-              available.   If  using  a  memory  cache,  do  not
-              combine this argument with -dcache, since doing so
-              could result in a  chunk  size  that  was  not  an
-              exponent of 2.
- 
-    -files    specifies  the  number of V files to be created in
-              the cache directory for a disk  cache,  overriding
-              the  default of 1000.  Each V file can accommodate
-              a "chunk" of data, which for a disk  cache  is  64
-              kilobytes by default.  Thus the default of 1000 is
-              adequate for any cache smaller than  64  megabytes
-              (unless  chunk  size  is changed with -chunksize).
-              Do not combine this argument with -memcache.
- 
-    -stat     specifies the number of entries in  the  machine's
-              memory  for recording status information about the
-              AFS files in the cache.  This value overrides  the
-              default of 300.
- 
-    -rootvol  names  the  Read Write volume corresponding to the
-              root directory for the AFS  file  tree  (which  is
-              usually  /afs).   This value overrides the default
-              of root.afs.
- 
-    -cachedir names the local disk directory to be used  as  the
-              cache.    This value overrides the default defined
-              in the  second  field  of  /usr/vice/etc/cacheinfo
-              (typically, /usr/vice/cache).
- 
-    -mountdir names  the  local disk directory on which to mount
-              the AFS file  tree.    This  value  overrides  the
-              default    defined   in   the   first   field   of
-              /usr/vice/etc/cacheinfo  (typically,  /afs).    If
-              /afs  is  not  used, the machine cannot access the
-              AFS global name space.
- 
-    -daemons  specifies the number of  "background"  daemons  to
-              run   on  the  machine.    These  daemons  improve
-              efficiency by doing  pre-fetching  and  background
-              writing  of  saved data.  This value overrides the
-              default of 2, which  is  adequate  for  a  machine
-              serving  up to five users.  It does not change the
-              number of  "callback"  or  "maintenance"  daemons,
-              which is always one each.
- 
-    -verbose  causes  afsd  to  produce a more detailed trace of
-              its activities than the default one.    The  trace
-              displays  on  standard  out  (stdout) unless it is
-              piped into a file.
- 
-    -debug    causes afsd to produce a highly detailed trace  of
-              its  activities, potentially useful to a developer
-              for  debugging  purposes.    The  trace  goes   to
-              standard output (stdout) by default.
- 
-    -nosettime
- 
- 
- 
-              prevents the machine from selecting  at  random  a
-              local  file  server machine to act as a source for
-              the "correct" time.  If this flag is omitted,  the
-              machine  selects  a  file server machine as a time
-              standard,  and  every  five   minutes   thereafter
-              adjusts  its  clock  to  avoid  drifting  from the
-              standard.
- 
-    -rmtsys   initializes an additional  "remote-system"  daemon
-              to  execute AFS-specific system calls on behalf of
-              NFS client machines.  This flag is necessary  only
-              if  the  machine is an NFS/AFS translator machine,
-              and if users on its NFS clients  want  to  execute
-              AFS commands.
- 
-    -memcache causes  afsd  to  initialize a memory cache rather
-              than a disk cache.  Do not combine this flag  with
-              -files.
- 
-    -dcache   sets  the  number  of  "dcache entries" in memory,
-              which are used to store  information  about  cache
-              chunks.    For  a  disk  cache, this overrides the
-              default of 100.  For a memory cache, this argument
-              effectively  sets the number of cache chunks.  Use
-              of this argument is not recommended for  a  memory
-              cache,   because   it   requires   the  issuer  to
-              pre-calculate  the  resulting  total  cache   size
-              (derived by multiplying this value by chunk size).
-              Do not combine this argument with  -blocks,  since
-              doing so could result in a chunk size that was not
-              an exponent of 2.
- 
-    -chunksize
-              sets  the  size  of each cache chunk.  The integer
-              provided, which should be between  0  and  20,  is
-              used as an exponent on the number 2.  It overrides
-                                                      16
-              the default of 16 for a  disk  cache  (2    is  64
-                                                         13
-              kilobytes)  and  13  for  a memory cache (2   is 8
-              kilobytes).  A value of 0 or less, or greater than
-              20,  sets  chunk  size to the appropriate default.
-              Values less than 10 (which sets chunk  size  to  a
-                          10
-              kilobyte,  2  )  are  not  recommended.  Combining
-              this argument  with  -dcache  is  not  recommended
-              because  it requires that the issuer pre-calculate
-              the cache size that results.
- 
- EXAMPLE
- 
-    This command is normally included in an initialization  file
-    such  as  /etc/rc,  rather  than  typed at the command shell
-    prompt.  For most disk caches, the appropriate form is
- 
-    /usr/vice/etc/afsd
- 
-    The following is appropriate when enabling a machine to  act
-    as  an  NFS/AFS  Translator  machine  serving more than five
-    users.
- 
-    /usr/vice/etc/afsd -daemons 4 -rmtsys
- 
- 
- 
-    The following initializes a memory cache and sets chunk size
-                      14
-    to 16 kilobytes (2  ).
- 
-    /usr/vice/etc/afsd -memcache -chunksize 14
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be logged into the machine's UNIX file system as
-    "root."
--- 0 ----
Index: openafs/src/man/dkload.1
diff -c openafs/src/man/dkload.1:1.1 openafs/src/man/dkload.1:removed
*** openafs/src/man/dkload.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/dkload.1	Fri Apr 14 09:27:29 2006
***************
*** 1,198 ****
- dkload                     AFS Commands                  dkload
- 
- 
- NAME
- 
-    dkload -- incorporate   external   libraries   into  kernel
- 
-                        without rebooting.
- 
- 
-    dkload  [-readonly]  [-quiet]  [-verbose]  [-syscallResult
-    <number>]
-    [-path <object path>]  [-ld_cmd <loader path>]
-    [-as_cmd <assembler path>]  [-nm_cmd <nm path>]
-    [-libcommon <path>] [-kernel_alloc <path>]
-                                                     +
-    [-name <library name>]  [<library to incorporate> ]
- 
- ACCEPTABLE ABBREVIATIONS
- 
-    This command does not use the syntax conventions of the  AFS
-    command  suites.   Therefore, "dkload" must be typed in full
-    and switches must always be included,  though  they  may  be
-    shortened as indicated.
- 
-    dkload  [-r]  [-q]  [-v]  [-s <number>] [-p <object path>]
-    [-ld <loader path>]
-    [-a <assembler path>]  [-nm <nm path>]  [-li <path>] [-k
-    <path>]
-                                                   +
-    [-na <library name>]  [<library to incorporate> ]
- 
- DESCRIPTION
- 
-    Loads  one  or more libraries into the memory version of the
-    local machine's kernel.  It does not alter the disk  version
-    of  the kernel (/vmunix or equivalent).  Its intended use is
-    loading the AFS routine library, lib.afs, into the kernel on
-    client machines.
- 
-    The  dynamic  loader  begins by requesting (from a low-level
-    kernel routine) allocation of a certain amount of memory  in
-    which  to  load the libraries.  It resolves cross-references
-    between  procedures  in  the  existing  kernel  and  in  the
-    libraries (referred to as "linking" the two).  The result is
-    a  list  of  memory  addresses  for   the   cross-referenced
-    procedures,  which the dynamic loader stores in a table.  It
-    generates  an  executable  version  of  the  libraries  with
-    correct  addresses  inserted for all of the necessary kernel
-    variables and procedures, and loads the executable into  the
-    memory space allocated in the first phase.
- 
- REQUIREMENTS
- 
-    The  dkload  binary  file should be available in the current
-    working directory, or the issuer must specify a pathname  in
-    the    command    name.      The   standard   directory   is
-    /usr/vice/etc/dkload     on     client     machines      and
-    /usr/afs/bin/dkload on file server machines.
- 
-    The file kalloc.o should be available in the current working
-    directory, or the issuer must specify a pathname with either
-    the -kernel_alloc or -path argument.  This file helps in the
-    first phase of dynamic loading:   allocating  kernel  memory
- 
- 
- 
-    for the libraries.  It is generated automatically during the
-    compilation of the dkload program.
- 
-    The file libcommon.a should  be  available  in  the  current
-    working  directory,  or  the  issuer must specify a pathname
-    with either the -libcommon or -path  argument.    This  file
-    helps  in  the  second  phase  of dynamic loading: resolving
-    cross-references.  It is generated automatically during  the
-    compilation of the dkload program.
- 
-    The library file(s) to be loaded (such as lib.afs) should be
-    available in the current working directory,  or  the  issuer
-    must use the -path argument to specify the correct path.
- 
-    The  binary  files for the standard UNIX commands ld, as and
-    nm should be available in a local disk directory included in
-    the  issuer's  $PATH  environment  variable.  Otherwise, the
-    issuer needs to use  the  -ld_cmd,  -as_cmd  and/or  -nm_cmd
-    arguments to specify the correct pathname.
- 
- ARGUMENTS
- 
-    -readonly       directs  the  command  interpreter to report
-                    the actions it would  perform  if  executing
-                    the command, rather than actually performing
-                    it.
- 
-    -quiet          suppresses the  trace  of  actions  that  by
-                    default appears on standard output (stdout).
- 
-    -verbose        increases  the  amount of information in the
-                    trace  that  appears  on   standard   output
-                    (stdout).    Multiple instances of this flag
-                    may be provided, resulting (up to a  certain
-                    point)  in  a  increasing level of detail in
-                    the trace.
- 
-    -syscallResult  specifies  the  memory  address   at   which
-                    allocation begins when the -readonly flag is
-                    provided.  This is useful  when  the  issuer
-                    wants  to  specify a memory address obtained
-                    during a previous aborted run of dkload.
- 
-                    Provide  this  argument  only   when   using
-                    -readonly.   The value may be either a large
-                    decimal or hexidecimal  number  (the  latter
-                    beginning  with  0x).    If this flag is not
-                    provided, the value defaults to  0xc1456780,
-                    which  may  not be acceptable on all machine
-                    types but has the advantage that  it  causes
-                    allocation to begin well above the addresses
-                    used by standard libraries.
- 
-    -path           specifies the directory in which the command
-                    interpreter  can  find kalloc.o, libcommon.a
-                    and each library to be loaded, if  they  are
-                    not  in  the current working directory.  The
-                    value of  this  argument  is  overridden  by
-                    -kernel_alloc   and   -libcommon,   or   the
-                    pathnames  given   for   each   library   to
-                    incorporate.
- 
- 
- 
-    -ld_cmd         specifies the pathname to the binary for the
-                    UNIX ld command, which  the  kernel  dynamic
-                    loader uses during the linking phase.
- 
-                    This  argument  is  necessary  only  if  the
-                    issuer's $PATH environment variable will not
-                    lead to the correct binary file.  The binary
-                    file cannot be in AFS, for  instance,  since
-                    the  dynamic  loader runs before the machine
-                    can access AFS.
- 
-    -as_cmd         specifies the pathname to the binary for the
-                    UNIX  as  command,  which the kernel dynamic
-                    loader uses during the linking phase.
- 
-                    This  argument  is  necessary  only  in  the
-                    conditions specified under -ld_cmd.
- 
-    -nm_cmd         specifies the pathname to the binary for the
-                    UNIX nm command, which  the  kernel  dynamic
-                    loader uses during the linking phase.
- 
-                    This  argument  is  necessary  only  in  the
-                    conditions specified under -ld_cmd.
- 
-    -libcommon      specifies the pathname  of  the  libcommon.a
-                    file.
- 
-                    This  argument is necessary only if the file
-                    does  not  reside  in  the  current  working
-                    directory  or if the -path argument does not
-                    indicate the correct directory for it.
- 
-    -kernel_alloc   specifies the pathname of the kalloc.o file.
- 
-                    This  argument  is  necessary  only  in  the
-                    conditions specified under -libcommon.
- 
-    -name           specifies  the  variable part of the library
-                    name to be loaded: the  command  interpreter
-                    loads        the        library       called
-                    "lib<library name>.a".    For  example,   if
-                    <library  name>  is  afs, then libafs.a gets
-                    loaded.
- 
-                    Provide  this   argument   OR   library   to
-                    incorporate.
- 
-    library to incorporate names each library to be incorporated
-                    into the kernel.
- 
-                    Provide this argument OR -name.
- 
- EXAMPLE
- 
-    The following loads in the AFS libraries.  It  assumes  that
-    all  files  can  be  found in the current directory or other
-    expected place.  The issuer desires extra trace information.
- 
-    % dkload -verbose -name afs
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be logged into the machine's UNIX file system as
-    "root" or at least have w access to /dev/mem and /dev/kmem.
--- 0 ----
Index: openafs/src/man/fileserver.1
diff -c openafs/src/man/fileserver.1:1.1 openafs/src/man/fileserver.1:removed
*** openafs/src/man/fileserver.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fileserver.1	Fri Apr 14 09:27:29 2006
***************
*** 1,177 ****
- fileserver                 AFS Commands              fileserver
- 
- 
- NAME
- 
-    fileserver -- initialize   File   Server  component  of  fs
- 
-                        process.
- 
- 
-    /usr/afs/bin/fileserver [-b <buffers>]  [-banner]  [-cb
-    <callbacks>]
-    [-d <debug level>]  [-k <stack size>]  [-l <large vnodes>]
-             [-oldvldb]  [-pctspare <percent>]  [-rxdbg]
-    [-rxdbge]  [-rxpck]
-    [-s <small vnodes>]  [-spare <kilobyte blocks>]
-    [-w <callback wait interval>]
-    [-c <check interval>]  [-ftpck <r ftp packets>]  [-noauth]
-             [-p <LWPs>]  [-r <r retry count>]  [-rpck <r
-    packets
- 
- DESCRIPTION
- 
-    Initializes the File Server component of the fs process.
- 
-    The arguments on fileserver allow the issuer to control many
-    aspects  of  its  behavior,  as  detailed  in  the ARGUMENTS
-    section.
- 
-    Perhaps  the  most  important  aspect  to  control  from  an
-    administrative standpoint is that by default the File Server
-    allows users to store up to a megabyte (1024  kilobytes)  of
-    data  in a volume after the volume's quota is exceeded.  The
-    user still cannot create new files after quota is  exceeded.
-    The  issuer  of this command can change the default with the
-    -spare or -pctspare arguments:
- 
-       - -spare specifies  the  number  of  kilobytes  over
-         quota  the  File Server will allow.  To make users
-         unable to store files after the quota is exceeded,
-         specify a value of 0.
- 
-       - -pctspare  expresses the amount of excess the File
-         Server will allow as a percentage of the  volume's
-         quota.
- 
- WARNING
- 
-    This  command  is  not  normally issued at the command shell
-    prompt, but rather  placed  into  a  file  server  machine's
-    /usr/afs/local/BosConfig with the bos create command.  If it
-    is ever issued at the command shell prompt, the issuer  must
-    be working on a file server machine.
- 
-    Several  of this command's arguments are intended for use by
-    AFS developers only.    Changing  them  from  their  default
-    values   is   strongly   discouraged   and   may  result  in
-    unpredictable File Server behavior.  The relevant  arguments
-    are marked in the ARGUMENTS section.
- 
-    This  command does not use the syntax conventions of the AFS
-    command suites, so the command  and  switch  names  must  be
-    typed in full.
- 
-    Do  not  specify both -spare and -pctspare.  Doing so causes
- 
- 
- 
-    the File  Server  to  exit,  leaving  an  error  message  in
-    /usr/afs/logs/FileLog.
- 
- ARGUMENTS
- 
-    -b           sets the number of directory buffers, which are
-                 2 kilobytes each.  Provide a positive  integer.
-                 The default is 70.
- 
-    -banner      causes  the File Server to prints the following
-                 banner to /dev/console about every 10 minutes.
- 
-                     File Server is running at time.
- 
-    -cb          sets the number of callbacks  the  File  Server
-                 can  track.    Provide a positive integer.  The
-                 default is 20,000.
- 
-    -d           sets the detail level for the  debugging  trace
-                 the      File      Server      produces      in
-                 /usr/afs/logs/FileLog.    Provide  a   positive
-                 integer;  higher values (up to a point) produce
-                 greater  detail.    The  default  level  of   0
-                 produces no trace.
- 
-    -k           sets the LWP stack size in units of 1 kilobyte.
-                 Provide a positive integer.  The default is  24
-                 (kilobytes).    Do  not set this argument lower
-                 than the default.
- 
-    -l           sets the number of large  vnodes  to  use  (for
-                 tracking   directory   elements).    Provide  a
-                 positive integer.  The default is 200.
- 
-    -oldvldb     directs the File Server to use  the  pre-AFS  3
-                 volume  location  facility rather than the VLDB
-                 and VL Server.
- 
-    -pctspare    specifies the amount by which the  File  Server
-                 will  allow  a volume to exceed its quota, as a
-                 percentage of the quota.   Provide  an  integer
-                 between  0  and  99.  A value of 0 prevents the
-                 volume from ever exceeding its quota.   Do  not
-                 combine this argument with -spare.
- 
-    -rxdbg       sends  an Rx debugging trace to the rx_dbg file
-                 in the current working directory.
- 
-    -rxdbge      sends an Rx event debugging trace to the rx_dbg
-                 file in the current working directory.
- 
-    -rxpck       sets the number of extra Rx packets to reserve.
-                 Provide a positive integer.    The  default  is
-                 100.    Do  not use this argument; changing its
-                 default may cause unpredictable behavior.
- 
-    -s           sets the number of small  vnodes  to  use  (for
-                 tracking  file  elements).   Provide a positive
-                 integer. The default is 200.
- 
-    -spare       specifies the number  of  extra  kilobytes  the
- 
- 
- 
-                 File  Server  will  allow  users  to store in a
-                 volume after its quota is exceeded.  Provide  a
-                 positive  integer.    A value of 0 prevents the
-                 volume from ever exceeding its quota.   Do  not
-                 combine this argument with -pctspare.
- 
-    -w           sets  the  interval at which daemons spawned by
-                 the  File  Server  perform  their   maintenance
-                 tasks.  The default is 300 seconds (5 minutes).
-                 Do not use this argument; changing its  default
-                 may cause unpredictable behavior.
- 
-    -c           is not implemented.
- 
-    -ftpck       is obsolete.
- 
-    -noauth      is obsolete.
- 
-    -p           is obsolete.
- 
-    -r           is obsolete.
- 
-    -rpck        is obsolete.
- 
- EXAMPLES
- 
-    The  following  bos create  command creates an fs process on
-    fs2.transarc.com that allows volumes to exceed  their  quota
-    by 10%.
- 
-    Type the command on a single line.
- 
-    % bos create fs2.transarc.com fs fs "/usr/afs/bin/fileserver
-    -pctspare 10"
-    /usr/afs/bin/volserver  /usr/afs/bin/salvager
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList to place this
-    command in /usr/afs/local/BosConfig,  because  that  is  the
-    privilege required to issue bos create.
- 
- MORE INFORMATION
- 
-    bos create
--- 0 ----
Index: openafs/src/man/fs.1
diff -c openafs/src/man/fs.1:1.1 openafs/src/man/fs.1:removed
*** openafs/src/man/fs.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs.1	Fri Apr 14 09:27:29 2006
***************
*** 1,68 ****
-                            AFS Commands
- 
-    1. The fs Commands
- 
-    ------------------------------------------------------------
- 
-    This  command  defines the fs commands that users and system
-    administrators employ to contact  the  File  Server  and  to
-    configure  the  Cache  Manager.    It  assumes the reader is
-    familiar with the  concepts  described  in  the  AFS  System
-    Administrator's Guide.
- 
-    Some  fs  commands  extend  UNIX  file  system  semantics by
-    invoking file-related functions that UNIX does  not  provide
-    (setting  access  control  lists,  for  example).   Other fs
-    commands help users control the  performance  of  the  Cache
-    Manager  running  on  their  local client workstation.  When
-    using fs commands, pay particular attention to the  kind  of
-    privilege required, as it varies from command to command.
- 
-    Refer to the Command Summary at the end of this document for
-    a complete list of fs commands and their syntax.
- 
-    1.1 Common Arguments and Flags
-    All fs commands accept the following optional flag.   It  is
-    listed  in  the  command  descriptions  and  is described in
-    detail here:
- 
-    [-help]
- 
-    This flag has the same function as the fs help command:   It
-    prints  a  command's  online help message on the screen.  No
-    other arguments or flags should be provided at the same time
-    as  this  flag.   If they are, this flag overrides them, and
-    the only effect of issuing the  command  is  that  the  help
-    message appears.
-    AFS Command Reference Manual              The fs Commands  2
- 
- 
-    1.2 The Privileges Required for fs Commands
-    The privileges required for fs commands vary more than those
-    required  for  commands  in  other  suites.    Pay   special
-    attention  to the PRIVILEGE REQUIRED section of each command
-    description.
- 
-    The various types of necessary privilege include
- 
- 
-       - Having certain  rights  on  a  directory's  access
-         control  list.  For example, creating and removing
-         mount  points  requires  ADMINISTER,  INSERT,  and
-         DELETE rights for the directory in which the mount
-         point  resides.    Setting  a  directory's  access
-         control list requires certain rights, too.
- 
-       - Being  logged  in  as the super-user "root" in the
-         UNIX file system  of  the  machine  on  which  the
-         command  is  being issued.  This is necessary when
-         issuing  commands  that   affect   Cache   Manager
-         configuration.
- 
-       - Belonging  to  the  system:administrators group in
-         the  Protection  Database.    See  the   fs setvol
-         command for an example.
- 
-       - No  privilege.    Many  fs  commands  simply  list
-         information and so  do  not  require  any  special
-         privilege.
--- 0 ----
Index: openafs/src/man/fs_apropos.1
diff -c openafs/src/man/fs_apropos.1:1.1 openafs/src/man/fs_apropos.1:removed
*** openafs/src/man/fs_apropos.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_apropos.1	Fri Apr 14 09:27:29 2006
***************
*** 1,66 ****
- fs apropos                 AFS Commands              fs apropos
- 
- 
- NAME
- 
-    fs apropos -- show each help entry containing keyword.
- 
- 
-    fs apropos  -topic <help string>  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs ap  -t <help string>  [-h]
- 
- DESCRIPTION
- 
-    Displays  the first line of the online help entry for any fs
-    command  that  has  help  string  in  its  name   or   short
-    description.
- 
- ARGUMENTS
- 
-    -topic
-          specifies the keyword string for which to search.   If
-          it is more than a single word, surround it with double
-          quotes  or  other  delimiters.    This   argument   is
-          case-sensitive;  type  help strings for fs commands in
-          lowercase letters.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- OUTPUT
- 
-    The  first  line  of a command's online help entry names the
-    command and briefly describes what it does.  The  fs apropos
-    command  displays  that  first line for any fs command where
-    help string is part of the command name or first line.
- 
-    To see the remaining lines in a help  entry,  which  provide
-    the  command's  alias  (if  any) and syntax, use the fs help
-    command.
- 
- EXAMPLES
- 
-    The following lists all  fs  commands  that  have  the  word
-    "cache"   in   their   operation   codes   or  short  online
-    descriptions:
- 
-        % fs apropos -topic cache
-        setcachesize: set cache size
-        flush: flush file from cache
-        getcacheparms: get cache usage info
-        monitor: set cache monitor host address
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs help
--- 0 ----
Index: openafs/src/man/fs_checkservers.1
diff -c openafs/src/man/fs_checkservers.1:1.1 openafs/src/man/fs_checkservers.1:removed
*** openafs/src/man/fs_checkservers.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_checkservers.1	Fri Apr 14 09:27:29 2006
***************
*** 1,153 ****
- fs checkservers            AFS Commands         fs checkservers
- 
- 
- NAME
- 
-    fs checkservers -- check status of file server machines.
- 
- 
-    fs checkservers  [-cell <cell to check>]  [-all]  [-fast]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs checks  [-c <cell to check>]  [-a]  [-f]  [-h]
- 
- DESCRIPTION
- 
-    Lists any file server machines in the indicated cell(s) that
-    meet two conditions:
- 
-       1. The Cache Manager has been in  contact  with  the
-          fileserver process running on the machine, and/or
-          may need to contact it in future.   (Reasons  for
-          wanting  to  contact  a file server machine might
-          include holding a callback from that  machine  or
-          having locked files on it.)
- 
-       2. The  fileserver  process  on  the  machine is not
-          currently  responding  to  Cache  Manager  probes
-          (implying  that  it  is  not  responding to Cache
-          Manager file requests either).
- 
-    The Cache Manager constantly maintains a list of file server
-    machines  that  meet  the first condition, updating it every
-    four to ten minutes by attempting to contact the  fileserver
-    process  on  each  machine in the list.  When a process does
-    not respond to the probe, the  Cache  Manager  marks  it  as
-    non-functioning.    If  a  machine  that  previously did not
-    respond begins to respond again, the  Cache  Manager  erases
-    the "not functioning" mark.
- 
-    This   command  forces  the  Cache  Manager  to  update  its
-    information immediately (rather than  waiting  the  standard
-    interval).   The Cache Manager probes the fileserver process
-    on the machines in the specified cell that  meet  the  first
-    condition  above,  records  those  that  do not respond, and
-    reports the result.  If the issuer includes the -fast  flag,
-    the  Cache  Manager  outputs  the list it already has at the
-    time the command is issued instead of probing  the  machines
-    again.
- 
-    By  default,  the Cache Manager probes machines in the local
-    cell only.  If the -all flag is used, it probes all machines
-    (from  all  cells) that meet the first condition.  If a cell
-    name is specified with -cell, The Cache Manager  probes  the
-    machines in that cell only.
- 
- WARNING
- 
-    It  can  take  quite a while for this command to produce its
-    entire output if a number of machines in the Cache Manager's
-    list are in fact down when the command is issued.  The delay
-    is because after issuing the probe the Cache Manager waits a
-    standard   timeout   period   before   concluding  that  the
- 
- 
- 
-    fileserver  is  not  responding;   this   allows   for   the
-    possibility  of  slow cross-network communication.  If it is
-    important that the command shell prompt return quickly,  the
-    issuer  may  wish to put this command in the background.  It
-    is harmless to interrupt the command (with Ctrl-C or another
-    interrupt signal).
- 
-    This  command  is  not guaranteed to check the status of all
-    file server machines in a cell.  The  Cache  Manager  probes
-    only  those machines that meet the first condition mentioned
-    above.
- 
- ARGUMENTS
- 
-    -cell specifies the complete name of  the  cell  whose  file
-          server   machines   the  Cache  manager  should  probe
-          (shortened forms are not acceptable).    Provide  this
-          argument OR -all; it may be combined with -fast.
- 
-    -all  causes  the  Cache  Manager to probe all machines that
-          meet the first condition  mentioned  above.    Provide
-          this argument OR -cell; it may be combined with -fast.
- 
-    -fast tells the Cache Manager to display its current list of
-          down machines, rather than probing any machines.   The
-          displayed output may be up to 10 minutes old.
- 
-    -dir  is   obsolete,  but  can  still  be  provided  on  the
-          command-line.    Previous  versions  of  this  command
-          required a directory argument.  If the issuer includes
-          it by accident, a warning  message  appears,  but  the
-          command still executes correctly.
- 
-    -help prints the online help entry for this command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  3.1  in  the  Reference  Manual for more
-          details.
- 
- OUTPUT
- 
-    If the Cache  Manager  gets  a  response  from  all  of  the
-    machines  that  it  probes  (i.e.,  all  such  machines  are
-    functioning normally), the output is
- 
-        All servers are running.
- 
-    (Remember that this message does not  imply  that  all  file
-    server  machines  in  the  cell are running.  It reports the
-    status of only those that the Cache Manager tries to probe.)
- 
-    If a machine fails to respond to the Cache  Manager's  probe
-    within  the  timeout  period,  the output displays its name.
-    The format of a machine name (name  in  uppercase,  name  in
-    lowercase,  or  Internet address in four-field decimal form)
-    depends on the state of the local cell's name server at  the
-    time the command is issued.
- 
- EXAMPLES
- 
-    In  the  following  example,  the  issuer chooses to see the
-    Cache Manager's current list of down machines that belong to
- 
- 
- 
-    the  local  cell,  rather  than waiting for it to probe them
-    again.  The output indicates that all machines responded  to
-    the previous probe.
- 
-    % fs checks -f  All servers are running.
- 
-    The  following  example  checks  file server machines in all
-    cells that the Cache Manager has previously contacted.    It
-    reports    that    the    machines    fs1.transarc.com   and
-    vice3.andrew.cmu.edu did not respond to the machine's probe.
- 
-    % fs checkservers -all &  These servers are still down:
-    fs1.transarc.com               VICE3.ANDREW.CMU.EDU
- 
-    The following example checks machines in the  athena.mit.edu
-    cell only:
- 
-    % fs checks athena.mit.edu &  %All servers are running.
- 
- PRIVILEGE REQUIRED
- 
-    None.
--- 0 ----
Index: openafs/src/man/fs_checkvolumes.1
diff -c openafs/src/man/fs_checkvolumes.1:1.1 openafs/src/man/fs_checkvolumes.1:removed
*** openafs/src/man/fs_checkvolumes.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_checkvolumes.1	Fri Apr 14 09:27:29 2006
***************
*** 1,44 ****
- fs checkvolumes            AFS Commands         fs checkvolumes
- 
- 
- NAME
- 
-    fs  checkvolumes -- force  Cache  Manager to update volume-
- 
-                        related information.
- 
- 
-    fs checkvolumes  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs checkv  [-h]
- 
- DESCRIPTION
- 
-    Forces the Cache Manager to discard its  table  of  mappings
-    between  volume  names  and  volumeID  numbers.    The Cache
-    Manager needs the information in the table to  fetch  files,
-    so  this  command  will  force  it to fetch the most current
-    information available at the File Server  about  a  volume's
-    contents before it can fetch any more files.
- 
-    This  command  is  most  useful  if  the issuer knows that a
-    volume's name has changed, or that there has been a  release
-    of  new  ReadOnly  replicas,  because  issuing it forces the
-    Cache Manager to reference the volume with the new name,  or
-    the new ReadOnly replica.
- 
-    Normally  the Cache Manager flushes the table and constructs
-    a new one once per hour anyway.
- 
- ARGUMENTS
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- PRIVILEGE REQUIRED
- 
-    None.
--- 0 ----
Index: openafs/src/man/fs_cleanacl.1
diff -c openafs/src/man/fs_cleanacl.1:1.1 openafs/src/man/fs_cleanacl.1:removed
*** openafs/src/man/fs_cleanacl.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_cleanacl.1	Fri Apr 14 09:27:29 2006
***************
*** 1,83 ****
- fs cleanacl                AFS Commands             fs cleanacl
- 
- 
- NAME
- 
-    fs  cleanacl -- remove obsolete entries from access control
- 
-                        list.
- 
- 
-                                       +
-    fs cleanacl  [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                              +
-    fs cl  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Removes from the  access  control  list  of  each  specified
-    directory  or  file any entries that specify a user or group
-    no  longer  found  in  the  Protection  Database.    When  a
-    user/group  is removed from the Protection Database, its AFS
-    UID appears on access control lists rather  than  its  name.
-    This  command  removes such "abandoned" AFS UIDs from access
-    control lists.
- 
-    Cleaning access control lists in this  way  not  only  keeps
-    them  from becoming crowded with irrelevant information, but
-    also prevents the new possessor of a recycled AFS  UID  from
-    obtaining  access  intended  for the former possessor of the
-    ID.  (Note that recycling IDs  is  not  recommended  in  any
-    case.)
- 
- ARGUMENTS
- 
-    -path specifies a file or directory for which the associated
-          access control list is to be cleaned.  If  a  filename
-          is  specified,  the ACL of the file's parent directory
-          is cleaned.  If the  issuer  omits  this  switch,  the
-          current working directory is assumed.
- 
-    -help prints the online help entry for this command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  3.1  in  the  Reference  Manual for more
-          details.
- 
- OUTPUT
- 
-    If there are no obsolete AFS UIDs on the ACL, the  following
-    message appears:
- 
-        Access list for directory is fine.
- 
-    Otherwise,  the  output  reports  the resulting state of the
-    ACL, following the header
- 
-        Access list for directory is now
- 
- 
- 
- EXAMPLES
- 
-    In the following example, the user pat cleans the ACL on the
-    current  directory and its subdirectories called reports and
-    sources.  The ACLs for the first two have  no  obsolete  AFS
-    UIDs on them, but sources does.
- 
-    % fs cl . ./reports ./sources  Access list for . is fine.
-    Access list for ./reports is fine.  Access list for
-    ./sources is now  Normal rights:     system:authuser rl
-    pat rlidwka
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  must  have  ADMINISTER  rights  to the directory; by
-    default,  the  owner  of  the  directory  and   members   of
-    system:administrators do.
- 
- MORE INFORMATION
- 
-    fs listacl
--- 0 ----
Index: openafs/src/man/fs_copyacl.1
diff -c openafs/src/man/fs_copyacl.1:1.1 openafs/src/man/fs_copyacl.1:removed
*** openafs/src/man/fs_copyacl.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_copyacl.1	Fri Apr 14 09:27:29 2006
***************
*** 1,137 ****
- fs copyacl                 AFS Commands              fs copyacl
- 
- 
- NAME
- 
-    fs copyacl -- copy access control list from one directory
- 
-                        to one or more other directories.
- 
- 
-    fs copyacl -fromdir <source directory>
-                                  +
-    -todir <destination directory> 
-    [-clear]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                                                            +
-    fs co  -f <source directory>  -t <destination directory> 
-    [-c]  [-h]
- 
- DESCRIPTION
- 
-    Copies  the  access  control  list  (ACL)  from  the  source
-    directory to each destination directory.  The  command  does
-    not  affect  entries on the ACL of the source directory.  It
-    affects entries on the ACL of each destination directory  as
-    follows:
- 
-       - If  an  entry  is  unique to the ACL of the source
-         directory,  it  is  copied  to  the  ACL  of   the
-         destination directory.
- 
-       - If   an   entry   exists   on  the  ACLs  of  both
-         directories, it is  changed  on  the  ACL  of  the
-         destination  directory to match the rights granted
-         on the ACL of the source directory.
- 
-       - If  an  entry  is  unique  to  the  ACL   of   the
-         destination  directory  and  the  -clear  flag  is
-         omitted, the entry is not affected.
- 
-       - If  an  entry  is  unique  to  the  ACL   of   the
-         destination  directory  and  the  -clear  flag  is
-         included, the entry is removed.
- 
-    Use the -clear flag to completely replace the  ACL  of  each
-    destination directory with that of the source directory.
- 
- ARGUMENTS
- 
-    -fromdir
-          specifies the source directory  whose  ACL  is  to  be
-          copied  to  each  destination  directory.  Abbreviated
-          pathnames are interpreted relative to the directory in
-          which  the  command  is  issued.    If  a  filename is
-          provided, the file's parent directory is used  as  the
-          source directory.
- 
-    -todir
-          specifies  one  or  more  destination  directories  to
-          receive   the   ACL   from   the   source   directory.
-          Abbreviated pathnames are interpreted relative to  the
-          directory  in which the command is issued.  A filename
- 
- 
- 
-          cannot be specified with this switch.
- 
-    -clear
-          removes  all  existing  entries  from  the ACL of each
-          destination directory before copying the ACL from  the
-          source   directory.    The  ACL  of  each  destination
-          directory is thus completely replaced with the ACL  of
-          the  source directory.  If the issuer omits this flag,
-          entries  that  exist  on  the  ACL  of  a  destination
-          directory  but  not on the ACL of the source directory
-          are not affected.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- EXAMPLES
- 
-    The  following  example  uses the fs copyacl command to copy
-    the ACL from the current directory to the subdirectory named
-    reports.    Entries  on the ACL of the current directory are
-    not affected.   Because  the  -clear  option  is  not  used,
-    entries  on the ACL of the reports directory that are not on
-    the ACL of the current directory remain unaffected as well.
- 
-        % fs la . reports
-        Access list for . is
-        Normal rights:
-           pat rlidwka
-           smith rlidwk
- 
-        Access list for reports is
-        Normal rights:
-           pat rl
-           pat:friends rl
-        Negative rights
-           jones rlidwka
- 
-        % fs co . reports
- 
-        % fs la . reports
-        Access list for . is
-        Normal rights:
-           pat rlidwka
-           smith rlidwk
- 
-        Access list for reports is
-        Normal rights:
-           pat rlidwka
-           pat:friends rl
-           smith rlidwk
-        Negative rights
-           jones rlidwka
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must have LOOKUP right to the  source  directory  and
-    ADMINISTER  right  to  each destination directory.  To issue
-    the command with a filename used for source  directory,  the
-    issuer  must have both the LOOKUP and READ rights on the ACL
-    of the file's parent directory.
- 
- MORE INFORMATION
- 
-    fs listacl
- 
-    fs setacl
--- 0 ----
Index: openafs/src/man/fs_debug.1
diff -c openafs/src/man/fs_debug.1:1.1 openafs/src/man/fs_debug.1:removed
*** openafs/src/man/fs_debug.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_debug.1	Fri Apr 14 09:27:29 2006
***************
*** 1,110 ****
- fs debug                   AFS Commands                fs debug
- 
- 
- NAME
- 
-    fs debug -- enable/disable Cache Manager debugging trace.
- 
- 
-    fs debug  -debug <'on' or 'off'>  [-dafs <afs debug level>]
-            [-dnet <network debug level>]  [-syslog]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs de  -de <on> or <off>  [-da <afs debug level>]
-    [-dn <network debug level>]  [-s]  [-h]
- 
- DESCRIPTION
- 
-    Determines  whether  the  Cache  Manager records information
-    about its activities that may prove helpful in debugging  or
-    other  trouble-shooting.    The  output  goes  into the file
-    /usr/vice/etc/AFSLog (unless an alternate directory or  name
-    is  specified  for  the file with the -logfile switch of the
-    afsd command).  See the ARGUMENTS  section  for  information
-    about  the  different  types of debugging output that can be
-    written to the file.
- 
-    You can use the more command (or an equivalent command  such
-    as  the  pg  command  on  AIX systems) to read the debugging
-    output recorded in the AFSLog file.  You must be  logged  in
-    as  root  on the machine on which the AFSLog file resides to
-    read the file.  Interpreting the output requires familiarity
-    with the AFS source code.
- 
- ARGUMENTS
- 
-    -debug
-          controls whether debugging  information  is  produced.
-          The  legal  values  are  on,  which  directs debugging
-          information into the AFSLog file, and off, which stops
-          the recording of information in the file.
- 
-    -dafs determines  the  types  of  debugging  information the
-          Cache Manager produces  about  its  activities.    The
-          following  list  describes  the  legal values for this
-          switch and the type of debugging  output  each  causes
-          the Cache Manager to write to the AFSLog file:
- 
-             - 1,  which  causes the Cache Manager to write
-               standard debugging information.  Using  this
-               value   provides  a  good  deal  of  general
-               output.
- 
-             - 2, which causes the Cache Manager  to  write
-               low-level  debugging  information  about the
-               AFS network.  Use this value only if you are
-               convinced that network problems exist.
- 
-             - 4,  which  causes the Cache Manager to write
-               debugging information about the RX protocol.
- 
-             - 8, which causes the Cache Manager  to  write
-               debugging  information  about  the interface
-               layer to AFS.  This value is not  useful  on
- 
- 
- 
-               machines running a Sun operating system.
- 
-          In  addition,  if  a value of 1, 4, or 8 is specified,
-          the Cache Manager also records in the AFSLog file  the
-          AFS  UID  of  each  user who accesses data from a file
-          server machine.  It records the  appropriate  AFS  UID
-          with each operation that accesses data.
- 
-          The  legal  values  can  be added to specify different
-          combinations of output.  For example, a  value  of  15
-          specifies  that all possible types of output are to be
-          provided.  The default value of 1 is used if no  value
-          is specified.
- 
-          Note:  The AFSLog file also records the type of volume
-          (ReadWrite, ReadOnly, or Backup) accessed from a  file
-          server  machine.   The type of the volume is displayed
-          along with the volumeID in the "state" flag in  bitmap
-          form.  If a ReadWrite volume is accessed, the bits are
-          clear; if a ReadOnly volume is accessed, the 1 bit  is
-          set; if a Backup volume is accessed, the 4 bit is set.
- 
-    -dnet is not currently implemented and should not be used.
- 
-    -syslog
-          specifies that debugging output is to be redirected to
-          the  syslogd  daemon.    This flag can be used only on
-          machines running Sun OS 4.1 or higher.
- 
- EXAMPLES
- 
-    The following turns on debugging using the default debugging
-    level of 1:
- 
-    % fs de on
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    afsd
--- 0 ----
Index: openafs/src/man/fs_diskfree.1
diff -c openafs/src/man/fs_diskfree.1:1.1 openafs/src/man/fs_diskfree.1:removed
*** openafs/src/man/fs_diskfree.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_diskfree.1	Fri Apr 14 09:27:29 2006
***************
*** 1,88 ****
- fs diskfree                AFS Commands             fs diskfree
- 
- 
- NAME
- 
-    fs diskfree -- show information about the partition housing
- 
-                        a directory/file.
- 
- 
-                                      +
-    fs diskfree [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                              +
-    fs df  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Provides information about the  partition  that  houses  the
-    volume  containing the specified directory or file.  See the
-    OUTPUT section for a complete explanation of the information
-    provided.  To learn more about the volume itself, use the fs
-    examine command.
- 
- ARGUMENTS
- 
-    -path specifies  a  file  or  directory  about  whose   host
-          partition information is desired.  If the issuer omits
-          this  argument,  the  current  working  directory   is
-          assumed.
- 
-    -help prints the online help entry for this command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  3.1  in  the  Reference  Manual for more
-          details.
- 
- OUTPUT
- 
-    Note: The numbers that appear in this output may not  always
-    agree  with  the  corresponding numbers in the output of the
-    standard UNIX df command.  The main reason is  that  the  df
-    output  reflects  the  state  of partitions exactly when the
-    command is issued.  The numbers in this command's output may
-    be  up to 5 minutes old, as the Cache Manager polls the File
-    Server for partition information at that frequency.  Another
-    potential  difference:  the  partition  size reported by the
-    UNIX df command includes some reserved space that  does  not
-    show  up  in this report of partition size, and so is likely
-    to be about 10% larger.
- 
-    The output reports  the  following  information  about  each
-    partition that houses a specified directory or file:
- 
-       - the name of the volume that contains the directory
-         or file
- 
-       - the total size in kilobyte blocks of the partition
-         that stores the named volume
- 
-       - the   number   of  kilobyte  blocks  used  on  the
-         partition
- 
-       - the number of kilobyte  blocks  available  on  the
- 
- 
- 
-         partition
- 
-       - the percentage of the partition's total space used
- 
- EXAMPLES
- 
-    The following shows the output for the partition housing the
-    volume user.smith in the Transarc Corporation cell:
- 
-        % fs df /afs/transarc.com/usr/smith
-        Volume Name    kbytes  used     avail     %used
-        user.smith     333305  286710   46595       86%
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs examine
--- 0 ----
Index: openafs/src/man/fs_examine.1
diff -c openafs/src/man/fs_examine.1:1.1 openafs/src/man/fs_examine.1:removed
*** openafs/src/man/fs_examine.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_examine.1	Fri Apr 14 09:27:29 2006
***************
*** 1,109 ****
- fs examine                 AFS Commands              fs examine
- 
- 
- NAME
- 
-    fs  examine -- show  information  about  volume  containing
- 
-                        specified directory.
- 
- 
-                                      +
-    fs examine  [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                               +
-    fs exa  [-p <dir/file path> ]  [-h]
-                                   +
-    fs listvol  [-p <dir/file path> ]  [-h]
-                              +
-    fs lv  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Displays  information  about  the  volume  containing   each
-    specified  directory  or file.  The information includes the
-    file's quota and current size.  See the OUTPUT section for a
-    complete  explanation  of  the  information provided.  While
-    this command provides the most information about  a  volume,
-    the fs listquota and fs quota commands are also available to
-    display information about a volume.
- 
- ARGUMENTS
- 
-    -path specifies  each  file  and/or  directory   for   which
-          information  about  the  host volume is desired.  Omit
-          this switch to display information  about  the  volume
-          that contains the current working directory.
- 
-    -help prints the online help entry for this command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  3.1  in  the  Reference  Manual for more
-          details.
- 
- OUTPUT
- 
-    Note: The partition-related  numbers  that  appear  in  this
-    output  may  not always agree with the corresponding numbers
-    in the output of the standard UNIX df  command.    The  main
-    reason   is  that  the  df  output  reflects  the  state  of
-    partitions exactly when the command is issued.  The  numbers
-    in  this command's output may be up to 5 minutes old, as the
-    Cache  Manager  polls  the   File   Server   for   partition
-    information   at   that   frequency.      Another  potential
-    difference: the partition  size  reported  by  the  UNIX  df
-    command  includes  some reserved space that does not show up
-    in this report of partition size, and so  is  likely  to  be
-    about 10% larger.
- 
- 
- 
-    The  output  reports  the  following  information about each
-    volume that contains a specified directory or file:
- 
-       - the volumeID number (abbreviated in the output  as
-         "vid") of the volume
- 
-       - the volume's name
- 
-       - the  current "offline" message associated with the
-         volume, as set by a system administrator using the
-         fs setvol command
- 
-       - the  current  "message of the day" associated with
-         the volume, as set by a system administrator using
-         the fs setvol command
- 
-       - the  volume's  maximum  size  quota,  in  kilobyte
-         blocks
- 
-       - its current size, in kilobyte blocks
- 
-       - the number of kilobyte blocks still  available  on
-         the  disk partition that houses the volume and the
-         partition's total size
- 
- EXAMPLES
- 
-    The following shows the output  for  the  volume  user.smith
-    (and  the  partition housing it) in the Transarc Corporation
-    cell:
- 
-        % fs exa /afs/transarc.com/usr/smith
-        Volume status for vid = 50489902 named user.smith
-        Current maximum quota is 15000
-        Current blocks used are 5073
-        The partition has 46383 blocks available out of 333305
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs listquota
- 
-    fs quota
- 
-    fs setquota
--- 0 ----
Index: openafs/src/man/fs_exportafs.1
diff -c openafs/src/man/fs_exportafs.1:1.1 openafs/src/man/fs_exportafs.1:removed
*** openafs/src/man/fs_exportafs.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_exportafs.1	Fri Apr 14 09:27:29 2006
***************
*** 1,93 ****
- fs exportafs               AFS Commands            fs exportafs
- 
- 
- NAME
- 
-    fs  exportafs -- report  or  set whether machine can export
- 
-                        AFS  to  clients   of   alternate   file
-                        systems.
- 
- 
-    fs exportafs   -type <exporter name>  [-state <'on' or
-    'off'>]        [-noconvert]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs exp  -t <exporter name>  [-s <'on' or 'off'>]  [-n]  [-h]
- 
- DESCRIPTION
- 
-    This  command  performs  one  of the following, depending on
-    whether the issuer provides the -state argument:
- 
-       - It sets whether the machine  is  accessible  as  a
-         server  of  the non-AFS file system exporter name,
-         able to be mounted by clients of that file system.
- 
-       - It reports on the current status of the machine.
- 
-    The command's  -noconvert  flag  can  be  used  to  indicate
-    whether  mode  bits of exported directories and files are to
-    be converted.  By default, the group and other mode bits  of
-    exported directories and files are changed to match the user
-    bits.
- 
- ARGUMENTS
- 
-    -type names the alternate file system for which the  setting
-          is  to be changed or reported.  Only lowercase letters
-          are acceptable.  The only legal value is nfs.
- 
-    -state
-          controls  whether  the  workstation is accessible as a
-          server of the non-AFS file system or not.   The  legal
-          values  are  on,  which  enables  the workstation as a
-          server, and off, which  makes  it  inaccessible  as  a
-          server.  If the issuer omits this argument, the output
-          reports the current setting.
- 
-    -noconvert
-          determines   whether  the  group  and  other  bits  on
-          exported files and directories are converted to  match
-          the  user  bits.  By default, the group and other bits
-          on exported files and directories are  made  to  match
-          the user bits.  Specify this flag to leave the bits as
-          they are in AFS.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- 
- 
- OUTPUT
- 
-    When  the -state argument is omitted, the output reports the
-    name of the non-AFS file system and whether the  workstation
-    is enabled as a server of it.
- 
- EXAMPLES
- 
-    The  following  shows that this machine is enabled as an NFS
-    server (i.e., it is running the AFS/NFS Translator):
- 
-    %  fs exportafs nfs  Exporter type: nfs is currently enabled
-    for AFS
- 
-    The following shows that the machine is not  enabled  as  an
-    NFS server:
- 
-    %  fs exportafs nfs  Sorry, the nfs-exporter type is
-    currently not supported on      this AFS client
- 
-    The  following  prevents  the  machine from acting as an NFS
-    server:
- 
-    % fs exp nfs off
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be logged in as "root" in the UNIX  file  system
-    of the machine on which the command is being issued.
--- 0 ----
Index: openafs/src/man/fs_flush.1
diff -c openafs/src/man/fs_flush.1:1.1 openafs/src/man/fs_flush.1:removed
*** openafs/src/man/fs_flush.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_flush.1	Fri Apr 14 09:27:29 2006
***************
*** 1,63 ****
- fs flush                   AFS Commands                fs flush
- 
- 
- NAME
- 
-    fs   flush -- force  Cache  Manager  to  discard  a  cached
- 
-                        file/directory.
- 
- 
-                                    +
-    fs flush  [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                                 +
-    fs flush  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Forces the Cache Manager to remove each specified  directory
-    or file from its caches of data and status information.  The
-    result is that the next time data from a  flushed  directory
-    or  file  is  requested, the Cache Manager contacts the File
-    Server for the  most  current  version,  along  with  a  new
-    callback  (if  necessary) and associated status information.
-    This command does not discard data from application  program
-    buffers  or  data that has been altered in the cache but not
-    yet written back to the central copy maintained by the  File
-    Server.
- 
-    The  fs  flushvolume  command  can be used to flush all data
-    that resides in the same  volume  as  a  specified  file  or
-    directory.
- 
- ARGUMENTS
- 
-    -path specifies  each  file  or directory to be flushed.  In
-          the case of a  directory  element,  only  the  element
-          itself  is  flushed,  not  data  cached  from files or
-          subdirectories that reside in it.  If this argument is
-          omitted, the current directory is flushed.
- 
-    -help prints the online help entry for this command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  3.1  in  the  Reference  Manual for more
-          details.
- 
- EXAMPLES
- 
-    The following flushes from the cache the  file  projectnotes
-    in  the  current  working  directory  and  all data from the
-    subdirectory plans:
- 
-    %  fs flush projectnotes ./plans/*
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs flushvolume
--- 0 ----
Index: openafs/src/man/fs_flushvolume.1
diff -c openafs/src/man/fs_flushvolume.1:1.1 openafs/src/man/fs_flushvolume.1:removed
*** openafs/src/man/fs_flushvolume.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_flushvolume.1	Fri Apr 14 09:27:29 2006
***************
*** 1,65 ****
- fs flushvolume             AFS Commands          fs flushvolume
- 
- 
- NAME
- 
-    fs flushvolume -- force Cache Manager to discard any cached
- 
-                        data   from   the   volume    containing
-                        specified file/directory.
- 
- 
-                                          +
-    fs flushvolume  [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                                  +
-    fs flushv  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Forces  the Cache Manager to remove cached data (but not the
-    cached status information) for  all  files  and  directories
-    that  reside  in the same volume as each specified directory
-    or file.  The result is that the next time the Cache Manager
-    needs  anything  from a flushed volume, it contacts the File
-    Server for the  most  current  version,  along  with  a  new
-    callback (if necessary).  This command does not discard data
-    from application program  buffers  or  data  that  has  been
-    altered in the cache but not yet written back to the central
-    copy maintained by the File Server.
- 
-    The fs flush command can be used to flush  individual  files
-    and directories.
- 
- ARGUMENTS
- 
-    -path specifies  one file or directory from each volume that
-          the Cache Manager is  to  flush  completely  from  its
-          cache.  If this argument is omitted, all data from the
-          volume that contains the current directory is flushed.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- EXAMPLES
- 
-    The  following  flushes  from  the cache all data that comes
-    from the volume that contains the current working  directory
-    and  the  directory  reports  at  the same level in the file
-    tree:
- 
-    %  fs flushv . ../reports
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- 
- 
- MORE INFORMATION
- 
-    fs flush
--- 0 ----
Index: openafs/src/man/fs_getcacheparms.1
diff -c openafs/src/man/fs_getcacheparms.1:1.1 openafs/src/man/fs_getcacheparms.1:removed
*** openafs/src/man/fs_getcacheparms.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_getcacheparms.1	Fri Apr 14 09:27:29 2006
***************
*** 1,67 ****
- fs getcacheparms           AFS Commands        fs getcacheparms
- 
- 
- NAME
- 
-    fs  getcacheparms -- show  current  size  of data cache and
- 
-                        amount being used.
- 
- 
-    fs getcacheparms  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs getca  [-h]
- 
- DESCRIPTION
- 
-    Displays the current  size  of  the  cache  that  the  Cache
-    Manager  has  at its disposal, and the amount it is using at
-    the moment the command is issued.  The command works both on
-    machines  using  a memory cache and on machines using a disk
-    cache.
- 
-    This information comes from the kernel of the workstation on
-    which  the  command  is  issued.    On machines using a disk
-    cache, the current cache size may disagree with the  default
-    setting  specified  in  the file /usr/vice/etc/cacheinfo, if
-    someone has set it with the fs setcachesize command.
- 
- ARGUMENTS
- 
-    -help           prints  the  online  help  entry  for   this
-                    command.  Do not provide any other arguments
-                    or flags with this one.  See section 3.1  in
-                    the Reference Manual for more details.
- 
- OUTPUT
- 
-    The output is of the form
- 
-        AFS using <amount> of the cache's available <size> 1
-           blocks.
- 
-    where  <amount>  is  the  number of 1K byte blocks the Cache
-    Manager is currently using, and <size> the total  number  of
-    blocks  available  to  the  Cache Manager (the current cache
-    size).
- 
- EXAMPLES
- 
-    The following shows the output on a  machine  with  a  25000
-    kilobyte cache.
- 
-        % fs getca
-        AFS using 22876 of the cache's available 25000 1K by
-           blocks.
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs setcachesize
--- 0 ----
Index: openafs/src/man/fs_getcellstatus.1
diff -c openafs/src/man/fs_getcellstatus.1:1.1 openafs/src/man/fs_getcellstatus.1:removed
*** openafs/src/man/fs_getcellstatus.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_getcellstatus.1	Fri Apr 14 09:27:29 2006
***************
*** 1,74 ****
- fs getcellstatus           AFS Commands        fs getcellstatus
- 
- 
- NAME
- 
-    fs getcellstatus -- show whether workstation can run setuid
- 
-                        programs
-                        from specified cell(s), and whether cell
-                        is using the old VLDB.
- 
- 
-                                      +
-    fs getcellstatus -cell <cell name>   [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                            +
-    fs getce  -c <cell name>   [-h]
- 
- DESCRIPTION
- 
-    Reports whether the workstation allows programs fetched from
-    the specified cell(s) to run with setuid privilege.   System
-    administrators   set   a   cell's   setuid   status   on   a
-    per-workstation basis with the fs setcell command.
- 
-    If a cell is using the AFS 2.0 method  for  tracking  volume
-    location  rather than the VLDB, the output reports this also
-    (see the OUTPUT section).
- 
- ARGUMENTS
- 
-    -cell names the cell(s) for which setuid status is  desired.
-          Provide the complete Internet-style name for each cell
-          (unlike the common -cell  argument  in  other  command
-          suites, it is not possible to abbreviate this one).
- 
-    -help prints the online help entry for this command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  3.1  in  the  Reference  Manual for more
-          details.
- 
- OUTPUT
- 
-    Possible output values are
- 
-       - no setuid allowed, indicating that  programs  from
-         the cell may not run with setuid privilege.
- 
-       - setuid  allowed, indicating that programs from the
-         cell may run with setuid privilege.
- 
-       - using old VLDB, indicating that the cell is  still
-         using the AFS 2.0 volume location method.
- 
- 
- 
- EXAMPLES
- 
-    The   following   indicates  that  programs  from  the  cell
-    oldcell.com may not run with setuid privilege and  that  the
-    cell is still using the old volume location method:
- 
-    %  fs getce oldcell.com  Cell oldcell.com status: no setuid
-    allowed, using old VLDB
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs setcell
--- 0 ----
Index: openafs/src/man/fs_getserverprefs.1
diff -c openafs/src/man/fs_getserverprefs.1:1.1 openafs/src/man/fs_getserverprefs.1:removed
*** openafs/src/man/fs_getserverprefs.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_getserverprefs.1	Fri Apr 14 09:27:29 2006
***************
*** 1,147 ****
- fs getserverprefs          AFS Commands       fs getserverprefs
- 
- 
- NAME
- 
-    fs  getserverprefs -- display  Cache  Manager's preferences
- 
-                        for file server machines.
- 
- 
-    fs getserverprefs  [-file <dir/file path>]  [-numeric]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs gets  [-f <dir/file path>]  [-n]  [-h]
- 
-    fs gp  [-f <dir/file path>]  [-n]  [-h]
- 
- DESCRIPTION
- 
-    Displays the Cache Manager's  preferences  for  file  server
-    machines.    A preference consists of the name or IP address
-    of a file server machine followed by its "rank."   The  rank
-    is a positive integer in the range from 1 to 65,534.
- 
-    A  file server machine's rank determines the Cache Manager's
-    preference for selecting it  when  the  Cache  Manager  must
-    access  a  ReadOnly  replica  that resides on it.  The Cache
-    Manager compares the rank of the  server  machine  with  the
-    ranks  of  other server machines that house the replica.  It
-    then attempts to access the replica on  the  server  machine
-    that has the lowest integer rank.
- 
-    If  it  cannot  access  the  replica on the machine with the
-    lowest rank (possibly because the machine or the network  on
-    which  the  machine  is  located is down), the Cache Manager
-    attempts to access the replica from the server machine  with
-    the  next lowest rank.  It continues in this manner until it
-    either accesses the replica or determines that  all  of  the
-    file  server  machines  on  which  the  replica  resides are
-    unavailable.
- 
-    The Cache Manager records addresses and ranks for all  local
-    file  server  machines.  It also records addresses and ranks
-    for all foreign file server machines that house a volume  it
-    has accessed or for which a rank has been specified with the
-    fs setserverprefs command.   It  stores  the  addresses  and
-    ranks in the kernel of the client machine.
- 
-    Information displayed with this command is sent to stdout by
-    default.  The -file switch can be used to direct the  output
-    to a file.
- 
- 
- 
- ARGUMENTS
- 
-    -file           specifies  the  pathname  of a file to which
-                    the file server machine names and ranks  are
-                    to  be written.  Omit this switch to display
-                    the machine names and ranks on stdout.
- 
-    -numeric        specifies that the IP addresses of the  file
-                    server  machines  are to be displayed.  Omit
-                    this flag to display the names of  the  file
-                    server  machines.    Because  including this
-                    flag skips the resolution of IP addresses to
-                    machine names, information is displayed more
-                    quickly  than  if  the  option  is  omitted.
-                    (This  flag  is  especially  useful  if  the
-                    output is intended to be used  as  input  to
-                    the fs setserverprefs command, in which case
-                    it  does  not  matter   whether   names   or
-                    addresses are used.)
- 
-    -help           prints   the  online  help  entry  for  this
-                    command.  Do not provide any other arguments
-                    or  flags with this one.  See section 3.1 in
-                    the Reference Manual for more details.
- 
- OUTPUT
- 
-    The output displays a separate line  for  each  file  server
-    machine  that  has  a  rank  in the kernel of the machine on
-    which the command is issued.  Each line displays the name of
-    a file server machine followed by its rank, as follows:
- 
-        first machine name            rank
-        second machine name           rank
-          .  .  .  .                  . .
- 
-    If  the  -numeric  flag  is  included  with the command, the
-    output displays the IP addresses of the file server machines
-    instead  of  their  names.  The address of a machine is also
-    displayed if the Cache Manager cannot resolve a file  server
-    machine's  name  based  on the machine's address at the time
-    the command is issued.
- 
- EXAMPLES
- 
-    The following displays the preferences  (the  list  of  file
-    server  machines and their respective ranks) associated with
-    a Cache Manager.  The output in the  example  truncates  the
-    complete  list of server machine names and ranks.  Note that
-    the IP addresses,  not  the  names,  of  some  machines  are
-    displayed because their addresses cannot be resolved.
- 
- 
- 
-        % fs gets
-        fs5.transarc.com              20000
-        fs1.transarc.com              40000
-        fs3.transarc.com              20001
-        fs4.transarc.com              40001
-        fs2.transarc.com              25000
-        121.86.3.37                   40002
-        fserver1.andrew.cmu.edu       40000
-        121.86.3.34                   40001
-        server1.athena.mit.edu        1000
-           .   .   .   .   .           . .
- 
-    The following displays the same Cache Manager's preferences,
-    but the -numeric flag is included to  display  only  the  IP
-    addresses of the file server machines, not their names.  The
-    example output again truncates the complete list  of  server
-    machine names and ranks.
- 
-        % fs gets -n
-        128.21.6.214                  20000
-        128.2.11.9                    40000
-        128.2.11.12                   20001
-        128.2.11.13                   40001
-        128.2.11.11                   25000
-        121.86.3.37                   40002
-        121.86.3.31                   40000
-        121.86.3.34                   40001
-        145.2.50.121                  1000
-          .  .  .                      . .
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs setserverprefs
--- 0 ----
Index: openafs/src/man/fs_help.1
diff -c openafs/src/man/fs_help.1:1.1 openafs/src/man/fs_help.1:removed
*** openafs/src/man/fs_help.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_help.1	Fri Apr 14 09:27:29 2006
***************
*** 1,80 ****
- fs help                    AFS Commands                 fs help
- 
- 
- NAME
- 
-    fs  help -- show  syntax  of  specified fs commands or list
- 
-                        functional  descriptions   of   all   fs
-                        commands.
- 
- 
-                                  +
-    fs help  [-topic <help string> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                           +
-    fs h  [-t <help string> ]  [-h]
- 
- DESCRIPTION
- 
-    Displays  the  first  line  (name  and short description) of
-    every fs command's online help entry if no  help  string  is
-    provided.  For each operation code specified with -topic, it
-    outputs the entire help entry.  See the OUTPUT section.
- 
- ARGUMENTS
- 
-    -topic          specifies  the  operation  codes  for  which
-                    syntax  is  to  be  provided.  If the issuer
-                    omits  this  argument,  the  output  instead
-                    provides  a  short  description  of  all  fs
-                    commands.
- 
-    -help           prints  the  online  help  entry  for   this
-                    command.  Do not provide any other arguments
-                    or flags with this one.  See section 3.1  in
-                    the Reference Manual for more details.
- 
- OUTPUT
- 
-    The online help entry for each fs command consists of two or
-    three lines:
- 
-       - The first  line  names  the  command  and  briefly
-         describes what it does.
- 
-       - The  second  line displays any aliases the command
-         has (this line does not appear for every command).
- 
-       - The final line, which begins with "Usage:",  lists
-         the   command's   arguments   and   flags  in  the
-         prescribed order.  Online  help  entries  use  the
-         same   symbols  (for  example,  brackets)  as  the
-         command  definitions  in  this  manual.    For  an
-         explanation  of  their  meaning, see page v of the
-         introductory About This Manual chapter.
- 
- 
- 
- EXAMPLES
- 
-    The  following  displays  the  online  help  entry  for  the
-    fs setacl command:
- 
-        % fs help setacl
-        fs setacl: set access control list
-        aliases: sa
-                                         +
-        Usage: fs setacl -dir <directory> 
-                                  +
-        -acl <access list entries>  [-clear] [-negative] [-help]
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs apropos
--- 0 ----
Index: openafs/src/man/fs_listacl.1
diff -c openafs/src/man/fs_listacl.1:1.1 openafs/src/man/fs_listacl.1:removed
*** openafs/src/man/fs_listacl.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_listacl.1	Fri Apr 14 09:27:29 2006
***************
*** 1,128 ****
- fs listacl                 AFS Commands              fs listacl
- 
- 
- NAME
- 
-    fs listacl -- show access control list.
- 
- 
-                                     +
-    fs listacl [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                              +
-    fs la  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Displays  the access control list (ACL) associated with each
-    directory.  It is legal to provide a filename rather than  a
-    directory  name  for directory, in which case the ACL of the
-    file's parent directory is  displayed  (because  it  is  not
-    possible  to  set an ACL for an individual file, the file is
-    inheriting the ACL from its parent directory).    Omit  this
-    switch to display the ACL of the current working directory.
- 
-    Users  who possess the ADMINISTER right on an ACL may change
-    the ACL with the fs setacl command or copy the  ACL  from  a
-    different directory to it with the fs copyacl command.
- 
- WARNING
- 
-    The  appearance  of a user/group on the Negative rights list
-    does not guarantee that the person is denied  those  rights.
-    If system:anyuser is granted any rights on the Normal rights
-    list, a user need only unlog to obtain those rights.
- 
- ARGUMENTS
- 
-    -path           specifies each  file  and/or  directory  for
-                    which  to  display  the  associated ACL.  If
-                    this  argument  is   omitted,   the   output
-                    displays the ACL associated with the current
-                    working directory.  If it is a filename, the
-                    ACL  displayed is associated with the file's
-                    parent directory.
- 
-    -help           prints  the  online  help  entry  for   this
-                    command.  Do not provide any other arguments
-                    or flags with this one.  See section 3.1  in
-                    the Reference Manual for more details.
- 
- OUTPUT
- 
-    The  first line of the output names the directory associated
-    with the access control list.  If the issuer used  shorthand
-    notation  (such  as  "."  for  the  current  directory) when
-    indicating the directory, it may appear here rather than the
-    full pathname of the directory.
- 
- 
- 
-    The  "Normal rights:" header indicates the list of users who
-    have normal rights to the directory.   Each  following  line
-    lists a user/group name and the set of rights the user/group
-    may exercise.  The possible rights and their meanings are
- 
- 
-       - r = READ the contents of files in the directory
- 
-       - w = WRITE (modify) the contents of  files  in  the
-         directory
- 
-       - l  =  LOOKUP status information about the files in
-         the directory
- 
-       - d = DELETE files from the directory
- 
-       - i = INSERT new files into the directory
- 
-       - k = LOCK; set read or write locks on the files  in
-         the directory
- 
-       - a  =  ADMINISTER;  change the rights on the access
-         control list
- 
-       - A, B, C, D, E, F, G, H; by default, these have  no
-         meaning  to  AFS server processes.  Administrators
-         and application programs may  assign  meanings  to
-         them  and  place them on ACLs to control access to
-         the directory's contents in new ways.  The letters
-         must be uppercase.
- 
-    A "Negative rights:" header may appear next, if any negative
-    rights have been specified for this directory.   The  format
-    of  this list is the same as that of the Normal rights list.
-    The difference  is  that  the  user(s)/group(s)  listed  are
-    denied rather than granted the specified rights.
- 
- EXAMPLES
- 
-    The  following  displays  the ACL associated with user pat's
-    home  directory  and  its  private  subdirectory  when   the
-    fs listacl command is issued in the home directory:
- 
-    % fs la . private  Access list for . is  Normal rights:
-    system:authuser rl     pat rlidwka     pat:friends rlid
-    Negative rights:     smith rlidwka
- 
-    Access list for private is  Normal rights:     pat rlidwka
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    To issue this command with a directory name argument, issuer
-    must have the LOOKUP right on the directory's ACL.  To issue
-    command  with a filename argument, the issuer must have both
-    the LOOKUP and READ rights on the ACL of the  file's  parent
-    directory.
- 
- MORE INFORMATION
- 
-    fs cleanacl
- 
-    fs copyacl
- 
-    fs setacl
--- 0 ----
Index: openafs/src/man/fs_listcells.1
diff -c openafs/src/man/fs_listcells.1:1.1 openafs/src/man/fs_listcells.1:removed
*** openafs/src/man/fs_listcells.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_listcells.1	Fri Apr 14 09:27:29 2006
***************
*** 1,64 ****
- fs listcells               AFS Commands            fs listcells
- 
- 
- NAME
- 
-    fs  listcells -- show  database  server machines in cell(s)
- 
-                        known to Cache Manager.
- 
- 
-    fs listcells  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs listc  [-h]
- 
- DESCRIPTION
- 
-    Formats and displays  the  Cache  Manager's  kernel-resident
-    list  of  the  database server machines in its home cell and
-    foreign cells.
- 
-    At each reboot of the workstation, the Cache Manager  copies
-    the contents of /usr/vice/etc/CellServDB into the kernel. It
-    is possible  to  modify  the  kernel-resident  list  between
-    reboots using fs newcell.
- 
- ARGUMENTS
- 
-    -help prints the online help entry for this command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  3.1  in  the  Reference  Manual for more
-          details.
- 
- OUTPUT
- 
-    The output contains a line  for  each  cell  for  which  the
-    kernel  has  a  list  of database server machines.  The cell
-    name is followed by a list of its database  server  machines
-    (referred to as "hosts").
- 
-    The  format of each machine name (name in uppercase, name in
-    lowercase, or Internet address in four-field  decimal  form)
-    depends  on the state of the local cell's name server at the
-    time the command is issued.
- 
- EXAMPLES
- 
-    The  following   shows   output   for   several   cells   as
-    illustrations of the different formats for machine names:
- 
-        % fs listc
-        Cell transarc.com on hosts fs1.transarc.com fs2.transarc
-        Cell andrew.cmu.edu on hosts VICE11.FS.ANDREW.CMU.EDU
-           VICE2.FS.ANDREW.CMU.EDU VICE7.FS.ANDREW.CMU.EDU.
-        Cell athena.mit.edu on hosts 18.80.0.2 orf.mit.edu
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs newcell
--- 0 ----
Index: openafs/src/man/fs_listquota.1
diff -c openafs/src/man/fs_listquota.1:1.1 openafs/src/man/fs_listquota.1:removed
*** openafs/src/man/fs_listquota.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_listquota.1	Fri Apr 14 09:27:29 2006
***************
*** 1,84 ****
- fs listquota               AFS Commands            fs listquota
- 
- 
- NAME
- 
-    fs  listquota -- show  quota  information  for  the  volume
- 
-                        containing a file/directory.
- 
- 
-                                        +
-    fs listquota  [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                              +
-    fs lq  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Displays information about the size and quota of the  volume
-    containing each specified directory or file.  See the OUTPUT
-    section  for  a  complete  explanation  of  the  information
-    provided.
- 
- ARGUMENTS
- 
-    -path specifies   each   file  and/or  directory  for  which
-          information about the host volume is desired.  If  the
-          issuer  omits  this argument, the current directory is
-          assumed.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- OUTPUT
- 
-    The  output  reports  the  following  information about each
-    volume that contains a specified directory or file:
- 
-       - the name of the volume
- 
-       - its maximum size quota, in kilobytes
- 
-       - its current size, in kilobytes
- 
-       - the percentage of its quota that its current  size
-         represents
- 
-       - the percentage of the volume's disk partition that
-         is full.  This is usually unrelated to how much of
-         the  user's quota is used, since it depends on all
-         the volumes on the partition.  A large  value  may
-         nevertheless  prevent  a  user  from being able to
-         store more data on the partition.
- 
- 
- 
- EXAMPLES
- 
-    The following shows the output for the volume user.smith  in
-    the Transarc Corporation cell:
- 
-        % fs lq /afs/transarc.com/usr/smith
-        Volume Name     Quota    Used    % Used   Partition
-        user.smith      15000    5071       34%         86%
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs diskfree
- 
-    fs examine
- 
-    fs quota
- 
-    fs setquota
- 
-    fs setvol
--- 0 ----
Index: openafs/src/man/fs_lsmount.1
diff -c openafs/src/man/fs_lsmount.1:1.1 openafs/src/man/fs_lsmount.1:removed
*** openafs/src/man/fs_lsmount.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_lsmount.1	Fri Apr 14 09:27:29 2006
***************
*** 1,96 ****
- fs lsmount                 AFS Commands              fs lsmount
- 
- 
- NAME
- 
-    fs  lsmount -- show  volume  for which directory is a mount
- 
-                        point.
- 
- 
-                                +
-    fs lsmount  -dir <directory>   [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                         +
-    fs ls  -d <directory>   [-h]
- 
- DESCRIPTION
- 
-    Outputs the name of the volume(s) for which  each  directory
-    is the root directory.  If directory is not a mount point or
-    is not in AFS, an error message appears.
- 
-    The association between directory  and  a  volume  name  was
-    created with the fs mkmount command.
- 
- ARGUMENTS
- 
-    -dir  names the directory that serves as a mount point for a
-          volume.  The last element in  the  pathname  that  the
-          issuer  provides must be an actual name, not "dot" (.)
-          or "dot dot" (. .), which the fs  command  interpreter
-          does not understand in this case.
- 
-    -help prints the online help entry for this command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  3.1  in  the  Reference  Manual for more
-          details.
- 
- OUTPUT
- 
-    The output is of the form:
- 
-    'directory' is a mount point for volume 'volume name'
- 
-    A  hash  sign  (#)  preceding  volume  name  indicates  that
-    directory is a regular mount point.
- 
-    A  percent  sign  (%)  preceding  volume name indicates that
-    directory is a ReadWrite mount point.
- 
-    If directory is a cellular mount point, then a cell name and
-    colon  precede  volume  name in addition to the hash sign or
-    percent sign.
- 
- 
- 
-    If directory is not a mount point, the output reads:
- 
-    'directory' is not a mount point.
- 
- EXAMPLES
- 
-    The following shows the mount point for the  home  directory
-    of user smith in the Transarc Corporation cell:
- 
-        % fs ls /afs/transarc.com/usr/smith
-        '/afs/transarc.com/usr/smith' is a mount point for
-            volume '#user.smith'
- 
-    The  following  shows  both  the regular and ReadWrite mount
-    points for the Transarc Corporation cell's root.cell volume.
- 
-        % fs ls /afs/transarc.com
-        '/afs/transarc.com' is a mount point for volume '#ro
- 
-        % fs ls /afs/.transarc.com
-        '/afs/.transarc.com' is a mount point for volume
-            '%root.cell'
- 
-    The following shows  a  cellular  mount  point:  the  Andrew
-    cell's   root.cell   volume   as  mounted  in  the  Transarc
-    Corporation cell's tree.
- 
-        % fs ls /afs/andrew.cmu.edu
-        '/afs/andrew.cmu.edu' is a mount point for volume
-            '#andrew.cmu.edu:root.cell'
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs mkmount fs rmmount
--- 0 ----
Index: openafs/src/man/fs_mkmount.1
diff -c openafs/src/man/fs_mkmount.1:1.1 openafs/src/man/fs_mkmount.1:removed
*** openafs/src/man/fs_mkmount.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_mkmount.1	Fri Apr 14 09:27:29 2006
***************
*** 1,297 ****
- fs mkmount                 AFS Commands              fs mkmount
- 
- 
- NAME
- 
-    fs mkmount -- create a mount point for a volume.
- 
- 
-    fs mkmount -dir <directory> -vol <volume name>  [-cell <cell
-    name>]    [-rw]  [-fast]  [-root]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs mk -d <directory> -v <volume name> [-c <cell name>]
-    [-rw]  [-f]  [-ro]  [-h]
- 
- DESCRIPTION
- 
-    Creates a mount point called directory for the volume volume
-    name.  The volume's root directory is also named  directory.
-    Mount  points look and act just like standard UNIX directory
-    structures, because when  the  Cache  Manager  encounters  a
-    mount point directory in a pathname, it knows to look in the
-    indicated volume for the elements listed under directory.
- 
-    It is possible, although not  recommended,  to  create  more
-    than one mount point to a volume.
- 
-    Types of mount points
- 
-    There  are  several  types  of  mount  points, because mount
-    points can vary along three dimensions.  The following  will
-    discuss  the  three  dimensions in turn, explaining how they
-    affect the  Cache  Manager's  interpretation  of  the  mount
-    point.
- 
-    Dimension 1: Volume Type
- 
-    The   first   dimension   concerns   which  type  of  volume
-    (ReadWrite, ReadOnly or Backup) is named in the mount point.
-    ReadOnly and Backup volumes are distinguished by a .readonly
-    or .backup extension, respectively.    When  a  mount  point
-    names  a  volume  with  either  extension, the Cache Manager
-    accesses the specified volume  only,  ignoring  Dimension  2
-    (the mount point's type).  In other words, the Cache Manager
-    will never access the ReadWrite version of a volume  if  the
-    mount point explicitly names the ReadOnly or Backup version.
-    If the named ReadOnly or Backup volume is inaccessible,  the
-    Cache Manager reports an error.
- 
-    If  the  volume name does not include a .backup or .readonly
-    extension, then the volume is ReadWrite.  The Cache  Manager
-    considers Dimension 2.
- 
-    Dimension 2: Mount Point Type
- 
-    Note:   This  dimension  is  relevant  only  if  the  volume
-    indicated in the mount point is ReadWrite.  Only Dimension 1
-    is relevant if the named volume is ReadOnly or Backup.
- 
-    The second dimension concerns whether the mount point itself
-    is "regular" or "ReadWrite":
- 
-       - When the Cache Manager encounters a regular  mount
- 
- 
- 
-         point (one naming a ReadWrite volume), it tries to
-         access a copy of the volume that is of  same  type
-         (ReadWrite or ReadOnly) as the volume which houses
-         the mount point.  If there is  no  volume  of  the
-         same  type,  it  will  access  the  type  that  is
-         available.
- 
-         Almost all mount points are of  this  type.    Its
-         advantage  is  that  the  Cache Manager is free to
-         access the most  readily  available  form  of  the
-         volume.    When  the  Cache  Manager  starts  in a
-         ReadOnly volume, this type of  mount  point  means
-         that  it traverses a "ReadOnly path," which can be
-         efficient because no callbacks are necessary.
- 
-         The  issuer  creates  a  regular  mount  point  by
-         providing   only   the   required  -dir  and  -vol
-         arguments.
- 
-       - When the  Cache  Manager  encounters  a  ReadWrite
-         mount   point,  it  accesses  only  the  ReadWrite
-         version of the indicated volume.    (This  assumes
-         that  the  volume  does  not  have  a  .backup  or
-         .readonly  extension.    Mounting  a   Backup   or
-         ReadOnly  volume  with  a ReadWrite mount point is
-         possible but unnecessary,  as  the  Cache  Manager
-         handles those volume types in the same way whether
-         their mount point is regular or  ReadWrite.    See
-         Dimension 1.)
- 
-         A ReadWrite mount point is generally used to mount
-         only one volume in a cell: its root.cell volume at
-         the  second  level  in  the  file tree, just below
-         /afs.  Conventionally, root.cell is  also  mounted
-         with  a regular mount point at the same level. The
-         two  mount  points  are   distinguished   by   the
-         placement   of  a  period  at  the  start  of  the
-         ReadWrite mount point's  name  (see  the  EXAMPLES
-         section).    The  existence  of  a ReadWrite mount
-         point   for   root.cell    allows    the    system
-         administrator  to  switch  onto a "ReadWrite" path
-         and thus be  sure  he  or  she  is  accessing  the
-         ReadWrite   version  of  a  volume  when  that  is
-         important.
- 
-         The issuer creates  a  ReadWrite  mount  point  by
-         adding the -rw flag.
- 
-    Dimension 3: Cellular versus Local
- 
-    The  third  dimension concerns which cell the volume resides
-    in.  A cellular mount point indicates to the  Cache  Manager
-    that  the  volume  resides  in a foreign cell (and specifies
-    which one).  If the mount point is not  cellular,  then  the
-    Cache  Manager  assumes  that the volume resides in the same
-    cell as the mount point does.
- 
-    Normally, cellular mount points are used only at the  second
-    level  in a cell's file tree (i.e., at the "cell" level just
-    below /afs), to mount  the  root.cell  volumes  for  foreign
-    cells  that  are  to  be  visible  in the local cell.  It is
- 
- 
- 
-    possible to create  cellular  mount  points  (mount  foreign
-    volumes)  at  other  levels  in  the  tree.  Doing so is not
-    recommended,  however,  as  it  can  make  it  difficult  to
-    determine which cell a given pathname leads to.
- 
-    Cellular mount points can be either regular or ReadWrite:
- 
-       - A  regular cellular mount point not only tells the
-         Cache Manager to cross into a  foreign  cell,  but
-         also   to  access  the  ReadOnly  version  of  the
-         indicated volume if possible.   The  advantage  is
-         that the Cache Manager traverses a "ReadOnly path"
-         in the foreign cell, even if the mount  point  for
-         the   indicated  volume  resides  in  a  ReadWrite
-         volume.  This is particularly useful when crossing
-         into foreign cells that are too small to replicate
-         their root.afs volume.
- 
-         To create a  regular  cellular  mount  point,  the
-         issuer uses the -cell argument to specify the cell
-         name, and adds the -root flag.
- 
-       - A ReadWrite cellular mount point tells  the  Cache
-         Manager  to  cross  into a foreign cell and access
-         the ReadWrite version of the volume (assuming that
-         the  volume  does  not have a .backup or .readonly
-         extension).  Use of this type of  mount  point  is
-         discouraged,  because  accessing ReadWrite volumes
-         means the File Server has to issue  callbacks,  an
-         extra  load  it is not fair to impose from outside
-         the  cell.    In  general,  only  a   cell's   own
-         administrators   need   to  access  the  ReadWrite
-         version of a volume.
- 
-         To create a ReadWrite cellular  mount  point,  the
-         issuer uses the -cell argument to specify the cell
-         name, and adds  both  the  -root  and  -rw  flags.
-         Because  this is not recommended, no example of it
-         appears below.
- 
-    Mounting foreign volumes in foreign cells
- 
-    In addition to mounting  volumes  in  the  local  cell,  the
-    fs mkmount  allows a user who possesses the necessary access
-    rights in a foreign cell to create a  regular,  non-cellular
-    mount point in a foreign cell's file tree while working on a
-    machine in his or her local  cell.    In  other  words,  the
-    issuer can mount a volume from a foreign cell in that cell's
-    file space as though he or she were working at a machine  in
-    that cell.
- 
-    To  mount a foreign volume in foreign cell, specify the cell
-    name with -cell, but do not use the -root flag.
- 
- 
- 
-    Distinguishing the types of mount points
- 
-    The output of fs lsmount uses various symbols to distinguish
-    the different types of mount points.  See the Output section
-    of that command's description.
- 
- ARGUMENTS
- 
-    -dir  names the directory to be created as a mount point  to
-          the  named  volume.   It should not already exist.  If
-          the issuer does not  specify  a  pathname,  the  mount
-          point  is  created  as  a  subdirectory of the current
-          working directory.
- 
-    -vol  names the volume to be mounted.  Add the .readonly  or
-          .backup  extension  if  appropriate.   The volumeID is
-          also acceptable.
- 
-          Note: When creating a cellular  mount  point,  do  not
-          specify the cell name as part of this argument, as was
-          necessary in previous versions of  AFS  that  did  not
-          have  the -root flag.  Instead, include the -root flag
-          and use the -cell argument to specify the  cell  name;
-          the command interpreter will automatically prepend the
-          cell name to the volume name, separating them  with  a
-          colon.
- 
-    -cell names  the  cell  in  which  the volume resides.  When
-          creating a cellular mount point, combine this argument
-          with  the  -root flag.  When mounting a foreign volume
-          in a foreign cell, use this argument alone.
- 
-    -rw   designates the mount point as ReadWrite, which  forces
-          the Cache Manager to access only the ReadWrite copy of
-          a volume that does not have  a  .backup  or  .readonly
-          extension.    Without  this  flag,  the mount point is
-          regular.
- 
-    -fast indicates that the VL Server  should  not  check  that
-          there  is  a  VLDB entry for the volume to be mounted.
-          By default, the VL Server  does  check  and  prints  a
-          warning  message  if there is no VLDB entry; the mount
-          point is created in any case.
- 
-    -root creates a cellular mount point.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- EXAMPLES
- 
-    Note:    These  examples  illustrate  only  the  recommended
-    combinations and use of arguments.  The  OUTPUT  section  of
-    fs lsmount's  description  shows what each mount point looks
-    like.
- 
-    The following creates a regular  mount  point.    It  mounts
-    user.smith at /afs/transarc.com/usr/smith.
- 
- 
- 
-    % cd /afs/transarc.com/usr  % fs mk smith user.smith
- 
- 
- 
-    The  following  creates  both  a ReadWrite and regular mount
-    point for the Transarc Corporation cell's root.cell  volume,
-    in  that  cell's  file  tree.   It follows the convention of
-    putting a period at the beginning  of  the  ReadWrite  mount
-    point's name.
- 
-    % fs mk /afs/transarc.com root.cell  % fs mk
-    /afs/.transarc.com root.cell -rw
- 
-    The  following  mounts  the  root.cell  volume  belonging to
-    Carnegie Mellon University's Andrew  cell  in  the  Transarc
-    Corporation  cell's  file tree, creating a regular, cellular
-    mount  point  called  andrew.cmu.edu.    When   a   Transarc
-    Corporation  Cache  Manager  encounters this mount point, it
-    will cross into the Andrew cell on a ReadOnly path.
- 
-    % fs mk /afs/andrew.cmu.edu root.cell -c andrew.cmu.edu
-    -root
- 
-    The following illustrates the creation of a mount point in a
-    foreign  cell,  using  Transarc  Corporation's  regular cell
-    (transarc.com)  as  the  local  cell  and  its   test   cell
-    (test.transarc.com) as the foreign cell.  Suppose that while
-    working on a machine belonging to the transarc.com  cell,  a
-    Transarc Corporation user wants to mount a test.transarc.com
-    volume            called            user.test5            at
-    /afs/test.transarc.com/usr/test5.    She  has the INSERT and
-    ADMINISTER rights for /afs/test.transarc.com/usr.  Note that
-    the effect is just the same as if the issuer were working on
-    a  machine  belonging  to  the  test.transarc.com  cell  and
-    omitted the -c test.transarc.com part of the command.
- 
-    % cd /afs/test.transarc.com/usr  % fs mk test5 user.test5 -c
-    test.transarc.com
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  must  have  INSERT  and  ADMINISTER  access  for the
-    directory that is to contain the mount point.
- 
- MORE INFORMATION
- 
-    fs lsmount fs rmmount
--- 0 ----
Index: openafs/src/man/fs_monitor.1
diff -c openafs/src/man/fs_monitor.1:1.1 openafs/src/man/fs_monitor.1:removed
*** openafs/src/man/fs_monitor.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_monitor.1	Fri Apr 14 09:27:29 2006
***************
*** 1,125 ****
- fs monitor                 AFS Commands              fs monitor
- 
- 
- NAME
- 
-    fs  monitor -- direct  reports  on  file system activity to
- 
-                        specified  machine,  or  report  current
-                        monitoring machine.
- 
- 
-    fs monitor [-server <host name> or <off>]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs mo [-s <host name> or <off>]  [-h]
- 
- DESCRIPTION
- 
-    Depending   on  whether  the  issuer  provides  the  -server
-    argument, and its value when provided:
- 
-    EITHER sets where the Cache Manager sends messages about
-    file system activity (including its transactions with the Fi
- 
-    OR disables message sending
- 
-    OR reports the current destination for messages.
- 
-    The messages are of  a  less  technical  nature  than  those
-    generated by the fs debug command.  They are at the level of
-    file fetches and stores.
- 
-    In order for the messages to  be  displayed,  the  specified
-    destination  machine  must  be  running a monitoring program
-    that "listens" to the correct UDP socket. If the destination
-    machine is not running such a program, then the messages are
-    lost.
- 
- WARNING
- 
-    The effect of this command endures  even  after  the  issuer
-    logs out.  See the EXAMPLE section below.
- 
-    Transarc  Corporation  does not provide a monitoring program
-    appropriate for use with this command, but such  a  program,
-    called "Console", is available as part of the Andrew Toolkit
-    developed  at  Carnegie  Mellon   University's   Information
-    Technology Center.
- 
-    If no monitoring program is available, it is best to provide
-    a value of off for -server.
- 
- 
- 
- ARGUMENTS
- 
-    -server has two legal values: off or  a  machine  name  host
-            name.
- 
-            If  set  to  off,  then  the  Cache Manager does not
-            generate any reports on  its  role  in  file  system
-            activities.    This  setting  is  recommended if the
-            machine is not running a monitoring program  capable
-            of   intercepting   and   displaying   the  messages
-            produced.
- 
-            The issuer may otherwise specify a machine name host
-            name  to which the Cache Manager will send messages.
-            The host name  must  be  a  complete  Internet-style
-            machine  name,  and  a  monitoring program should be
-            running on the machine.    If  no  such  program  is
-            running, the messages will simply be lost.
- 
-            If  the  issuer  does not provide this argument, the
-            current monitor setting is displayed.
- 
-    -help   prints the online help entry for this command.    Do
-            not  provide  any other arguments or flags with this
-            one.  See section 3.1 in the  Reference  Manual  for
-            more details.
- 
- OUTPUT
- 
-    When  no  arguments are provided, the output will report the
-    name of the machine to which monitoring messages  are  being
-    sent:
- 
-        Using host machine for monitor services.
- 
-    If monitoring is disabled, the output reports
- 
-        Cache monitoring is currently disabled.
- 
- EXAMPLES
- 
-    The  following shows that monitoring messages are being sent
-    to machineQ.transarc.com.
- 
-        % fs mo
-        Using host machineQ.transarc.com for monitor service
- 
-    The following  sets  the  machine's  monitoring  machine  to
-    machineB.transarc.com.
- 
-        % fs monitor machineB.transarc.com
-        fs: new monitor host set.
- 
-    As  an  example  of  the "lingering" effect of this command,
-    suppose that a user working on machineA.transarc.com  issues
-    the  example  command, and then logs out.  When another user
-    logs on to machineA, he or she will  not  see  any  messages
-    about  file system activity; instead, users of machineB will
-    continue to see messages from  both  machineB  (their  local
-    machine)  and machineA (the remote machine).  To avoid this,
-    the original user on machineA should  issue  the  fs monitor
- 
- 
- 
-    command again before logging out, specifying host name to be
-    machineA.transarc.com.
- 
- PRIVILEGE REQUIRED
- 
-    None.
--- 0 ----
Index: openafs/src/man/fs_newcell.1
diff -c openafs/src/man/fs_newcell.1:1.1 openafs/src/man/fs_newcell.1:removed
*** openafs/src/man/fs_newcell.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_newcell.1	Fri Apr 14 09:27:29 2006
***************
*** 1,87 ****
- fs newcell                 AFS Commands              fs newcell
- 
- 
- NAME
- 
-    fs   newcell -- change   list  of  cell's  database  server
- 
-                        machines in kernel.
- 
- 
-                                                           +
-    fs newcell -name <cell name> -servers <primary servers> 
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                                            +
-    fs n -n <cell name> -s <primary servers>   [-h]
- 
- DESCRIPTION
- 
-    Removes the Cache Manager's kernel-resident list of database
-    server  machines  for  the cell cell name, replacing it with
-    primary servers.
- 
-    This  command  does  not  make  permanent  changes  in   the
-    workstation's /afs/vice/etc/CellServDB file, the contents of
-    which are transferred into the kernel at each  reboot.    In
-    other  words,  rebooting  the workstation will overwrite the
-    changes made with this command, unless  the  issuer  changes
-    CellServDB in the same way.
- 
-    Changes  made  with  this command do appear in the output of
-    fs listcells, since that command consults the in-kernel list
-    rather than CellServDB.
- 
-    This  command may be used to introduce a completely new cell
-    into the kernel-resident list, but it  is  not  possible  to
-    make  a cell inaccessible with this command (i.e., remove it
-    from the kernel-resident list by not providing any instances
-    for  -server).    To do that, the user must alter CellServDB
-    and reboot the machine.
- 
- WARNING
- 
-    Some commands work correctly only when both  CellServDB  and
-    the  kernel-resident  list  correctly list a cell's database
-    server machines.  The need  of  such  commands  for  correct
-    information  in  CellServDB  precludes  use of this command.
-    The klog command is a prominent example.
- 
- ARGUMENTS
- 
-    -name   is the complete Internet-style name of the cell  for
-            which the in-kernel list of database server machines
-            will change.  It may be the local cell or a  foreign
-            cell.
- 
-    -servers
-            names the database server machine(s) for the cell in
-            question.     Provide  the  complete  Internet-style
-            machine name for each machine.
- 
-    -help   prints the online help entry for this command.    Do
- 
- 
- 
-            not  provide  any other arguments or flags with this
-            one.  See section 3.1 in the  Reference  Manual  for
-            more details.
- 
- EXAMPLES
- 
-    The  following changes the machine's kernel-resident list of
-    database server machines for the Transarc  Corporation  cell
-    to include fs1.transarc.com and fs2.transarc.com.
- 
-    % fs n transarc.com fs1.transarc.com fs2.transarc.com
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  must  be logged in as "root" in the UNIX file system
-    of the machine on which the command is being issued.
- 
- MORE INFORMATION
- 
-    fs listcells
--- 0 ----
Index: openafs/src/man/fs_quota.1
diff -c openafs/src/man/fs_quota.1:1.1 openafs/src/man/fs_quota.1:removed
*** openafs/src/man/fs_quota.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_quota.1	Fri Apr 14 09:27:29 2006
***************
*** 1,78 ****
- fs quota                   AFS Commands                fs quota
- 
- 
- NAME
- 
-    fs   quota -- show   percent   of  quota  used  for  volume
- 
-                        containing directory/file.
- 
- 
-                                    +
-    fs quota  [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                             +
-    fs q  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Displays the percent of maximum quota currently used by  the
-    volume that contains each specified directory or file.  This
-    is the  least  informative  but  quickest  fs  command  that
-    provides  quota  information about a volume.  The fs examine
-    and fs listquota commands provide more complete information.
- 
-    The system administrator may set quota with the fs  setquota
-    or fs setvol command.
- 
- ARGUMENTS
- 
-    -path specifies  each  file and/or directory for which quota
-          information about the host volume is desired.  If  the
-          issuer  omits  this argument, the current directory is
-          assumed.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- OUTPUT
- 
-    The  output  reports the percent of quota used.  It does not
-    name the host volume.
- 
- EXAMPLES
- 
-    The following lists the percent quota  used  of  the  volume
-    housing the current working directory:
- 
-        % fs quota
-        17% of quota used.
- 
- 
- 
-    The  following  lists  the  percent  quota  used of both the
-    volume  housing  the  current  working  directory's   parent
-    directory   and  the  volume  housing  the  directory  named
-    /afs/transarc.com/usr/smith:
- 
-        % fs quota .. /afs/transarc.com/usr/smith
-        43% of quota used.
-        92% of quota used.
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs examine
- 
-    fs listquota
- 
-    fs setquota
- 
-    fs setvol
--- 0 ----
Index: openafs/src/man/fs_rmmount.1
diff -c openafs/src/man/fs_rmmount.1:1.1 openafs/src/man/fs_rmmount.1:removed
*** openafs/src/man/fs_rmmount.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_rmmount.1	Fri Apr 14 09:27:29 2006
***************
*** 1,52 ****
- fs rmmount                 AFS Commands              fs rmmount
- 
- 
- NAME
- 
-    fs rmmount -- destroy mount point.
- 
- 
-                               +
-    fs rmmount -dir <directory>   [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                         +
-    fs rm  -d <directory>   [-h]
- 
- DESCRIPTION
- 
-    Removes  the  mount  point  called  directory  from the file
-    system.  The corresponding volume remains in the system, but
-    will  be inaccessible if there are no other mount points for
-    it.
- 
- ARGUMENTS
- 
-    -dir  names the mount point to  be  deleted  from  the  file
-          system.  The  last  element  in  the pathname that the
-          issuer provides must be an actual name, not "dot"  (.)
-          or  "dot  dot" (. .), which the fs command interpreter
-          does not understand in this case.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- EXAMPLES
- 
-    The  following removes the mount points jones and terry from
-    the   current    working    directory    (assume    it    is
-    /afs/transarc.com/usr).
- 
-    % fs rm jones terry
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  must have DELETE access for the directory containing
-    the mount point.
- 
- MORE INFORMATION
- 
-    fs lsmount fs mkmount
--- 0 ----
Index: openafs/src/man/fs_setacl.1
diff -c openafs/src/man/fs_setacl.1:1.1 openafs/src/man/fs_setacl.1:removed
*** openafs/src/man/fs_setacl.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_setacl.1	Fri Apr 14 09:27:29 2006
***************
*** 1,204 ****
- fs setacl                  AFS Commands               fs setacl
- 
- 
- NAME
- 
-    fs setacl -- sets access control list for a directory.
- 
- 
-                               +                           +
-    fs setacl  -dir <directory>  -acl <access list entries> 
-    [-clear]
-    [-negative]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                        +                         +
-    fs sa -d <directory>  -a <access list entries>  [-c] [-n]
-    [-h]
- 
- DESCRIPTION
- 
-    Puts the specified access list entries on the access control
-    list (ACL) of each specified directory.
- 
- WARNING
- 
-    If the ACL already grants certain rights to a user or group,
-    the  rights specified with access list entries replace them,
-    rather than just being added to them.
- 
-    Setting negative rights is  generally  unnecessary  and  not
-    recommended.    Simply  omitting  a  user  or group from the
-    Normal rights list is normally adequate to  prevent  access.
-    In  particular,  note  that it is futile to deny rights that
-    are granted to system:anyuser on the same ACL; all the  user
-    needs to do is issue the unlog command to receive the denied
-    rights.
- 
- ARGUMENTS
- 
-    -dir            specifies  each  directory  for  which   the
-                    access    control   list   is   to   change.
-                    Abbreviated   pathnames   are    interpreted
-                    relative  to  the  directory  in  which  the
-                    command is issued.
- 
-    -acl            defines a list of one or more entries,  each
-                    of which specifies
- 
-                       - a user name or group name (letters
-                         all lowercase)
- 
-                       - the   access   right(s)   to    be
-                         associated with the user/group
- 
-                    in  that  order, separated by a space.  This
-                    argument is unusual in requiring  two  parts
-                    for    each    instance.      The   accepted
-                    abbreviation of each right and  the  meaning
-                    of the right follows:
- 
-                    r    READ.  Allows the possessor to read the
-                         contents of files in the directory  and
-                         to  "stat"  (issue  ls -l for) file and
- 
- 
- 
-                         subdirectory elements in the directory.
- 
-                    w    WRITE.   Allows the possessor to modify
-                         the contents of files in the  directory
-                         and to change their UNIX mode bits with
-                         chmod.
- 
-                    l    LOOKUP.  Allows the possessor  to  list
-                         the  names  of files and subdirectories
-                         in  the  directory  (for  example,   by
-                         issuing  ls).  The possessor may "stat"
-                         (issue ls -l for) the directory  itself
-                         (but  not  for files and subdirectories
-                         in it) and may examine the  directory's
-                         ACL.
- 
-                    d    DELETE.  Allows the possessor to remove
-                         files from the directory.
- 
-                    i    INSERT.  Allows the possessor to create
-                         new  files  in  the  directory  or move
-                         existing files into it.
- 
-                    k    LOCK.   Allows  the  possessor  to  run
-                         programs that need to issue the "flock"
-                         system call on files in the  directory.
- 
-                    a    ADMINISTER.    Allows  the possessor to
-                         change the directory's ACL.
- 
-                    A, B, C, D, E, F, G, H;  by  default,  these
-                         have   no   meaning   to   AFS   server
-                         processes.        Administrators    and
-                         application    programs    may   assign
-                         meanings to them and place them on ACLs
-                         to  control  access  to the directory's
-                         contents in new ways.  The letters must
-                         be uppercase.
- 
-                    all  all seven standard rights (rlidwka).
- 
-                    none no rights.  Removes the user/group from
-                         the ACL, but  may  not  guarantee  they
-                         have no rights if they belong to groups
-                         that remain on the ACL.
- 
-                    read both r and l.
- 
-                    write
-                         all  rights except ADMINISTER (rlidwk).
- 
-                    It is legal to mix  the  individual  letters
-                    and  the  words  within access list entries,
-                    but not  within  an  individual  pairing  of
-                    user/group and rights.
- 
-    -clear          removes  all existing entries on each access
-                    control  list  before  placing  access  list
-                    entries  on  it.    This should be used with
-                    caution:  if access list  entries  does  not
-                    grant   all  rights  to  the  owner  of  the
- 
- 
- 
-                    directory, it can  become  awkward  for  the
-                    owner  to access items in the directory.  In
-                    particular,  not  having  the  LOOKUP  right
-                    makes it impossible to resolve the "dot" ( .
-                    ) and "dot dot"  (  .  .  )  shorthand  from
-                    within the directory.
- 
-    -negative       puts  the  specified  access list entries in
-                    the Negative rights section of  each  access
-                    control   list.    The  user/group  is  thus
-                    explicitly denied the indicated rights, even
-                    if entries on the accompanying Normal rights
-                    section of the  access  control  list  grant
-                    them  rights.    However,  it is possible to
-                    unlog   to   obtain   rights   granted    to
-                    system:anyuser  on the Normal rights section
-                    of the same ACL; see the WARNING above.
- 
-                    This flag affects all directories and access
-                    list  entries  specified.    Its  use is not
-                    recommended; see the WARNING section  above.
-                    If  the  issuer  omits this flag, the access
-                    list  entries  go  into  the   Normal rights
-                    section of the access control list.
- 
-    -help           prints   the  online  help  entry  for  this
-                    command.  Do not provide any other arguments
-                    or  flags with this one.  See section 3.1 in
-                    the Reference Manual for more details.
- 
- EXAMPLES
- 
-    The following example adds two entries to the  Normal rights
-    part of the current working directory's ACL: the first entry
-    grants READ and LOOKUP  rights  to  pat:friends,  while  the
-    other  (using  the  write shorthand) gives all rights except
-    ADMINISTER to smith.
- 
-    % fs sa . pat:friends rl smith write
- 
-    The following shows the effect of the -clear flag on the ACL
-    of  the  subdirectory  reports by showing the ACL before and
-    after the command is issued:
- 
-    % fs la reports  Access list for reports is  Normal rights:
-    system:authuser rl     pat:friends rlid     smith rlidwk
-    pat rlidwka  Negative rights:     terry rl
- 
-    % fs sa -clear reports pat all smith write system:anyuser rl
-    % fs la reports  Access list for reports is  Normal rights:
-    system:anyuser rl     smith rlidwk     pat rlidwka
- 
- 
- 
-    The following shows how  the  -dir  and  -acl  switches  are
-    necessary  when  more  than one directory is specified.  The
-    new entry  granting  READ,  LOOKUP,  and  INSERT  rights  to
-    pat:friends  is  added  to  the  ACL  for  both  the current
-    directory and its public subdirectory.
- 
-    % fs sa -d . public -a pat:friends rli
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must have ADMINISTER rights  to  the  directory;  the
-    directory's   owner  and  members  of  system:administrators
-    always do.
- 
- MORE INFORMATION
- 
-    fs copyacl
- 
-    fs listacl
--- 0 ----
Index: openafs/src/man/fs_setcachesize.1
diff -c openafs/src/man/fs_setcachesize.1:1.1 openafs/src/man/fs_setcachesize.1:removed
*** openafs/src/man/fs_setcachesize.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_setcachesize.1	Fri Apr 14 09:27:30 2006
***************
*** 1,97 ****
- fs setcachesize            AFS Commands         fs setcachesize
- 
- 
- NAME
- 
-    fs setcachesize -- set size of disk cache.
- 
- 
-    fs setcachesize [-blocks <size in 1K byte blocks>]  [-reset]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs setca [-b <size in 1K byte blocks>]  [-r]  [-h]
- 
-    fs cachesize [-b <size in 1K byte blocks>]  [-r]  [-h]
- 
- DESCRIPTION
- 
-    On  machines using a disk cache, changes the amount of local
-    disk space that the Cache  Manager  may  use  for  its  data
-    cache.  Specify the number in kilobyte blocks.  This command
-    is not operative on machines using memory caching.
- 
-    To return the cache size to the default value  specified  in
-    /usr/vice/etc/cacheinfo  on the client's local disk, specify
-    0 as the number of kilobyte blocks.  The cacheinfo  file  is
-    human-readable  and visible with the cat command.  The third
-    and final field is the number of kilobyte  blocks  allocated
-    to  the  cache  at  reboot.    The chapter in the AFS System
-    Administrator's  Guide  on  client   machine   configuration
-    further describes the contents of cacheinfo.
- 
-    To  return  the cache size to the value set when the machine
-    was last booted, use the -reset flag instead of the  -blocks
-    argument.     This  is  normally  the  amount  specified  in
-    cacheinfo, unless the -blocks argument was used on  afsd  to
-    override the cacheinfo value.
- 
-    The  fs getcacheparms  command  displays  the current actual
-    cache size and the amount of space in use, both for disk and
-    memory caches.
- 
- WARNINGS
- 
-    This  command  is  not  operative  on  machines using memory
-    caching, and will result in an error message.
- 
-    On machines using a disk cache, do not set the cache size to
-    exceed  90% of the actual disk space available for the cache
-    directory.  The cache implementation itself requires a small
-    amount of room on the partition.
- 
- ARGUMENTS
- 
-    -blocks
-          specifies the number of 1 kilobyte  blocks  the  Cache
-          Manager  may  devote to the cache.  Specifying a value
-          of "0" sets cache size to  the  default  specified  in
-          cacheinfo.    This  implies that the smallest possible
-          cache size is 1 kilobyte, not 0.
- 
-    -reset
-          returns  the  cache  size  to  the  value set when the
- 
- 
- 
-          machine was last booted.  This agrees with  the  value
-          in  cacheinfo  unless the -blocks argument was used on
-          afsd.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- EXAMPLES
- 
-    The  following  sets  the  disk cache size to 25000 kilobyte
-    blocks.
- 
-    %  fs setca 25000
- 
-    Both of the following reset the disk cache size to the value
-    in cacheinfo, assuming that the -blocks argument on afsd was
-    not used.
- 
-    %  fs setcachesize 0  %  fs setca -r
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be logged in as "root" in the UNIX  file  system
-    of the machine on which the command is being issued.
- 
- MORE INFORMATION
- 
-    fs getcacheparms
--- 0 ----
Index: openafs/src/man/fs_setcell.1
diff -c openafs/src/man/fs_setcell.1:1.1 openafs/src/man/fs_setcell.1:removed
*** openafs/src/man/fs_setcell.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_setcell.1	Fri Apr 14 09:27:30 2006
***************
*** 1,81 ****
- fs setcell                 AFS Commands              fs setcell
- 
- 
- NAME
- 
-    fs  setcell -- allow or disallow running of setuid programs
- 
-                        from specified cells.
- 
- 
-                                 +
-    fs setcell  -cell <cell name>   [-suid]  [-nosuid]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                            +
-    fs setce  -c <cell name>   [-s]  [-n]  [-h]
- 
- DESCRIPTION
- 
-    Determines whether the  workstation  allows  programs  whose
-    binary  files  reside in the indicated cells to execute with
-    setuid privilege.  By default, programs originating  in  the
-    local cell (as determined by /usr/vice/etc/ThisCell) may run
-    with setuid privilege, but programs originating  in  foreign
-    cells may not.  Use the fs getcellstatus command to displays
-    a cell's current status in this respect.
- 
-    Include the -suid flag with the command  to  allow  programs
-    from  the  specified cells to execute with setuid privilege;
-    include the  -nosuid  flag  with  the  command  to  prohibit
-    programs from the specified cells from executing with setuid
-    privilege.  Use either the -suid flag or the  -nosuid  flag.
-    Omit both flags to prevent programs from the specified cells
-    from executing with setuid privilege.
- 
- ARGUMENTS
- 
-    -cell           names each  cell  from  which  to  allow  or
-                    disallow  programs  to  execute  with setuid
-                    privilege.  Provide the  complete  Internet-
-                    style  cell  name  of  each cell (unlike the
-                    -cell argument common to many commands,  the
-                    cell  argument  of  this  command  does  not
-                    accept abbreviated cell names).
- 
-    -suid           allows programs from cell  name  to  execute
-                    with   setuid  privilege.    Provide  it  or
-                    provide -nosuid.  Omit both flags to prevent
-                    programs  from cell name from executing with
-                    setuid privilege.
- 
-    -nosuid         prevents  programs  from  cell   name   from
-                    executing with setuid privilege.  Provide it
-                    or  provide  -suid.    Omit  both  flags  to
-                    prevent   programs   from   cell  name  from
-                    executing with setuid privilege.
- 
-    -help           prints  the  online  help  entry  for   this
-                    command.  Do not provide any other arguments
-                    or flags with this one.  See section 3.1  in
-                    the Reference Manual for more details.
- 
- EXAMPLES
- 
- 
- 
-    The  following enables programs whose binary files reside in
-    the Transarc Cell to execute with setuid  privilege  in  the
-    local cell:
- 
-    % fs setc transarc.com -s
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  must  be logged in as "root" in the UNIX file system
-    of the machine on which the command is issued.
- 
- MORE INFORMATION
- 
-    fs getcellstatus
--- 0 ----
Index: openafs/src/man/fs_setquota.1
diff -c openafs/src/man/fs_setquota.1:1.1 openafs/src/man/fs_setquota.1:removed
*** openafs/src/man/fs_setquota.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_setquota.1	Fri Apr 14 09:27:30 2006
***************
*** 1,73 ****
- fs setquota                AFS Commands             fs setquota
- 
- 
- NAME
- 
-    fs  setquota -- sets  maximum  quota  for volume containing
- 
-                        specified directory.
- 
- 
-    fs setquota  [-path <dir/file path>]  -max <max quota in
-    kbytes>  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs sq  [-p <dir/file path>]  -m <max quota in kbytes>  [-h]
- 
- DESCRIPTION
- 
-    Sets the maximum size quota for the volume that contains the
-    specified  directory  or  file.    The  fs  examine  and  fs
-    listquota commands show the current maximum quota.   The  fs
-    quota command shows the percent of maximum quota used.
- 
-    The  fs  setvol  command  can  be  used  to set the quota on
-    multiple volumes at once.  It can also  be  used  to  create
-    messages associated with the volumes.
- 
- ARGUMENTS
- 
-    -path           names  the directory or file for which quota
-                    on the host volume is to be set.    If  this
-                    argument  is  omitted,  the  current working
-                    directory is used; in this  case,  the  -max
-                    switch must be used.
- 
-    -max            specifies  the  maximum amount of disk space
-                    the volume can use.  Express it in  kilobyte
-                    blocks (a value of 1024 is one megabyte).  A
-                    value of 0 grants an  unlimited  quota,  but
-                    the  size  of the disk partition that houses
-                    the volume places an absolute limit  on  the
-                    volume's maximum size.
- 
-    -help           prints   the  online  help  entry  for  this
-                    command.  Do not provide any other arguments
-                    or  flags with this one.  See section 3.1 in
-                    the Reference Manual for more details.
- 
- EXAMPLES
- 
-    The following imposes a maximum quota of 3000  kilobytes  on
-    the      volume      that      houses      the     directory
-    /afs/transarc.com/usr/smith:
- 
-    % fs sq /afs/transarc.com/usr/smith 3000
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must belong to the system:administrators group in the
-    Protection Database.
- 
- MORE INFORMATION
- 
- 
- 
-    fs examine
- 
-    fs listquota
- 
-    fs quota
- 
-    fs setvol
--- 0 ----
Index: openafs/src/man/fs_setserverprefs.1
diff -c openafs/src/man/fs_setserverprefs.1:1.1 openafs/src/man/fs_setserverprefs.1:removed
*** openafs/src/man/fs_setserverprefs.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_setserverprefs.1	Fri Apr 14 09:27:30 2006
***************
*** 1,232 ****
- fs setserverprefs          AFS Commands       fs setserverprefs
- 
- 
- NAME
- 
-    fs  setserverprefs -- set  Cache  Manager's preferences for
- 
-                        file server machines.
- 
- 
-                                                        +
-    fs setserverprefs  [-servers <machine name and rank> ]
-    [-file <dir/file path>]  [-stdin]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                                         +
-    fs sets  [-se <machine name and rank> ]  [-f <dir/file
-    path>]
-    [-st]  [-h]
-                                       +
-    fs sp  [-se <machine name and rank> ]  [-f <dir/file path>]
-         [-st]  [-h]
- 
- DESCRIPTION
- 
-    Sets the Cache Manager's preference for  one  or  more  file
-    server  machines.  Each Cache Manager stores a table of file
-    server machines and their respective "ranks."  A file server
-    machine's  rank  is an integer in the range from 1 to 65,534
-    that determines the Cache Manager's preference for selecting
-    the  server  machine  when  the  Cache Manager must access a
-    ReadOnly replica that resides on it.  Ranks bias  the  Cache
-    Manager  to  prefer  to  access  replicas  on  "near" server
-    machines rather than those on "distant" server machines.
- 
-    When the Cache Manager needs to access a  ReadOnly  replica,
-    it  first  contacts  the  Volume  Location  (VL)  Server  to
-    ascertain the names of the file server machines on which the
-    replica  resides.    It  then  checks  its internal table to
-    determine the rank associated with each of the  file  server
-    machines.    After  comparing  the ranks of the machines, it
-    attempts to access the replica on the  server  machine  that
-    has the lowest integer rank.
- 
-    If  the  Cache  Manager  cannot  access  the  replica on the
-    machine with the lowest rank (possibly because of  a  server
-    process,  machine, or network outage), it attempts to access
-    the replica on the machine with the next lowest  rank.    It
-    continues  in  this way until it either accesses the replica
-    or determines that all of the file server machines on  which
-    the replica is housed are unavailable.
- 
-    Each time it is initialized with the afsd command, the Cache
-    Manager assigns preferences to any database server  machines
-    listed  in  the local /usr/vice/etc/CellServDB file that are
-    also file server machines.  It  stores  the  preferences  as
-    machine  IP  addresses and associated ranks in the kernel of
-    the  client  machine.    (See  the  DETERMINING  PREFERENCES
-    section  for  more  information  about how the Cache Manager
-    determines actual file server machine ranks.)  Because  they
-    are  stored  in the kernel, the preferences are recalculated
-    when the client machine is rebooted.
- 
-    The Cache Manager assigns ranks to file server  machines  in
- 
- 
- 
-    the local cell and from foreign cells as necessary.  When it
-    needs to access a ReadOnly volume, it first  determines  the
-    machines  on  which  the  replica  resides.  It then assigns
-    ranks to any of the machines that do not already  have  them
-    and  stores the ranks in the kernel, after which it uses the
-    ranks as the basis of  its  selection  of  the  file  server
-    machine from which to access the replica.
- 
-    The  fs  setserverprefs  command  can  be  used to define or
-    change the rank associated with  a  local  or  foreign  file
-    server  machine.    If the Cache Manager has no rank for the
-    machine, the command defines the machine's initial rank.  If
-    the  Cache  Manager  already has a rank for the machine, the
-    command changes the rank to match the one specified  by  the
-    issuer; the old rank is overwritten.
- 
-    Preferences  are  specified  as  pairs of values.  The first
-    value is the file server machine, the second  the  machine's
-    rank.    File server machines can be specified by name or by
-    IP address.  Depending on the naming  service  available  at
-    the time the command is issued, abbreviated forms of machine
-    names may be allowed.    See  the  introductory  About  This
-    Manual chapter for more information.
- 
-    Pairs  of  file  server  machines  and  their  ranks  can be
-    specified
- 
-       - on the command line with the -servers switch
- 
-       - from a file with the -file switch
- 
-       - from stdin with the -stdin flag
- 
-    The -file switch and -stdin flag are especially  useful  for
-    configuring  multiple Cache Managers in a cell with the same
-    preferences.  The -file switch can be  used  to  indicate  a
-    file created manually or generated automatically with the fs
-    getserverprefs command.  Similarly, the -stdin flag  can  be
-    used  to  accept  preferences  piped  directly  from another
-    process (possibly from another Cache  Manager  with  the  fs
-    getserverprefs  command).    The -servers, -file, and -stdin
-    switches and flag are not mutually  exclusive,  so  multiple
-    sources of preferences are permitted.
- 
-    It is possible for the Cache Manager or a user to assign the
-    same rank to multiple file server machines housing a replica
-    of  the  same  volume.  In this case, the Cache Manager uses
-    methods  described  in  the  following  section,   ASSIGNING
-    PREFERENCES, to break the tie.  It then increments the ranks
-    of the file server machines from which it  does  not  access
-    the replica.
- 
- ASSIGNING PREFERENCES
- 
-    When  initially  assigning  preferences,  the  Cache Manager
-    bases the ranks on  IP  addresses,  rather  than  on  actual
-    physical  considerations  such  as location or distance.  It
-    calculates  file  server  machine  ranks  according  to  the
-    following heuristic:
- 
-       - If  the  client  machine  is  also  a  file server
- 
- 
- 
-         machine, the machine receives a rank of 5000.
- 
-       - If the client machine is in  a  subnet,  all  file
-         server  machines  in the same subnet as the client
-         machine receive an initial rank of 20000.
- 
-       - All file server machines in the  same  network  as
-         the  client  machine  receive  an  initial rank of
-         30000.
- 
-       - All file server machines on the  distant  ends  of
-         point-to-point   links  from  the  client  machine
-         receive an initial rank of 30000.
- 
-       - All file server machines on networks not  directly
-         connected  to the client machine receive a rank of
-         40000.
- 
-       - All file server  machines  for  which  no  network
-         locality  information  can be determined receive a
-         default rank of 40000.
- 
-    The  Cache  Manager  also   considers   additional   metrics
-    associated  with  networks,  subnets, and interfaces when it
-    determines ranks.
- 
-    If the same ReadOnly replica  is  stored  on  multiple  file
-    server  machines  that have the same rank, the Cache Manager
-    employs the metrics  mentioned  previously  to  resolve  the
-    duplicate  rank collisions.  If necessary, the Cache Manager
-    randomizes its ranking of the tied machines.    It  resolves
-    the  ties internally by incrementing by one the ranks of the
-    machines from which it chooses not to access the replica.
- 
- NOTE
- 
-    The Cache Manager consults preferences only  when  accessing
-    ReadOnly  replicas  of  volumes.    It does not consider the
-    preferences when contacting the  VL  Server  on  a  database
-    server  machine  to determine the location of a volume.  Its
-    access of database server machines is still random.
- 
- ARGUMENTS
- 
-    -servers        specifies one or more pairs of  file  server
-                    machines   and   their   respective   ranks.
-                    Identify file server machines by name or  by
-                    IP address.  See the DESCRIPTION section for
-                    more information on specifying  file  server
-                    machines and their ranks.
- 
-    -file           specifies   the  pathname  of  a  file  that
-                    contains pairs of file server  machines  and
-                    their   respective  ranks.    Identify  file
-                    server machines by name or  by  IP  address.
-                    See   the   DESCRIPTION   section  for  more
-                    information  on   specifying   file   server
-                    machines and their ranks.
- 
-    -stdin          indicates that pairs of file server machines
-                    and their respective ranks are  to  be  read
- 
- 
- 
-                    from  stdin.   Identify file server machines
-                    by  name  or  by  IP  address.     See   the
-                    DESCRIPTION  section for more information on
-                    specifying file server  machines  and  their
-                    ranks.
- 
-    -help           prints   the  online  help  entry  for  this
-                    command.  Do not provide any other arguments
-                    or  flags with this one.  See section 3.1 in
-                    the Reference Manual for more details.
- 
- EXAMPLES
- 
-    The following sets preference ranks for  three  file  server
-    machines.    In  this  example,  the server machines have no
-    replicas  in  common,  so  no   potential   collisions   are
-    associated with their all having the same rank.
- 
-    % fs sets -se fs1.transarc.com 10000 fs2.transarc.com 10000
-    \     128.2.11.12 10000
- 
-    The  following  defines  a  rank for one file server machine
-    from the command line and reads ranks  for  additional  file
-    server  machines  from a file named prefs.txt in the current
-    directory:
- 
-    % fs sets -se fs4.transarc.com 10010 -f prefs.txt
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be logged in as "root" in the UNIX  file  system
-    of the machine on which the command is issued.
- 
- MORE INFORMATION
- 
-    fs getserverprefs
--- 0 ----
Index: openafs/src/man/fs_setvol.1
diff -c openafs/src/man/fs_setvol.1:1.1 openafs/src/man/fs_setvol.1:removed
*** openafs/src/man/fs_setvol.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_setvol.1	Fri Apr 14 09:27:30 2006
***************
*** 1,94 ****
- fs setvol                  AFS Commands               fs setvol
- 
- 
- NAME
- 
-    fs setvol -- set maximum quota and messages for each volume
- 
-                        containing specified directory.
- 
- 
-                                     +
-    fs setvol  [-path <dir/file path>   [-max <disk space quota
-    in 1K units>]
-    [-motd <message of the day>]  [-offlinemsg <offline
-    message>]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                              +
-    fs sv  [-p <dir/file path> ]  [-ma <disk space quota in 1K
-    units>]
-    [-mo <message of the day>]  [-o <offline message>]  [-h]
- 
- DESCRIPTION
- 
-    Sets  maximum  quota  for  the  volumes  that  contain  each
-    specified  directory  or  file.   It is also possible to use
-    -motd and -offlinemsg to create messages associated with the
-    volume, which appear when the fs examine command is issued.
- 
-    The fs examine command displays all the information that can
-    be altered with this  command.    The  fs listquota  command
-    displays  maximum  quota,  and the fs quota command displays
-    the percent quota used.
- 
-    The fs setquota command sets maximum quota on one volume  at
-    a time.
- 
- ARGUMENTS
- 
-    -path           names  each  file and/or directory for which
-                    quota and messages on the host  volumes  are
-                    to  be  set.  Omit this switch to affect the
-                    volume that  contains  the  current  working
-                    directory.
- 
-    -max            specifies  the  maximum amount of disk space
-                    the volume can use.  Express it in  kilobyte
-                    blocks (a value of 1024 is one megabyte).  A
-                    value of 0 grants an  unlimited  quota,  but
-                    the  size  of the disk partition housing the
-                    volume  places  an  absolute  limit  on  the
-                    volume's maximum size.
- 
-    -motd           specifies  a  "message of the day" displayed
-                    with the fs examine command.  It can be used
-                    to  alert  users  to  anything  of  interest
-                    concerning the volume.
- 
-    -offlinemsg     specifies a message displayed  with  the  fs
-                    examine  command.  It can be used to explain
-                    why the volume is currently offline.
- 
-    -help           prints  the  online  help  entry  for   this
- 
- 
- 
-                    command.  Do not provide any other arguments
-                    or flags with this one.  See section 3.1  in
-                    the Reference Manual for more details.
- 
- EXAMPLES
- 
-    The  following  imposes a 6500 kilobyte quota on the volumes
-    housing      the       /afs/transarc.com/usr/smith       and
-    /afs/transarc.com/usr/pat home directories:
- 
-    % cd /afs/transarc.com/usr  % fs sv -p smith pat -ma 6500
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must belong to the system:administrators group in the
-    Protection Database.
- 
- MORE INFORMATION
- 
-    fs examine
- 
-    fs listquota
- 
-    fs quota
- 
-    fs setquota
--- 0 ----
Index: openafs/src/man/fs_sysname.1
diff -c openafs/src/man/fs_sysname.1:1.1 openafs/src/man/fs_sysname.1:removed
*** openafs/src/man/fs_sysname.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_sysname.1	Fri Apr 14 09:27:30 2006
***************
*** 1,112 ****
- fs sysname                 AFS Commands              fs sysname
- 
- 
- NAME
- 
-    fs sysname -- report or set CPU/operating system type.
- 
- 
-    fs sysname [-newsys <new sysname>]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs sy [-n <new sysname>]  [-h]
- 
- DESCRIPTION
- 
-    Depending   on  whether  the  issuer  provides  the  -newsys
-    argument,
- 
-    EITHER sets the indicator of CPU/operating system type in th
-    the machine on which the command is issued
- 
-    OR reports the current setting.
- 
-    If the command is issued on an AFS client machine, the value
-    is set/reported for the machine itself.
- 
-    If  the command is issued on an NFS client machine accessing
-    AFS via the NFS/AFS Translator, then  the  specified  CPU/OS
-    value  is  set/reported  for  the  NFS  client machine.  The
-    information is in a record  maintained  by  the  AFS  client
-    machine  serving  as  the  NFS  client's  NFS/AFS translator
-    machine.  The translator machine maintains a separate record
-    for each user logged into the NFS client.  This implies that
-    if a user adopts a new identity (UNIX UID)  during  a  login
-    session  on  the  NFS clientMperhaps using suMhe or she must
-    issue this command again.  Setting this indicator allows the
-    translator machine to provide the NFS client with the proper
-    version of program binaries when the  user  issues  commands
-    for which the binaries are kept in the AFS file tree.
- 
-    The Cache Manager's main use of this indicator is as a value
-    for the "@sys" variable which can occur  in  AFS  pathnames.
-    As  the  Cache  Manager interprets pathnames, it substitutes
-    the indicator's value for any occurrence of @sys.   See  the
-    EXAMPLES  section for an example.  (Note that @sys should be
-    used sparingly, as  it  can  make  the  effect  of  changing
-    directories    unpredictable;    see    the    AFS    System
-    Administrator's Guide for further information.)
- 
- ARGUMENTS
- 
-    -newsys   specifies the new  setting  of  the  CPU/operating
-              system  indicator  for  the machine on which it is
-              issued.  If the issuer omits it, the output  shows
-              the  current  setting.    Consult  the  AFS System
-              Administrator's Guide for a complete list  of  the
-              legal values and the CPU/OS types they represent.
- 
-    -help     prints the online help entry for this command.  Do
-              not provide any other arguments or flags with this
-              one.   See section 3.1 in the Reference Manual for
-              more details.
- 
- 
- 
- OUTPUT
- 
-    The output reports the machine's system type in the format
- 
-        Current sysname is 'system type'
- 
- EXAMPLES
- 
-    The  following  shows  the  output   produced   on   a   Sun
-    SPARCStation running SunOS 4.1:
- 
-    % fs sy  Current sysname is 'sun4c_41'
- 
-    The  following  defines a machine to be a DECStation running
-    Ultrix 4.1:
- 
-    % fs sysname pmax_ul4
- 
-    When the Cache Manager on the machine encounters a  pathname
-    with  the  @sys  variable in it, it substitutes pmax_ul4 for
-    the variable.  For instance, this  machine  would  interpret
-    the pathname
- 
-       /afs/transarc.com/@sys/usr/bin
-    as
-       /afs/transarc.com/pmax_ul4/usr/bin
-    and would access the volume corresponding to that directory.
-    A machine whose CPU/OS type was rt_aos4 would interpret  the
-    same pathname as
- 
-       /afs/transarc.com/rt_aos4/usr/bin
- 
-    and so would access a volume different from that accessed by
-    the DECStation.
- 
- PRIVILEGE REQUIRED
- 
-    None, if the machine is an NFS client.  If the machine is an
-    AFS  client,  the  issuer must be logged into the local UNIX
-    file system as "root."
- 
- 
- 
- MORE INFORMATION
- 
-    fs exportafs
--- 0 ----
Index: openafs/src/man/fs_whereis.1
diff -c openafs/src/man/fs_whereis.1:1.1 openafs/src/man/fs_whereis.1:removed
*** openafs/src/man/fs_whereis.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_whereis.1	Fri Apr 14 09:27:30 2006
***************
*** 1,69 ****
- fs whereis                 AFS Commands              fs whereis
- 
- 
- NAME
- 
-    fs whereis -- report name of file server machine(s) housing
- 
-                        specified file/directory.
- 
- 
-                                      +
-    fs whereis  [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                               +
-    fs whe  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Returns the name of the file server machines that house each
-    specified  directory  or file.  See the OUTPUT section for a
-    description of the information displayed.
- 
- ARGUMENTS
- 
-    -path specifies each file or directory whose location is  to
-          be  returned.    Each specified file or directory must
-          reside in AFS (not on a local disk).   If  the  issuer
-          omits  this  argument,  the  location  of  the working
-          directory is returned.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- OUTPUT
- 
-    The  output  includes a line for each specified directory or
-    file.  It names the file server machine on which the  volume
-    that houses the specified directory or file resides.  A list
-    of multiple machines indicates that the directory or file is
-    in a replicated volume.
- 
-    Machine  names  usually  have a suffix indicating their cell
-    membership.  If some  question  remains,  the  fs  whichcell
-    command names the cell in which a directory or file resides.
- 
- EXAMPLES
- 
-    The following indicates that the directory /afs/transarc.com
-    resides   in   a   replicated   volume   located   on   both
-    fs1.transarc.com and fs3.transarc.com:
- 
-    % fs whe /afs/transarc.com  File /afs/transarc.com is on
-    hosts fs1.transarc.com     fs3.transarc.com
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs whichcell
- 
-    fs wscell
--- 0 ----
Index: openafs/src/man/fs_whichcell.1
diff -c openafs/src/man/fs_whichcell.1:1.1 openafs/src/man/fs_whichcell.1:removed
*** openafs/src/man/fs_whichcell.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_whichcell.1	Fri Apr 14 09:27:30 2006
***************
*** 1,61 ****
- fs whichcell               AFS Commands            fs whichcell
- 
- 
- NAME
- 
-    fs  whichcell -- return  name  of  cell  to which specified
- 
-                        file/directory belongs.
- 
- 
-                                        +
-    fs whichcell  [-path <dir/file path> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                               +
-    fs whi  [-p <dir/file path> ]  [-h]
- 
- DESCRIPTION
- 
-    Returns the name of the cell in which the volume that houses
-    each  indicated  directory  or file resides.  See the OUTPUT
-    section for a description of the information displayed.
- 
- ARGUMENTS
- 
-    -path specifies  each  file  and/or  directory  whose   cell
-          membership   is   to  be  returned.    Each  specified
-          directory or file must reside in AFS (not on  a  local
-          disk).  If the issuer omits this argument, the cell of
-          the working directory is returned.
- 
-    -help prints the online help entry for this command.  Do not
-          provide  any  other  arguments or flags with this one.
-          See section 3.1  in  the  Reference  Manual  for  more
-          details.
- 
- OUTPUT
- 
-    The  output  includes a line for each specified directory or
-    file, naming  the  cell  in  which  the  directory  or  file
-    resides.
- 
- EXAMPLES
- 
-    The  following shows that the current directory resides in a
-    volume in the Transarc Corporation cell:
- 
-    % fs whi  File . lives in cell 'transarc.com'
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- 
- 
- MORE INFORMATION
- 
-    fs whereis
- 
-    fs wscell
--- 0 ----
Index: openafs/src/man/fs_wscell.1
diff -c openafs/src/man/fs_wscell.1:1.1 openafs/src/man/fs_wscell.1:removed
*** openafs/src/man/fs_wscell.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/fs_wscell.1	Fri Apr 14 09:27:30 2006
***************
*** 1,50 ****
- fs wscell                  AFS Commands               fs wscell
- 
- 
- NAME
- 
-    fs  wscell -- return  name  of  cell  to  which workstation
- 
-                        belongs.
- 
- 
-    fs wscell  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    fs ws  [-h]
- 
- DESCRIPTION
- 
-    Returns the name of the home cell for the  workstation  from
-    which the command is issued.
- 
- ARGUMENTS
- 
-    -help           prints   the  online  help  entry  for  this
-                    command.  Do not provide any other arguments
-                    or  flags with this one.  See section 3.1 in
-                    the Reference Manual for more details.
- 
- OUTPUT
- 
-    The   reported   cell   name    comes    from    the    file
-    /usr/vice/etc/ThisCell on the workstation's local disk.
- 
- EXAMPLES
- 
-    The  following  results  when  the  fs wscell is issued on a
-    machine in the Transarc Corporation cell:
- 
-        % fs wscell
-        This workstation belongs to cell 'transarc.com'
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    fs whereis
- 
-    fs whichcell
--- 0 ----
Index: openafs/src/man/kas.1
diff -c openafs/src/man/kas.1:1.1 openafs/src/man/kas.1:removed
*** openafs/src/man/kas.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas.1	Fri Apr 14 09:27:30 2006
***************
*** 1,207 ****
-                            AFS Commands
- 
- 
- NAME
-                              AFS Commands
- 
- 
-    1. The kas Commands
- 
-    ------------------------------------------------------------
- 
-    This   chapter   defines   the   kas  commands  that  system
-    administrators use to contact the Authentication Server.  It
-    assumes  the  reader is familiar with the concepts described
-    in the AFS System Administrator's Guide.
- 
-    The kas command interface allows  system  administrators  to
-    create,   modify,   examine   and   delete  entries  in  the
-    Authentication Database  maintained  by  the  Authentication
-    Server.    Individual  users  may  use  the  kas setpassword
-    command to change their own password (as well  as  the  more
-    standard, non-kas command, kpasswd).
- 
-    Refer to the Command Summary at the end of this document for
-    a complete list of kas commands and their syntax.
-    AFS Command Reference Manual             The kas Commands  2
- 
- 
-    1.1 The kas Interface
-    The kas command interface differs slightly from  the  others
-    described   in  this  manual.    The  Authentication  Server
-    authenticates issuers of kas commands directly  rather  than
-    accepting  a ticket from the Ticket Granting Service as most
-    other servers do.   Thus  most  commands  require  that  the
-    issuer provide his or her password at the time of issue.
- 
- 
- 
-    1.1.1 Interactive Mode
-    Providing  the  password  each time could get tedious if the
-    user needed to execute a  whole  set  of  commands,  so  kas
-    provides  an "interactive" mode in which it is not necessary
-    to provide a password repeatedly.
- 
- 
-    1.1.1.1 Entering Interactive Mode
-    There are several ways to enter interactive mode:
- 
-       - Use the kas interactive command.
- 
-       - Type kas without any operation code.  By  default,
-         the  command  interpreter establishes a connection
-         with each Authentication Server in the local cell.
-         They  attempt to authenticate the user logged into
-         the machine from  which  the  command  is  issued,
-         based  on  the password the issuer provides at the
-         prompt.  The  issuer  may  specify  an   alternate
-         identity,  password,  cell  name  and/or  list  of
-         Authentication Servers by  using  the  first  four
-         common  arguments  described in section 4.3 in the
-         Reference Manual .  Type kas followed  by  a  user
-         name  and  cell  name,  separated  by  an "@" sign
-         (example:   kas    smith@transarc.com).        The
-         Authentication Server attempts to authenticate the
-         specified user in the specified cell, and  prompts
-         for  his  or  her  password in the specified cell.
-         This method is most useful when the issuer  wishes
-         to   enter   interactive  mode  with  a  different
-         identity in a different cell.
- 
- 
-    1.1.1.2 Effects of Entering Interactive Mode
-    While in interactive mode:
- 
- 
-       - The "ka>" prompt  replaces  the  issuer's  regular
-         prompt.
- 
-       - It  is no longer necessary or legal to type kas at
-         the beginning of a command.   Type  the  operation
-         code as the first part of the command.
- 
-       - The  Authentication Server does not prompt for the
-         issuer's password at each command.   This  is  the
-         mode's main advantage.
- 
-       - The  issuer's identity and cell are set and cannot
-         be changed without leaving interactive mode, so it
-         is   not  legal  to  provide  any  of  the  common
-    AFS Command Reference Manual             The kas Commands  3
- 
- 
-         arguments described fully in section  4.3  in  the
-         Reference Manual , except for -help.
- 
-    1.2 Information in the Authentication Database
-    Both  individual  users  and  servers  have  entries  in the
-    Authentication Database.  The two most important  fields  in
-    an entry are:
- 
-       - the name
- 
-       - the  key  (a  scrambled  form  of name's password,
-         suitable for use as an encryption key)
- 
-    For individual users, the name field holds the user name  as
-    typed  at  login,  and  key  holds  a  scrambled form of the
-    password the user has created.
- 
-    Server entries are the same as user entries.  The entry name
-    for the AFS server processes is "afs".  A server entry's key
-    field contains the server encryption  key  that  the  Ticket
-    Granting  Service (TGS) uses to seal the tickets it gives to
-    clients so that they may contact the server processes.
- 
-    1.3 Common Arguments and Flags
-    When not in interactive mode, most kas commands  accept  the
-    following  optional  arguments and flags.  Some of these are
-    unavailable in interactive mode because the information they
-    provide  is established while entering interactive mode, and
-    cannot be changed from within interactive mode.    They  are
-    listed in the command descriptions where they apply, and are
-    described in detail below:
- 
-    [-admin_username <admin principal to use for
-    authentication>]
- 
-    This argument allows the issuer to assume  the  identity  of
-    the  specified  user name (which is referred to as an "admin
-    principal").  By default, the Authentication Server attempts
-    to authenticate the user logged into the local workstation.
- 
-    [-password_for_admin <admin password>]
- 
-    This  argument  provides  the Authentication Server with the
-    password needed to prove that the issuer of the command (the
-    admin  principal) is legitimate (which it will if it matches
-    the password stored in the Authentication Database  for  the
-    issuer).    Note that providing this argument on the command
-    line reveals the password on the screen.  Issuers may prefer
-    to  respond  to the prompt that will appear if this argument
-    is not provided, as the password does not  echo  visibly  in
-    that case.
- 
-    [-cell <cell name>]
- 
-    This  argument specifies that the command should be run in a
-    different  cell,  specified  by  cell  name.    By  default,
-    commands  are  executed  in  the  local  cell, as defined in
-    /usr/vice/etc/ThisCell on the client machine  on  which  the
-    command  is  issued.  The issuer may abbreviate cell name to
-    the shortest form that distinguishes it from the other cells
-    listed  in /usr/vice/etc/CellServDB on the client machine on
-    AFS Command Reference Manual             The kas Commands  4
- 
- 
-    which the command is issued.
- 
-                                                       +
-    [-servers <explicit list of authentication servers> ]
- 
-    This  argument  causes  the  kas  command   interpreter   to
-    establish   a  connection  with  the  Authentication  Server
-    running on each specified database server machine.  It  then
-    chooses  one  of  these at random to execute each subsequent
-    command.  The issuer may abbreviate the machine name to  the
-    extent the cell's name server will accept.
- 
-    By  default,  the  kas  command  interpreter  establishes  a
-    connection  with  each   machine   listed   in   the   local
-    workstation's  copy  of  /usr/vice/etc/CellServDB,  and then
-    chooses one of those at random for command execution.
- 
-    This option  is  useful  for  testing  specific  servers  if
-    problems are encountered.
- 
-    [-noauth]
- 
-    This  flag  instructs indicated Authentication Server(s) not
-    to  authenticate  the  issuer  of  the  command,  and   thus
-    establishes an unauthenticated connection between the issuer
-    and the Authentication Server (he or she  is  recognized  as
-    the  unprivileged  user  anonymous).  It is useful only when
-    authorization  checking  is  disabled  on  the  file  server
-    machine (during the installation of a file server machine or
-    when  bos setauth  has  been  used  during   other   unusual
-    circumstances).  In normal circumstances, the Authentication
-    Server allows only authorized (privileged)  users  to  issue
-    most  kas commands, and will refuse to execute the requested
-    actions even if the -noauth flag is used.
- 
-    [-help]
- 
-    This flag has the same function as the kas help command:  it
-    prints  the command's online help message on the screen.  No
-    other arguments or flags should  be  provided  at  the  same
-    time.    Even if they are, this flag overrides them, and the
-    only effect of issuing the command is that the help  message
-    appears.
- 
-    1.4 The Privilege Required for kas Commands
-    The  Authentication  Server considers privileged those users
-    who have the ADMIN flag turned on  in  their  Authentication
-    Database  entry.  See the kas setfields command to learn how
-    to turn on the ADMIN flag.  Most kas commands  require  that
-    the  issuer  be  privileged.  All commands will prompt for a
-    password, unless the issuer has entered interactive mode.
--- 0 ----
Index: openafs/src/man/kas_apropos.1
diff -c openafs/src/man/kas_apropos.1:1.1 openafs/src/man/kas_apropos.1:removed
*** openafs/src/man/kas_apropos.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_apropos.1	Fri Apr 14 09:27:30 2006
***************
*** 1,64 ****
- kas apropos                AFS Commands             kas apropos
- 
- 
- NAME
- 
-    kas apropos -- show each help entry containing keyword.
- 
- 
-    kas apropos  -topic <help string>  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas a  -t <help string>  [-h]
- 
- DESCRIPTION
- 
-    Displays  the  first  line  of  the  help  entry for any kas
-    command  that  has  help  string  in  its  name   or   short
-    description.
- 
- ARGUMENTS
- 
-    -topic
-          specifies the keyword string to search for.  If it  is
-          more  than  a  single  word,  surround  it with double
-          quotes or other delimiters.  Type all help strings for
-          kas commands in all lowercase letters, except the word
-          "AuthServer."
- 
-    -help prints the online help  for  this  command.    Do  not
-          provide  any  other  arguments or flags with this one.
-          See section 4.3  in  the  Reference  Manual  for  more
-          details.
- 
- OUTPUT
- 
-    The  first  line  of a command's online help entry names the
-    command and briefly describes what it does.  The kas apropos
-    command  displays  that first line for any kas command where
-    help string is part of the command name or first line.
- 
-    To see the remaining lines in a help  entry,  which  provide
-    the  command's  alias  (if any) and syntax, use the kas help
-    command.
- 
- EXAMPLE
- 
-    The following lists all kas  commands  that  have  the  word
-    "key" in their operation code or short online description.
- 
-        % kas a key
-        getrandomkey: get a random key
-        setkey: set a user's key
-        stringtokey: convert a string to a key
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    None.  No password will be prompted for.
- 
- MORE INFORMATION
- 
-    kas help
--- 0 ----
Index: openafs/src/man/kas_create.1
diff -c openafs/src/man/kas_create.1:1.1 openafs/src/man/kas_create.1:removed
*** openafs/src/man/kas_create.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_create.1	Fri Apr 14 09:27:30 2006
***************
*** 1,107 ****
- kas create                 AFS Commands              kas create
- 
- 
- NAME
- 
-    kas   create -- create   an  entry  in  the  Authentication
- 
-                        Database.
- 
- 
-    kas create  -name <name of user>  [-initial_password
-    <initial password>]
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>] [-cell <cell name>]
-              [-servers <explicit list of authentication
-            +
-    servers> ]  [-noauth]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas c -na <name of user>  [-i <initial password>]
-    [-a <admin principal to use for authentication>]  [-p <admin
-    password>]
-    [-c <cell name>]  [-s <explicit list of authentication
-            +
-    servers> ]  [-no]  [-h]
- 
- DESCRIPTION
- 
-    Creates an entry in  Authentication  Database  for  name  of
-    user.    The Authentication Server converts initial password
-    into a form suitable for  use  as  an  encryption  key,  and
-    places it in the entry's key field.
- 
- ARGUMENTS
- 
-    -name             specifies    the    name    of   the   new
-                      Authentication Database entry.  It will be
-                      the user name under which the user logs in
-                      to the system.
- 
-    -initial_password specifies a  character  string  that  will
-                      become   the   user's   password.      The
-                      Authentication Server scrambles it into an
-                      octal  key  and places it in the key field
-                      of the Database entry.  If the issuer does
-                      not  provide  it,  it will be prompted for
-                      (if it is not provided at the  prompt  the
-                      create operation fails).  The advantage of
-                      waiting  for  the  prompt  is   that   the
-                      password does not echo on the screen.
- 
-    -admin_username   specifies  the  user  name under which the
-                      issuer wishes to perform the command.  See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -password_for_admin
-                      specifies   the  issuer's  password.    If
-                      provided here, the password is visible  on
-                      the  screen.    If  the  issuer  does  not
-                      provide it, it will be  prompted  for  and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
- 
- 
- 
-                      details.  -cell
-                      specifies the cell in  which  to  run  the
-                      command,  if  not  the  local  cell.   See
-                      section 4.3 in the  Reference  Manual  for
-                      more details.  -servers
-                      specifies the database  server  machine(s)
-                      with which to establish a connection.  See
-                      section 4.3 in the  Reference  Manual  for
-                      more details.  -noauth
-                      establishes an unauthenticated  connection
-                      between  the  Authentication  Servers  and
-                      issuer, whom they assign the  unprivileged
-                      identity  anonymous rather than attempting
-                      mutual authentication.  See section 4.3 in
-                      the  Reference  Manual  for  more details.
-                      -help
-                      prints  the  online help for this command.
-                      Do not  provide  any  other  arguments  or
-                      flags  with  this one.  See section 4.3 in
-                      the Reference Manual for more details.
- 
- EXAMPLE
- 
-    The following shows the prompts  that  appear  when  someone
-    authenticated  as  admin  creates an Authentication Database
-    entry for the user  smith,  and  does  not  specify  smith's
-    initial  password  on the command line.  The passwords typed
-    at the prompts do not echo visibly.
- 
-    % kas cr smith  Password for admin:   initial_password:
-    Verifying, please re-enter initial_password:
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  must  have  the  ADMIN  flag  set  in  his  or   her
-    Authentication Database entry.
- 
- MORE INFORMATION
- 
-    kas examine
--- 0 ----
Index: openafs/src/man/kas_debuginfo.1
diff -c openafs/src/man/kas_debuginfo.1:1.1 openafs/src/man/kas_debuginfo.1:removed
*** openafs/src/man/kas_debuginfo.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_debuginfo.1	Fri Apr 14 09:27:30 2006
***************
*** 1,88 ****
- kas debuginfo              AFS Commands           kas debuginfo
- 
- 
- NAME
- 
-    kas    debuginfo -- produce   debugging   trace   for   the
- 
-                        Authentication Server.
- 
- 
-    kas debuginfo  [-hostname <authentication server host name>]
-           [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-                                                              +
-           [-servers <explicit list of authentication servers> ]
-    [-noauth]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas deb  [-ho <authentication server host name>]
-    [-a <admin principal to use for authentication>]
-    [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-n]  [-he]
- 
- DESCRIPTION
- 
-    Displays information on the standard output device  (stdout)
-    which  is  helpful  in  debugging the Authentication Server.
-    This information is useful only for  someone  familiar  with
-    the  implementation  of  the  Authentication  Server and the
-    internal structure of the  Authentication  Database.    Most
-    system administrators will not find it helpful.
- 
- ARGUMENTS
- 
-    -hostname         names  the  database  server  machine  for
-                      which  to  display  debugging  information
-                      about  the  Authentication Server instance
-                      it is running.
- 
-    -admin_username   specifies the user name  under  which  the
-                      issuer wishes to perform the command.  See
-                      section 4.3 in the  Reference  Manual  for
-                      more details.  -password_for_admin
-                      specifies  the  issuer's  password.     If
-                      provided  here, the password is visible on
-                      the  screen.    If  the  issuer  does  not
-                      provide  it,  it  will be prompted for and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
-                      details.  -cell
-                      specifies  the  cell  in  which to run the
-                      command, if  not  the  local  cell.    See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -servers
-                      specifies  the  database server machine(s)
-                      with which to establish a connection.  See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -noauth
-                      establishes  an unauthenticated connection
-                      between  the  Authentication  Servers  and
- 
- 
- 
-                      issuer,  whom they assign the unprivileged
-                      identity anonymous rather than  attempting
-                      mutual authentication.  See section 4.3 in
-                      the Reference  Manual  for  more  details.
-                      -help
-                      prints the online help for  this  command.
-                      Do  not  provide  any  other  arguments or
-                      flags with this one.  See section  4.3  in
-                      the Reference Manual for more details.
- 
- PRIVILEGE REQUIRED
- 
-    None.    A  password will be prompted for unless the -noauth
-    flag is provided.   The  issuer  must  type  some  character
-    string  at the prompt, but even providing the wrong one does
-    not  prevent  the  command  from  being  executed,   despite
-    possible error messages.
- 
- MORE INFORMATION
- 
-    kas statistics
--- 0 ----
Index: openafs/src/man/kas_delete.1
diff -c openafs/src/man/kas_delete.1:1.1 openafs/src/man/kas_delete.1:removed
*** openafs/src/man/kas_delete.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_delete.1	Fri Apr 14 09:27:30 2006
***************
*** 1,97 ****
- kas delete                 AFS Commands              kas delete
- 
- 
- NAME
- 
-    kas   delete -- delete   entry   from   the  Authentication
- 
-                        Database.
- 
- 
-    kas delete  -name <name of user>
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-              [-servers <explicit list of authentication
-            +
-    servers> ]  [-noauth]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas del  -na <name> [-a <admin principal to use for
-    authentication>]
-    [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-no]  [-h]
- 
-    kas rm  -na <name> [-a <admin principal to use for
-    authentication>]
-    [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-no]  [-h]
- 
- DESCRIPTION
- 
-    Removes the entry  name  of  user  from  the  Authentication
-    Database.    If  name  of  user is a user, he or she becomes
-    unable to log in.  If name of user is a server,  it  becomes
-    unreachable, because the TGS can no longer has anything with
-    which to seal tickets for the server.
- 
- ARGUMENTS
- 
-    -name             specifies the name of the  Database  entry
-                      to delete
- 
-    -admin_username   specifies  the  user  name under which the
-                      issuer wishes to perform the command.  See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -password_for_admin
-                      specifies   the  issuer's  password.    If
-                      provided here, the password is visible  on
-                      the  screen.    If  the  issuer  does  not
-                      provide it, it will be  prompted  for  and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
-                      details.
- 
-    -cell             specifies  the  cell  in  which to run the
-                      command, if  not  the  local  cell.    See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -servers
-                      specifies  the  database server machine(s)
-                      with which to establish a connection.  See
- 
- 
- 
-                      section  4.3  in  the Reference Manual for
-                      more details.  -noauth
-                      establishes  an unauthenticated connection
-                      between  the  Authentication  Servers  and
-                      issuer,  whom they assign the unprivileged
-                      identity anonymous rather than  attempting
-                      mutual authentication.  See section 4.3 in
-                      the Reference  Manual  for  more  details.
-                      -help
-                      prints the online help for  this  command.
-                      Do  not  provide  any  other  arguments or
-                      flags with this one.  See section  4.3  in
-                      the Reference Manual for more details.
- 
- EXAMPLE
- 
-    In the following the issuer admin enters interactive mode in
-    order to make it more convenient to delete three accounts at
-    once.    The  password  typed  at  the  prompt does not echo
-    visibly.
- 
-    % kas  Password for admin:   ka> del smith  ka> del pat  ka>
-    del terry
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  must  have  the  ADMIN  flag  set  in  his  or   her
-    Authentication Database entry.
- 
- MORE INFORMATION
--- 0 ----
Index: openafs/src/man/kas_examine.1
diff -c openafs/src/man/kas_examine.1:1.1 openafs/src/man/kas_examine.1:removed
*** openafs/src/man/kas_examine.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_examine.1	Fri Apr 14 09:27:30 2006
***************
*** 1,220 ****
- kas examine                AFS Commands             kas examine
- 
- 
- NAME
- 
-    kas  examine -- display  information from an Authentication
- 
-                        Database entry.
- 
- 
-    kas examine  -name <name of user>
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-            [-servers <explicit list of authentication
-            +
-    servers> ]  [-noauth]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas e  -na <name of user>  [-a <admin principal to use for
-    authentication>]
-    [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-no]  [-h]
- 
- DESCRIPTION
- 
-    Formats and displays  information  from  the  Authentication
-    Database  entry  for  name.    See  the  OUTPUT  section for
-    details.
- 
- ARGUMENTS
- 
-    -name             specifies the Database entry from which to
-                      display information.
- 
-    -admin_username   specifies  the  user  name under which the
-                      issuer wishes to perform the command.   If
-                      the   issuer  does  not  provide  it,  the
-                      current identity is used.  See section 4.3
-                      in  the Reference Manual for more details.
-                      -password_for_admin
-                      specifies   the  issuer's  password.    If
-                      provided here, the password is visible  on
-                      the  screen.    If  the  issuer  does  not
-                      provide it, it will be  prompted  for  and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
-                      details.  -cell
-                      specifies the cell in  which  to  run  the
-                      command,  if  not  the  local  cell.   See
-                      section 4.3 in the  Reference  Manual  for
-                      more details.  -servers
-                      specifies the database  server  machine(s)
-                      with which to establish a connection.  See
-                      section 4.3 in the  Reference  Manual  for
-                      more details.  -noauth
-                      establishes an unauthenticated  connection
-                      between  the  Authentication  Servers  and
-                      issuer, whom they assign the  unprivileged
-                      identity  anonymous rather than attempting
-                      mutual authentication.  See section 4.3 in
- 
- 
- 
-                      the  Reference  Manual  for  more details.
-                      -help
-                      prints  the  online help for this command.
-                      Do not  provide  any  other  arguments  or
-                      flags  with  this one.  See section 4.3 in
-                      the Reference Manual for more details.
- 
- 
- 
- OUTPUT
- 
-    The output reports, in this order:
- 
-       - the name of the entry
- 
-       - one or more status flags, which will  only  appear
-         if   a   system   administrator   has   used   the
-         kas setfields command to change a  flag  from  its
-         default  value.  A plus sign (+) will separate the
-         flags if more than one appears.   The  non-default
-         values which may appear, and their meanings, are:
- 
-            * ADMIN.      the  user  is  allowed  to  issue
-              privileged kas commands (Default: NOADMIN.)
- 
-            * NOTGS.   the  Ticket  Granting  Service  will
-              refuse to issue tickets to the user (Default:
-              TGS.)
- 
-            * NOSEAL. the Ticket  Granting  Service  cannot
-              use the contents of this entry's key field as
-              an encryption key (Default: SEAL.)
- 
-            * NOCPW.  the  user  or  server  cannot  change
-              his/her/its  own  password  or  key (Default:
-              CPW.)
- 
-       - the word "key" followed by the key version  number
-         in parentheses.
- 
-         The octal key itself appears only if authorization
-         checking  is  disabled  on  the  database   server
-         machine   to  which  the  kas examine  command  is
-         directed  with  the  -servers  argument  (see  the
-         EXAMPLES  section).    The  reasoning  behind this
-         requirement is two-fold.  First, it  implies  that
-         only  someone  authorized to issue the bos setauth
-         command or with  "root"  access  to  the  database
-         server  machine's local disk is able to see actual
-         keys from the Authentication Database.  Second, it
-         makes it clear that the system is in a compromised
-         state of security while keys are  being  displayed
-         on  the  screen.    Both turning off authorization
-         checking and  displaying  keys  on  a  screen  are
-         serious security risks.
- 
-         In the normal cases when authorization checking is
-         enabled  on  the  database   server   machine,   a
-         "checksum"  appears instead of the key.  This is a
-         decimal number derived by  encrypting  a  constant
-         with  the key.  In the case of the "afs" key, this
-         number can be compared to the  checksum  with  the
-         corresponding  key version number in the output of
-         the bos listkeys command.
- 
-       - the  date  that  the  user  changed  his/her   own
-         password,  indicated  as  "last cpw" (which stands
-         for "last change of password")
- 
-       - the date on which the entry expires.  If this is a
- 
- 
- 
-         user   entry,   the   user   will   be  unable  to
-         authenticate with the Authentication Server  after
-         this date.
- 
-       - the maximum length of time that tickets issued for
-         this entry may be valid
- 
-       - the date of the last modification  to  the  entry,
-         indicated  as "last mod," and the user name of the
-         person who issued the modifying command.  Password
-         changes  made  by  the  user  himself/herself  are
-         recorded as "last cpw" instead.
- 
- EXAMPLES
- 
-    In each of the examples, the password typed  at  the  prompt
-    does not echo visibly.
- 
-    The  following shows the privileged user smith examining her
-    own Authentication Database entry.   Note  the  ADMIN  flag,
-    which shows that smith is privileged.
- 
-    % kas e smith
-    Password for smith:
-    User data for smith (ADMIN)
-     key (0) cksum is 3414844392,  last cpw: Wed Jan 3 16:05:44
-     entry expires on never. Max ticket lifetime 100.00 hours.
-     last mod on Thu Dec 21 08:22:29 1989 by admin
- 
-    In  the  following  the  regular user terry examines her own
-    entry and tries to examine pat's.
- 
-        % kas
-        Password for terry:
-        ka> ex terry
-        User data for terry
-         key (0) cksum is 529538018,  last cpw: Fri Jan 19 9
-         entry expires on never. Max ticket lifetime 100.00
-         last mod on Thu Dec 21 08:43:29 1989 by admin
-        ka> ex pat
-        kas:examine: caller not authorized getting informati
- 
- 
-    In  the  following  an  administrator  logged  in   as   the
-    privileged   user   admin   uses  bos setauth  to  turn  off
-    authorization  checking  on  the  database  server   machine
-    db1.transarc.com  so  that he can look at the key in the afs
-    entry.  He enters interactive mode to open a connection with
-    the  Authentication Server on db1.transarc.com only and uses
-    the -noauth flag to prevent that server from  attempting  to
-    authenticate him.
- 
-        % bos setauth db1.transarc.com off
-        % kas i -servers db1.transarc.com -noauth
-        ka> examine afs -servers db1.transarc.com
-        User data for afs
-         key (12): \357\253\304\352a\236\253\352, last cpw:
-         entry expires on never. Max ticket lifetime 100.00
-         last mod on Thu Jan 11 14:53:29 1990 by admin
- 
- PRIVILEGE REQUIRED
- 
- 
- 
-    A user may examine his or her own entry.  To examine others'
-    entries, the issuer must have the ADMIN flag set in  his  or
-    her Authentication Database entry.
- 
-    To  look  at  actual  keys,  authorization  checking must be
-    disabled on the database server  machine  with  bos setauth,
-    which  implies  being listed in /usr/afs/etc/UserList; it is
-    not necessary to have the ADMIN flag in addition.
- 
- MORE INFORMATION
- 
-    bos listkeys
- 
-    bos setauth
- 
-    kas setfields
--- 0 ----
Index: openafs/src/man/kas_forgetticket.1
diff -c openafs/src/man/kas_forgetticket.1:1.1 openafs/src/man/kas_forgetticket.1:removed
*** openafs/src/man/kas_forgetticket.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_forgetticket.1	Fri Apr 14 09:27:30 2006
***************
*** 1,57 ****
- kas forgetticket           AFS Commands        kas forgetticket
- 
- 
- NAME
- 
-    kas forgetticket -- discard all tickets for the issuer.
- 
- 
-    kas forgetticket [-name <name of server>]  [-all]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas f [-h]
- 
- DESCRIPTION
- 
-    Discards  all  tickets  that  the  Authentication Server has
-    registered for the issuer.  This  includes  the  AFS  server
-    ticket  from  each cell in which the user has authenticated,
-    and any tickets that the user may have acquired during  this
-    kas  session  (either  by  virtue of entering the session or
-    using kas getticket).
- 
- ARGUMENTS
- 
-    -name specifies which ticket should be discarded.    Provide
-          this argument OR the -all flag.
- 
-          Note:This  argument  is not currently implemented: all
-          tickets are discarded no  matter  which  ticket  which
-          ticket name is specified here.
- 
-    -all  indicates   that  all  tickets  should  be  discarded.
-          Provide this flag OR  the  -name  argument.    In  the
-          current  implementation,  this  flag  is more sensible
-          because it matches what  actually  happens  no  matter
-          which option the issuer chooses.
- 
-    -help prints  the  online  help  for  this  command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  4.3  in  the  Reference  Manual for more
-          details.
- 
- EXAMPLES
- 
-    Both of the following discard all tickets for the issuer.
- 
-    % kas forgetticket -all  % kas f
- 
- PRIVILEGE REQUIRED
- 
-    None.  There is no prompt for a  password,  and  the  issuer
-    does  not  have  to  have  the  ADMIN flag set in his or her
-    Database entry.  The deletion can  affect  only  the  issuer
-    anyway.
- 
- MORE INFORMATION
--- 0 ----
Index: openafs/src/man/kas_getpassword.1
diff -c openafs/src/man/kas_getpassword.1:1.1 openafs/src/man/kas_getpassword.1:removed
*** openafs/src/man/kas_getpassword.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_getpassword.1	Fri Apr 14 09:27:30 2006
***************
*** 1,80 ****
- kas getpassword            AFS Commands         kas getpassword
- 
- 
- NAME
- 
-    kas getpassword -- display octal key from an Authentication
- 
-                        Database entry.
- 
- 
-    kas getpassword  -name <name of user>  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas getp  -n <name of user>  [-h]
- 
- DESCRIPTION
- 
-    Prints out the contents (an octal-format encryption key)  of
-    the key field for the Database entry name of user.
- 
- WARNING
- 
-    This  command  works  only  if the Authentication Server has
-    been compiled with a special flag;  this  is  normally  done
-    only  for cells in the process of converting from use of AFS
-    2.0-style  authentication   to   AFS   3.0   authentication.
-    Moreover,  this  command  does  not work if issued on an AFS
-    client.  The issuer must be logged into  a  machine  running
-    the  specially-compiled  Authentication  Server  (a database
-    server  machine  or  other  machine  running   an   isolated
-    Authentication Server).
- 
-    The  recommended  way  to  examine the octal form of keys is
-    with kas examine when authorization  checking  is  disabled.
-    That  command shows a "checksum" when authorization checking
-    is enabled, which may be suitable for some purposes.
- 
-    Even when the other conditions are met,  this  command  does
-    not work for entries where the name includes a period (these
-    entries  are  generally  for  the  Authentication   Server's
-    internal use anyway).
- 
- ARGUMENTS
- 
-    -name names  the  entry  from  which the key field should be
-          printed out.
- 
-    -help prints the online help  for  this  command.    Do  not
-          provide  any  other  arguments or flags with this one.
-          See section 4.3  in  the  Reference  Manual  for  more
-          details.
- 
- OUTPUT
- 
-    The  output simply prints the key after a "Key:" header.  It
-    does  not  report  the  key  version  number,  but  that  is
-    available from kas examine.
- 
- EXAMPLE
- 
-    The  following  shows  a  user using this command to examine
-    afs's password.
- 
- 
- 
-        % kas getp afs
-        Key: \020\354\315\310\313\023W\370
- 
- PRIVILEGE REQUIRED
- 
-    None.  There is no prompt for a  password,  and  the  issuer
-    does  not  have  to  have  the  ADMIN flag set in his or her
-    Database entry.  It is assumed that any machine running  the
-    Authentication  Server  is  secured by having only a limited
-    number of people in its local /etc/passwd file.
- 
- MORE INFORMATION
- 
-    kas examine
--- 0 ----
Index: openafs/src/man/kas_getrandomkey.1
diff -c openafs/src/man/kas_getrandomkey.1:1.1 openafs/src/man/kas_getrandomkey.1:removed
*** openafs/src/man/kas_getrandomkey.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_getrandomkey.1	Fri Apr 14 09:27:30 2006
***************
*** 1,102 ****
- kas getrandomkey           AFS Commands        kas getrandomkey
- 
- 
- NAME
- 
-    kas getrandomkey -- generate an encryption key at random.
- 
- 
-    kas getrandomkey
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-                                                              +
-           [-servers <explicit list of authentication servers> ]
-    [-noauth]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas getr  [-a <admin principal to use for authentication>]
-            [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-n]  [-h]
- 
- DESCRIPTION
- 
-    Returns  a  key  generated at random (i.e., not derived from
-    any known password).  This is useful mainly for testing  and
-    debugging the Authentication Server.
- 
- WARNINGS
- 
-    The  output  of  this  command  is  visible  on the issuer's
-    screen, making it a potential security risk to use  the  key
-    in  an  actual  Authentication  Database  entry (such as the
-    "afs" entry).
- 
-    If  the  -noauth  flag  is  used,  the  connection  to   the
-    Authentication  Server is not authenticated, so the randomly
-    generated  key  crosses  the  network  unencrypted.      The
-    potential  security  risk  in  using  the  key  as an actual
-    encryption key is even greater in this case.
- 
- ARGUMENTS
- 
-    -admin_username   specifies the user name  under  which  the
-                      issuer  wishes to perform the command.  If
-                      the  issuer  does  not  provide  it,   the
-                      current identity is used.  See section 4.3
-                      in the Reference Manual for more  details.
-                      -password_for_admin
-                      specifies  the  issuer's  password.     If
-                      provided  here, the password is visible on
-                      the  screen.    If  the  issuer  does  not
-                      provide  it,  it  will be prompted for and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
-                      details.  -cell
-                      specifies  the  cell  in  which to run the
-                      command, if  not  the  local  cell.    See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -servers
-                      specifies  the  database server machine(s)
-                      with which to establish a connection.  See
- 
- 
- 
-                      section  4.3  in  the Reference Manual for
-                      more details.  -noauth
-                      establishes  an unauthenticated connection
-                      between  the  Authentication  Servers  and
-                      issuer,  whom they assign the unprivileged
-                      identity anonymous rather than  attempting
-                      mutual authentication.  See section 4.3 in
-                      the Reference  Manual  for  more  details.
-                      -help
-                      prints the online help for  this  command.
-                      Do  not  provide  any  other  arguments or
-                      flags with this one.  See section  4.3  in
-                      the Reference Manual for more details.
- 
- OUTPUT
- 
-    Following a "Key:" header, the output displays the octal and
-    hexadecimal forms of the key.
- 
- EXAMPLE
- 
-    The following shows terry issuing this command.
- 
-        % kas getr
-        Password for terry:
-        Key: \230\206\370v1\334\373\346 (98.86.f8.76 31.dc.f
- 
- PRIVILEGE REQUIRED
- 
-    None, but the correct  password  must  be  provided  at  the
-    prompt  if  the  key  is  to be encrypted while crossing the
-    network.  If the -noauth flag is used,  a  password  is  not
-    prompted for.
- 
- MORE INFORMATION
--- 0 ----
Index: openafs/src/man/kas_getticket.1
diff -c openafs/src/man/kas_getticket.1:1.1 openafs/src/man/kas_getticket.1:removed
*** openafs/src/man/kas_getticket.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_getticket.1	Fri Apr 14 09:27:30 2006
***************
*** 1,101 ****
- kas getticket              AFS Commands           kas getticket
- 
- 
- NAME
- 
-    kas  getticket -- create  a  ticket valid for the specified
- 
-                        server.
- 
- 
-    kas getticket  -name <name of server>
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-                                                              +
-           [-servers <explicit list of authentication servers> ]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas gett  -na <name of server>  [-a <admin principal to use
-    for authentication>]
-    [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-no]  [-h]
- 
- DESCRIPTION
- 
-    Instructs the Ticket Granting Service to create a ticket for
-    the  issuer  of  the  command,  which  he or she can use for
-    secured communication with name of server.   The  ticket  is
-    sealed  with  the  contents  of  the  key  field  in name of
-    server's Database entry.
- 
-    This command is functionally similar to klog.  It is  useful
-    primarily  for debugging purposes, and is not recommended as
-    the normal way  to  obtain  tickets.    Also,  while  it  is
-    possible  to  make name of server an individual user as well
-    as a server process, such a ticket is  useless  because  the
-    user's workstation will not know what to do with it.
- 
- ARGUMENTS
- 
-    -name             specifies the Database entry from which to
-                      use the  key.    It  may  include  a  cell
-                      specification (example:
- 
-                      kas getticket afs@transarc.com
- 
-                      gets  a ticket good for all AFS servers in
-                      the Transarc Corporation cell).
- 
-    -admin_username   specifies the user name  under  which  the
-                      issuer  wishes to perform the command.  If
-                      the  issuer  does  not  provide  it,   the
-                      current identity is used.  See section 4.3
-                      in the Reference Manual for more  details.
-                      -password_for_admin
-                      specifies  the  issuer's  password.     If
-                      provided  here, the password is visible on
-                      the  screen.    If  the  issuer  does  not
-                      provide  it,  it  will be prompted for and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
- 
- 
- 
-                      details.  -cell
-                      specifies  the  cell  in  which to run the
-                      command, if  not  the  local  cell.    See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -servers
-                      specifies  the  database server machine(s)
-                      with which to establish a connection.  See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -noauth
-                      establishes  an unauthenticated connection
-                      between  the  Authentication  Servers  and
-                      issuer,  whom they assign the unprivileged
-                      identity anonymous rather than  attempting
-                      mutual authentication.  See section 4.3 in
-                      the Reference  Manual  for  more  details.
-                      -help
-                      prints the online help for  this  command.
-                      Do  not  provide  any  other  arguments or
-                      flags with this one.  See section  4.3  in
-                      the Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following  shows  the  regular  user  terry obtaining a
-    ticket for the AFS server processes in her home cell.
- 
-    % kas gett afs  Password for terry:
- 
- PRIVILEGE REQUIRED
- 
-    None.  However, the issuer must provide his or  her  correct
-    password.
- 
- MORE INFORMATION
--- 0 ----
Index: openafs/src/man/kas_help.1
diff -c openafs/src/man/kas_help.1:1.1 openafs/src/man/kas_help.1:removed
*** openafs/src/man/kas_help.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_help.1	Fri Apr 14 09:27:30 2006
***************
*** 1,82 ****
- kas help                   AFS Commands                kas help
- 
- 
- NAME
- 
-    kas help -- show syntax of specified kas command(s) or list
- 
-                        functional description for all of them.
- 
- 
-                                  +
-    kas help [-topic <help string> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                            +
-    kas h  [-t <help string> ]  [-h]
- 
- DESCRIPTION
- 
-    Displays the first line  (name  and  short  description)  of
-    every  kas  command's  help  entry,  if  no  help  string is
-    provided.  For each operation code specified with -topic, it
-    outputs  the  entire  help  entry.    See the Output section
-    below.
- 
- ARGUMENTS
- 
-    -topic
-          specifies the operation code(s) for which syntax is to
-          be provided.  If  the  issuer  omits  it,  the  output
-          instead  provides  a  short  description  of  all  kas
-          commands.
- 
-    -help prints the online help  for  this  command.    Do  not
-          provide  any  other  arguments or flags with this one.
-          See section 4.3  in  the  Reference  Manual  for  more
-          details.
- 
- OUTPUT
- 
-    The  online  help entry for each kas command consists of two
-    or three lines:
- 
-       - The first  line  names  the  command  and  briefly
-         describes what it does
- 
-       - If  the  command  has aliases, they will appear on
-         the next line
- 
-       - The final line, which begins with "Usage:",  lists
-         the   command's   arguments   and   flags  in  the
-         prescribed order.  Online  help  entries  use  the
-         same  symbols  (brackets,  etc.)  as  the  command
-         definitions in this manual.  For an explanation of
-         their  meaning,  see  page  v  of the introductory
-         About This Manual chapter.
- 
- 
- 
- EXAMPLE
- 
-    The  following  displays  the  online  help  entry  for  the
-    kas setpassword command.
- 
-        % kas help setpassword
-        kas setpassword: set a user's password
-        aliases: sp
-        Usage: kas setpassword -name <name of user> [-new_passwo
-        <new password>] [-kvno <key version number>]
-        [-admin_username <admin principal to use for authenticat
-        [-password_for_admin <password>] [-cell <cell name>]
-                                                           +
-        [-servers <explicit list of authentication servers> ] [-
- 
- PRIVILEGE REQUIRED
- 
-    None.  No password will be prompted for.
- 
- MORE INFORMATION
- 
-    kas apropos
--- 0 ----
Index: openafs/src/man/kas_interactive.1
diff -c openafs/src/man/kas_interactive.1:1.1 openafs/src/man/kas_interactive.1:removed
*** openafs/src/man/kas_interactive.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_interactive.1	Fri Apr 14 09:27:30 2006
***************
*** 1,168 ****
- kas interactive            AFS Commands         kas interactive
- 
- 
- NAME
- 
-    kas     interactive -- enter     interactive    mode    for
- 
-                        Authentication Server.
- 
- 
-    kas interactive
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-             [-servers <explicit list of authentication
-            +
-    servers> ]  [-noauth]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas i  [-a <admin principal to use for authentication>]  [-p
-    <admin password>]
-    [-c <cell name>]  [-s <explicit list of authentication
-            +
-    servers> ]
-    [-n]  [-h]
- 
- DESCRIPTION
- 
-    Enters interactive mode.  By establishing  an  authenticated
-    connection in this way, the issuer will not have to type his
-    or her password at each command as  would  be  necessary  in
-    regular  mode.    The authenticated connection lasts for one
-    hour unless the maximum ticket lifetime for  the  issuer  or
-    the Authentication Server is shorter.
- 
-    It   is   also  possible  to  establish  an  unauthenticated
-    connection under the identity anonymous by using the -noauth
-    flag.    During normal operation, there is no point to doing
-    so,   because   the   Authentication   Server   still   does
-    authorization  checking and will not allow anonymous, who is
-    unprivileged by definition, to perform privileged commands.
- 
-    A possible situation in which an issuer might wish to  enter
-    interactive  mode unauthenticated is if he or she knows that
-    attempting to authenticate will cause a problem,  but  wants
-    to  list  some  unprivileged  information.    Attempting  to
-    authenticate could cause a problem,  for  instance,  if  the
-    Authentication  Server  no longer knows the key used to seal
-    the ticket  the  user  has  (perhaps  it  is  no  longer  in
-    /usr/afs/etc/KeyFile).
- 
-    The other repercussions of entering interactive mode are:
- 
-       - A  "ka>"  prompt  replaces  the  issuer's  regular
-         prompt
- 
-       - It is no longer necessary or legal to type kas  at
-         the  beginning  of  a command.  Type the operation
-         code as the first part of the command
- 
-       - It is not useful to include the  common  arguments
-         described in section 4.3 in the Reference Manual :
- 
- 
- 
-         -admin_username,    -password_for_admin,    -cell,
-         -servers.  They are ignored, because the variables
-         corresponding to them are set as the issuer enters
-         interactive  mode,  and  cannot be changed without
-         leaving interactive mode.  It is legal to  provide
-         the -help flag.
- 
-    There are two additional ways to enter interactive mode:
- 
-       1. Type kas without any operation code.  By default,
-          the command interpreter establishes a  connection
-          with  all  of  the  Authentication Servers in the
-          local cell.  They  attempt  to  authenticate  the
-          user  logged  into  the  machine  from  which the
-          command is issued,  based  on  the  password  the
-          issuer  provides  at  the  prompt. The issuer may
-          specify an  alternate  identity,  password,  cell
-          name  and/or  list  of  Authentication Servers by
-          using the first four common  arguments  described
-          in  section  4.3  in the Reference Manual .  Type
-          kas followed  by  a  user  name  and  cell  name,
-          separated   by   an   "@"   sign   (example:  kas
-          smith@transarc.com).  The  Authentication  Server
-          attempts  to  authenticate  the specified user in
-          the specified cell, and prompts for  his  or  her
-          password  in  the specified cell.  This method is
-          most useful  when  the  issuer  wishes  to  enter
-          interactive  mode  with a different identity than
-          the one under which he or she is currently logged
-          on.
- 
- ARGUMENTS
- 
-    -admin_username   specifies  the  user  name under which the
-                      issuer wishes to perform the command.   If
-                      the   issuer  does  not  provide  it,  the
-                      current identity is used.  See section 4.3
-                      in  the Reference Manual for more details.
-                      -password_for_admin
-                      specifies   the  issuer's  password.    If
-                      provided here, the password is visible  on
-                      the  screen.    If  the  issuer  does  not
-                      provide it, it will be  prompted  for  and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
-                      details.  -cell
-                      specifies the cell in  which  to  run  the
-                      command,  if  not  the  local  cell.   See
-                      section 4.3 in the  Reference  Manual  for
-                      more details.  -servers
-                      specifies the database  server  machine(s)
-                      with which to establish a connection.  See
-                      section 4.3 in the  Reference  Manual  for
-                      more details.  -noauth
-                      establishes an unauthenticated  connection
-                      between  the  Authentication  Servers  and
-                      issuer, whom they assign the  unprivileged
-                      identity  anonymous rather than attempting
-                      mutual   authentication.      Using   this
-                      argument  on  this  command is useful only
-                      when authorization checking is disabled on
- 
- 
- 
-                      the   file   server  machine  (during  the
-                      installation of a file server  machine  or
-                      when  bos setauth  has  been  used  during
-                      other  unusual  circumstances).      Under
-                      normal        authorization       checking
-                      circumstances, the Authentication  Servers
-                      will  allow  only  authorized (privileged)
-                      users to issue commands  that  change  the
-                      status  of a server or configuration file,
-                      even if the -noauth  flag  was  used  when
-                      entering  interactive  mode.   See section
-                      4.3  in  the  Reference  Manual  for  more
-                      details.  -help
-                      prints the online help for  this  command.
-                      Do  not  provide  any  other  arguments or
-                      flags with this one.  See section  4.3  in
-                      the Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following shows a user entering interactive mode as the
-    privileged user admin.
- 
-    % kas i admin  Password for admin:  ka>
- 
- PRIVILEGE REQUIRED
- 
-    None.  A password will be prompted for, and  something  must
-    be  typed  in  response, but the issuer needs to provide the
-    correct  password  only  if  he  or  she  wishes  to   issue
-    privileged commands while in interactive mode.  If he or she
-    provides  an  wrong  character  string,  the  Authentication
-    Server assigns the unprivileged identity anonymous.
- 
- MORE INFORMATION
- 
-    (kas) noauthentication (kas) quit
--- 0 ----
Index: openafs/src/man/kas_list.1
diff -c openafs/src/man/kas_list.1:1.1 openafs/src/man/kas_list.1:removed
*** openafs/src/man/kas_list.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_list.1	Fri Apr 14 09:27:30 2006
***************
*** 1,88 ****
- kas list                   AFS Commands                kas list
- 
- 
- NAME
- 
-    kas   list -- list   all   entries  in  the  Authentication
- 
-                        Database.
- 
- 
-    kas list  [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-            [-servers <explicit list of authentication
-            +
-    servers> ]
-    [-noauth]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas ls  [-a <admin principal to use for authentication>]
-    [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-n]  [-h]
- 
- DESCRIPTION
- 
-    Lists the names of all the entries  (server  and  individual
-    user) in the Authentication Database.
- 
- ARGUMENTS
- 
-    -admin_username   specifies  the  user  name under which the
-                      issuer wishes to perform the command.   If
-                      the   issuer  does  not  provide  it,  the
-                      current identity is used.  See section 4.3
-                      in  the Reference Manual for more details.
-                      -password_for_admin
-                      specifies  the  issuer's  password.   Note
-                      that provided here the password is visible
-                      on  the  screen.    If the issuer does not
-                      provide it, it will be  prompted  for  and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
-                      details.  -cell
-                      specifies the cell in  which  to  run  the
-                      command,  if  not  the  local  cell.   See
-                      section 4.3 in the  Reference  Manual  for
-                      more details.  -servers
-                      specifies the database  server  machine(s)
-                      with which to establish a connection.  See
-                      section 4.3 in the  Reference  Manual  for
-                      more details.  -noauth
-                      establishes an unauthenticated  connection
-                      between  the  Authentication  Servers  and
-                      issuer, whom they assign the  unprivileged
-                      identity  anonymous rather than attempting
-                      mutual authentication.  See section 4.3 in
-                      the  Reference  Manual  for  more details.
-                      -help
-                      prints  the  online help for this command.
-                      Do not  provide  any  other  arguments  or
-                      flags  with  this one.  See section 4.3 in
-                      the Reference Manual for more details.
- 
- 
- 
- OUTPUT
- 
-    Each entry appears on its own line.  Some entries have  been
-    created  by  the  Authentication Server for its own internal
-    use (for instance, AuthServer.Admin).
- 
- EXAMPLE
- 
-    The following example is for the cell small.edu,  which  has
-    five   users   in   it   (the  other  entries  are  for  the
-    Authentication Server's internal use).
- 
-    % kas list  AuthServer.Admin  krbtgt.SMALL.EDU  afs  admin
-    pat   smith  jones   terry
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  must  have  the  ADMIN  flag  set  in  his  or   her
-    Authentication Database entry.
- 
- MORE INFORMATION
--- 0 ----
Index: openafs/src/man/kas_listtickets.1
diff -c openafs/src/man/kas_listtickets.1:1.1 openafs/src/man/kas_listtickets.1:removed
*** openafs/src/man/kas_listtickets.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_listtickets.1	Fri Apr 14 09:27:30 2006
***************
*** 1,80 ****
- kas listtickets            AFS Commands         kas listtickets
- 
- 
- NAME
- 
-    kas listtickets -- list all tickets (tokens) for issuer.
- 
- 
-    kas listtickets  [-name <name of server>]  [-long]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas listt  [-n <name of server>]  [-l]  [-h]
- 
- DESCRIPTION
- 
-    Lists  all  the  tickets  (tokens)  for  the  issuer,  if no
-    arguments are provided.  If  name  of  server  is  provided,
-    lists only the ticket good for that server process ("afs" is
-    the most common server).  If the -long switch  is  provided,
-    the  output shows octal strings representing the session key
-    and ticket itself.
- 
- ARGUMENTS
- 
-    -name specifies the  server  name  for  which  to  list  the
-          ticket.
- 
-    -long specifies  that  the  output  should display the octal
-          number  strings  constituting  the  session  key   and
-          ticket,  along  with other information (see the OUTPUT
-          section).  The session  key  is  the  one  also  found
-          within the ticket.
- 
-    -help prints  the  online  help  for  this  command.  Do not
-          provide any other arguments or flags  with  this  one.
-          See  section  4.3  in  the  Reference  Manual for more
-          details.
- 
- OUTPUT
- 
-    The output reports for whom the  ticket  is  valid  and  the
-    ticket's expiration date.  If no cell specification appears,
-    then the ticket is valid in the local cell.
- 
-    If the -long flag is used, the  output  displays  the  octal
-    numbers making up the session key and ticket, along with the
-    key version number and the number of  bytes  in  the  ticket
-    (this should always be 56).  If a "[>> POSTDATED <<]" marker
-    appears where the expiration date normally does, the  ticket
-    does  not  become  valid  until  the  indicated  time. (Only
-    internal calls can create a postdated ticket;  there  is  no
-    standard interface that allows users to do this.)
- 
- 
- 
- EXAMPLES
- 
-    The  following two examples are for a user with AFS UID 1020
-    in  the  transarc.com  cell  and   AFS   UID   35   in   the
-    test.transarc.com  cell.   He is working on a machine in the
-    former cell and is authenticated in both cells.
- 
-    % kas listtickets
- 
-        User's (AFS ID 1020) tokens for afs [Expires Wed Jan
-        User's (AFS ID 35@test.transarc.com) tokens for afs@
-             [Expires Wed Jan 3 13:54:26 1990]
- 
-    % kas listtickets afs -l
- 
-        User's (AFS ID 1020) tokens for afs [Expires Wed Jan
-        SessionKey: \375\205\351\227\032\310\263\013
-        Ticket: (kvno = 0, len = 56): \033\005\221S\203d\312
- 
- PRIVILEGE REQUIRED
- 
-    None. A password is not prompted for.
- 
- MORE INFORMATION
--- 0 ----
Index: openafs/src/man/kas_noauthentication.1
diff -c openafs/src/man/kas_noauthentication.1:1.1 openafs/src/man/kas_noauthentication.1:removed
*** openafs/src/man/kas_noauthentication.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_noauthentication.1	Fri Apr 14 09:27:30 2006
***************
*** 1,62 ****
- kas noauthentication       AFS Commands    kas noauthentication
- 
- 
- NAME
- 
-    kas  noauthentication -- discard  authenticated identity in
- 
-                        interactive mode.
- 
- 
-    (kas) noauthentication  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    (kas) n  [-h]
- 
- DESCRIPTION
- 
-    Instructs the Authentication Server to close the (presumably
-    authenticated)   connection   established  when  the  issuer
-    entered interactive mode.  It opens  a  new  unauthenticated
-    connection,  assigning  the issuer the unprivileged identity
-    anonymous.  It does not actually  flush  the  user's  tokens
-    from    the    Cache   Manager's   memory   (as   unlog   or
-    kas forgetticket do).
- 
-    This command is useful only in interactive  mode,  in  which
-    case  the issuer should omit the kas command suite name.  If
-    issued in non-interactive mode, it has no effect.
- 
-    Like the -noauth flag available on a few kas commands (e.g.,
-    kas interactive)  this  command  is  only  useful in unusual
-    circumstances.  During normal operation, there is  no  point
-    to   throwing   away  an  authenticated  identity  (becoming
-    anonymous).   The   Authentication   Server    still    does
-    authorization  checking and will not allow anonymous, who is
-    unprivileged by definition, to perform privileged commands.
- 
- ARGUMENTS
- 
-    -help           prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  4.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following  discards the authentication information with
-    which the user entered interactive mode.
- 
-    kas> no
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    None.  Because this command may  be  issued  only  while  in
-    interactive mode, no password is prompted for.
- 
- MORE INFORMATION
- 
-    kas interactive
--- 0 ----
Index: openafs/src/man/kas_quit.1
diff -c openafs/src/man/kas_quit.1:1.1 openafs/src/man/kas_quit.1:removed
*** openafs/src/man/kas_quit.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_quit.1	Fri Apr 14 09:27:30 2006
***************
*** 1,46 ****
- kas quit                   AFS Commands                kas quit
- 
- 
- NAME
- 
-    kas quit -- leave interactive mode.
- 
- 
-    (kas) quit  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    (kas) q  [-h]
- 
- DESCRIPTION
- 
-    Leaves  interactive  mode.    This  command  terminates  the
-    authenticated connection, so the Authentication Server  will
-    again require a password when another kas command is issued.
- 
-    This  command  is  useful only in interactive mode, in which
-    case the issuer should omit the kas command suite name.   If
-    issued in non-interactive mode, it has no effect.
- 
- ARGUMENTS
- 
-    -help           prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  4.3 in the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The following shows the return of the normal  command  shell
-    prompt when the issuer leaves interactive mode.
- 
-    ka> quit  %
- 
- PRIVILEGE REQUIRED
- 
-    None.    Because  this  command  may be issued only while in
-    interactive mode, no password is prompted for.
- 
- MORE INFORMATION
- 
-    kas interactive
--- 0 ----
Index: openafs/src/man/kas_setfields.1
diff -c openafs/src/man/kas_setfields.1:1.1 openafs/src/man/kas_setfields.1:removed
*** openafs/src/man/kas_setfields.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_setfields.1	Fri Apr 14 09:27:30 2006
***************
*** 1,190 ****
- kas setfields              AFS Commands           kas setfields
- 
- 
- NAME
- 
-    kas  setfields -- set  various  flags,  expiration date and
- 
-                        ticket   lifetime   for   Authentication
-                        Database entry.
- 
- 
-    kas setfields  -name <name of user>
-    [-flags <hex flag value or flag name expression>]
-    [-expiration <date of account expiration>]
-    [-lifetime <maximum ticket lifetime>]
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-             [-servers <explicit list of authentication
-            +
-    servers> ]
-    [-noauth]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas sf  -na <name of user>  [-f <hex flag value or flag name
-    expression>]
-    [-e <date of account expiration>]
-    [-l <maximum ticket lifetime>]
-    [-ad <admin principal to use for authentication>]
-    [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-no]  [-h]
- 
- DESCRIPTION
- 
-    Changes  the  Authentication Database entry for name of user
-    in the manner specified by the various  optional  arguments,
-    which may occur singly or in combination.  See the ARGUMENTS
-    section for a description of the values that may be set.
- 
-    The results of this command are visible in the output of the
-    kas examine command.
- 
- ARGUMENTS
- 
-    -name     specifies the entry to be affected.
- 
-    -flags    sets  any  one  of  four  toggling flags in name's
-              entry.  The default is for none of the flags to be
-              set.  A value of 0 returns all four flags to their
-              defaults.    The  following  explains   the   four
-              non-default  values to set, their meanings and the
-              associated defaults:
- 
-            - ADMIN (Hex equivalent: 0x004).  The  name  of
-              user  is  allowed  to  issue  privileged  kas
-              commands (Default: NOADMIN).
- 
-            - NOTGS (Hex equivalent: 0x008).    The  Ticket
-              Granting Service will refuse to issue tickets
-              to name of user (Default: TGS).
- 
-            - NOSEAL (Hex equivalent: 0x020).   The  Ticket
- 
- 
- 
-              Granting  Service  cannot use the contents of
-              this entry's key field as an  encryption  key
-              (Default: SEAL).
- 
-            - NOCPW  (Hex  equivalent: 0x040).  The name of
-              user cannot change his/her/its  own  password
-              or key (Default: CPW).
- 
-              Both  upper  and lower-case letters are acceptable
-              in specifying values for the flags.
- 
-              To restore the ADMIN flag to its default,  specify
-              NOADMIN.    To  restore  the  other flags to their
-              defaults, omit the NO (i.e.,  type  TGS,  SEAL  or
-              CPW).
- 
-              To  set  more  than one flag at once, connect them
-              with plus signs (example:  NOTGS+ADMIN+CPW).    To
-              remove   all  the  current  flag  settings  before
-              setting new ones, precede the whole list  with  an
-              equal sign (example: =NOTGS+ADMIN+CPW).
- 
-    -expiration
-              determines when the entry  itself  expires,  which
-              will render an individual user unable to log in to
-              the system, and a server unreachable.  The default
-              is never.
- 
-              There are three types of legal values:
- 
-                 - never, which allows the issuer to return
-                   the expiration time to its default after
-                   having set it to a date.
- 
-                 - mm/dd/yy  specifies  12:00  a.m.  on the
-                   indicated     date     (month/day/year).
-                   Examples : 1/23/90, 10/7/89.
- 
-                 - "mm/dd/yy   hh:mm"   specifies   a  time
-                   "hh:mm" (hour:minutes) on the  indicated
-                   date  (month/day/year).  The time should
-                   be in 24-hour format (for example, 20:30
-                   is  8:30  p.m.)  Date format is the same
-                   as for  a  date  alone.    Surround  the
-                   entire  instance  with quotes because it
-                   contains a space.  Examples  :  "1/23/90
-                   22:30", "10/7/89 3:45".
- 
-              Legal  values  for yy run from 00 to 37, which are
-              interpreted as the years 2000-2037, and from 70 to
-              99  which  are  interpreted  as  1970-1999.  (This
-              restriction is because the  Authentication  Server
-              converts  the  date  into  the  number  of seconds
-              elapsed since 1 February 1970, to comply with  the
-              standard  UNIX  date  representation;  dates later
-              than  sometime  in  February   2038   exceed   the
-              representation's capacity.)
- 
-    -lifetime specifies the upper limit on the validity lifetime
-              that the TGS may stamp on a ticket  issued  to  an
-              individual  or  for a server.  That is, if name of
- 
- 
- 
-              user is an individual, this value is  the  maximum
-              lifetime  of a ticket issued to the user.  If name
-              of user is a server such as "afs," this  value  is
-              the  maximum  lifetime  of  a  ticket that the TGS
-              issues to clients in order to contact the server.
- 
-              To specify a number of hours, include a  colon  in
-              the  number  (example:    1:00  means  one  hour).
-              Otherwise, the number is assumed to be in  seconds
-              (so 3600 means one hour).  If this argument is not
-              provided, the  default  setting  is  100:00  hours
-              (360000 seconds).
- 
-    -admin_username
-              specifies  the  user  name  under which the issuer
-              wishes to perform the command.  If the issuer does
-              not provide it, the current identity is used.  See
-              section 4.3  in  the  Reference  Manual  for  more
-              details.  -password_for_admin
-              specifies  the  issuer's  password.    If provided
-              here, the password is visible on the screen.    If
-              the  issuer  does  not  provide  it,  it  will  be
-              prompted for and not be  visible  on  the  screen.
-              See  section  4.3 in the Reference Manual for more
-              details.  -cell
-              specifies the cell in which to run the command, if
-              not the local  cell.    See  section  4.3  in  the
-              Reference Manual for more details.  -servers
-              specifies  the  database  server  machine(s)  with
-              which  to establish a connection.  See section 4.3
-              in the Reference Manual for more details.  -noauth
-              establishes  an unauthenticated connection between
-              the Authentication Servers and issuer,  whom  they
-              assign  the unprivileged identity anonymous rather
-              than  attempting  mutual  authentication.      See
-              section  4.3  in  the  Reference  Manual  for more
-              details.
- 
-    -help     prints the online help for this command.   Do  not
-              provide  any  other  arguments  or flags with this
-              one.  See section 4.3 in the Reference Manual  for
-              more details.
- 
- EXAMPLE
- 
-    In  the  following, admin grants administrative privilege to
-    smith, and makes smith's entry  expire  at  midnight  on  31
-    December 1995.
- 
-    % kas sf smith ADMIN 12/31/95  Password for admin:
- 
- PRIVILEGE REQUIRED
- 
-    Issuer   must  have  the  ADMIN  flag  set  in  his  or  her
-    Authentication Database entry.
- 
- MORE INFORMATION
- 
-    kas examine
--- 0 ----
Index: openafs/src/man/kas_setkey.1
diff -c openafs/src/man/kas_setkey.1:1.1 openafs/src/man/kas_setkey.1:removed
*** openafs/src/man/kas_setkey.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_setkey.1	Fri Apr 14 09:27:30 2006
***************
*** 1,159 ****
- kas setkey                 AFS Commands              kas setkey
- 
- 
- NAME
- 
-    kas  setkey -- insert  octal key directly into key field of
- 
-                        Database entry.
- 
- 
-    kas setkey  -name <name of user>  -new_key <eight byte new
-    key>    [-kvno <keyversion number>]
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-                                                              +
-           [-servers <explicit list of authentication servers> ]
-           [-noauth]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas setk -na <name of user> -ne <eight byte new key>
-    [-k <key version number>]
-    [-a <admin principal to use for authentication>]  [-p <admin
-    password>]
-    [-c <cell name>]  [-s <explicit list of authentication
-            +
-    servers> ]  [-no]  [-h]
- 
- DESCRIPTION
- 
-    Accepts the octal number string eight byte new  key,  places
-    it  in  the key field of the Database entry for name of user
-    and marks it with key version  number  key  version  number.
-    This  command makes most sense when name of user is a server
-    process (such as "afs") rather than an individual  user,  as
-    discussed in the Warning section.  For individual users, use
-    the kas setpassword command instead.
- 
-    When changing the key in a server entry, remember  to  alter
-    the /usr/afs/etc/KeyFile with the bos addkey command and use
-    the same key version number in both places.
- 
- WARNING
- 
-    Using this command to change user  passwords  is  needlessly
-    complicating,  for the following reason.  The Authentication
-    Database stores both user passwords and server keys as octal
-    strings,  never  as  character  strings.    When a character
-    string is provided in  the  kas   setpassword  command  (see
-    above),  the  Authentication  Server  calls  an algorithm to
-    convert the string into an octal-form encryption  key,  then
-    stores  the  key  in the key field of the appropriate entry.
-    The kas setkey command (this one)  bypasses  the  conversion
-    algorithm, entering eight byte new key directly into the key
-    field.  If an octal string is simply invented, there  is  no
-    way  to  discover  which character string it corresponds to.
-    To use this command to change a user  password,  the  issuer
-    would  need  to translate the password character string into
-    an  octal  key  using  kas   stringtokey  and  specify   the
-    resulting string as eight byte new key here.  Otherwise, the
-    user would not know what password to type at login.
- 
-    The main use for this command is to  set  server  encryption
- 
- 
- 
-    keys,  if  the  system  administrator first executes the bos
-    addkey command to add a  new  key  to  /usr/afs/etc/KeyFile.
-    That  command  accepts  only  strings and converts them into
-    octal keys, just like kas setpassword, but the  output  from
-    the  bos  listkeys  command  will  then reveal the converted
-    octal form of the string, which is the eight  byte  new  key
-    that should be specified here.
- 
- ARGUMENTS
- 
-    -name             specifies  the  entry for which to replace
-                      the key field.
- 
-    -new_key          specifies a string of  eight  bytes,  each
-                      consisting  of  EITHER a three-digit octal
-                      number preceded by a backslash OR a single
-                      ASCII  character.  The issuer must provide
-                      it  on  the  command  line  where  it   is
-                      visible, as there is no prompt for it.
- 
-                      Outside    interactive    mode,   surround
-                      octalkey with single quotes, or the  shell
-                      will  throw away the backslashes.  When in
-                      interactive  mode,  do  not  include   the
-                      single quotes.
- 
-    -kvno             specifies    the    key   version   number
-                      associated with the new key.  It  must  be
-                      an integer in the range 0 through 255.  In
-                      addition, 999 is reserved for the "bcrypt"
-                      key  used  in  AFS 2.0 authentication.  If
-                      the issuer does not provide this argument,
-                      it  defaults  to  0, which is probably not
-                      desirable for server keys.
- 
-    -admin_username   specifies the user name  under  which  the
-                      issuer  wishes to perform the command.  If
-                      the  issuer  does  not  provide  it,   the
-                      current identity is used.  See section 4.3
-                      in the Reference Manual for more  details.
-                      -password_for_admin
-                      specifies  the  issuer's  password.     If
-                      provided  here, the password is visible on
-                      the  screen.    If  the  issuer  does  not
-                      provide  it,  it  will be prompted for and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
-                      details.  -cell
-                      specifies  the  cell  in  which to run the
-                      command, if  not  the  local  cell.    See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -servers
-                      specifies  the  database server machine(s)
-                      with which to establish a connection.  See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -noauth
-                      establishes  an unauthenticated connection
-                      between  the  Authentication  Servers  and
-                      issuer,  whom they assign the unprivileged
-                      identity anonymous rather than  attempting
-                      mutual authentication.  See section 4.3 in
- 
- 
- 
-                      the Reference  Manual  for  more  details.
-                      -help
-                      prints the online help for  this  command.
-                      Do  not  provide  any  other  arguments or
-                      flags with this one.  See section  4.3  in
-                      the Reference Manual for more details.
- 
- 
- 
- EXAMPLE
- 
-    The  following  shows  admin  setting the "afs" key with key
-    version number 15.
- 
-    % kas setk afs \222\260\334\241c\212\274W 15  Password for
-    admin:
- 
- PRIVILEGE REQUIRED
- 
-    Individual users may use this command to  change  their  own
-    keys,  though  this is not advised for the reasons stated in
-    the WARNING section.  To change server  encryption  keys  or
-    the  key field in another user's entry, issuer must have the
-    ADMIN flag set in his or her Authentication Database entry.
- 
- MORE INFORMATION
- 
-    bos addkey bos listkeys kas setpassword
--- 0 ----
Index: openafs/src/man/kas_setpassword.1
diff -c openafs/src/man/kas_setpassword.1:1.1 openafs/src/man/kas_setpassword.1:removed
*** openafs/src/man/kas_setpassword.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_setpassword.1	Fri Apr 14 09:27:30 2006
***************
*** 1,137 ****
- kas setpassword            AFS Commands         kas setpassword
- 
- 
- NAME
- 
-    kas setpassword -- change key field in Database entry.
- 
- 
-    kas setpassword  -name <name of user>
-    [-new_password <new password>]
-    [-kvno <key version number>]
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-             [-servers <explicit list of authentication
-            +
-    servers> ]
-    [-noauth]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas sp  -na <name of user> [-ne <new password>]
-    [-k <key version number>]
-    [-a <admin principal to use for authentication>]
-    [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-no]  [-h]
- 
- DESCRIPTION
- 
-    Accepts a character string new password of unlimited length,
-    scrambles it into a form suitable for use as  an  encryption
-    key, and places it in the key field of name's Authentication
-    Database entry.
- 
-    There is little reason to type new password on  the  command
-    line,  where  it is visible.  If the issuer does not provide
-    the password on the command line, a
- 
-    new_password:
- 
-    prompt appears, followed by a  second  prompt  requesting  a
-    repetition  of the new password.  In both cases the password
-    does not echo visibly.  The second  prompt  guarantees  that
-    the  issuer did not make a typing mistake when responding to
-    the first prompt.
- 
-    When adding server keys (such as "afs"), remember to add the
-    new  key  to  the  /usr/afs/etc/KeyFile using the bos addkey
-    command and to use the same  key  version  number  there  as
-    here.     See  the  AFS  System  Administrator's  Guide  for
-    instructions.
- 
- 
- 
- ARGUMENTS
- 
-    -name             specifies the entry for which  to  replace
-                      the key field.
- 
-    -new_password     is the character string the user will type
-                      when  logging  in.    It   should   be   8
-                      characters   or   less,  as  some  non-AFS
-                      programs cannot handle  longer  passwords.
-                      The  Authentication  Server  scrambles  it
-                      into a  string  of  octal  numbers  before
-                      storing it in the key field.
- 
-    -kvno             specifies    the    key   version   number
-                      associated with the new key.  It  must  be
-                      an   integer   between  0  and  255.    In
-                      addition, 999 is reserved for the "bcrypt"
-                      key  used  in  AFS 2.0 authentication.  If
-                      the issuer does not provide this argument,
-                      it  defaults  to  0, which is probably not
-                      desirable for server keys.
- 
-    -admin_username   specifies the user name  under  which  the
-                      issuer  wishes to perform the command.  If
-                      the  issuer  does  not  provide  it,   the
-                      current identity is used.  See section 4.3
-                      in the Reference Manual for more  details.
-                      -password_for_admin
-                      specifies  the  issuer's  password.     If
-                      provided  here, the password is visible on
-                      the  screen.    If  the  issuer  does  not
-                      provide  it,  it  will be prompted for and
-                      not be visible on the screen.  See section
-                      4.3  in  the  Reference  Manual  for  more
-                      details.  -cell
-                      specifies  the  cell  in  which to run the
-                      command, if  not  the  local  cell.    See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -servers
-                      specifies  the  database server machine(s)
-                      with which to establish a connection.  See
-                      section  4.3  in  the Reference Manual for
-                      more details.  -noauth
-                      establishes  an unauthenticated connection
-                      between  the  Authentication  Servers  and
-                      issuer,  whom they assign the unprivileged
-                      identity anonymous rather than  attempting
-                      mutual authentication.  See section 4.3 in
-                      the Reference  Manual  for  more  details.
-                      -help
-                      prints the online help for  this  command.
-                      Do  not  provide  any  other  arguments or
-                      flags with this one.  See section  4.3  in
-                      the Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following  shows  privileged  user admin changing pat's
-    password (presumably because pat forgot the former  password
-    or got locked out of his account in some other way.
- 
- 
- 
-        % kas sp pat
-        Password for admin:
-        new_password:
-        Verifying, please re-enter new_password:
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    An  individual  user  may  change  his  or her own password,
-    although use of the kpasswd command is recommended  instead.
-    To  change  another  user's password or the password (server
-    encryption key) for server processes such as  "afs",  issuer
-    must  have  the  ADMIN flag set in his or her Authentication
-    Database entry.
- 
- MORE INFORMATION
- 
-    bos addkey kas setkey
--- 0 ----
Index: openafs/src/man/kas_statistics.1
diff -c openafs/src/man/kas_statistics.1:1.1 openafs/src/man/kas_statistics.1:removed
*** openafs/src/man/kas_statistics.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_statistics.1	Fri Apr 14 09:27:30 2006
***************
*** 1,124 ****
- kas statistics             AFS Commands          kas statistics
- 
- 
- NAME
- 
-    kas     statistics -- display     statistics    from    one
- 
-                        Authentication Server process.
- 
- 
-    kas statistics
-    [-admin_username <admin principal to use for
-    authentication>]
-    [-password_for_admin <admin password>]  [-cell <cell name>]
-              [-servers <explicit list of authentication
-            +
-    servers> ]
-    [-noauth]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas sta  [-a <admin principal to use for authentication>]
-    [-p <admin password>]  [-c <cell name>]
-                                                 +
-    [-s <explicit list of authentication servers> ]  [-n]  [-h]
- 
- DESCRIPTION
- 
-    Displays statistics from one of the cell's  database  server
-    machines.  It is recommended that the issuer use -servers to
-    specify  one  machine  name.      Otherwise,   the   command
-    interpreter  displays  statistics  for  a  machine chosen at
-    random from all the database server machines with  which  it
-    has established connections.
- 
- WARNING
- 
-    If  this  command  is  issued in interactive mode, it is not
-    possible to  specify  a  file  server  machine  because  the
-    -servers   argument  is  inoperative.    If  the  issuer  is
-    interested in a particular file server machine, it  is  best
-    to leave interactive mode.
- 
- ARGUMENTS
- 
-    -admin_username specifies  the  user  name  under  which the
-                    issuer wishes to perform the  command.    If
-                    the  issuer does not provide it, the current
-                    identity is used.  See section  4.3  in  the
-                    Reference    Manual    for   more   details.
-                    -password_for_admin
-                    specifies  the issuer's password.  Note that
-                    provided here the password is visible on the
-                    screen.   If the issuer does not provide it,
-                    it will be prompted for and not  be  visible
-                    on  the  screen.    See  section  4.3 in the
-                    Reference Manual for more details.  -cell
-                    specifies  the  cell  in  which  to  run the
-                    command, if not the local cell.  See section
-                    4.3   in   the  Reference  Manual  for  more
-                    details.  -servers
-                    specifies  the  database  server  machine(s)
-                    with which to establish a connection.  It is
-                    recommended   that   the   issuer  use  this
- 
- 
- 
-                    argument and specify a single machine.
- 
-    -noauth         establishes  an  unauthenticated  connection
-                    between   the   Authentication  Servers  and
-                    issuer, whom they  assign  the  unprivileged
-                    identity  anonymous  rather  than attempting
-                    mutual authentication.  See section  4.3  in
-                    the   Reference  Manual  for  more  details.
-                    -help
-                    prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  4.3 in the
-                    Reference Manual for more details.
- 
- OUTPUT
- 
-    The information includes:
- 
-       - server's network address number and  last  startup
-         date
- 
-       - number   of  requests  and  aborted  requests  for
-         various   services:      authentication,    ticket
-         granting, password setting, entry listing, etc
- 
-       - number of entries with ADMIN flag
- 
- EXAMPLE
- 
-    The  following show the output when someone authenticated as
-    the  privileged  user  admin  issues  this   command   about
-    fs1.transarc.com.
- 
-        % kas stat -s fs1.transarc.com
-        56 allocs, 46 frees, 0 password changes
-        Hash table utilization = 0.100000%
-        From host c037cf05 started at Tue Mar 20 12:42:02 19
-          of 88 requests for Authenticate, 18 were aborted.
-          of 14 requests for GetTicket, 0 were aborted.
-          of 4 requests for CreateUser, 1 were aborted.
-          of 12 requests for SetFields, 4 were aborted.
-          of 3 requests for DeleteUser, 0 were aborted.
-          of 23 requests for GetEntry, 4 were aborted.
-          of 18 requests for ListEntry, 0 were aborted.
-          of 2 requests for GetStats, 1 were aborted.
-          of 2 requests for GetRandomKey, 0 were aborted.
-        Used 6.015 seconds of CPU time.
-        1 admin accounts
- 
- PRIVILEGE REQUIRED
- 
-    Issuer   must  have  the  ADMIN  flag  set  in  his  or  her
-    Authentication Database entry.
- 
- MORE INFORMATION
- 
-    kas debuginfo
--- 0 ----
Index: openafs/src/man/kas_stringtokey.1
diff -c openafs/src/man/kas_stringtokey.1:1.1 openafs/src/man/kas_stringtokey.1:removed
*** openafs/src/man/kas_stringtokey.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kas_stringtokey.1	Fri Apr 14 09:27:30 2006
***************
*** 1,70 ****
- kas stringtokey            AFS Commands         kas stringtokey
- 
- 
- NAME
- 
-    kas stringtokey -- convert a character string into an octal
- 
-                        string.
- 
- 
-    kas stringtokey  -string <password string>  [-cell <cell
-    name>]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kas str  -s <password string>  [-c <cell name>]  [-h]
- 
- DESCRIPTION
- 
-    Converts the character string password string into an  octal
-    string  suitable  for  use  as  an  encryption key.  This is
-    useful for showing what form a given password would take  in
-    the cell.
- 
-    The   algorithm  that  the  Authentication  Server  uses  to
-    generate keys combines password string with the cell's  name
-    during the generation, so use of cell name allows the issuer
-    to see what a string would look like when scrambled  into  a
-    key in a certain cell.
- 
- ARGUMENTS
- 
-    -string         specifies the password-like character string
-                    to be converted into a key.
- 
-    -cell           specifies  the  cell  name  to  be  used  in
-                    converting  password  string into a key.  If
-                    the issuer does not provide it, the  default
-                    is  the cell in which the command is issued.
-                    Provide a complete Internet-style name.
- 
-    -help           prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  4.3  in  the
-                    Reference Manual for more details.
- 
- OUTPUT
- 
-    The output is of the form:
- 
-        Converting password string in realm 'cell name yield
- 
- EXAMPLE
- 
-    The  following shows a user in the Transarc Corporation cell
-    deriving the octal key equivalent of the string "new_pswd".
- 
-        % kas str new_pswd
-        Converting new_pswd in realm 'TRANSARC.COM' yields
-            key='\255\364b\354\221s\235\313'.
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    kas getrandomkey kas setkey
--- 0 ----
Index: openafs/src/man/klog.1
diff -c openafs/src/man/klog.1:1.1 openafs/src/man/klog.1:removed
*** openafs/src/man/klog.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/klog.1	Fri Apr 14 09:27:30 2006
***************
*** 1,319 ****
- klog                       AFS Commands                    klog
- 
- 
- NAME
- 
-    klog -- authenticate  with  Authentication Server to obtain
- 
-                        token.
- 
- 
-    klog [-x]  [-principal <user name>]  [-password <user's
-    password>]
-    [-tmp]  [-cell <cell name>]  [-servers <explicit list of
-            +
-    servers> ]
-    [-pipe]  [-lifetime <ticket lifetime in hh[:mm[:ss]]>]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    klog [-x]  [-pr <user name>]  [-pa <user's password>] [-t]
-    [-c <cell name>]
-                                  +
-    [-s <explicit list of servers> ]  [-pi]
-    [-l <ticket lifetime in hh[:mm[:ss]]>]  [-h]
- 
- DESCRIPTION
- 
-    Authenticates the issuer in the indicated cell.  The  issuer
-    obtains a token accepted by the AFS server processes in that
-    cell.  The Cache Manager stores the token  in  a  credential
-    structure associated with the issuer.  If the issuer already
-    has a token for the cell,  the  token  resulting  from  this
-    command replaces it in the credential structure.
- 
-    By default, the token generated is appropriate for the local
-    cell (the one to  which  the  local  machine  belongs):  the
-    command interpreter contacts an Authentication Server in the
-    local  cell,   chosen   at   random   from   the   list   in
-    /usr/vice/etc/CellServDB,  and  requests  a  token  for  the
-    issuer logged into the local machine.  Use  the  -principal,
-    -cell  and/or  -servers  arguments  to  specify  a different
-    identity,   cell   or   set   of   Authentication    Servers
-    respectively.     See  the  ARGUMENTS  section  for  further
-    explanation.
- 
-    This command does not change the identity  under  which  the
-    issuer is logged into the local UNIX file system.
- 
-    The issuer (or user indicated with -principal) does not have
-    to  appear  in  the  local  password  file  (/etc/passwd  or
-    equivalent)  to  issue this command; in previous versions of
-    this command, users had to add the -x flag if they  did  not
-    appear in that file.
- 
-    During  a  single  login  on  a given machine, a user can be
-    authenticated in multiple cells simultaneously, but can have
-    only  one  token  at  a  time  for each cell (i.e., can only
-    authenticate under one identity per cell).
- 
-    The lifetime of the token resulting from this command is the
-    smallest of the following:
- 
-       - the  lifetime  requested  by  the  issuer with the
- 
- 
- 
-         -lifetime  argument.    If  the  issuer  does  not
-         include  this  argument, the value defaults to 720
-         hours (30 days).
- 
-       - the "maximum  ticket  lifetime"  recorded  in  the
-         "afs"  entry  in the Authentication Database.  The
-         default is 100 hours.  Administrators can  inspect
-         this  value using kas examine, and change it using
-         kas setfields.
- 
-       - the "maximum  ticket  lifetime"  recorded  in  the
-         issuer's   Authentication  Database  entry.    The
-         default is 25 hours for user  entries  created  by
-         the AFS 3.1 or later version of the Authentication
-         Server, and 100 hours for user entries created  by
-         the  AFS 3.0 version of the Authentication Server.
-         Administrators and the  user  himself/herself  can
-         inspect   this   value   using   kas examine,  and
-         administrators can change it using kas setfields.
- 
-       - the "maximum  ticket  lifetime"  recorded  in  the
-         "krbtgt.CELLNAME"   entry  in  the  Authentication
-         Database; this entry corresponds  to  the  ticket-
-         granting  ticket used internally in generating the
-         token.  The default is 720 hours (30 days).
- 
-    If none of  these  defaults  have  been  changed,  then  the
-    standard   token  lifetime  is  25  hours  for  users  whose
-    Authentication Database entries were created by the AFS  3.1
-    or later version of the Authentication Server, and 100 hours
-    for users whose Authentication Database entries were created
-    by  the  AFS  3.0 version of the Authentication Server.  The
-    user can issue klog to request  a  token  with  a  different
-    lifetime.
- 
-    The  maximum  lifetime for any token is 720 hours (30 days),
-    and the minimum is 5 minutes.  Between these  values,  token
-    lifetimes  are  not  granted on a linear scale; only certain
-    values are possible.
- 
-    Lifetimes between 5 minutes and  10  hours  40  minutes  are
-    granted  at 5 minute intervals, rounding up. For example, if
-    the issuer requests a lifetime of 12  minutes,  the  token's
-    actual lifetime is 15 minutes.
- 
-    For  token  lifetimes  greater  than  10  hours  40 minutes,
-    consult the following table,  which  presents  the  possible
-    times  in  units  of  hours:minutes:seconds.  The  number in
-    parentheses is a translation to daysd  hoursh;  the  minutes
-    and  seconds  are  the  same  as in the corresponding hourly
-    time.  For example, 282:22:17 means 282  hours,  22  minutes
-    and  17 seconds, which translates to 11d 18h (11 days and 18
-    hours, etc.).  If the issuer requests a lifetime between two
-    values,  the  token's  lifetime  is rounded up to the higher
-    value.
- 
-       11:24:15 (0d 11h)             33:14:21 (1d 09h)          
-       12:11:34 (0d 12h)             35:32:15 (1d 11h)          
-       13:02:09 (0d 13h)             37:59:41 (1d 13h)          
-       13:56:14 (0d 13h)             40:37:19 (1d 16h)          
-       14:54:03 (0d 14h)             43:25:50 (1d 19h)          
- 
- 
- 
-       15:55:52 (0d 15h)             46:26:01 (1d 22h)          
-       17:01:58 (0d 17h)             49:38:40 (2d 01h)          
-       18:12:38 (0d 18h)             53:04:37 (2d 05h)          
-       19:28:11 (0d 19h)             56:44:49 (2d 08h)          
-       20:48:57 (0d 20h)             60:40:15 (2d 12h)          
-       22:15:19 (0d 22h)             64:51:57 (2d 16h)          
-       23:47:38 (0d 23h)             69:21:04 (2d 21h)          
-       25:26:21 (1d 01h)             74:08:46 (3d 02h)          
-       27:11:54 (1d 03h)             79:16:23 (3d 07h)          
-       29:04:44 (1d 05h)             84:45:16 (3d 12h)          
-       31:05:22 (1d 07h)             90:36:53 (3d 18h)          
- 
- WARNING
- 
-    This command does not create a new  "process  authentication
-    group" (commonly abbreviated PAG; see the description of the
-    pagsh command in this chapter to learn about PAGs).    Users
-    in  cells  not  using  the AFS version of login should issue
-    pagsh before issuing this command, so that  the  tokens  get
-    stored  in  a credential structure that is identified by PAG
-    rather than UNIX UID.  The potential security problem with a
-    credential  structure  identified  by  UID  is  that  anyone
-    already logged in as "root"  on  a  machine  is  allowed  to
-    assume  any other identity by issuing su.  If the credential
-    structure is identified by UID rather than  PAG,  then  when
-    "root"  assumes  another UID it can use the token, too.  Use
-    of a PAG as an identifier eliminates that possibility.
- 
-    If the issuer entered the current session by issuing the AFS
-    login  command,  his  or her credential structure is already
-    identified by a PAG.  Issuing klog during the  same  session
-    creates a new token associated with the existing PAG.
- 
- ARGUMENTS
- 
-    -x        appears  only  for  backwards  compatibility.  Its
-              former function is now  the  default  behavior  of
-              this  command,  as  mentioned  in  the DESCRIPTION
-              section.
- 
-    -principal
-              is  the user name under which the issuer wishes to
-              authenticate.    By  default,  the  Authentication
-              Server  attempts  to  authenticate the user logged
-              into the local machine's UNIX file system.    This
-              argument  allows the issuer to specify a different
-              user name.
- 
-    -password specifies the issuer's password (or that  of  user
-              name  if  principal  is  provided).    Use of this
-              argument is STRONGLY DISCOURAGED, as it makes  the
-              password  visible  on  the  command  line.  If the
-              issuer omits this argument, klog prompts  for  the
-              password and does not echo it visibly:
- 
-              Password: <user's password>
- 
-    -tmp      indicates  that  a  copy  of  the "ticket-granting
-              ticket" should be placed in a file  on  the  local
-              machine's  /tmp  directory.    The  file is called
-              /tmp/tktUnix_UID (example for user with  UNIX  UID
- 
- 
- 
-              1000: /tmp/tkt1000).
- 
-              The  ticket-granting  ticket  is  an  intermediate
-              ticket that the Ticket Granting  Service  requires
-              of  clients  who  desire server tickets (the extra
-              level of indirection increases security).  Putting
-              the   ticket-granting   ticket  into  /tmp  allows
-              standard Kerberos applications to  access  it  and
-              use it for obtaining server tickets.  If this flag
-              is  omitted,  the  Cache  Manager   discards   the
-              ticket-granting  ticket  after  it obtains the AFS
-              server ticket.
- 
-    -cell     specifies the cell in which the issuer  wishes  to
-              authenticate,  by  directing  the  command to that
-              cell's Authentication Servers.   During  a  single
-              login   on   a   given  machine,  a  user  may  be
-              authenticated in  multiple  cells  simultaneously,
-              but  can have only one token at a time for each of
-              them  (i.e.,  can  only  authenticate  under   one
-              identity per cell per machine).
- 
-              If  this  argument  is  omitted,  the  command  is
-              executed  in  the  local  cell,  as   defined   in
-              /usr/vice/etc/ThisCell  on  the  client machine on
-              which the command  is  issued.    The  issuer  may
-              abbreviate  cell  name  to  the shortest form that
-              distinguishes it from the other  cells  listed  in
-              /usr/vice/etc/CellServDB  on the client machine on
-              which the command is issued.
- 
-    -servers  causes the  command  interpreter  to  establish  a
-              connection  with the Authentication Server running
-              on each specified database  server  machine.    It
-              then chooses one of these at random to execute the
-              command.  The command  accepts  shortened  machine
-              names,   but   exactly   which  abbreviations  are
-              acceptable depends on the state of the cell's name
-              server at the time the command is issued.
- 
-              If   this   argument   is   omitted,  the  command
-              interpreter establishes  a  connection  with  each
-              machine listed for the indicated cell in the local
-              workstation's  copy  of  /usr/vice/etc/CellServDB,
-              and  then  chooses  one  of  those  at  random for
-              command execution.
- 
-              This option is useful for testing specific servers
-              if problems are encountered.
- 
-    -pipe     indicates  that  the  command  should  run without
-              printing anything on the screen, including prompts
-              or  error  messages.  The klog command interpreter
-              Server  expects  to  receive  the  password   from
-              standard input (stdin).  The issuer is discouraged
-              from  using  this  argument;  it  is  for  use  by
-              application programs rather than human users.
- 
-    -lifetime indicates  the lifetime that the issuer wishes the
-              token to have.  The value provided  is  considered
-              in  the  lifetime  calculation  described  in  the
- 
- 
- 
-              DESCRIPTION section above, along with the  maximum
-              ticket lifetimes mentioned there.  The DESCRIPTION
-              section also explains how the actual  lifetime  of
-              the  token  is determined, since not all times are
-              possible.  If this argument is  not  provided,  it
-              defaults  to 720 hours.  The format for specifying
-              the lifetime is
- 
-                 hh[:mm[:ss]]
- 
-              Legal values for hh (hours) range from 00  through
-              720.    Legal  values  for  mm and ss (minutes and
-              seconds) range from 00 through 59.
- 
-    -help     prints the online help for this command.   Do  not
-              provide  any  other  arguments  or flags with this
-              one.
- 
- EXAMPLES
- 
-    Most often, this command is issued without arguments.    The
-    appropriate password is for the person currently logged into
-    the local UNIX  file  system.    The  ticket's  lifetime  is
-    calculated as described in the DESCRIPTION section above (if
-    no defaults have been changed, it is 25  hours  for  a  user
-    whose  Authentication  Database entry was created by the AFS
-    3.1 or later version of the Authentication Server, 100 hours
-    for  a  user whose Authentication Database entry was created
-    with the AFS 3.0 version).
- 
-    % klog  Password:
- 
-    The following allows the issuer working on a machine in  the
-    Transarc  cell to authenticate as admin in the Transarc test
-    cell, even though he or she  is  logged  into  the  Transarc
-    machine under a different name.
- 
-    % klog admin -c test.transarc.com  Password: <admin's
-    password>
- 
-    In  the  following, the issuer requests a ticket lifetime of
-    104 hours 30 minutes (4 days 8 hours 30 minutes).  Presuming
-    that   this  lifetime  is  allowed  by  the  maximum  ticket
-    lifetimes and other factors  described  in  the  DESCRIPTION
-    section,   the   token  will  have  an  actual  lifetime  of
-    110:44:28, which the next largest possible value.
- 
-    % klog -life 104:30  Password:
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    None.    An  entry  for  the  issuer  must  exist   in   the
-    Authentication  Database,  and  the  issuer  must supply the
-    correct password.
- 
- MORE INFORMATION
- 
-    pagsh
--- 0 ----
Index: openafs/src/man/knfs.1
diff -c openafs/src/man/knfs.1:1.1 openafs/src/man/knfs.1:removed
*** openafs/src/man/knfs.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/knfs.1	Fri Apr 14 09:27:30 2006
***************
*** 1,178 ****
- knfs                       AFS Commands                    knfs
- 
- 
- NAME
- 
-    knfs -- enable   authenticated  access  to  AFS  from  non-
- 
-                        supported  NFS  client   using   NFS/AFS
-                        Translator.
- 
- 
-    knfs -host <host name>  [-id <user ID (decimal)>]
-    [-unlog]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    knfs  [-ho <host name>]  [-i <user ID (decimal)>] [-u]
-    [-he]
- 
- DESCRIPTION
- 
-    When  issued on an NFS/AFS Translator machine, creates a PAG
-    associated with  the  indicated  NFS  client  machine  (host
-    name), and optionally, the user ID (user ID) that the issuer
-    is using on host name.  It associates the issuer's  existing
-    AFS  token(s)  with a new credential structure identified by
-    the new PAG.
- 
-    Issue  this  command  only  over   a   connection   (perhaps
-    established  at the console or via telnet) to the AFS client
-    machine serving as the NFS/AFS translator machine  for  host
-    name,  never  on  the  NFS  client  machine  itself.  Before
-    issuing it, obtain AFS tokens on the translator machine  for
-    every  cell to be contacted during the login session on host
-    name.  The Cache Manager on the translator machine then uses
-    the  credential  structure  identified  by  the new PAG when
-    accessing AFS on behalf of the issuer  working  on  the  NFS
-    client  machine.    (If  the  issuer  dos  not  use  the -id
-    argument, he or she may actually be sharing  the  credential
-    structure  with  other  users on the NFS client machine; see
-    the WARNINGS section for details.)
- 
-    This command  allows  the  issuer  to  obtain  authenticated
-    access  to AFS (via the NFS/AFS Translator) while working on
-    an NFS client machine (host name) of a system type for which
-    AFS  is not available.  Users working on NFS client machines
-    of system types for which AFS is available  (and  for  which
-    the  cell has purchased a license) do not need this command,
-    because the klog command  is  available  for  those  machine
-    types.
- 
-    The  -unlog  flag  discards  the  tokens  in  the credential
-    structure identified by the PAG, but does  not  destroy  the
-    credential  structure  itself.    The  Cache  Manager on the
-    translator machine retains the  credential  structure  until
-    the  next  reboot, and uses it each time the issuer accesses
-    AFS  through  the  translator  machine.     The   credential
-    structure only has tokens in it if the issuer re-issues knfs
-    on the translator machine each time he or she logs into  the
-    NFS client machine.
- 
- WARNINGS
- 
-    Although  the  -id  argument  is  optional, not using it can
- 
- 
- 
-    create potential security problems and confusion about which
-    users are using which tokens, as described in the following.
- 
-    The  security  problems arise because if the issuer does not
-    use -id, then his  or  her  tokens  are  associated  with  a
-    "generic"  credential  structure identified by a PAG that is
-    associated only  with  host  name,  not  with  the  specific
-    issuer.    Every user working on host name who also does not
-    use the -id argument  shares  the  same  generic  credential
-    structure  and  so  uses the issuer's tokens.  This includes
-    users on host name who do not issue knfs at all.  If another
-    user subsequently issues knfs without -id, his or her tokens
-    replace the  previous  issuer's  tokens  in  the  credential
-    structure,  and  everyone  shares  the  new  tokens instead.
-    Similarly, when an issuer discards tokens  with  the  -unlog
-    flag  and  does not use -id, then everyone using the generic
-    credential structure becomes  unauthenticated  at  the  same
-    time.
- 
-    The  sharing  of  tokens  that  result from not using -id is
-    acceptable from a security standpoint only if
- 
-       - host name is used by only one person
- 
-       - it is acceptable that all of host name's users who
-         do not have their own credential structure (do not
-         use -id) have the same access to AFS files.   They
-         should  be  aware  that  they are subject to token
-         sharing.
- 
-    The DESCRIPTION section mentioned that using the -unlog flag
-    does not destroy the credential structure, but only discards
-    the tokens associated with it.  The  Cache  Manager  on  the
-    translator  machine  retains  the credential structure until
-    the next reboot and uses it whenever the issuer accesses AFS
-    through  the  translator  machine.   One implication is that
-    once the issuer issues knfs using the -id  argument,  he  or
-    she  cannot  use  the generic credential structure until the
-    machine is rebooted.
- 
-    This command does not make it possible for users working  on
-    non-supported  machine types to issue AFS commands.  This is
-    possible only on NFS clients of a system type for which  AFS
-    is available (and for which the cell has purchased AFS).
- 
- ARGUMENTS
- 
-    -host           names  the  NFS client machine the issuer is
-                    working on.  A  full  name  is  safest,  but
-                    abbreviated  forms  are acceptable depending
-                    on the state of the cell's  name  server  at
-                    the time the command is issued.
- 
-    -id             specifies  the  issuer's  user ID on the NFS
-                    client (a UNIX UID or equivalent), which NFS
-                    passes to the translator machine to identify
-                    the user.
- 
-    -unlog          discards  the  tokens  in   the   credential
-                    structure  identified  by the PAG associated
-                    with -host and, optionally, -id.
- 
- 
- 
-    -help           prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.
- 
- EXAMPLE
- 
-    The following shows a typical use  of  this  command.    The
-    issuer  smith is working on nfs-client1.transarc.com and has
-    user ID 1020 on that machine.  He is accessing  AFS  through
-    the  translator machine called translator4.transarc.com.  He
-    telnets to translator4 and uses AFS login as  smith  in  the
-    Transarc  cell.    He  the uses klog to obtain tokens in the
-    Transarc test cell (test.transarc.com) as admin.   The  knfs
-    command  instructs  the  Cache  Manager  on  translator4  to
-    associate both tokens with the PAG identified by nfs-client1
-    and  user ID 1020.  He exits the telnet connection and works
-    normally on nfs-client1.
- 
-        % telnet translator4.transarc.com
-        . . .
-        login: smith
-        Password:
-        AFS 3.2 (R) login
-        % klog admin -c test.transarc.com
-        Password:
-        % knfs nfs-client1.transarc.com 1020
-        % exit
- 
-    The following shows smith telnetting  again  to  translator4
-    and discarding his tokens.
- 
-        % telnet translator4.transarc.com
-        . . .
-        login: smith
-        Password:
-        AFS 3.2 (R) login
-        % knfs nfs-client1.transarc.com 1020 -unlog
-        % exit
- 
- PRIVILEGE REQUIRED
- 
-    None,  but  issuer  must  provide  correct  password(s) when
-    obtaining tokens on translator machine.
- 
- MORE INFORMATION
- 
-    klog      login (AFS version) pagsh
--- 0 ----
Index: openafs/src/man/kpasswd.1
diff -c openafs/src/man/kpasswd.1:1.1 openafs/src/man/kpasswd.1:removed
*** openafs/src/man/kpasswd.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/kpasswd.1	Fri Apr 14 09:27:30 2006
***************
*** 1,151 ****
- kpasswd                    AFS Commands                 kpasswd
- 
- 
- NAME
- 
-    kpasswd -- change password in Authentication Database.
- 
- 
-    kpasswd [-x]  [-principal <user name>]
-    [-password <user's current password>]
-    [-newpassword <user's new password>]  [-cell <cell name>]
-                                        +
-    [-servers <explicit list of servers> ]  [-pipe]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    kpasswd [-x]  [-pr <user name>]  [-pa <user's password>]
-    [-n <user's new password>]  [-c <cell name>]  [-s <explicit
-                    +
-    list of servers> ]
-    [-pi]  [-h]
- 
- DESCRIPTION
- 
-    Changes   password  for  indicated  user  in  Authentication
-    Database.  By default, the change occurs in the local cell's
-    Authentication  Database  for the user logged into the local
-    machine's UNIX file system.
- 
-    The issuer (or user indicated with -principal) does not have
-    to  appear  in  the  local  password  file  (/etc/passwd  or
-    equivalent) to issue this command; in previous  versions  of
-    this  command,  users had to add the -x flag if they did not
-    appear in that file.
- 
- ARGUMENTS
- 
-    -x              appears only  for  backwards  compatibility.
-                    Its  former  function  is  now  the  default
-                    behavior of this command,  as  mentioned  in
-                    the DESCRIPTION section.
- 
-    -principal      names  the  Authentication Database entry in
-                    which to  change  the  password.    If  this
-                    argument  is  omitted,  the change is in the
-                    entry of the person logged  into  the  local
-                    machine's UNIX file system.
- 
-    -password       specifies  the  current password.  It is NOT
-                    recommended that  the  issuer  provide  this
-                    argument  on  the  command  line.   If it is
-                    omitted, the new password  is  prompted  for
-                    and does not echo visibly:
- 
-                    Old password: <user's password>
- 
-    -newpassword    specifies   the   new  password,  which  the
-                    kpasswd command interpreter converts into an
-                    encryption  key  (string  of  octal numbers)
-                    before  sending  it  to  the  Authentication
-                    Server    for    storage   in   the   user's
-                    Authentication Database entry.   Unlike  the
-                    UNIX   passwd   command,  kpasswd  does  not
-                    restrict  passwords  to  8  characters;   it
- 
- 
- 
-                    accepts  passwords  of virtually any length.
-                    All  AFS  commands  that  require  passwords
-                    (klog,  the  kas suite, kpasswd, and the AFS
-                    version  of  login)  can  handle   passwords
-                    longer  than  8 characters, but some non-AFS
-                    programs cannot.  This is a consideration if
-                    non-AFS programs handle AFS passwords in the
-                    local environment.
- 
-                    It  is  NOT  recommended  that  the   issuer
-                    provide  this  argument on the command line.
-                    If it is omitted, it  is  prompted  for  and
-                    does not echo visibly:
- 
-                    New password (RETURN to abort): <new pas
-                    Retype new password: <new password>
- 
-    -cell           specifies  the  cell  in which to change the
-                    password, by directing the command  to  that
-                    cell's  Authentication Servers.  By default,
-                    the command is executed in the  local  cell,
-                    as  defined in /usr/vice/etc/ThisCell on the
-                    client  machine  on  which  the  command  is
-                    issued.  The issuer may abbreviate cell name
-                    to the shortest form that  distinguishes  it
-                    from    the    other    cells    listed   in
-                    /usr/vice/etc/CellServDB   on   the   client
-                    machine on which the command is issued.
- 
-    -servers        causes  the command interpreter to establish
-                    a connection with the Authentication  Server
-                    running  on  each  specified database server
-                    machine.  It then chooses one  of  these  at
-                    random  to  execute the command.  The issuer
-                    may  abbreviate  the  machine  name  to  the
-                    extent the cell's name server will accept.
- 
-                    By    default,   the   command   interpreter
-                    establishes a connection with  each  machine
-                    listed  for  the indicated cell in the local
-                    workstation's            copy             of
-                    /usr/vice/etc/CellServDB,  and  then chooses
-                    one  of  those   at   random   for   command
-                    execution.
- 
-                    This  option  is useful for testing specific
-                    servers if problems are encountered.
- 
-    -pipe           indicates  that  the  command   should   run
-                    without  printing  anything  on  the screen,
-                    including prompts or error  messages.    The
-                    kpasswd   command   interpreter  expects  to
-                    receive all necessary arguments, each  on  a
-                    separate  line, from standard input (stdin).
-                    The issuer  is  discouraged  from  including
-                    this  argument; it is for use by application
-                    programs rather than human users.
- 
-    -help           prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.
- 
- 
- 
- EXAMPLE
- 
-    The following shows the typical use of  this  command,  when
-    the issuer wishes to change his or her own password.
- 
-        % kpasswd
-        Changing password for 'user' in cell 'cellname'.
-        Old password:
-        New password (RETURN to abort):
-        Verifying, please re-enter new_password:
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must provide correct current password.
- 
- MORE INFORMATION
- 
-    klog
- 
-    kas setpassword
--- 0 ----
Index: openafs/src/man/package.1
diff -c openafs/src/man/package.1:1.1 openafs/src/man/package.1:removed
*** openafs/src/man/package.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/package.1	Fri Apr 14 09:27:30 2006
***************
*** 1,926 ****
- package                    AFS Commands                 package
- 
- 
- NAME
- 
-    package -- configure local disk.
- 
- 
-    package [-config <base name of configuration file>]
-    [-fullconfig <full name of config file> OR stdin for
-    standard input]
-    [-overwrite]  [-noaction]  [-silent]  [-verbose]
-    [-rebootfiles]
-    [-debug] [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    package [-c <base name of configuration file>]
-    [-f <full name of config file> OR stdin for standard input]
-           [-o]  [-n]  [-s]  [-v]  [-r]  [-d] [-h]
- 
- DESCRIPTION
- 
-    Configures  the  machine's  local  disk  to  comply with the
-    indicated configuration file.    By  default,  package  does
-    nothing  to elements on disk that have no counterpart in the
-    configuration file, but the issuer can have  package  remove
-    any  element  found  in a directory on disk that is not also
-    found in that directory in the configuration file.  See  the
-    "R" update code in the definition of the "D" line.
- 
-    If an element named in the configuration file already exists
-    on disk but is  not  identical  to  the  configuration  file
-    element,  then  package  updates  the existing disk version.
-    For example, if an element exists on disk as a symbolic link
-    but  is  defined as a directory or file in the configuration
-    file, then package will replace the  symbolic  link  with  a
-    directory  or  file.    The same holds for directory or file
-    elements on disk that appear in the configuration file as  a
-    symbolic  link.  Similarly, if the contents of a file do not
-    match  those  in  the  "source"  file  referred  to  in  the
-    configuration  file,  then  package  overwrites the existing
-    file with the contents of the source file.  The  issuer  can
-    specify  different  updating  behavior  through  the  use of
-    "update codes" on the lines in the configuration file.   See
-    the definition of the "F" line.
- 
- ARGUMENTS
- 
-    -config         specifies  the pathname of the configuration
-                    file to use,  ending  in  the  file's  "base
-                    name", which omits the suffix that indicates
-                    the machine type.  Package can  determine  a
-                    machine's  type and automatically select the
-                    appropriate version of the base  file  name.
-                    An  example  of  the  proper  value for this
-                    argument    is     staff     rather     than
-                    staff.rt_aix221.
- 
-                    If  only  a  file  name is provided, package
-                    looks  for  it  in   the   current   working
-                    directory.     It  also  interprets  partial
-                    pathnames relative to that directory.
- 
-                    Provide this argument OR -fullconfig.
- 
- 
- 
-    -fullconfig     specifies the configuration file to use.  It
-                    accepts two types of values:
- 
-                       - the    full    pathname   of   the
-                         configuration   file    to    use,
-                         complete    with    an   extension
-                         indicating    the     machine-type
-                         (examples:          staff.rt_aos4,
-                         staff.dkload.pmax_ul3)
- 
-                       - the string stdin, which  indicates
-                         that   the   issuer  will  provide
-                         configuration   information    via
-                         standard  input (stdin), either as
-                         a piped  file  or  by  typing  the
-                         configuration    file    at    the
-                         keyboard.  Type ^D (Control-D)  to
-                         conclude the input.
- 
-                    Provide this argument OR -config.
- 
-    -overwrite      tells  package  to overwrite elements on the
-                    local disk with the source version indicated
-                    in  the configuration file, even if the disk
-                    version's "user" w mode bit is  turned  off.
-                    Files protected by the I update code are not
-                    overwritten; see the "F" line definition.
- 
-    -noaction       indicates that package should  not  actually
-                    perform  the  command,  but  instead  should
-                    print  a  list  (at  standard  out)  of  any
-                    problems it would encounter in executing the
-                    command.  If the  -verbose  flag  is  added,
-                    package  produces a trace of all the actions
-                    it would perform in executing  the  command,
-                    but does not actually perform them.
- 
-    -silent         suppresses  some  of the trace messages that
-                    package produces at standard out by default.
-                    It   still   reports   on   major   problems
-                    encountered.
- 
-    -verbose        indicates that package should produce a more
-                    detailed  trace  of its actions (at standard
-                    out).  The trace records on the transfer and
-                    ownership/mode  bit  setting of each element
-                    in the configuration file.
- 
-    -rebootfiles    indicates that package should not  overwrite
-                    any  element  marked  with the Q update-mode
-                    code  in  the  configuration  file.     This
-                    effectively   prevents   the   machine  from
-                    rebooting automatically again  when  package
-                    is invoked from /etc/rc.
- 
-    -debug          enables  debugging output, which is directed
-                    to standard out (stdout) unless  the  issuer
-                    directs  it  into  a  file.   By default, no
-                    debugging output is produced.
- 
-    -help           prints the online help for this command.  Do
- 
- 
- 
-                    not  provide  any  other  arguments or flags
-                    with this one.
- 
- EXAMPLES
- 
-    This command is usually invoked in  an  initialization  file
-    such  as  /etc/rc,  rather  than  typed at the command shell
-    prompt.
- 
-    The following invokes the version of the staff configuration
-    file   appropriate  for  this  machine's  system  type,  and
-    produces verbose output.
- 
-        /etc/package -c staff -v
- 
-    The following tells package to use  the  configuration  file
-    whose  basename is stored in /.package on the local machine.
-    This can be convenient because the administrator can put  it
-    (the same command) in every machine's /etc/rc file and still
-    configure machines differently, by putting  the  appropriate
-    basename in /.package.
- 
-        /etc/package -c `cat /.package` -v
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be logged into the machine's UNIX file system as
-    the super user "root."
- 
- 
- 
-    Configuration File "B" Line -- define block special device.
- 
- 
-    B  <device name>  <major device number>  <minor device
-    number>
-    <owner name> <group name> <mode bits>
- 
- DESCRIPTION
- 
-    Defines  a  block special device, such as a disk, that deals
-    with input in units of multi-byte blocks.
- 
- ARGUMENTS
- 
-    B              should be a  capital  letter  and  tells  the
-                   command  interpreter that this line defines a
-                   block special device.
- 
-    device name    names the block special device being defined.
- 
-    major device number
-                   specifies  the  device's major device number.
-                   To   learn   the   correct   value,   consult
-                   documentation  provided by the machine and/or
-                   operating system's manufacturer.
- 
-    minor device number
-                   specifies  the  device's minor device number.
-                   To   learn   the   correct   value,   consult
-                   documentation       provided      by      the
-                   machine/operating system's manufacturer.
- 
-    owner name     names the owner for the device  in  the  UNIX
-                   file  system (the user who will appear in the
-                   device's "owner" field  in  the  output  from
-                   ls -l).
- 
-    group name     names  the  group  for the device in the UNIX
-                   file system (the group that  will  appear  in
-                   the  device's  group field in the output from
-                   ls -lg).
- 
-    mode bits      defines the mode bits that protect the device
-                   in  the  UNIX  file system.  Legal values are
-                   the standard  three-  or  four-digit  decimal
-                   numbers   corresponding  to  combinations  of
-                   rights.     Example:   755   corresponds   to
-                   rwxr-xr-x.
- 
- EXAMPLE
- 
-    The  following  defines  disk /dev/hd0a with major and minor
-    device numbers 1 and 0.
- 
-       B /dev/hd0a 1 0 root wheel 644
- 
- 
- 
-    Configuration File  "C"  Line -- define  character  special
- 
-                        device.
- 
- 
-    C  <device name>  <major device number>  <minor device
-    number>
-    <owner name> <group name> <mode bits>
- 
- DESCRIPTION
- 
-    Defines  a  character  special device, such as a terminal or
-    tty, that deals with input in single character units.
- 
- ARGUMENTS
- 
-    C              should be a  capital  letter  and  tells  the
-                   command  interpreter that this line defines a
-                   character special device.
- 
-    device name    names  the  character  special  device  being
-                   defined.
- 
-    major device number
-                   specifies the device's major  device  number.
-                   To   learn   the   correct   value,   consult
-                   documentation      provided      by       the
-                   machine/operating system's manufacturer.
- 
-    minor device number
-                   specifies the device's minor  device  number.
-                   To   learn   the   correct   value,   consult
-                   documentation      provided      by       the
-                   machine/operating system's manufacturer.
- 
-    owner name     names  the  owner  for the device in the UNIX
-                   file  (the  user  who  will  appear  in   the
-                   device's  "owner"  field  in  the output from
-                   ls -l).
- 
-    group name     names the group for the device  in  the  UNIX
-                   file  system  (the  group that will appear in
-                   the device's group field in the  output  from
-                   ls -lg).
- 
-    mode bits      defines the mode bits that protect the device
-                   in the UNIX file system.   Legal  values  are
-                   the  standard  three-  or  four-digit decimal
-                   numbers  corresponding  to  combinations   of
-                   rights.    Example: 644 corresponds to rw-r--
-                   r--.
- 
- EXAMPLE
- 
-    The following defines tty /dev/ttyp5 with  major  and  minor
-    device numbers 6 and 5.
- 
-       C /dev/ttyp5 6 5 root wheel 666
- 
- 
- 
-    Configuration File "D" Line -- define directory.
- 
- 
-    D[<update code>] <directory> <owner name> <group name> <mode
-    bits>
- 
- DESCRIPTION
- 
-    Names  a  directory  to  be created on the local disk.  If a
-    directory of this name already exists, package does nothing.
-    However,  if an element of the same name exists on disk as a
-    symbolic link, package replaces the symbolic  link  with  an
-    actual directory.
- 
- ARGUMENTS
- 
-    D         should  be  a capital letter and tells the command
-              interpreter that this line creates a directory.
- 
-    update code
-              is  optional  and  if  provided  should follow the
-              letter D directly, without an  intervening  space.
-              Choose one of the two legal values:
- 
-             - X,  which  indicates that the directory is a
-               lost+found  directory  (used  by  the   fsck
-               program).
- 
-             - R,   which  indicates  that  package  should
-               remove  any  files  from  the   local   disk
-               directory   that   do   not  appear  in  the
-               configuration file.  It will also remove any
-               subdirectories  of  the directory, and files
-               in  them,  that  do  not   appear   in   the
-               configuration file.
- 
-    owner name
-              names the owner for the directory in the UNIX file
-              system   (the   user   who   will  appear  in  the
-              directory's  "owner"  field  in  the  output  from
-              ls -l).
- 
-    group name
-              names the group for the directory in the UNIX file
-              system   (the   group  that  will  appear  in  the
-              directory's  group  field  in  the   output   from
-              ls -lg).
- 
-    mode bits defines  the  mode bits that protect the directory
-              in the UNIX file system.   Legal  values  are  the
-              standard  three-  or  four-digit  decimal  numbers
-              corresponding to combinations of rights.  Example:
-              755 corresponds to rwxr-xr-x.
- 
- EXAMPLE
- 
-    The following defines the /usr directory.
- 
-       DR /usr root wheel 755
- 
- 
- 
-    Configuration File "F" Line -- create/update file.
- 
- 
-    F[<update code>] <file> <source file> [<owner name> <group
-    name>
-    <mode bits>]
- 
- DESCRIPTION
- 
-    Names  a file to be created on the local disk.  Its contents
-    come from the indicated source file, which may reside either
-    in  AFS  or  on  the  local  disk itself.  If package cannot
-    locate the source file, it aborts.
- 
-    If a file of this name already  exists  on  disk,  then  its
-    contents  are  updated with (overwritten by) the contents of
-    the source file, unless the I update code is used to prevent
-    that.    Other update codes also modify the way in which the
-    update takes place; see the ARGUMENTS section.
- 
-    If a symbolic link or directory exists on  disk  under  this
-    name, package replaces it with the indicated file.
- 
- ARGUMENTS
- 
-    F         should  be  a capital letter and tells the command
-              interpreter that this line creates/updates a file.
- 
-    update code
-              determines  the manner in which the source file is
-              used to update the contents of the  file,  if  the
-              latter  already  exists  on  the local disk.  This
-              argument is optional and if provided should follow
-              the  letter  F  directly,  without  an intervening
-              space.  Any number of the  update-mode  codes  may
-              combined  with  one  another,  in  any order.  The
-              legal values are:
- 
-             - A, which indicates that the pathname in  the
-               source file slot is the complete pathname of
-               the source file, including the filename.  By
-               default,  the  source file pathname does not
-               include a  file  name  at  the  endMinstead,
-               package appends the name in the file slot to
-               the  source  file  pathname  in   order   to
-               determine   the  source  file's  full  name.
-               Thus, this code allows the name of the  file
-               being created to differ from the name of the
-               source  file.    See  also  the   EXAMPLE(S)
-               section.
- 
-             - I,  which indicates that the file should not
-               be overwritten if it already exists  on  the
-               local  disk.    If  it  does not exist, then
-               package creates it, and copies the  contents
-               of the source file into it.
- 
-             - O,  which indicates that package should save
-               the existing local disk version of the  file
-               with  a  .old  extension, before overwriting
-               its contents with the source file's.
- 
- 
- 
-             - Q,   which   indicates   that   if   package
-               overwrites  the  file,  then  it should exit
-               with  status  code  4.    If  the   standard
-               package-related  changes  have  been made to
-               /etc/rc, then status code 4  will  cause  an
-               automatic  reboot  of  the machine.  This is
-               useful  in  cases  where  the  machine  must
-               reboot  in  order for updates to the file to
-               have  any  effect  (/vmunix  is   a   common
-               example).
- 
-    file      specifies  the complete pathname of the file to be
-              created or updated on the local disk.
- 
-    source file
-              specifies  the  file (in AFS or on the local disk)
-              whose contents should be used to create or  update
-              the disk file.
- 
-              If  the  A  update  code appears on the line, this
-              slot should specify  the  source  file's  complete
-              pathname.    Otherwise,  this  slot should specify
-              only the part of the pathname  that  precedes  the
-              name  of  the  local  disk  file.   As an example,
-              suppose that  the  configuration  file  is  for  a
-              Transarc  cell  machine running AIX 2.2.1, so that
-              the  source  for  the  local  disk   file   called
-              /bin/grep is /afs/transarc.com/rt_aix221/bin/grep.
-              If the A does not appear, then the  proper  filler
-              for      the      source      file     slot     is
-              /afs/transarc.com/rt_aix221.      See   also   the
-              EXAMPLE(S) section.
- 
-    owner name
-              names the owner for the  file  in  the  UNIX  file
-              system  (the  user  who  will appear in the file's
-              "owner" field in the output from ls -l).
- 
-              This slot may be left empty,  in  which  case  the
-              file's  owner  is  set  to match the source file's
-              owner.  If this slot is empty, the group name  and
-              mode bits slots must also be empty.
- 
-    group name
-              names the group for the  file  in  the  UNIX  file
-              system  (the  group that will appear in the file's
-              group field in the output from ls -lg).
- 
-              This slot may be left empty,  in  which  case  the
-              file's  group  is  set  to match the source file's
-              group.  If this slot is empty, the owner name  and
-              mode bits slots must also be empty.
- 
-    mode bits defines the mode bits that protect the file in the
-              UNIX file system.  Legal values are  the  standard
-              three- or four-digit decimal numbers corresponding
-              to  combinations  of   rights.      Example:   755
-              corresponds to rwxr-xr-x.
- 
-              This  slot  may  be  left empty, in which case the
-              file's mode bits  are  set  to  match  the  source
- 
- 
- 
-              file's  mode  bits.    If  this slot is empty, the
-              owner name and  group  name  slots  must  also  be
-              empty.
- 
- EXAMPLES
- 
-    The  following,  appropriate for a machine running AIX 2.2.1
-    in the Transarc cell, creates/updates the file /bin/grep  on
-    the  local  disk, using /afs/transarc.com/rt_aix221/bin/grep
-    as the source.
- 
- 
-        F /bin/grep /afs/transarc.com/rt_aix221 root wheel 7
- 
-    The next example specifies  an  absolute  pathname  for  the
-    source  file, as indicated by the A update code.  The Q code
-    makes package return status code 4 as it exits, prompting  a
-    reboot  of  the  machine  if  the  standard  package-related
-    changes have been made to /etc/rc.  This example also leaves
-    the  owner  name,  group  name and mode bits slots empty, so
-    that the disk file adopts the source file's values for those
-    slots.
- 
- 
-        FAQ /usr/vice/etc/ThisCell /afs/transarc.com/common/
- 
- 
- 
-    Configuration File "L" Line -- create symbolic link.
- 
- 
-    L[<update code>] <link> <actual file> [<owner name>
-    <group name> <mode bits>]
- 
- DESCRIPTION
- 
-    Creates  a  symbolic link to a directory or file that exists
-    either in AFS or elsewhere on the local disk.    If  package
-    cannot access the actual directory/file, it aborts.
- 
-    If  a  file  or directory currently exists on the local disk
-    under this name, package replaces it with a symbolic link.
- 
- ARGUMENTS
- 
-    L         should be a capital letter and tells  the  command
-              interpreter   that   this   is   a  symbolic  link
-              definition.
- 
-    update code
-              modulates   the   way  that  package  creates  the
-              symbolic link, as discussed for each code.  It  is
-              optional  and if provided should follow the letter
-              L directly, without an intervening space.  The two
-              legal  update-mode  codes  may  combined  with one
-              another, in either order.  The legal values are:
- 
-             - A, which indicates that the pathname in  the
-               actual file slot is the complete pathname of
-               the actual file, including the filename.  By
-               default,  the  actual file pathname does not
-               include a  file  name  at  the  endMinstead,
-               package appends the name in the link slot to
-               the  actual  file  pathname  in   order   to
-               determine   the  actual  file's  full  name.
-               Thus, this  code  allows  the  name  of  the
-               symbolic  link  being created to differ from
-               the name of the actual file.  See  also  the
-               EXAMPLE(S) section.
- 
-             - I,  which  indicates  that the symbolic link
-               should not  be  overwritten  if  it  already
-               exists  on  the  local disk.  If it does not
-               exist, then package creates it.
- 
-    link      specifies the complete pathname  of  the  symbolic
-              link to be created on the local disk.
- 
-    actual file
-              specifies the file (in AFS or on the  local  disk)
-              to which the symbolic link refers.
- 
-              If  the  A  update  code appears on the line, this
-              slot should specify  the  actual  file's  complete
-              pathname.    Otherwise,  this  slot should specify
-              only the part of the pathname  that  precedes  the
-              name  of  the  local  disk  link.   As an example,
-              suppose that  the  configuration  file  is  for  a
-              Transarc  cell machine running Ultrix 3.0, so that
- 
- 
- 
-              /etc/ftpd    is     a     symbolic     link     to
-              /afs/transarc.com/vax_ul3/etc/ftpd.  If the A does
-              not appear, then the proper filler for  this  slot
-              is          /afs/transarc.com/vax_ul3,         not
-              /afs/transarc.com/vax_ul3/etc/ftpd.  See also  the
-              EXAMPLE(S) section.
- 
-    owner name
-              names the owner for the symbolic link in the  UNIX
-              file  system  (the  user  who  will  appear in the
-              symbolic link's "owner" field in the  output  from
-              ls -l).
- 
-              This  slot  may  be  left empty, in which case the
-              symbolic link's owner is set  to  match  the  UNIX
-              user  name  of  the  issuer of the package command
-              (i.e., "root").  If this slot is empty, the  group
-              name and mode bits slots must also be empty.
- 
-    group name
-              names the group for the symbolic link in the  UNIX
-              file  system  (the  group  that will appear in the
-              symbolic link's group field  in  the  output  from
-              ls -lg).
- 
-              This  slot  may  be  left empty, in which case the
-              symbolic link's group is set to  match  the  group
-              for  the issuer of the package command (defined in
-              the issuer's /etc/rc  entry.    If  this  slot  is
-              empty,  the  owner  name  and mode bits slots must
-              also be empty.
- 
-    mode bits defines the mode bits that  protect  the  symbolic
-              link  in  the  UNIX file system.  Legal values are
-              the standard three- or four-digit decimal  numbers
-              corresponding to combinations of rights.  Example:
-              755 corresponds to rwxr-xr-x.
- 
-              This slot may be left empty,  in  which  case  the
-              symbolic   link's   mode   bits  are  set  to  777
-              (rwxrwxrwx).  If this slot  is  empty,  the  owner
-              name and group name slots must also be empty.
- 
- EXAMPLES
- 
-    The  following, appropriate for a machine running Ultrix 3.0
-    in the Transarc cell, creates a symbolic link from /etc/ftpd
-    on       the      local      disk      to      the      file
-    /afs/transarc.com/vax_ul3/etc/ftpd in AFS.
- 
- 
-       L /etc/ftpd /afs/transarc.com/vax_ul3 root wheel 644
- 
-    The next example uses an absolute pathname (as indicated  by
-    the  A  update  code),  because the symbolic link and actual
-    file names differ.  This example also leaves the owner name,
-    group  name  and mode bits slots empty, so that the symbolic
-    link adopts values for those slots from the actual file.
- 
- 
-       LA /etc/printcap /afs/transarc.com/common/etc/printca
- 
- 
- 
-    Configuration File "S" Line -- define socket.
- 
- 
-    S  <socket name>  [<owner name> <group name> <mode bits>]
- 
- DESCRIPTION
- 
-    Defines a socket (a communications device for UDP and TCP/IP
-    connections).
- 
- ARGUMENTS
- 
-    S         should  be  a capital letter and tells the command
-              interpreter that this is a socket definition.
- 
-    socket name
-              names the socket being defined.
- 
-    owner name
-              names the owner for the socket in  the  UNIX  file
-              system  (the  user who will appear in the socket's
-              "owner" field in the output from ls -l).
- 
-              This slot may be left empty,  in  which  case  the
-              socket's  owner is set to match the UNIX user name
-              of  the  issuer  of  the  package  command  (i.e.,
-              "root").    If  this slot is empty, the group name
-              and mode bits slots must also be empty.
- 
-    group name
-              names  the  group  for the socket in the UNIX file
-              system (the group that will appear in the socket's
-              group field in the output from ls -lg).
- 
-              This  slot  may  be  left empty, in which case the
-              socket's group is set to match the group  for  the
-              issuer  of  the  package  command  (defined in the
-              issuer's /etc/rc entry.  If this  slot  is  empty,
-              the  owner  name  and mode bits slots must also be
-              empty.
- 
-    mode bits defines the mode bits that protect the  socket  in
-              the  UNIX  file  system.    Legal  values  are the
-              standard  three-  or  four-digit  decimal  numbers
-              corresponding to combinations of rights.  Example:
-              755 corresponds to rwxr-xr-x.
- 
-              This slot may be left empty,  in  which  case  the
-              socket's  mode bits are set to 777 (rwxrwxrwx), as
-              modulated by the cell's umask.  If  this  slot  is
-              empty,  the  owner  name and group name slots must
-              also be empty.
- 
- EXAMPLE
- 
-    The following defines the socket /dev/printer:
- 
- 
-       S /dev/printer root wheel 777
- 
- 
- 
-    Configuration File %define -- define  variable  or  declare
- 
-                        string.
- 
- 
-    %define  <variable> <value>   %define  <declaration>
- 
- DESCRIPTION
- 
-    If followed by two arguments, defines the second argument as
-    the value of the first, which may appear as a  variable  (in
-    the form ${variable}) in the same or other prototype/library
-    files.  The second argument is substituted  for  occurrences
-    of the variable wherever it occurs.
- 
-    If  followed  by a single argument, declares the argument to
-    be defined, making it available for use as a  controller  in
-    %ifdef  and  %ifndef statements.  That is, %ifdef statements
-    mentioning this variable will  resolve  as  "true,"  %ifndef
-    statements as "false."
- 
- ARGUMENTS
- 
-    variable        as the first of two arguments, specifies the
-                    name of the variable for which  a  value  is
-                    defined.     This  argument  may  appear  in
-                    variable form (i.e., as ${variable}) in this
-                    or other prototype/library files.
- 
-    value           as  the  second  of two arguments, specifies
-                    the value to be  assigned  to  variable-form
-                    occurrences of the first argument.
- 
-    declaration     as   the   single   argument,  declares  the
-                    indicated string to be defined.
- 
- EXAMPLES
- 
-    The  following  defines   the   value   for   the   variable
-    ${diskmode}.    This  variable  is  used  elsewhere  in  the
-    template  to  fill  the   <owner name>,   <group name>   and
-    <mode bit> slots on a "D", "F" or "L" line.
- 
- 
-       %define diskmode root wheel 644
- 
-    The following declares the string "afsd" to be defined.
- 
- 
-       %define afsd
- 
- 
- 
-    Configuration  File  %ifdef -- specify action to perform if
- 
-                        value is declared or defined.
- 
- 
-    %ifdef  <declaration>
-            +
-    <action>   [%else [<declaration>]
-                      +
-    <alternate action> ]  %endif <declaration>
- 
- DESCRIPTION
- 
-    Specifies  the  action(s)  to  perform  if   the   indicated
-    declaration  has  been  made  with a single-argument %define
-    statement, or if the indicated variable has a value.
- 
-    The optional %else statement specifies  alternate  action(s)
-    to perform if the indicated declaration has never been made,
-    or has been undone with %undef.
- 
-    It is possible to nest any  number  of  %ifdef  and  %ifndef
-    statements.
- 
- ARGUMENTS
- 
-    declaration     specifies  the string that must be declared,
-                    or variable that must  be  defined,  if  the
-                    action  is  to  be  performed.    Its second
-                    occurrence (following  %else)  is  optional,
-                    serving  only  to  clarify  which %ifdef the
-                    %else belongs  to.    The  first  and  third
-                    occurrences  (the  latter  following %endif)
-                    are required.
- 
-    action          specifies each  action  to  perform  if  the
-                    %ifdef  statement  resolves to "true."  Each
-                    action should appear  on  a  separate  line.
-                    Both "%-statements" and definition lines are
-                    acceptable actions.
- 
-    alternate action
-                    specifies  each  action  to  perform  if the
-                    %ifdef statement resolves to "false."   Each
-                    action  should  appear  on  a separate line.
-                    Both "%-statements" and definition lines are
-                    acceptable actions.
- 
- EXAMPLE
- 
-    The  following  specifies  that  if  the  string  rt_aos4 is
-    currently declared, then the three indicated  library  files
-    will  be  included  in the configuration file resulting from
-    compilation of this prototype file.
- 
-       %ifdef rt_aos4
-       %include ${wsadmin}/lib/rt_aos4.readonly
-       %include ${wsadmin}/lib/rt_aos4.generic
-       %include ${wsadmin}/lib/rt_aos4.generic.dev
-       %endif rt_aos4
- 
- 
- 
-    Configuration File %ifndef -- specify action to perform  if
- 
-                        value is not declared or defined.
- 
- 
-    %ifndef  <declaration>
-            +
-    <action>   [%else [<declaration>]
-                      +
-    <alternate action> ]  %endif <declaration>
- 
- DESCRIPTION
- 
-    Specifies   the   action(s)  to  perform  if  the  indicated
-    declaration has never been made or has been undone  with  an
-    %undef statement, or if the indicated variable does not have
-    a value.
- 
-    The optional %else statement specifies  alternate  action(s)
-    to  perform if the indicated declaration/definition has been
-    made, or if the variable does have a value.
- 
-    It is possible to nest any  number  of  %ifdef  and  %ifndef
-    statements.
- 
- ARGUMENTS
- 
-    declaration     specifies which string must not be declared,
-                    or which variable must not  be  defined,  in
-                    order  for  action  to  be  performed.   Its
-                    second  occurrence  (following   %else)   is
-                    optional,  serving  only  to  clarify  which
-                    %ifdef the %else belongs to.  The first  and
-                    third   occurrences  (the  latter  following
-                    %endif) are required.
- 
-    action          specifies each  action  to  perform  if  the
-                    %ifndef  statement resolves to "true" (i.e.,
-                    the string is not declared  or  variable  is
-                    not  defined).  Each action should appear on
-                    a separate line.   Both  "%-statements"  and
-                    definition lines are acceptable actions.
- 
-    alternate action
-                    specifies each  action  to  perform  if  the
-                    %ifndef statement resolves to "false" (i.e.,
-                    the string is declared or variable does have
-                    a defined value).  Each action should appear
-                    on a separate line.  Both "%-statements" and
-                    definition lines are acceptable actions.
- 
- 
- 
- EXAMPLE
- 
-    The  following,  appropriate  for  the  Transarc Corporation
-    cell, defines "transarc.com" as the  value  of  the  ${cell}
-    variable if it does not already have a value.
- 
- 
-       %ifndef cell
-       %define cell transarc.com
-       %endif cell
- 
- 
- 
-    Configuration File %include -- include library file.
- 
- 
-    %include  <file pathname>
- 
- DESCRIPTION
- 
-    Causes  contents of indicated library file to be included in
-    configuration  file  resulting  from  compilation  of   this
-    prototype file.
- 
- ARGUMENTS
- 
-    file pathname   specifies   the  complete  pathname  of  the
-                    library file to be included.   The  pathname
-                    may include variables.
- 
- EXAMPLE
- 
-    The  following  includes  the file base.generic from the lib
-    subdirectory of  the  directory  in  which  the  cell  keeps
-    package  related  files.    The  ${wsadmin} variable will be
-    resolved    to    an    actual     pathname     (such     as
-    /afs/transarc.com/wsadmin) during compilation.
- 
- 
-       %include ${wsadmin}/lib/base.generic
- 
- 
- 
-    Configuration File %undef -- declare value to be defined no
- 
-                        longer.
- 
- 
-    %undef  <declaration>
- 
- DESCRIPTION
- 
-    Specifies that the indicated string is  no  longer  defined.
-    Any  %ifndef  statements  involving  this  string  will then
-    resolve as "true," %ifdef statements as "false."
- 
- ARGUMENTS
- 
-    declaration     specifies the string that should  no  longer
-                    is no longer defined.
- 
- EXAMPLE
- 
-    The following declares the string "afsd" not to be defined.
- 
- 
-       %undef afsd
--- 0 ----
Index: openafs/src/man/pagsh.1
diff -c openafs/src/man/pagsh.1:1.1 openafs/src/man/pagsh.1:removed
*** openafs/src/man/pagsh.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/pagsh.1	Fri Apr 14 09:27:30 2006
***************
*** 1,85 ****
- pagsh                      AFS Commands                   pagsh
- 
- 
- NAME
- 
-    pagsh -- create new process authentication group (PAG).
- 
- 
-    pagsh
- 
- DESCRIPTION
- 
-    Creates  a  new  command  shell  (owned by the issuer of the
-    command) and associates a new "process authentication group"
-    (PAG)  with  the  shell  and  the  user.   A PAG is a number
-    guaranteed to identify the issuer of  commands  in  the  new
-    shell uniquely to the local Cache Manager.  The PAG is used,
-    instead of the issuer's UNIX UID, to identify him or her  in
-    the  credential  structure that the Cache Manager creates to
-    track each user.
- 
-    Any additional tokens issued to  the  user  (presumably  for
-    other  cells)  become  associated  with the PAG, rather than
-    with the user's UNIX UID.  This  method  for  distinguishing
-    users has two advantages.
- 
-       - It  means  that  processes  spawned  by  the  user
-         inherit the PAG and so share the token; thus  they
-         gain  access to AFS as the authenticated user.  In
-         many environments, for example, printer and  other
-         daemons run under identities (such as "root") that
-         the  AFS  server  processes  recognize   only   as
-         anonymous.    Unless  PAGs  are used, such daemons
-         cannot    access    files    protected     against
-         system:anyuser.
- 
-       - It  closes  a  potential  security  loophole: UNIX
-         allows anyone already logged in  as  "root"  on  a
-         machine  to  assume  any other identity by issuing
-         su.  If the credential structure  were  identified
-         by a UNIX UID rather than a PAG, then assuming the
-         same UID would mean being able to use  the  token,
-         too.    Use  of  a PAG as an identifier eliminates
-         that possibility.
- 
- WARNINGS AND REQUIREMENTS
- 
-    Each PAG created uses two  of  the  memory  slots  that  the
-    kernel  uses  to  record  the  UNIX groups associated with a
-    user.  If none of  these  slots  are  available,  the  pagsh
-    command  fails.    This is not a problem with most operating
-    systems, which make at least 16 slots available per user.
- 
-    Users in cells not using the AFS  version  of  login  should
-    issue  this  command  before  issuing klog.  If they do not,
-    then the Cache Manager stores  the  token  in  a  credential
-    structure  identified  by  UNIX  UID  rather than PAG.  This
-    creates the potential security  loophole  described  in  the
-    DESCRIPTION section.
- 
-    If  the  command  is to be issued on NFS client machines for
-    which AFS is available, the pagsh binary accessed by the NFS
-    client  must  be  owned  by,  and grant setuid privilege to,
-    "root."  The complete set of mode bits should be -rwsr-xr-x.
- 
- 
- 
-    This  is not a requirement when the command is issued on AFS
-    client machines.
- 
- EXAMPLE
- 
-    The following shows the only possible use of the command.
- 
-    % pagsh
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    klog
- 
-    login (AFS version)
--- 0 ----
Index: openafs/src/man/runntp.1
diff -c openafs/src/man/runntp.1:1.1 openafs/src/man/runntp.1:removed
*** openafs/src/man/runntp.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/runntp.1	Fri Apr 14 09:27:30 2006
***************
*** 1,117 ****
- runntp                     AFS Commands                  runntp
- 
- 
- NAME
- 
-    runntp -- initialize Network Time Protocol Daemon.
- 
- 
-    /usr/afs/bin/runntp  [-localclock]  [-precision <small
-    negative integer>]
-                                          +
-    [-logfile <pathname>]  [<machine name> ]
- 
- DESCRIPTION
- 
-    Initializes  the  Network  Time  Protocol Daemon and related
-    programs on the local  machine.    It  also  constructs  the
-    ntp.conf configuration file.
- 
-    This  command  is  intended as a convenient interface to the
-    standard ntpd  program,  to  be  used  on  AFS  file  server
-    machines.
- 
- WARNING
- 
-    A cell in which the NTPD was running before the introduction
-    of AFS does not need to use runntp.  It is an error  to  run
-    two NTPDs on one machine.
- 
-    This  command  is  not  normally issued at the command shell
-    prompt, but rather  placed  into  a  file  server  machine's
-    /usr/afs/local/BosConfig with the bos create command.
- 
-    This  command does not use the syntax conventions of the AFS
-    command suites, so the command  and  switch  names  must  be
-    typed in full.
- 
- ARGUMENTS
- 
-    -localclock
-              tells NTPD to use  the  local  machine's  internal
-              clock  as a possible source of the correct time in
-              case a network  partition  separates  the  machine
-              from   the   specified  machine  name(s).    Cells
-              connected to the Internet should not normally  use
-              this  flag.    In  cells  that experience frequent
-              separations  from  the   network   (voluntary   or
-              otherwise),  it  should be used only on the system
-              control machine.
- 
-    -precision
-              specifies  the precision of the local clock.  This
-              argument  is  not  normally  provided.    As  ntpd
-              initializes,  it  determines  the precision of the
-              local clock on  its  own.    If  the  argument  is
-              provided, it should be a small integer preceded by
-              a hyphen to show that it is negative.   The  value
-              is  used  as  an exponent on the number 2, and the
-              result interpreted as the frequency, in  fractions
-              of  a  second,  at  which  the  local  clock  tics
-              (advances).
- 
-              For example, a value of -6,  which  translates  to
- 
- 
- 
-               -6
-              2    or 1/64, means that the local clock tics once
-              every 1/64th of a second, or has  a  precision  of
-              about   60  tics  per  second.    A  value  of  -7
-              translates to about 100 tics per second.  A  value
-              of -10 translates to about 1000 tics per second (a
-              millisecond clock).
- 
-    -logfile  indicates the pathname of the  file  in  which  to
-              store  log  output from NTPD.  Indicate a location
-              on the file server machine's local  disk,  not  in
-              AFS;     a     suitable    location    might    be
-              /usr/afs/logs/ntp.log.       The    log    records
-              information  about  which  machines are serving as
-              time sources and peers, what adjustments have been
-              made  to  reduce  drift,  and  so  on.  Use ntpd's
-              debugging  mechanism  to  control  the  amount  of
-              information   produced.     If  this  argument  is
-              omitted, the information is discarded.
- 
-    machine name
-              is  the  complete Internet-style host name of each
-              machine the local machine should consult  for  the
-              correct time.  Preferably the machines are outside
-              the cell.
- 
-              In general, this argument is necessary only on the
-              system  control  machine.  If the issuer omits it,
-              then    the    local    machine    consults    its
-              /usr/afs/etc/CellServDB file and uses the machines
-              listed there as time sources.
- 
-              See the AFS  Installation  Guide  or  consult  AFS
-              Product   Support   at   Transarc  for  advice  on
-              selecting appropriate time sources.
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList to place this
-    command  in  /usr/afs/local/BosConfig,  because  that is the
-    privilege required to issue bos create.
- 
- MORE INFORMATION
- 
-    bos create
- 
-    UNIX manual page for ntp
- 
-    UNIX manual page for ntpd
- 
-    UNIX manual page for ntpdc
--- 0 ----
Index: openafs/src/man/salvager.1
diff -c openafs/src/man/salvager.1:1.1 openafs/src/man/salvager.1:removed
*** openafs/src/man/salvager.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/salvager.1	Fri Apr 14 09:27:30 2006
***************
*** 1,101 ****
- salvager                   AFS Commands                salvager
- 
- 
- NAME
- 
-    salvager -- initialize Salvager in BosConfig or manually.
- 
- 
-    /usr/afs/bin/salvager  [-f] [-o] [<partition name>
-    [<volumeID>]]
- 
- DESCRIPTION
- 
-    Initializes  the Salvager component of the fs process, which
-    corrects corruption in  ReadWrite  volumes  where  possible.
-    Unlike  most  other  AFS file server processes, this process
-    can also be started from the command line.   It  produces  a
-    trace of its actions in /usr/afs/logs/SalvageLog.
- 
-    If  the  Salvager  detects  corruption in ReadOnly or Backup
-    volumes, it removes them rather than attempting  to  correct
-    the  corruption;  it  records the removal in SalvageLog.  If
-    desired, the issuer can  recreate  the  ReadOnly  or  Backup
-    version by issuing vos release or vos backup, respectively.
- 
-    The  Salvager normally salvages only those ReadWrite volumes
-    that are marked as having been active when a crash occurred.
-    To  have  it salvage all relevant ReadWrite volumes, add the
-    -f flag.
- 
-    The number of  volumes  the  Salvager  attempts  to  salvage
-    depends  on the combination of arguments and flags used.  To
-    salvage:
- 
-       - volumes on all /vicepx partitions on a file server
-         machine, provide no arguments
- 
-       - volumes   on  a  certain  partition,  specify  the
-         partition's full (/vicepx-style) name as partition
-         name
- 
-       - one   particular  ReadWrite  volume,  specify  its
-         partition  as  partition  name  and  its  volumeID
-         number as volumeID
- 
- WARNING
- 
-    This  command does not use the syntax conventions of the AFS
-    command suites, so the command  and  switch  names  must  be
-    typed in full.
- 
- ARGUMENTS
- 
-    -f           inspects  all  volumes for corruption, not just
-                 those that are marked  as  having  been  active
-                 when a crash occurred.
- 
-    -o           enables the Salvager to remove volumes that are
-                 too damaged to be removed in the normal manner.
-                 Do not Use this argument unless a member of the
-                 AFS Product Support staff has directed its use.
-                 In  normal  cases,  use  the -force flag on the
-                 vos zap command  instead.    If  this  flag  is
-                 provided,  it should be combined with partition
- 
- 
- 
-                 name and volumeID.
- 
-    partition name
-                 specifies  which  partition the Salvager should
-                 inspect for corruption.    If  it  is  omitted,
-                 every  /vicepx  partition  on  the  file server
-                 machine is inspected.
- 
-    volumeID number
-                 specifies the volumeID number of the Read Write
-                 volume to salvage.
- 
- EXAMPLES
- 
-    The following command instructs the Salvager to  attempt  to
-    salvage  the  volume  with volume ID 258347486 on /vicepg on
-    the local machine.
- 
-    % /usr/afs/bin/salvager /vicepg 258347486
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be logged into the local  UNIX  file  system  as
-    "root" to issue this command to the shell.
- 
-    Issuer must be listed in /usr/afs/etc/UserList to place this
-    command in /usr/afs/local/BosConfig,  because  that  is  the
-    privilege required to issue bos create.
- 
- MORE INFORMATION
- 
-    bos create
- 
-    bos salvage
--- 0 ----
Index: openafs/src/man/scout.1
diff -c openafs/src/man/scout.1:1.1 openafs/src/man/scout.1:removed
*** openafs/src/man/scout.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/scout.1	Fri Apr 14 09:27:30 2006
***************
*** 1,363 ****
- scout                      AFS Commands                   scout
- 
- 
- NAME
- 
-    scout -- monitor  File  Server  process on one or more file
- 
-                        server machines.
- 
- 
-                                                  +
-    scout -server <File Server name(s) to monitor> 
-    [-basename <base server name>]
-    [-frequency <poll frequency, in seconds>]  [-host]
-                                                        +
-    [-attention <specify attention (highlighting) level> ]
-    [-debug <turn debugging on to the named file>]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                                             +
-    scout -s <File Server name(s) to monitor> 
-    [-b <base server name>]
-    [-f <poll frequency, in seconds>]  [-ho]
-                                                +
-    [-a <specify attention (highlighting) level> ]
-    [-d <turn debugging on to the named file>]  [-he]
- 
- DESCRIPTION
- 
-    Displays statistics gathered from the  File  Server  process
-    running  on each machine specified with -server.  The OUTPUT
-    section explains the meaning of the statistics and describes
-    how they appear on the screen.
- 
- REQUIREMENTS
- 
-    In addition to the scout binary, the machine must be able to
-    access the "curses" graphics package, since scout's  display
-    abilities  rely  on  it.    Most  UNIX distributions include
-    curses as a standard utility.
- 
-    Both "dumb" terminals and  windowing  systems  that  emulate
-    terminals can display scout's statistics.  The scout display
-    makes use of reverse video and cursor addressing, so for the
-    display  to  look  its  best, the display environment should
-    support those features (most windowing systems do, most dumb
-    terminals  do  not).    To  let  scout  know  what  type  of
-    environment  is  being  used,  the  user  should   set   the
-    environment  variable  TERM to the correct terminal type, or
-    one with characteristics similar to the actual  ones.    For
-    machines  running  AIX,  the recommended setting for TERM is
-    vt100, as long as the terminal is  similar  to  that.    For
-    other  operating  systems,  the  wider  range  of acceptable
-    values includes xterm, xterms, vt100, vt200 and wyse85.
- 
- 
- 
- ARGUMENTS
- 
-    -server   names each File  Server  process  to  monitor,  by
-              identifying  the file server machine it is running
-              on.  Complete Internet-style host names are  best,
-              unless  the  -basename  argument is used.  In that
-              case, specify only the unique initial part of each
-              machine name, omitting the domain/cell name suffix
-              (or  "basename")  common   to   all   the   names.
-              Shortened  unambiguous  names  are  legal when the
-              -basename argument is not used, but in  that  case
-              their  correct  resolution depends on the state of
-              the cell's naming service at the time the  command
-              is issued.
- 
-    -basename specifies  the  basename (domain/cell name) suffix
-              common to all of the  file  server  machine  names
-              specified   with  -server,  and  is  automatically
-              appended to them.  This argument is  normally  the
-              name of the cell to which the machines belong.  Do
-              not include the period that separates this  suffix
-              from  the  distinguishing part of each file server
-              machine name, but  do  include  any  periods  that
-              occur  within the suffix itself.  (For example, in
-              the Transarc Corporation cell,  the  proper  value
-              would be "transarc.com", not ".transarc.com".)
- 
-    -frequency
-              indicates how often scout should  probe  the  File
-              Server  processes.    Specify  a number of seconds
-              greater than 0.  The default is 60 seconds.
- 
-    -host     causes the banner line to display the name of  the
-              machine that is running scout.  The default is not
-              to display the machine name in the banner.
- 
-    -attention
-              defines  a  list  of  one or more entries, each of
-              which pairs a type of statistic  and  a  threshold
-              value.    When  the value of the statistic exceeds
-              the indicated threshold  value,  scout  highlights
-              the  value.    The  pairs may appear in any order.
-              Legal values for the pairs are
- 
-             - conn <connections>.  Indicates  the  maximum
-               number  of  connections that the File Server
-               may have open to client machines before  the
-               value  is  highlighted.    Highlighting goes
-               away when the  value  goes  back  below  the
-               threshold.  By default, no threshold is set.
- 
-               Example of a legal value: conn 300
- 
-             - fetch   <bytes   fetched>.    Indicates  the
-               maximum number of bytes of data that clients
-               can have fetched from the File Server before
-               the value is highlighted.  Highlighting goes
-               away  when  the  value  goes  back below the
-               threshold, but this is possible only if  the
-               File  Server is restarted, at which time the
-               value  returns  to  0.    By   default,   no
- 
- 
- 
-               threshold is set.
- 
-               Example of a legal value: fetch 45000
- 
-             - store <bytes stored>.  Indicates the maximum
-               number of bytes of  data  that  clients  can
-               have  sent  to  the  File Server for storage
-               before    the    value    is    highlighted.
-               Highlighting  goes  away when the value goes
-               back  below  the  threshold,  but  this   is
-               possible   only   if   the  File  Server  is
-               restarted, at which time the  value  returns
-               to 0.  By default, no threshold is set.
- 
-               Example of a legal value: store 120000
- 
-             - ws   <number  of  active  client  machines>.
-               Indicates the  maximum  number  of  "active"
-               client  machines  the  File  Server  can  be
-               serving before  the  value  is  highlighted.
-               "Active"  machines are defined as those that
-               have communicated with the  File  Server  in
-               the last 15 minutes.  Highlighting goes away
-               when  the  value   goes   back   below   the
-               threshold.  By default, no threshold is set.
- 
-               Example of a legal value: ws 65
- 
-             - disk <percent full>%.  Indicates the maximum
-               percentage of the  disk  that  can  be  full
-               before  the  value  is  highlighted; in that
-               case legal values are the integers between 0
-               and 99.
- 
-               Examples  of legal values: disk 90% and disk
-               72%.
- 
-               OR
- 
-               disk <minimum blocks free>.   Indicates  the
-               minimum  number of kilobyte blocks that must
-               be available on the partition if  the  value
-               is not to be highlighted.
- 
-               Examples  of  legal  values:   disk 1500 and
-               disk 5000.
- 
-               Specify one type  of  value  or  the  other.
-               Highlighting  goes  away when the value goes
-               back below the percent  threshold  or  above
-               the  blocks-free threshold.  By default, the
-               threshold is 95%.
- 
-    -debug    enables debugging output and directs it  into  the
-              specified  file.  Providing a complete pathname is
-              best; otherwise it is interpreted relative to  the
-              current   working   directory.    By  default,  no
-              debugging output is produced.
- 
-    -help     prints the online help for this command.   Do  not
-              provide  any  other  arguments  or flags with this
- 
- 
- 
-              one.
- 
- OUTPUT
- 
-    Scout can display statistics either in a dedicated window or
-    on  a  plain  screen  if  a  windowing  environment  is  not
-    available.  For best results, the window  or  screen  should
-    have the ability to print in reverse video.
- 
-    The  scout screen has three main parts: the banner line, the
-    statistics display region and the message/probe line.
- 
-    The Banner Line
- 
-    The word "Scout" appears in the banner line at  the  top  of
-    the  window  or  screen,  to indicate that scout is running.
-    Additional information may appear in the banner line if  the
-    system     administrator     includes     the    appropriate
-    flags/arguments on the  command  line.    By  default,  this
-    information does not appear.
- 
-       - The  name  of  the  machine  executing scout.  The
-         -hostname  flag  causes  scout  to  display   this
-         machine  name  in the banner line.  This is useful
-         in cases where  the  administrator  wants  to  run
-         scout  on several machines, but view the output on
-         only one machine (to achieve this, he or she could
-         open  several windows on a machine, then telnet to
-         a different machine in each one in  order  to  run
-         scout there).
- 
-         An  example:  if  a user runs scout on the machine
-         client1.transarc.com and use the  -hostname  flag,
-         the banner line will read
- 
- 
-            [client1.transarc.com] Scout
- 
-       - The ``basename'' of the file server machines being
-         monitored.  Scout identifies a File Server process
-         by  the  name  of  the  file  server machine it is
-         running on.  If all of  the  machine  names  in  a
-         scout  window  end  in  the same string (share the
-         same basename), then it is useful to  display  the
-         basename in one place rather than on every machine
-         name.  The  -basename  argument  causes  scout  to
-         display the indicated basename on the banner line.
-         The issuer then leaves the basename  off  of  each
-         file server machine name provided, specifying only
-         the distinguishing prefix rather than the complete
-         machine name.
- 
-         An  example,  if  a  user  specifies  a  value  of
-         transarc.com for -basename, the banner  line  will
-         read
- 
- 
-            Scout for transarc.com
- 
-    The Statistics Display Region
- 
-    In  this  region, which takes up the majority of the window,
- 
- 
- 
-    Scout displays the statistics gathered for each File  Server
-    process.  Each process appears on its own line.
- 
-    The region is divided into six columns, labeled as indicated
-    and displaying the following information:
- 
-       - Conn: number  of  connections  with  clients.  The
-         first   column   displays   the   number   of  RPC
-         connections open between the File  Server  process
-         and  client machines.  This number should equal or
-         exceed the number  in  the  Ws  column  (explained
-         below).    It  can  exceed it because each process
-         access  group  (PAG)  requires  a   separate   RPC
-         connection,  and  one  client  machine  can handle
-         several PAGs.    The  administrator  can  use  the
-         -attention  argument to specify the value at which
-         entries in the column should be highlighted.
- 
-       - Fetch: bytes fetched from File Server.  The second
-         column  displays  the number of bytes of data that
-         client machines have fetched from the File  Server
-         process.    This number is reset to zero each time
-         the   File   Server   process   restarts.      The
-         administrator  can  use the -attention argument to
-         specify the value at which entries in  the  column
-         should be highlighted.
- 
-       - Store: bytes stored by the File Server.  The third
-         column displays the number of bytes of  data  that
-         client  machines  have  sent  to  the  File Server
-         process for storage.  This number is reset to zero
-         each  time  the File Server process restarts.  The
-         administrator can use the -attention  argument  to
-         specify  the  value at which entries in the column
-         should be highlighted.
- 
-       - Ws: number  of  "active"  client  machines.    The
-         fourth   column  displays  the  number  of  client
-         machines  (workstations)  that  have  communicated
-         with  the  File  Server process within the last 15
-         minutes.  This number is likely to be smaller than
-         the  number  in  the Conn column, because a single
-         client machine can have several  connections  open
-         to one File Server.  The administrator can use the
-         -attention argument to specify the value at  which
-         entries in the column should be highlighted.
- 
-       - File  server  machine name.  The fifth, unlabeled,
-         column  displays  the  name  of  the  file  server
-         machine  on  which  the  File  Server  process  is
-         running.  If a name is too  long  to  fit  in  the
-         field, it is truncated and an asterisk (*) appears
-         as the last character in  the  name.    Using  the
-         -basename   argument   is  a  good  way  to  avoid
-         truncation, but only if all machine names end in a
-         common  string.    Entries  in  this column become
-         highlighted if the File Server  process  does  not
-         respond to scout's probes.
- 
-       - Disk  attn: disk usage.  The sixth column displays
-         how many kilobyte blocks are available on each AFS
- 
- 
- 
-         disk  partition  on  the file server machine.  The
-         display for each partition has the form
- 
- 
-            x:free_blocks
- 
-         where  x  indicates  the  partition  name.     For
-         example,  a:8949  specifies that partition /vicepa
-         has 8,949 free kilobyte  blocks.    The  available
-         space  may  be  displayed for up to 10 partitions.
-         If the window is not wide enough for  all  of  the
-         partition  entries  to  appear  on  a single line,
-         scout  automatically   creates   multiple   lines,
-         "stacking"  the partition entries into sub-columns
-         within the Disk attn column.
- 
-         The label on the Disk attn  column  indicates  the
-         threshold  at  which  values  are highlighted.  By
-         default, the label is
- 
- 
-            Disk attn: > 95% used
- 
-         because by default scout highlights the entry  for
-         any   partition  that  is  over  95%  full.    The
-         administrator may use the -attention  argument  to
-         change  this  default to either another percentage
-         or a minimum number of free blocks.
- 
-    The Message/Probe Line
- 
-    The bottom line of the scout screen indicates how many times
-    scout has "probed" the File Server processes for statistics.
-    The columns in the Statistics Display region above this line
-    display  the  result of the latest probe.  By default, scout
-    probes  the  File  Servers  every  60   seconds,   but   the
-    administrator  can  use the -frequency argument to specify a
-    different number of seconds.
- 
- EXAMPLE
- 
-    See the chapter on scout in the AFS  System  Administrator's
-    Guide,  which illustrates the on-screen displays that result
-    from different combinations of switches and flags.
- 
- PRIVILEGE REQUIRED
- 
-    None.
--- 0 ----
Index: openafs/src/man/tokens.1
diff -c openafs/src/man/tokens.1:1.1 openafs/src/man/tokens.1:removed
*** openafs/src/man/tokens.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/tokens.1	Fri Apr 14 09:27:30 2006
***************
*** 1,85 ****
- tokens                     AFS Commands                  tokens
- 
- 
- NAME
- 
-    tokens -- display all tokens.
- 
- 
-    tokens
- 
- DESCRIPTION
- 
-    Instructs  the Cache Manager on the local machine to display
-    all tokens (tickets) it has for  the  issuer.    AFS  server
-    processes  require  that  their  clients  present a token as
-    evidence that they have authenticated in the server's  local
-    cell.
- 
- OUTPUT
- 
-    The  output  lists one token for each cell in which the user
-    is authenticated.  The output indicates:
- 
-       - the user's AFS UID, if it is available for display
- 
-       - the server for which the token is valid (normally,
-         "afs").  This includes a cell specification.
- 
-       - the day and time the token expires
- 
-    An --End of list-- message appears at the end of the output.
-    If the user is not authenticated in any cell,  this  message
-    is all that appears.
- 
- EXAMPLES
- 
-    The  following  shows  the  output  when  the  issuer is not
-    authenticated in any cell.
- 
- 
-    % tokens
-    Tokens held by the Cache Manager:
- 
-        [  1]   --End of list--
- 
-    The  following  shows  the  output  when   the   issuer   is
-    authenticated  in Transarc Corporation cell, where he or she
-    has AFS UID 1000.
- 
- 
-    % tokens
-    Tokens held by the Cache Manager:
- 
-        [  1]User's (AFS ID 1000) tokens for afs@transarc.co
-                                          [Expires Jan 2 10:
-        [  2]    --End of list--
- 
-    The  following  shows  the  output  when   the   issuer   is
-    authenticated  in  Transarc Corporation cell, Andrew cell at
-    Carnegie Mellon University and Athena cell at MIT.  The user
-    has  different AFS UIDs in the three cells.  Tokens for last
-    cell are expired:
- 
- 
- 
-    % tokens
-    Tokens held by the Cache Manager:
- 
-        [  1]User's (AFS ID 1000) tokens for afs@transarc.co
-                           [Expires Jan 3 10:00]
-        [  2]User's (AFS ID 4286) tokens for afs@andrew.cmu.
-                           [Expires Jan 3 1:34]
-        [  3]User's (AFS ID 22) tokens for afs@athena.mit.ed
-                           [>>Expired<<]
-        [  4]    --End of list--
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    klog
- 
-    unlog
--- 0 ----
Index: openafs/src/man/unlog.1
diff -c openafs/src/man/unlog.1:1.1 openafs/src/man/unlog.1:removed
*** openafs/src/man/unlog.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/unlog.1	Fri Apr 14 09:27:30 2006
***************
*** 1,70 ****
- unlog                      AFS Commands                   unlog
- 
- 
- NAME
- 
-    unlog -- discard all tokens.
- 
- 
-                       +
-    unlog  [<cell name> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    This command does not use the conventions of the AFS command
-    suites.  Therefore "unlog" and  "-help"  must  be  typed  in
-    full.
- 
- DESCRIPTION
- 
-    Instructs  the Cache Manager on the local machine to discard
-    the specified token(s) currently held for the issuer.  If no
-    cell  names  are  provided,  the  Cache Manager discards the
-    token for the local cell and all tokens for foreign cells.
- 
- WARNINGS
- 
-    Specifying  one  or  more  cell  names   may   cause   brief
-    "authentication  outages,"  during  which  the issuer has no
-    valid tokens in any cell.    This  is  because  the  command
-    actually  discards  all  tokens and then restores those that
-    the issuer did not specify with cell name (and so presumably
-    wishes  to retain).  The authentication outage may interrupt
-    the operation of jobs that require authentication.
- 
- ARGUMENTS
- 
-    cellname        specifies each  cell  for  which  the  Cache
-                    Manager   should  discard  the  token.    If
-                    omitted,   all   tokens    are    discarded.
-                    Abbreviated  cell  names are acceptable, but
-                    which abbreviations are legal depends on the
-                    naming  service available in the cell at the
-                    time the command is issued.
- 
-    -help           prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.
- 
- EXAMPLE
- 
-    The following discards all tokens.
- 
-    % unlog
- 
-    The following discards only the tokens for the  transarc.com
-    and athena.mit.edu cells.
- 
-    % unlog transarc.com athena
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
- 
- 
-    klog
- 
-    tokens
--- 0 ----
Index: openafs/src/man/upclient.1
diff -c openafs/src/man/upclient.1:1.1 openafs/src/man/upclient.1:removed
*** openafs/src/man/upclient.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/upclient.1	Fri Apr 14 09:27:30 2006
***************
*** 1,182 ****
- upclient                   AFS Commands                upclient
- 
- 
- NAME
- 
-    upclient -- initialize client portion of Update Server.
- 
- 
-    /usr/afs/bin/upclient  <source machine> [-t <checking
-    frequency>]            [-clear]  [-crypt]  <directory to
-          +
-    check> 
- 
- DESCRIPTION
- 
-    Initializes  the  client  portion  of the Update Server.  It
-    checks  periodically  that  the  files  in   the   specified
-    directories  on  the  local machine match those files in the
-    corresponding directory on the source machine.   If  a  file
-    does  not match, this process overwrites the local file with
-    the file from the source machine.
- 
-    The  -clear  and  -crypt  flags  determine  whether  or  not
-    upclient  requests that upserver encrypt the contents of the
-    files it is distributing before transferring them across the
-    network.      The  request  applies  to  the  files  in  all
-    directories requested by upclient (whereas upserver supports
-    different  levels  of encryption for different directories).
-    The upserver will comply with a request only if it  protects
-    the  directory  to  the  same  extent  as  specified  in its
-    initialization command (i.e., will not  fill  an  upclient's
-    request  for  -clear  transfer  if  the  upserver is set for
-    -crypt).
- 
-    By default, the upclient in the United States edition of AFS
-    requests  encryption.    The  upclient  in the international
-    edition of AFS does  not  request  encryption,  because  the
-    international    edition   does   not   provide   encryption
-    capability.   The  -crypt  flag  is  not  available  in  the
-    international edition of this command.
- 
- WARNING
- 
-    This  command  is  not  normally issued at the command shell
-    prompt, but rather  placed  into  a  file  server  machine's
-    /usr/afs/local/BosConfig with the bos create command.  If it
-    is ever issued at the command shell prompt, the issuer  must
-    be  working  on a file server machine.  The upclient process
-    uses the local KeyFile when generating a  key  for  mutually
-    authenticating   with  the  upserver  process;  they  always
-    mutually authenticate, whether or not the data they pass  is
-    encrypted.
- 
-    This  command does not use the syntax conventions of the AFS
-    command suites, so the command  and  switch  names  must  be
-    typed in full.
- 
-    The  -crypt  flag  is  not  available  in  the international
-    edition of AFS.
- 
-    Cells using the international edition of AFS should not  use
-    the   Update   Server   to   distribute   the   contents  of
-    /usr/afs/etc.  The contents of this directory are sensitive,
-    and  the  international  edition of AFS does not provide any
- 
- 
- 
-    facility for encrypting files  before  transfer  across  the
-    network.
- 
- ARGUMENTS
- 
-    source machine
-                 names either the cell's system control  machine
-                 (if  directory to check is /usr/afs/etc) or the
-                 binary  distribution  machine  for  the   local
-                 machine's   CPU/operating   system   type   (if
-                 directory to check is /usr/afs/bin).
- 
-    -t           specifies how often the upclient process should
-                 check directory to check, in number of seconds.
-                 If omitted, this argument  default  to  300  (5
-                 minutes).    This number effectively determines
-                 how long it  will  take  for  changes  made  on
-                 source machine to propagate to this machine.
- 
-    -clear       indicates  that  upclient  requests upserver to
-                 transfer information in unencrypted form.   Use
-                 this  flag to change the default for the United
-                 States edition of AFS.
- 
-    -crypt       indicates that upclient  requests  upserver  to
-                 transfer  information  in encrypted form.  With
-                 the United States edition of AFS, use this flag
-                 to  set  the  default explicitly.  This flag is
-                 not available with the international edition of
-                 AFS.
- 
-    directory to check
-                 names each  directory  to  check  for  modified
-                 files.  The usual choices are:
- 
-                    - /usr/afs/bin,   in   which  case  the
-                      recommended  name  for  the   process
-                      (assigned with the -instance argument
-                      on bos create) is upclientbin.    The
-                      source  machine  should be the binary
-                      distribution machine  for  the  local
-                      machine's  CPU/operating system type.
-                      It is  recommended  that  the  -clear
-                      flag  be used for /usr/afs/bin, since
-                      binaries   are    not    particularly
-                      sensitive  and  encrypting  them  can
-                      take a long time.
- 
-                    - /usr/afs/etc,  in  which   case   the
-                      recommended   name  for  the  process
-                      (assigned with the -instance argument
-                      on  bos create)  is upclientetc.  The
-                      source machine should be  the  system
-                      control machine.
- 
-                      Note:  This option is discouraged for
-                      the  international  edition  of  AFS.
-                      See the WARNING above.
- 
-                    - both  /usr/afs/bin  and /usr/afs/etc,
-                      in which case  the  recommended  name
- 
- 
- 
-                      for  the  process  (assigned with the
-                      -instance argument on bos create)  is
-                      upclient.   The source machine should
-                      be the  system  control  machine  and
-                      also  the binary distribution machine
-                      for  this   machine's   CPU/operating
-                      system type.
- 
-                      Note:  This option is discouraged for
-                      the  international  edition  of  AFS.
-                      See the WARNING above.
- 
- EXAMPLES
- 
-    The following bos create command creates an upclient process
-    on fs4.transarc.com that refers to fs1.transarc.com  as  the
-    source   for   both   /usr/afs/bin  and  /usr/afs/etc  (thus
-    fs1.transarc.com is both the system control machine and  the
-    binary  distribution  machine  of  fs4.transarc.com's type).
-    The updates are transferred every 120 seconds.  The  command
-    requests  /usr/afs/bin  in  unencrypted  form.   It does not
-    specify a level  of  encryption  for  /usr/afs/etc,  so  the
-    default is used:
- 
-       - with  the  United  States edition of AFS, upclient
-         requests /usr/afs/etc in encrypted form.
- 
-       - with the international edition  of  AFS,  upclient
-         requests /usr/afs/etc in unencrypted form, because
-         encryption of user-level  data  is  not  possible.
-         Thus,  this  command  is  not  suitable  with  the
-         international editionMthe Update Server should not
-         be used to update /usr/afs/etc.
- 
-    Type the command on a single line.
- 
-    % bos create fs4.transarc.com upclient simple
-    "/usr/afs/bin/upclient           fs1.transarc.com -t 120
-    /usr/afs/etc -clear /usr/afs/bin"
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList to place this
-    command in /usr/afs/local/BosConfig,  because  that  is  the
-    privilege required to issue bos create.
- 
- MORE INFORMATION
- 
-    bos create
- 
-    upserver
--- 0 ----
Index: openafs/src/man/upserver.1
diff -c openafs/src/man/upserver.1:1.1 openafs/src/man/upserver.1:removed
*** openafs/src/man/upserver.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/upserver.1	Fri Apr 14 09:27:30 2006
***************
*** 1,107 ****
- upserver                   AFS Commands                upserver
- 
- 
- NAME
- 
-    upserver -- initialize server portion of Update Server.
- 
- 
-                                       +                      +
-    /usr/afs/bin/upserver  [<directory> ]  [-crypt <directory> ]
-                                            +
-                         [-clear <directory> ]
- 
- DESCRIPTION
- 
-    Initializes   the   server  portion  of  the  Update  Server
-    (upserver process),  specifying  which  of  its  local  disk
-    directories the process is willing to distribute in response
-    to requests from the client portion  of  the  Update  Server
-    (upclient  process)  running  on  other  machines.    If  no
-    directories are specified, the server portion can distribute
-    the contents of any directory on its local disk.
- 
-    The  command also determines whether the upserver is willing
-    to distribute a directory's contents in unencrypted form  or
-    not.    By  default, the encryption level is -clear, meaning
-    that  upserver  transfers  the   directory's   contents   in
-    unencrypted  form  unless  an  upclient requests encryption.
-    When -crypt is specified for a directory, the upserver  will
-    refuse an upclient's request for unencrypted transfer.  With
-    the United States edition of AFS, the effect of -crypt is to
-    guarantee  that  upserver  transfers  a directory's contents
-    only in encrypted form.  With the international edition, the
-    effect   of   -crypt   is  to  prevent  upserver  from  ever
-    transferring the directory's contents, because the  upclient
-    has  no  way  to comply with the requirement that it request
-    the contents in encrypted form (the -crypt flag on  upclient
-    is  not available in the international edition).  Use -crypt
-    and -clear to toggle the level of encryption for directories
-    as appropriate (the EXAMPLES section illustrates their use).
- 
- WARNING
- 
-    This  command  is  not  normally issued at the command shell
-    prompt, but rather  placed  into  a  file  server  machine's
-    /usr/afs/local/BosConfig with the bos create command.  If it
-    is ever issued at the command shell prompt, the issuer  must
-    be  working  on a file server machine.  The upserver process
-    uses the local  KeyFile  when  handling  keys  for  mutually
-    authenticating  with  the  upclient  process  and encrypting
-    data.   The  two  processes  always  mutually  authenticate,
-    whether or not data is encrypted.
- 
-    This  command does not use the syntax conventions of the AFS
-    command suites, so the command  and  switch  names  must  be
-    typed in full.
- 
-    Cells  using the international edition of AFS should not use
-    the  Update   Server   to   distribute   the   contents   of
-    /usr/afs/etc.  The contents of this directory are sensitive,
-    and the international edition of AFS does  not  provide  any
-    facility  for  encrypting  them  before  transfer across the
-    network.  One way to prevent this distribution  is  to  mark
-    /usr/afs/etc with -crypt.
- 
- 
- 
- ARGUMENTS
- 
-    directory names   each   directory   to  be  distributed  in
-              unencrypted form (because they appear  before  the
-              first  -crypt  or  -clear  flag).  If omitted, all
-              directories  on  the  machine's  local  disk   are
-              eligible for distribution.
- 
-    -crypt    precedes  a  list of one or more directories which
-              upserver will distribute only in encrypted form.
- 
-    -clear    precedes a list of one or more  directories  which
-              upserver  may  distribute in unencrypted form (but
-              if upclient requests them in encrypted form,  then
-              upserver   encrypts   them).    This  argument  is
-              necessary only if the issuer has  previously  used
-              -crypt  on  the  command line and wishes to switch
-              back to unencrypted form.
- 
- EXAMPLES
- 
-    The last parameter (enclosed in  quotes)  in  the  following
-    bos   create  command  causes  the  upserver  to  distribute
-    /usr/afs/bin  in  unencrypted  form  and   /usr/afs/etc   in
-    encrypted form.
- 
-    % bos create fs1.transarc.com upserver simple
-    "/usr/afs/bin/upserver /usr/afs/bin -crypt /usr/afs/etc"
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList to place this
-    command in /usr/afs/local/BosConfig,  because  that  is  the
-    privilege required to issue bos create.
- 
- MORE INFORMATION
- 
-    bos create
- 
-    upclient
--- 0 ----
Index: openafs/src/man/uss.1
diff -c openafs/src/man/uss.1:1.1 openafs/src/man/uss.1:removed
*** openafs/src/man/uss.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss.1	Fri Apr 14 09:27:30 2006
***************
*** 1,79 ****
-                            AFS Commands
- 
-    1. The uss Commands and Template Lines
- 
-    ------------------------------------------------------------
- 
-    The uss commands help administrators create user accounts in
-    their system more easily and  efficiently.    Without  them,
-    administering  accounts can become time consuming.  Creating
-    an account "by hand" requires issuing at least six  separate
-    commands  to  five  different  AFS servers, whereas a single
-    uss add command can accomplish all  the  equivalent  actions
-    once  the  issuer  sets  up  the  necessary  template.  Even
-    better, a single issue  of  the  the  uss bulk  command  can
-    create  multiple  accounts  at  once,  after  the  necessary
-    preparations have been made.
- 
-    Refer to chapter 11 in the Reference Manual for  a  complete
-    summary list of uss commands and their syntax.
- 
-    1.1 Common Arguments and Flags
-    Most  uss  commands  accept the following optional arguments
-    and flags.  They are  listed  in  the  command  descriptions
-    where they apply, and are described here in detail:
- 
-    [-cell <cell name>]
- 
-    This  argument  specifies  that the command should be run in
-    the cell specified by cell name.  By default,  commands  are
-    executed    in    the    local    cell,    as   defined   in
-    /usr/vice/etc/ThisCell on the client machine  on  which  the
-    command  is  issued.  The issuer may abbreviate cell name to
-    the shortest form that distinguishes it from the other cells
-    listed  in /usr/vice/etc/CellServDB on the client machine on
-    which the command is issued.
- 
-    [-admin <administrator to authenticate>]
- 
-    This argument names the user name  whom  the  Authentication
-    Servers  should  authenticate  for  purposes  of creating an
-    Authentication Database entry.    If  the  issuer  does  not
-    provide   it,   the  authentication  is  attempted  for  the
-    effective user name (the  one  under  which  the  issuer  is
-    logged  into the local machine's UNIX file system).  With or
-    without this argument, UNIX commands invoked by this command
-    (for  instance, /etc/chown) are executed under the effective
-    user name.
-                               l
-    AFS Command Reference ManuaThe uss Commands and Template Li
- 
- 
-    [-dryrun]
- 
-    This flag indicates that the command interpreter should  not
-    actually  execute  the  command,  but  should report all the
-    actions it would perform if executing  it.    This  flag  is
-    useful  for verifying that the account will be configured as
-    the issuer wishes.  It does not, however, necessarily reveal
-    failures  that  will  result  if the uss command interpreter
-    encounters any circumstances  that  make  it  impossible  to
-    carry  out  a  requested  action.  Combining  this flag with
-    -verbose yields more information.
- 
-    [-help]
- 
-    This flag has the same function as the bos help command:  it
-    prints  the command's online help message on the screen.  No
-    other arguments or flags should  be  provided  at  the  same
-    time.    Even if they are, this flag overrides them, and the
-    only effect of issuing the command is that the help  message
-    appears.
- 
- 
- 
-    1.1.1 The Privilege Required for uss Commands
-    The  issuer  of  a  uss  command  must  have  all the rights
-    required for performing the equivalent actions individually.
-    See   the   PRIVILEGE   REQUIRED  section  of  each  command
-    description for details.
--- 0 ----
Index: openafs/src/man/uss_add.1
diff -c openafs/src/man/uss_add.1:1.1 openafs/src/man/uss_add.1:removed
*** openafs/src/man/uss_add.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_add.1	Fri Apr 14 09:27:30 2006
***************
*** 1,286 ****
- uss add                    AFS Commands                 uss add
- 
- 
- NAME
- 
-    uss add -- create user account.
- 
- 
-    uss add  -user <login name>  [-realname <full name in
-    quotes>]
-    [-pass <initial passwd>]  [-server <file server for home
-    volume>]
-    [-partition <file server's disk partition for home volume>]
-           [-mount <home directory mount point>]
-    [-uid <uid to assign the user>]
-    [-template <pathname of template file>]
-                                                         +
-    [-verbose] [-var <auxiliary argument pairs (num val)> ]
-    [-cell <cell name>]  [-admin <administrator to
-    authenticate>]
-    [-dryrun]  [-overwrite]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    uss ad -us <login name>  [-r <full name in quotes>]
-    [-pas <initial passwd>]  [-s <file server for home volume>]
-        [-par <file server's disk partition for home volume>]
-    [-m <home directory mount point>]  [-ui <uid to assign the
-    user>]
-    [-t <pathname of template file>]  [-ve]  [-va <auxiliary
-                             +
-    argument pairs (num val)> ]
-    [-c <cell name>]  [-a <administrator to authenticate>]  [-d]
-    [-o]  [-h]
- 
- DESCRIPTION
- 
-    Creates    entries    in   the   Protection   Database   and
-    Authentication Database for the user name login  name.    If
-    initial  passwd  is  provided,  it  is  stored as the user's
-    password in the  Authentication  Database  after  conversion
-    into a form suitable for use as an encryption key.  , or the
-    By default, the Protection Server automatically allocates an
-    AFS  UID  for  the  new  user;  the  issuer  may  specify an
-    alternate with the -uid argument.
- 
-    The other results of the command depend on what  appears  in
-    the  template file specified with pathname of template file.
-    The issuer must provide  any  argument  whose  corresponding
-    variable  appears  in  the  template  (the ARGUMENTS section
-    below maps the arguments and  variables).    If  the  issuer
-    provides  an  argument  for which the corresponding variable
-    does not appear in  the  template,  the  value  is  ignored.
-    Failure to provide a value for a variable causes the account
-    creation to fail at the point where the command  interpreter
-    first encounters the variable in the template.
- 
-    Syntax  definitions  for  the  lines  in the template follow
-    descriptions of the uss commands.
- 
- WARNING
- 
-    If this command is issued on a machine  running  Ultrix  and
-    the  template file being used is not 0-length, the user must
- 
- 
- 
-    use the -admin argument to adopt a privileged  AFS  identity
-    while  remaining  "root"  in  the  local machine's UNIX file
-    system.  Ultrix allows only "root" to issue  the  /etc/chown
-    command  that  uss add invokes to set the owner of files and
-    directories created by template lines.  At  the  same  time,
-    AFS  allows only a privileged administrator to issue the AFS
-    commands invoked; "root" is not normally  a  privileged  AFS
-    administrator.
- 
-    Other  operating  systems  allow  users other than "root" to
-    issue /etc/chown, but users may still find it convenient  to
-    adopt different identities in the AFS and UNIX file systems.
-    Being authenticated in AFS as a privileged user is  required
-    under all operating systems.
- 
- ARGUMENTS
- 
-    -user     specifies the user name that the user will type at
-              the login prompt.  It also becomes the name of the
-              user's   Protection  and  Authentication  Database
-              entries.
- 
-              Corresponding variable in template:  $USER.
- 
-    -realname specifies the user's real name.  Surround it  with
-              double  quotes  as  delimiters,  since it contains
-              spaces and possibly punctuation.  If not provided,
-              it defaults to the user name provided with -user.
- 
-              Corresponding  variable  in  template: $NAME.  The
-              most common use for this variable is when creating
-              a  file  to  be  incorporated  as  an entry in the
-              cell's /etc/passwd file.
- 
-    -pass     defines the user's initial password.    Many  UNIX
-              applications and utilities require that this be no
-              longer than eight  characters;  the  AFS  commands
-              that  handle passwords accept strings of virtually
-              unlimited length.  If not provided, this  argument
-              defaults to the string changeme.
- 
-              Corresponding variable in the template: none.
- 
-    -server   specifies  the  file  server  machine on which the
-              user's volume will reside.
- 
-              Corresponding variable in template: $SERVER.
- 
-    -partition
-              specifies  the  partition  on file server for home
-              volume on which the user's volume will reside.
- 
-              Corresponding variable in template: $PART.
- 
-    -mount    specifies  the  pathname  to   the   user's   home
-              directory.   If the issuer does not provide a full
-              pathname,  it  is  interpreted  relative  to   the
-              working directory.
- 
-              Corresponding  variable in template: $MTPT, but on
-              the "V" line only.  Occurrences of $MTPT on  lines
- 
- 
- 
-              following  the  "V" line take their value from the
-              "V" line's <mount point> field.   Thus  the  exact
-              value  of  this  command line argument becomes the
-              value for post-"V" line occurrences of $MTPT  only
-              if $MTPT appears alone in the <mount point> field.
- 
-    -uid      specifies  the  AFS  UID to be assigned to the new
-              user.  It should  be  a  positive  integer.    The
-              issuer  may  wish  to  pre-verify with pts listmax
-              that the  intended  number  is  greater  than  the
-              current  largest AFS UID: if the requested AFS UID
-              is already  in  use,  the  account  creation  will
-              terminate  with  an error.  If the issuer does not
-              provide  this  argument,  the  Protection   Server
-              assigns  an  AFS UID automatically; as with manual
-              account   creation,   automatic   allocation    is
-              preferred.
- 
-              Corresponding variable in template: $UID.
- 
-    -template specifies  which  template the command interpreter
-              should consult.  If the issuer  does  not  provide
-              this argument, the command interpreter looks for a
-              template  called  uss.template  in  the  following
-              directories, which it searches in this order:
- 
-                 1. the working directory
- 
-                 2. /afs/cellname/common/uss,         where
-                    cellname names the local cell
- 
-                 3. /etc
- 
-              If  the  issuer  provides  a   name   other   than
-              uss.template   without  a  pathname,  the  command
-              interpreter looks for it in the  directories  just
-              listed, in the same order.  If the issuer provides
-              a  full   or   partial   pathname,   the   command
-              interpreter  consults  the  specified file without
-              consulting  the  directories   just   listed;   it
-              interprets   partial  pathnames  relative  to  the
-              working directory.
- 
-              If the template is 0-length, the new account  will
-              consist  solely  of  Protection and Authentication
-              Database entries.
- 
-    -verbose  causes the command interpreter to produce  a  more
-              detailed trace of the actions it is executing.  By
-              default, only warnings and error messages appear.
- 
-    -var      specifies values for each of the number  variables
-              $1  through  $9  found in the template. The number
-              variables allow the issuer to provide  values  for
-              variables not built-in to the uss add command.
- 
-              Corresponding  variables  in  template: $1 through
-              $9.
- 
- 
- 
-              Each instance of  this  argument  has  two  parts,
-              separated by a space:
- 
-                 - an integer between 1 and 9, not preceded
-                   by the dollar sign.  Each number matches
-                   the variable in the template.
- 
-                 - a value
- 
-              See   the   chapter  on  uss  in  the  AFS  System
-              Administrator's Guide for further explanation.
- 
-    -cell     specifies the cell in which to  run  the  command.
-              See  section  7.1 in the Reference Manual for more
-              details.  -admin
-              names  the  user  whom  the Authentication Servers
-              should authenticate for purposes  of  creating  an
-              Authentication Database entry.  See section 7.1 in
-              the Reference Manual  for  more  details.    Note:
-              Issuers of this command on machines running Ultrix
-              must use  this  argument  in  order  to  adopt  an
-              privileged  AFS identity while remaining "root" in
-              the local machine's UNIX file  system.    See  the
-              preceding WARNING.
- 
-    -dryrun   indicates  that the command interpreter should not
-              actually execute the command,  but  should  report
-              all  the actions it would perform if executing it.
-              See section 7.1 in the Reference Manual  for  more
-              details.
- 
-    -overwrite
-              instructs the command interpreter to overwrite any
-              directories,  files  and  links  that exist in the
-              file  system  and  for   which   it   also   finds
-              definitions on template "D", "E", "F", "L" and "S"
-              lines.  If  this  flag  is  omitted,  the  command
-              interpreter prompts once for confirmation that the
-              issuer  really  wants  to   overwrite   all   such
-              elements.
- 
-    -help     prints  the  online help for this command.  Do not
-              provide any other arguments  or  flags  with  this
-              one.   See section 7.1 in the Reference Manual for
-              more details.
- 
- EXAMPLES
- 
-    When the template  is  0-length,  the  following  creates  a
-    "dummy"  account called admin with entries in the Protection
-    and Authentication Databases only.
- 
-    % uss add admin
- 
-    The combination of the following "V" line  in  the  template
-    uss.tpl   and   uss add   command   creates  Protection  and
-    Authentication Database entries for user  name  smith.    It
-    would also create a volume called user.smith with a quota of
-    2500        kilobyte        blocks,        mounted        at
-    /afs/transarc.com/usr/smith,  the  ACL for which gives smith
-    all rights.  See the description of  the  "V"  line  for  an
- 
- 
- 
-    explanation  of  its  fields.  Note that only the template's
-    name is provided, not its pathname,  as  it  is  assumed  it
-    resides in one of the three expected directories.
- 
-        V user.$USER $SERVER.transarc.com /vice$PART $1
-             /afs/transarc.com/usr/$USER $UID $USER all
- 
-    % uss add smith "John Smith" js_pswd fs2 b -t uss.tpl -v 1
-    2500
- 
-    The  chapter  on uss in the AFS System Administrator's Guide
-    presents  more  extended  examples  of  template  lines  and
-    commands.
- 
- PRIVILEGE REQUIRED
- 
-    Issuer (or person named with -admin flag) must belong to the
-    system:administrators group in the Protection  Database  and
-    must  have  the  ADMIN  flag  in  his  or her Authentication
-    Database entry.  If the template contains a  "V"  line,  the
-    issuer must be listed in /usr/afs/etc/UserList and must have
-    at least ADMINISTER and INSERT rights in the directory where
-    the  mount point is to be created.  If the template includes
-    lines that create other types of objects (directories, files
-    or  links),  the issuer must have the privilege(s) necessary
-    to create them.
- 
-    Under Ultrix, only "root" can issue the  /etc/chown  command
-    invoked  when  a  file  or  directory  is  created.  See the
-    WARNING section.
--- 0 ----
Index: openafs/src/man/uss_apropos.1
diff -c openafs/src/man/uss_apropos.1:1.1 openafs/src/man/uss_apropos.1:removed
*** openafs/src/man/uss_apropos.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_apropos.1	Fri Apr 14 09:27:30 2006
***************
*** 1,59 ****
- uss apropos                AFS Commands             uss apropos
- 
- 
- NAME
- 
-    uss apropos -- show each help entry containing keyword.
- 
- 
-    uss apropos  -topic <help string>  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    uss ap  -t <help string>  [-h]
- 
- DESCRIPTION
- 
-    Displays  the  first  line  of  the  help  entry for any uss
-    command  that  has  help  string  in  its  name   or   short
-    description.
- 
- ARGUMENTS
- 
-    -topic    specifies the keyword string to search for.  If it
-              is more than  a  single  word,  surround  it  with
-              double  quotes or other delimiters.  Type all help
-              strings for uss commands in all lowercase letters.
- 
-    -help     prints the online help for this command.   Do  not
-              provide  any  other  arguments  or flags with this
-              one.  See section 7.1 in the Reference Manual  for
-              more details.
- 
- OUTPUT
- 
-    The  first  line  of a command's online help entry names the
-    command and briefly describes what it does.  The uss apropos
-    command  displays  that first line for any uss command where
-    help string is part of the command name or first line.
- 
-    To see the remaining lines in a help  entry,  which  provide
-    the  command's  alias  (if any) and syntax, use the uss help
-    command.
- 
- EXAMPLE
- 
-    The following lists all uss  commands  that  have  the  word
-    "create"   in   their   operation   code   or  short  online
-    description.
- 
-        % uss apropos create
-        add: create a new user
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    uss help
--- 0 ----
Index: openafs/src/man/uss_bulk.1
diff -c openafs/src/man/uss_bulk.1:1.1 openafs/src/man/uss_bulk.1:removed
*** openafs/src/man/uss_bulk.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_bulk.1	Fri Apr 14 09:27:30 2006
***************
*** 1,325 ****
- uss bulk                   AFS Commands                uss bulk
- 
- 
- NAME
- 
-    uss bulk -- execute multiple uss commands.
- 
- 
-    uss bulk  -file <bulk input file>  [-template <pathname of
-    template file>]
-    [-verbose]  [-cell <cell name>]
-    [-admin <administrator to authenticate>]  [-dryrun]
-    [-overwrite]
-    [-help]
- 
-    uss b  -f <bulk input file>  [-t <pathname of template
-    file>] [-v]  [-c <cell name>]
-    [-a <administrator to authenticate>]  [-d]  [-o]  [-h]
- 
- DESCRIPTION
- 
-    Executes  the  uss commands listed in bulk input file, which
-    must already exist.  If bulk input file has add commands  in
-    it  that  create  complete (rather than authentication-only)
-    accounts, then the issuer must also specify a template using
-    pathname of template file.
- 
- WARNING
- 
-    The  following warning applies when all of the following are
-    true:
- 
-       - this command is issued on machines running Ultrix
- 
-       - the bulk file contains add lines
- 
-       - the template file used for the  account  creations
-         is not 0-length.
- 
-    In this set of circumstances, the issuer must use the -admin
-    argument to adopt a privileged AFS identity while  remaining
-    "root"  in  the  local  machine's  UNIX file system.  Ultrix
-    allows only "root" to issue the /etc/chown command that  the
-    add   command   invokes  to  set  the  owner  of  files  and
-    directories created by template lines.  At  the  same  time,
-    AFS  allows only a privileged administrator to issue the AFS
-    commands invoked; "root" is not normally  a  privileged  AFS
-    administrator.
- 
-    Other  operating  systems  allow  users other than "root" to
-    issue /etc/chown, but users may still find it convenient  to
-    adopt different identities in the AFS and UNIX file systems.
-    Being authenticated in AFS as a privileged user is  required
-    under all operating systems.
- 
- ARGUMENTS
- 
-    -file     names  the  file  containing  the  uss commands to
-              execute.    If  the  issuer  does  not  provide  a
-              pathname, the command interpreter assumes the file
-              is in the working directory.  The BULK FILE FORMAT
-              section  details  the  proper  format  for command
-              lines in the bulk file.
- 
-    -template names the template file for any add commands  that
- 
- 
- 
-              appear in the bulk input file.  If the issuer does
-              not provide a pathname,  the  command  interpreter
-              assumes  the  template  file  is  in  the  working
-              directory.  See  the  AFS  System  Administrator's
-              Guide for a definition of template format.
- 
-    -verbose  causes  the  command  interpreter  to  produce (on
-              stdout) a more detailed trace of the actions it is
-              executing.    By  default, only warnings and error
-              messages appear.
- 
-    -cell     specifies the cell in which to  run  the  command.
-              See  section  7.1 in the Reference Manual for more
-              details.  -admin
-              names  the  user  whom  the Authentication Servers
-              should authenticate for purposes  of  creating  an
-              Authentication Database entry.  See section 7.1 in
-              the Reference Manual for more details.  Note: When
-              the  bulk  file contains add lines, issuers of the
-              uss bulk command on machines running  Ultrix  must
-              use  this argument in order to adopt an privileged
-              AFS identity while remaining "root" in  the  local
-              machine's  UNIX  file  system.   See the preceding
-              WARNING.
- 
-    -dryrun   indicates that the command interpreter should  not
-              actually  execute  the  command, but should report
-              all the actions it would perform if executing  it.
-              See  section  7.1 in the Reference Manual for more
-              details.
- 
-    -overwrite
-              instructs  the command interpreter (when add lines
-              appear  in  the  bulk  file)  to   overwrite   any
-              directories,  files  and  links  that exist in the
-              file system related to the user for which it  also
-              finds  definitions  on template "D", "E", "F", "L"
-              and "S" lines.   If  this  flag  is  omitted,  the
-              command  interpreter  prompts,  once  for each add
-              line in the bulk file, for confirmation  that  the
-              issuer  really  wants to overwrite those elements.
-              This flag should not be used if the bulk file does
-              not contain add lines.
- 
-    -help     prints  the  online help for this command.  Do not
-              provide any other arguments  or  flags  with  this
-              one.   See section 7.1 in the Reference Manual for
-              more details.
- 
- BULK FILE FORMAT
- 
-    Five types of command lines can appear  in  the  bulk  file:
-    add,  delete, exec, savevolume, and delvolume.  Each command
-    line should have a carriage return only  at  the  end,  even
-    though it may cover several lines on the screen.
- 
- 
- 
-    The add line
- 
-    Each  add line is the equivalent of a uss add command issued
-    on the command line.  Begin the line with  "add"  only,  not
-    "uss add",  and provide the arguments in the same order they
-    would appear on the uss add command  line,  separating  each
-    with a colon.  Only the first argument, corresponding to the
-    command line argument -user, is required.  To omit  a  value
-    for  an  argument  (presumably because it is optional or the
-    template specifies a constant value for  it),  type  nothing
-    between  two  colons.  After the last argument provided, end
-    the line with either a  colon  and  carriage  return,  or  a
-    carriage return alone.
- 
-    The  eighth  through  seventeenth  fields  are for assigning
-    values to the number variables, with the  fields  listed  in
-    increasing numerical order.  The issuer must indicate either
-    a value or an empty field (nothing between two  colons)  for
-    every  variable that precedes the last one being assigned an
-    actual value.  It  is  acceptable,  but  not  necessary,  to
-    indicate empty fields for any number variables following the
-    last one actually assigned a value.
- 
-    The  following  concrete  representation   uses   the   same
-    identifiers for arguments as the uss add definition.  The "{
-    }" notation indicates that each entry between vertical  bars
-    is  one  possible choice.  Remember that an instruction like
-    this would appear on a single line in the actual bulk file.
- 
-       add <login name>[:<full name>][:<initial passwd>][:<file 
-       [:<file server's disk partition for home volume>][:<home 
-       [:<uid to assign the user>][:{<var1> | :<var1>:<var2> | :
-            . . . . et cetera through.  . . .
-       | :<var1>:<var2>:<var3>:<var4>:<var5>:<var6>:<var7>:<var8
- 
-    Do not surround full name with double  quotes  in  the  bulk
-    file,  even  though  its  counterpart on the regular uss add
-    command line must be so surrounded.
- 
-    The EXAMPLES section below may help to clarify the format of
-    the add line.
- 
-    The delete line
- 
-    Each  delete  line is the equivalent of a uss delete command
-    issued on the command line.  Begin the  line  with  "delete"
-    only,  not  "uss delete",  and  provide the arguments in the
-    same order they would appear on the uss delete command line,
-    separating  each  with a colon.  Provide values for at least
-    the  first  two  arguments  (corresponding  to   -user   and
-    -mountpoint   on  the  command  line).    The  third  field,
-    corresponding to -savevolume, is optional; there  are  three
-    possible values:
- 
-       - if  the  word  savevolume  appears, the volume and
-         VLDB entry will not be removed
- 
-       - if the word delvolume appears, the volume and VLDB
-         entry will be removed
- 
-       - if  the  field  is  blank, then the volume will be
- 
- 
- 
-         treated according to the prevailing  default  (see
-         the  following  description  of the savevolume and
-         delvolume lines to learn how to set the default).
- 
-    After the last argument provided, end the line with either a
-    colon and carriage return or a carriage return alone.
- 
-    The   following   concrete   representation  uses  the  same
-    identifiers for arguments as does the uss delete definition.
-    The  "{    }"  notation  indicates that each entry between a
-    vertical line is one possible  choice.    Remember  that  an
-    instruction  like  this would appear on a single line in the
-    actual bulk file.  The EXAMPLES section illustrates  use  of
-    this line.
- 
-       delete <account name>:<full mount point pathname>
-              [:{savevolume | delvolume |  }]
- 
-    The exec line
- 
-    This  line  causes  the  indicated  UNIX shell command to be
-    executed.  Its format is
- 
-       exec <command string to execute>
- 
-    The savevolume and delvolume lines
- 
-    The savevolume and delvolume lines set the default treatment
-    of  volumes  in  delete  lines  that follow them in the bulk
-    file.  The savevolume line prevents the  removal  of  volume
-    and  VLDB  entry  for  all  subsequent  delete  lines.   The
-    delvolume line causes the removal of volume and  VLDB  entry
-    for  all  subsequent delete lines.  The default treatment if
-    neither line appears in a bulk file is to remove the  volume
-    and   VLDB;  delete  lines  that  appear  before  the  first
-    savevolume line are also treated this way.
- 
-    An explicit savevolume or delvolume instruction in the third
-    field  of an individual delete line overrides the default in
-    effect at the time.  If nothing appears in the third  field,
-    the default is obeyed.
- 
-    Neither  command  takes  arguments  (the  word savevolume or
-    delvolume should appear by itself on the line).  The  effect
-    of  either  line  lasts  until  the end of the bulk file, or
-    until its opposite appears in the file.  Multiple  instances
-    of each command can be used to toggle back and forth between
-    removal and non-removal of volumes.
- 
- EXAMPLES
- 
-    The following shows the proper format for an add line in the
-    bulk  file  when  only  the  first  (required)  argument  is
-    provided, and when the first three arguments  are  provided.
-    In the first case, the user's "real name" is set to anderson
-    and password to changeme (the defaults).
- 
-       add anderson
-       add smith:John Smith:js_pswd
- 
-    The following add line example supposes  that  the  Transarc
- 
- 
- 
-    Corporation cell uses a template with the following "V" line
-    in it:
- 
-    V user.$USER $SERVER.transarc.com /vicep$PART 2000
-           /afs/transarc.com/usr/$3/$USER $UID $USER all
- 
-    To create an account for users John Smith from the Marketing
-    Department  and  Pat  Jones from the Finance Department, the
-    appropriate add commands in the bulk file might be:
- 
-       add smith:John Smith::fs1:a:::::marketing
-       add jones:Pat Jones::fs3:c:::::finance
- 
-    The effect would be to establish an account called smith  in
-    the Protection and Authentication Databases, with an initial
-    password changeme and a  value  for  $UID  provided  by  the
-    Protection  Server.  His volume, user.smith, would reside on
-    partition    "/vicepa"    of     file     server     machine
-    "fs1.transarc.com"     and     would     be    mounted    at
-    /afs/transarc.com/usr/marketing/smith.   He  would  own  his
-    home  directory and have full access to it.  The account for
-    jones would be similar,  except  that  it  would  reside  on
-    partition     "/vicepc"     of     file    server    machine
-    "fs3.transarc.com"    and    would     be     mounted     at
-    /afs/transarc.com/usr/finance/jones.
- 
-    Notice  that  the  fields  corresponding  to <home directory
-    mount point>, <uid to assign the user>,  <var1>  and  <var2>
-    are  empty  (between  a  and  marketing on the first example
-    line) since their corresponding variables do not  appear  in
-    the  template  file.    The  <initial  passwd> field is also
-    empty.
- 
-    The issuer could, if he or she choose, specify  values/empty
-    fields  for  all  nine  number variables.  In this case, the
-    bulk file lines shown above would look like:
- 
-       add smith:John Smith::fs1:a:::::marketing::::::
-       add jones:Pat Jones::fs3:c:::::finance::::::
- 
-    The following shows a complete bulk file containing a set of
-    delete  lines  combined  with  a  savevolume  line.  Because
-    smith, pat, and rogers appear before the savevolume  command
-    and  their third field is blank, the volume will be removed.
-    The volume for terry will not be removed, but johnson's will
-    be  because  the  delvolume in the third field overrides the
-    current default.
- 
-        delete smith:/afs/transarc.com/usr/smith
-        delete pat:/afs/transarc.com/usr/pat
-        delete rogers:/afs/transarc.com/usr/rogers
-        savevolume
-        delete terry:/afs/transarc.com/usr/terry
-        delete johnson:/afs/transarc.com/usr/johnson:delvolu
- 
-    The following exec  example  supposes  that  the  bulk  file
-    contains  a  set of add lines followed by delete lines.  The
-    operator places this line between the two sets to flag  when
-    the additions are finished and the deletions beginning.
- 
-        exec echo "Additions completed; beginning deletions.
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  (or  person  named by -admin argument) must have the
-    privileges necessary to run all of the commands in the  bulk
-    file individually.
- 
- MORE INFORMATION
--- 0 ----
Index: openafs/src/man/uss_d_line.1
diff -c openafs/src/man/uss_d_line.1:1.1 openafs/src/man/uss_d_line.1:removed
*** openafs/src/man/uss_d_line.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_d_line.1	Fri Apr 14 09:27:30 2006
***************
*** 1,116 ****
- Template "D" line          AFS Commands       Template "D" line
- 
- 
- NAME
- 
-    Template "D" line -- create a directory.
- 
- 
-    D <pathname> <mode> <owner> <access list>
- 
- DESCRIPTION
- 
-    Creates  a  directory  anywhere  in  the  file  system.   It
-    intended use  is  to  create  a  subdirectory  in  the  home
-    directory defined on the preceding "V" line.
- 
-    The  "D"  line  should  appear  after  the  "V"  line if any
-    variables  in  it  take  their  values  from  the  "V"  line
-    (notably,  $MTPT).   Any number of "D" lines may appear in a
-    template.
- 
- WARNING
- 
-    Using the "D" line to create directories outside AFS  (e.g.,
-    in  the  UNIX  file  system of the workstation where the uss
-    command is being issued) introduces two complications:
- 
-       - The first complication arises if the issuer wishes
-         to  set  the <owner> field to something other than
-         his or her own user name or UNIX UID.  The default
-         owner  of a UNIX file system directory is the user
-         who created it (in this case, the  issuer  of  the
-         uss  command).    Changing this default, which uss
-         will attempt if anything other than  the  issuer's
-         name   appears  in  the  <owner>  field,  requires
-         issuing the chown command, which in turn  requires
-         being the super-user "root".  If the issuer wishes
-         to specify an alternate owner, he or she  must  be
-         "root"  in the UNIX file system and use the -admin
-         flag in  order  to  be  recognized  in  AFS  as  a
-         privileged  administrator.  See the description of
-         the -admin argument for uss add and uss bulk.
- 
-       - The second complication is that it is not possible
-         to  associate  an ACL with a non-AFS directory, so
-         uss will always  print  a  warning  message  about
-         that.    It will create the directory nonetheless,
-         and  the  <access  list>  field  must  always   be
-         provided.
- 
-    The  preferred method for automatic placement of directories
-    on the local disk is the  package  program,  which  runs  as
-    "root".
- 
- ARGUMENTS
- 
-    D         should  be  a capital letter and tells the command
-              interpreter  that  this  is  a  directory-creation
-              instruction.
- 
-    pathname  is the full pathname of the directory.
- 
-    mode      sets   the  UNIX  mode  bits  for  the  directory.
-              Provide a four-digit decimal number in this field,
- 
- 
- 
-              such  as  0755  or  0744.    Keep in mind that the
-              "user" x bit must be turned on for a directory.
- 
-    owner     names the directory's  owner  (in  the  UNIX  file
-              system  sense).   If the directory is being placed
-              in AFS, the $UID variable should  appear  in  this
-              field.   If the directory is being placed into the
-              UNIX file system rather than AFS, this field  must
-              contain  the  user  name  or  UNIX  UID of the uss
-              command's issuer, or  the  account  creation  will
-              abort at that point.
- 
-    access list
-              defines the access control list for the  new  home
-              directory.   It   must  be  included  for  non-AFS
-              directories, even though it  is  ignored  in  that
-              case.  The list may define one or more pairs, each
-              consisting of
- 
-                 - a user name or Protection Database group
-                   name
- 
-                 - the access rights
- 
-              separated  by  a space.  See the fs setacl command
-              to learn about the access  rights  available  with
-              AFS.
- 
-              At  the  least, the new user needs to be given all
-              access rights.  This could be achieved with
- 
-                 $USER all
- 
-              Unlike the "V" line, there are no default pairs on
-              the  ACL  of  a directory created with a "D" line.
-              However, as with the "V" line it is  not  possible
-              to  grant  any  rights  to  the  issuer of the uss
-              command.  As the last step  in  account  creation,
-              the  uss command interpreter automatically deletes
-              that person from  any  access  control  lists  set
-              during the creation process.
- 
- EXAMPLE
- 
-    The  following creates a public directory in the user's home
-    directory, makes  the  user  own  the  directory  and  gives
-    him/her all access rights.
- 
-        D $MTPT/public 0755 $UID $USER all
--- 0 ----
Index: openafs/src/man/uss_delete.1
diff -c openafs/src/man/uss_delete.1:1.1 openafs/src/man/uss_delete.1:removed
*** openafs/src/man/uss_delete.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_delete.1	Fri Apr 14 09:27:30 2006
***************
*** 1,98 ****
- uss delete                 AFS Commands              uss delete
- 
- 
- NAME
- 
-    uss delete -- delete user account from system.
- 
- 
-    uss delete  -user <login name>
-    -mountpoint <mount point for user's volume>  [-savevolume]
-              [-verbose]  [-cell <cell name>]
-    [-admin <administrator to authenticate>]  [-dryrun]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    uss d  -u <login name>  -m <mount point for user's volume>
-         [-s]  [-v]  [-c <cell name>]
-    [-a <administrator to authenticate>]  [-d]  [-h]
- 
- DESCRIPTION
- 
-    Deletes  an AFS user account from the system by deleting the
-    user's
- 
-       - Protection Database entry
- 
-       - Authentication Database entry
- 
-       - volume and VLDB entry, unless the issuer  includes
-         the  -savevolume flag to prevent the deletion.  If
-         the volume is to be deleted, the issuer may  first
-         wish to transfer its contents to tape for possible
-         restoration.
- 
-       - the home directory mount point from the file tree.
-         This  happens  even  if  the  -savevolume  flag is
-         provided.
- 
- ARGUMENTS
- 
-    -user     specifies  the  user  name  to  remove  from   the
-              Protection and Authentication Databases.
- 
-    -mountpoint
-              specifies  the  pathname  to   the   user's   home
-              directory.  The volume mounted at that location is
-              deleted from the system.  If the issuer  does  not
-              provide   a   full  pathname,  it  is  interpreted
-              relative to the working directory.
- 
-    -savevolume
-              prevents  the  user's  volume  and VLDB entry from
-              being deleted from the system.
- 
-    -verbose  causes  the  command  interpreter  to  produce  on
-              standard  output (stdout) a more detailed trace of
-              the actions it is executing.    By  default,  only
-              warnings and error messages appear.
- 
-    -cell     specifies  the  cell  in which to run the command.
-              See section 7.1 in the Reference Manual  for  more
-              details.  -admin
-              names the user  whom  the  Authentication  Servers
-              should  authenticate  for  purposes of creating an
- 
- 
- 
-              Authentication Database entry.  See section 7.1 in
-              the Reference Manual for more details.  -dryrun
-              indicates that the command interpreter should  not
-              actually  execute  the  command, but should report
-              all the actions it would perform if executing  it.
-              See  section  7.1 in the Reference Manual for more
-              details.
- 
-    -help     prints the online help for this command.   Do  not
-              provide  any  other  arguments  or flags with this
-              one.  See section 7.1 in the Reference Manual  for
-              more details.
- 
- EXAMPLES
- 
-    The   following   removes  smith's  user  account  from  the
-    transarc.com cell, but prevents deletion of  the  user.smith
-    volume.
- 
-    % uss del smith /afs/transarc.com/usr/smith -save
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  (or  person named by -admin argument) must belong to
-    the system:administrators group in the Protection  Database,
-    must  have  the  ADMIN  flag  in  his  or her Authentication
-    Database entry, and must have at least ADMINISTER and DELETE
-    rights  in the directory from which the mount point is to be
-    removed.  To remove volumes (i.e., if the  -savevolume  flag
-    is    not    used),   the   issuer   must   be   listed   in
-    /usr/afs/etc/UserList.
--- 0 ----
Index: openafs/src/man/uss_e_line.1
diff -c openafs/src/man/uss_e_line.1:1.1 openafs/src/man/uss_e_line.1:removed
*** openafs/src/man/uss_e_line.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_e_line.1	Fri Apr 14 09:27:30 2006
***************
*** 1,88 ****
- Template "E" line          AFS Commands       Template "E" line
- 
- 
- NAME
- 
-    Template "E" line -- create a single-line file.
- 
- 
-    E <pathname> <mode> <owner> "<contents>"
- 
- DESCRIPTION
- 
-    Creates  a  file anywhere in the file system by echoing what
-    appears in the <contents> field into  the  new  file.    Its
-    intended  use  is the creation of files in the new user home
-    directory or its subdirectories.
- 
-    The "E" line's advantage over the "F" line is that variables
-    may appear in the <contents> field.  The command interpreter
-    replaces  the  variables  with  appropriate  values   before
-    creating  the  file.    (In contrast, the contents of a file
-    created using the "F"  line  are  the  same  for  everyone.)
-    However, the "E" line restricts the contents of the new file
-    to  a  single  line,  since  no  carriage  returns  (newline
-    characters) can occur in the <contents> field.
- 
-    An "E" line should appear in the template after the "D" line
-    that creates the directory the file is to reside  in.    Any
-    number of "E" lines may appear in a template.
- 
- WARNING
- 
-    Using  the  "E"  line to create a file outside AFS (e.g., in
-    the UNIX file system of the client  machine  where  the  uss
-    command is being issued) introduces a potential complication
-    if the issuer wishes to set the <owner> field  to  something
-    other  than  his  or  her  own  user  name or UNIX UID.  The
-    default owner of a UNIX file system directory  is  the  user
-    who  created  it  (in  this  case,  the  issuer  of  the uss
-    command).  Changing this default, which uss will attempt  if
-    anything other than the issuer's name appears in the <owner>
-    field, requires issuing the chown  command,  which  in  turn
-    requires  being the super-user "root".  If the issuer wishes
-    to specify an alternate owner, he or she must be  "root"  in
-    the  UNIX file system and use the -admin flag in order to be
-    recognized in AFS as a privileged administrator.    See  the
-    description of the -admin argument for uss add and uss bulk.
- 
-    The preferred method for automatic placement of files on the
-    local disk is the package program, which runs as "root".
- 
- ARGUMENTS
- 
-    E         should be a capital letter and tells  the  command
-              interpreter   that   this   is   a   file-creation
-              instruction.
- 
-    pathname  is the full pathname of the file to be created.
- 
-    mode      sets the UNIX mode bits for the file.   Provide  a
-              four-digit  decimal  number in this field, such as
-              0666 or 0644.
- 
-    owner     names the file's owner (in the  UNIX  file  system
- 
- 
- 
-              sense).    If the file is being placed in AFS, the
-              $UID variable should appear in this field.  If the
-              file  is  being  placed  into the UNIX file system
-              rather than AFS, this field must contain the  user
-              name  or  UNIX UID of the uss command's issuer, or
-              the account creation will abort at that point.
- 
-    contents  defines the one-line string that is to become  the
-              contents of the new file.  Surround it with double
-              quotes in case it contains spaces.  It may contain
-              variables,  which  the  command  interpreter  will
-              resolve before creating  the  file,  but  may  not
-              contain carriage returns (newline characters).
- 
- EXAMPLE
- 
-    The  following  creates  an  file  in  the  current  working
-    directory called user_name.etcp containing an entry suitable
-    for incorporating into the cell's global /etc/passwd file.
- 
-        E  $USER.etcp  0644 root "$USER:X:$UID:10:$NAME:$MTP
--- 0 ----
Index: openafs/src/man/uss_f_line.1
diff -c openafs/src/man/uss_f_line.1:1.1 openafs/src/man/uss_f_line.1:removed
*** openafs/src/man/uss_f_line.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_f_line.1	Fri Apr 14 09:27:30 2006
***************
*** 1,82 ****
- Template "F" line          AFS Commands       Template "F" line
- 
- 
- NAME
- 
-    Template "F" line -- create a file by copying a prototype.
- 
- 
-    F <pathname> <mode> <owner> <prototype>
- 
- DESCRIPTION
- 
-    Creates  a  file  anywhere in the file system by copying the
-    contents of an existing "prototype" file into the new  file.
-    Its  intended  use  is creation of standard files in the new
-    user's home directory or a subdirectory of it.  Include  one
-    "F" line for each file to be created.
- 
-    "F"  lines should appear in the template after the "D" lines
-    that define the subdirectories they go in.   Any  number  of
-    "F" lines may appear in a template.
- 
- WARNING
- 
-    Using  the  "F"  line to create a file outside AFS (e.g., in
-    the UNIX file system of the client  machine  where  the  uss
-    command is being issued) introduces a potential complication
-    if the issuer wishes to set the <owner> field  to  something
-    other  than  his  or  her  own  user  name or UNIX UID.  The
-    default owner of a UNIX file system directory  is  the  user
-    who  created  it  (in  this  case,  the  issuer  of  the uss
-    command).  Changing this default, which uss will attempt  if
-    anything other than the issuer's name appears in the <owner>
-    field, requires issuing the chown  command,  which  in  turn
-    requires  being the super-user "root".  If the issuer wishes
-    to specify an alternate owner, he or she must be  "root"  in
-    the  UNIX file system and use the -admin flag in order to be
-    recognized in AFS as a privileged administrator.    See  the
-    description of the -admin argument for uss add and uss bulk.
- 
-    The preferred method for automatic placement of files on the
-    local disk is the package program, which runs as "root".
- 
- ARGUMENTS
- 
-    F         should be a capital letter and tells  the  command
-              interpreter   that   this   is   a   file-creation
-              instruction.
- 
-    pathname  is the full pathname of the file to be created.
- 
-    mode      sets the UNIX mode bits for the file.   Provide  a
-              four-digit  decimal  number in this field, such as
-              0666 or 0644.
- 
-    owner     names the file's owner (in the  UNIX  file  system
-              sense).   If the directory is being placed in AFS,
-              the $UID variable should appear in this field.  If
-              the  directory  is being placed into the UNIX file
-              system rather than AFS, this  field  must  contain
-              the  user  name  or  UNIX UID of the uss command's
-              issuer, or the account creation will abort at that
-              point.
- 
-    prototype specifies  the complete pathname of the file whose
- 
- 
- 
-              contents are to be copied into the new file.    It
-              may  reside  in  either AFS or the local UNIX file
-              system.
- 
- EXAMPLE
- 
-    The following,  appropriate  for  the  Transarc  Corporation
-    cell,    copies    a   standard   .login   file   (kept   in
-    /afs/transarc.com/common/uss/skel)    into     user     home
-    directories.    This  would  appear  on a single line in the
-    actual template.
- 
-        F $MTPT/.login 0644 $UID
-            /afs/transarc.com/common/uss/skel/.login
--- 0 ----
Index: openafs/src/man/uss_g_line.1
diff -c openafs/src/man/uss_g_line.1:1.1 openafs/src/man/uss_g_line.1:removed
*** openafs/src/man/uss_g_line.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_g_line.1	Fri Apr 14 09:27:30 2006
***************
*** 1,78 ****
- Template "G" line          AFS Commands       Template "G" line
- 
- 
- NAME
- 
-    Template "G" line -- define directory for even distribution
- 
-                        of home directories.
- 
- 
-    G  <directory>
- 
- DESCRIPTION
- 
-    Defines a directory to be considered  as  a  value  for  the
-    $AUTO  variable.    Define  a  separate  "G"  line  for each
-    directory to be considered.  All "G" lines, and there may be
-    any   number,   must  appear  in  the  template  before  any
-    occurrences of the $AUTO variable.
- 
-    The intended use of the  "G"  line  is  to  distribute  user
-    accounts  randomly  among  several  directories, rather than
-    using divisions that reflect real-world divisions  (such  as
-    departmental affiliation).
- 
-    Creating multiple "usr" directories in this fashion (perhaps
-    numbered as usr1, usr2 and so on) is useful mostly in a very
-    large  cell  where having all user home directories together
-    in one usr directory could cause slow lookup.    In  such  a
-    case,  the $AUTO variable goes in the <mount point> field in
-    the "V" line.  The command  interpreter  then  selects  from
-    among  the directories defined on "G" lines the one with the
-    fewest entries.  See the chapter on uss in  the  AFS  System
-    Administrator's Guide for more information.
- 
- ARGUMENTS
- 
-    G               should  be  a  capital  letter and tells the
-                    command interpreter that this line defines a
-                    directory  to  be  considered as a value for
-                    the $AUTO variable.
- 
-    directory       defines a pathname.   It  may  be  either  a
-                    complete  pathname or only the final element
-                    (the directory itself).  The choice  affects
-                    the  form  of  the  "V"  line  <mount-point>
-                    field's value,  as  shown  in  the  EXAMPLES
-                    section.
- 
- EXAMPLES
- 
-    If the Transarc Corporation cell's administrators decided to
-    distribute  user  home   directories   evenly   into   three
-    directories, they would define three "G" lines:
- 
-       G usr1
-       G usr2
-       G usr3
- 
-    and then put
- 
-       /afs/transarc.com/$AUTO/$USER
- 
-    in the "V" line <mount-point> field.
- 
- 
- 
-    Alternatively,  they  could  put the entire pathname for the
-    usr directories on the "G" line:
- 
-       G /afs/transarc.com/usr1
-       G /afs/transarc.com/usr2
-       G /afs/transarc.com/usr3
- 
-    in which case the "V" line <mount-point> field would specify
-    simply
- 
-       $AUTO/$USER
--- 0 ----
Index: openafs/src/man/uss_help.1
diff -c openafs/src/man/uss_help.1:1.1 openafs/src/man/uss_help.1:removed
*** openafs/src/man/uss_help.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_help.1	Fri Apr 14 09:27:30 2006
***************
*** 1,77 ****
- uss help                   AFS Commands                uss help
- 
- 
- NAME
- 
-    uss help -- show syntax of specified uss command(s) or list
- 
-                        functional description for all of them.
- 
- 
-                                   +
-    uss help  [-topic <help string> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                            +
-    uss h  [-t <help string> ]  [-h]
- 
- DESCRIPTION
- 
-    Displays the first line  (name  and  short  description)  of
-    every  uss  command's  help  entry,  if  no  help  string is
-    provided.  For each operation code specified with -topic, it
-    outputs  the  entire  help  entry.    See the Output section
-    below.
- 
- ARGUMENTS
- 
-    -topic    specifies the operation code(s) for  which  syntax
-              is  to  be provided.  If it is omitted, the output
-              instead provides a short description  of  all  uss
-              commands.
- 
-    -help     prints  the  online help for this command.  Do not
-              provide any other arguments  or  flags  with  this
-              one.   See section 7.1 in the Reference Manual for
-              more details.
- 
- OUTPUT
- 
-    The online help entry for each uss command consists  of  two
-    or three lines.
- 
-       - The  first  line  names  the  command  and briefly
-         describes what it does.
- 
-       - If the command has aliases, they  will  appear  on
-         the next line.
- 
-       - The  final line, which begins with "Usage:", lists
-         the  command's  arguments   and   flags   in   the
-         prescribed  order.    Online  help entries use the
-         same  symbols  (brackets,  etc.)  as  the  command
-         definitions in this manual.  For an explanation of
-         their meaning, see  page  v  of  the  introductory
-         About This Manual chapter.
- 
- 
- 
- EXAMPLE
- 
-    The  following  displays  the  online  help  entry  for  the
-    uss bulk command.
- 
-        % uss help bulk
-        uss bulk: bulk input mode
-        Usage: uss bulk -file <bulk input file> [-template <path
-        of template file>] [-verbose] [-cell <cell name>] [-dryr
-        [-help]
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    uss apropos
--- 0 ----
Index: openafs/src/man/uss_l_line.1
diff -c openafs/src/man/uss_l_line.1:1.1 openafs/src/man/uss_l_line.1:removed
*** openafs/src/man/uss_l_line.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_l_line.1	Fri Apr 14 09:27:30 2006
***************
*** 1,50 ****
- Template "L" line          AFS Commands       Template "L" line
- 
- 
- NAME
- 
-    Template "L" line -- create hard link.
- 
- 
-    L <existing-file> <link>
- 
- DESCRIPTION
- 
-    Creates  a "hard link" between two files, as achieved by the
-    standard Unix ln command.  An explanation of links is beyond
-    the  scope  of  this  document,  but  the basic effect is to
-    create a second name for an existing file, so that it can be
-    accessed  via either name.  It does not create a second copy
-    of the file.
- 
-    AFS allows hard links only between files that reside in  the
-    same  directory.  This restriction is necessary to eliminate
-    the  confusion  that  would  result  from  associating   two
-    potentially  different  ACLs  (those of the two directories)
-    with the same file.    However,  symbolic  links  are  legal
-    between  two  files that reside in different directories and
-    even volumes (see the section on the template "S" line).
- 
-    "L" lines should appear in the  template  after  "D"  lines;
-    they should also appear after "F" and "E" lines if either of
-    the files being linked were created on such  a  line.    Any
-    number of "L" lines may appear in a template.
- 
- ARGUMENTS
- 
-    L               should  be  a  capital  letter and tells the
-                    command interpreter  that  this  instruction
-                    creates a hard link.
- 
-    existing-file   is  the  complete  pathname  of the existing
-                    file.
- 
-    link            is the complete pathname of the second  name
-                    for the file.
- 
- EXAMPLE
- 
-    The  following  links  the file mail to the file mbox in the
-    home directory.
- 
-       L $MTPT/mbox $MTPT/mail
--- 0 ----
Index: openafs/src/man/uss_s_line.1
diff -c openafs/src/man/uss_s_line.1:1.1 openafs/src/man/uss_s_line.1:removed
*** openafs/src/man/uss_s_line.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_s_line.1	Fri Apr 14 09:27:30 2006
***************
*** 1,46 ****
- Template "S" line          AFS Commands       Template "S" line
- 
- 
- NAME
- 
-    Template "S" line -- create symbolic link.
- 
- 
-    S <existing-file> <link>
- 
- DESCRIPTION
- 
-    Creates  a "symbolic link" between two files, as achieved by
-    the standard Unix ln -s command.  An explanation of links is
-    beyond  the  scope of this document, but the basic effect is
-    to create a second name for an existing file, so that it can
-    be  accessed  via  either name.  It does not create a second
-    copy of the file.
- 
-    AFS allows symbolic links to cross mount  points  (that  is,
-    the linked files may reside in different volumes).
- 
-    "S"  lines  should  appear  in the template after "D" lines;
-    they should also appear after "F" and "E" lines if either of
-    the  files  being  linked  were created on such a line.  Any
-    number of "S" lines may appear in a template.
- 
- ARGUMENTS
- 
-    S               should be a capital  letter  and  tells  the
-                    command  interpreter  that  this instruction
-                    creates a symbolic link.
- 
-    existing-file   is the complete  pathname  of  the  existing
-                    file.
- 
-    link            is  the complete pathname of the second name
-                    for the file.
- 
- EXAMPLE
- 
-    The following,  appropriate  for  the  Transarc  Corporation
-    cell,  links  the  file outgoing in the Mail subdirectory to
-    the file /afs/transarc.com/common/mail/outgoing.
- 
-       S /afs/transarc.com/common/mail/outgoing $MTPT/Mail/o
--- 0 ----
Index: openafs/src/man/uss_v_line.1
diff -c openafs/src/man/uss_v_line.1:1.1 openafs/src/man/uss_v_line.1:removed
*** openafs/src/man/uss_v_line.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_v_line.1	Fri Apr 14 09:27:30 2006
***************
*** 1,145 ****
- Template "V" line          AFS Commands       Template "V" line
- 
- 
- NAME
- 
-    Template "V" line -- create a volume.
- 
- 
-    V <volume name> <server> <partition> <quota> <mount point>
-    <owner>
-    <access list>
- 
- DESCRIPTION
- 
-    Has several effects:
- 
-       - creates a volume
- 
-       - creates a VLDB entry for the volume
- 
-       - mounts  the  volume  in  the  file  system  at the
-         indicated place  in  the  file  tree,  effectively
-         creating the user's home directory
- 
-       - sets the owner of the home directory
- 
-       - sets the home directory's access control list
- 
-    A  template  file  may  contain  only one "V" line, and must
-    contain one unless the file is 0-length. No other lines  are
-    necessary.    (This does not imply that the "V" line must be
-    the first line in the template when there are  others.    If
-    the  $AUTO  variable  appears  on the "V" line, then the "G"
-    lines that provide values for it must appear above  the  "V"
-    line.)
- 
- ARGUMENTS
- 
-    V         should  be  a capital letter and tells the command
-              interpreter  that  this   is   a   volume-creation
-              instruction.
- 
-    volume name
-              is the volume's  name,  under  which  it  will  be
-              listed in the VLDB.
- 
-              By  convention, AFS user volume names have a user.
-              prefix followed by the user name. This is achieved
-              by specifying
- 
-                 user.$USER
- 
-              in this field.
- 
-    server    is  the  file  server  machine that will house the
-              volume.   It  is  safest  to  provide  a  complete
-              Internet-style  host  name  in  this  field.   The
-              interpretation of a shortened form depends on  the
-              state  of  the cell's name server when the uss add
-              command is executed.
- 
- 
- 
-    partition defines which partition on server will  house  the
-              volume.
- 
-              Acceptable  variants of the standard /vicepx-style
-              name are:
- 
-                 /vicepa     =     vicepa      =      a      =
- 
-                 /vicepb     =     vicepb      =      b      =
- 
-              and so on up to
- 
-                 /vicepz     =     vicepz      =      z      =
- 
-    quota     defines the  maximum  amount  of  disk  space  the
-              volume  will be able to take up.  Specify a number
-              of kilobyte blocks (so a value  of  1024  means  a
-              megabyte).
- 
-    mount point
-              defines the directory to be  created  as  a  mount
-              point  for  the  volume.   The specified directory
-              serves as the root directory for the volume  named
-              in the <volume name> field.
- 
-              By  convention, AFS cells call home directories by
-              the user's user name, so the $USER variable may be
-              part of this field.
- 
-              Note:   This   field  defines  the  value  of  any
-              occurrences of the $MTPT  variable  on  subsequent
-              lines in the template.
- 
-    owner     names the owner (in the UNIX file system sense) of
-              the home directory  named  in  the  <mount  point>
-              field.     This  field  should  contain  the  $UID
-              variable.
- 
-    access list
-              defines  the  access control list for the new home
-              directory.  The list may define one or more pairs,
-              each consisting of
- 
-                 - a user name or Protection Database group
-                   name
- 
-                 - the access rights
- 
-              separated by a space.  See the  fs setacl  command
-              to  learn  about  the access rights available with
-              AFS.
- 
-              At the least, the new user needs to be  given  all
-              access rights.  This could be achieved with
- 
-                 $USER all
- 
-              The  pairs  specified  are added to a default pair
-              that grants system:anyuser  the  READ  and  LOOKUP
-              rights.  Do not attempt to grant any rights to the
-              issuer of the uss command.  As the  last  step  in
- 
- 
- 
-              account  creation,  the  uss  command  interpreter
-              automatically deletes that person from any  access
-              control lists set during the creation process.
- 
- 
- 
- EXAMPLE
- 
-    The  following,  appropriate  for  the  Transarc Corporation
-    cell, creates a volume called user.user name on the  /vicepa
-    partition of the specified file server machine, assigning it
-    a quota of 3000 kilobyte blocks.  The volume is  mounted  in
-    /afs/transarc.com/usr  as the value of $USER.  The user owns
-    the home directory and has all access rights to  it.    This
-    line would appear on a single line in the actual template.
- 
-        V user.$USER $SERVER.transarc.com /vicepa 3000
-                /afs/transarc.com/usr/$USER $UID $USER all
--- 0 ----
Index: openafs/src/man/uss_x_line.1
diff -c openafs/src/man/uss_x_line.1:1.1 openafs/src/man/uss_x_line.1:removed
*** openafs/src/man/uss_x_line.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/uss_x_line.1	Fri Apr 14 09:27:31 2006
***************
*** 1,44 ****
- Template "X" line          AFS Commands       Template "X" line
- 
- 
- NAME
- 
-    Template "X" line -- execute command.
- 
- 
-    X <command>
- 
- DESCRIPTION
- 
-    Executes the indicated command, which may be a standard UNIX
-    or AFS command.    The  command  may  include  any  standard
-    template  variables,  which the uss command interpreter will
-    resolve before passing the command  on  to  the  appropriate
-    other command interpreter.
- 
-    "X" lines should appear in the template after the definition
-    of any elements they affect or variables they refer to.  Any
-    number  of  "X"  lines  may appear in a template.  Each line
-    must be a single line only (cannot contain carriage  returns
-    or new line characters within the <command> field).
- 
- ARGUMENTS
- 
-    X               should  be  a  capital  letter and tells the
-                    command interpreter  that  this  instruction
-                    executes a command.
- 
-    command         is  the command to be executed.  Surround it
-                    with  double  quotes  in  case  it  contains
-                    spaces.  It may contain variables, which the
-                    command  interpreter  will  resolve   before
-                    executing  the  command, but may not contain
-                    carriage returns (newline characters).
- 
- EXAMPLE
- 
-    The following,  appropriate  for  the  Transarc  Corporation
-    cell,  mounts the Backup version of the user's volume at the
-    OldFiles subdirectory.
- 
-       X "fs mkm /afs/transarc.com/usr/$USER/OldFiles user.$
--- 0 ----
Index: openafs/src/man/vldb_convert.1
diff -c openafs/src/man/vldb_convert.1:1.1 openafs/src/man/vldb_convert.1:removed
*** openafs/src/man/vldb_convert.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vldb_convert.1	Fri Apr 14 09:27:31 2006
***************
*** 1,264 ****
- vldb_convert               AFS Commands            vldb_convert
- 
- 
- NAME
- 
-    vldb_convert -- convert  Volume  Location Database from AFS
- 
-                        3.1 to AFS 3.2.
- 
- 
-    vldb_convert  [initcmd]  [-to <goal version>]  [-from
-    <current version>]
-    [-path <pathname>]  [-showversion]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS
- 
-    The name of this command must be typed in  full.    However,
-    its  switches can be omitted (if appropriate) or abbreviated
-    as follows:
- 
-    vldb_convert  [-t <goal version>]  [-f <current version>]
-    [-p <pathname>]  [-s]  [-h]
- 
- DESCRIPTION
- 
-    Converts a Volume Location  Database  (VLDB)  from  AFS  3.1
-    format  to  AFS 3.2 format.  Due to a limitation in the VLDB
-    in prior versions of AFS, a cell could have no more than  31
-    file server machines.  With the AFS 3.2 version of the VLDB,
-    a cell can have as many as 255 file server machines.
- 
-    The vldb_convert command converts an existing AFS  3.1  VLDB
-    for   use   as   an   AFS   3.2   VLDB.      It   reads  the
-    /usr/afs/db/vldb.DB0 database file  for  the  old  VLDB  and
-    writes  a  new,  converted  version  of  the database into a
-    temporary file in the /usr/afs/db directory.  If successful,
-    it then removes the old vldb.DB0 file from the directory and
-    replaces it with the new version from  the  temporary  file.
-    After  the  conversion,  the  database  functions  as it did
-    before, with the  exception  that  it  can  accommodate  the
-    entries for the additional file server machines.  The binary
-    file for the vldb_convert command resides in /usr/afsws/etc.
- 
-    The command requires the  file  system  in  which  the  VLDB
-    resides  to  have free space at least equivalent to the size
-    of the old VLDB plus  9  kilobytes.    Because  the  command
-    removes the old VLDB and replaces it with the new version of
-    the database, the additional space is  required  only  while
-    the  command  executes.    (The  new version of the database
-    requires  a  small  amount  of  additional  space,  but  the
-    difference is inconsequential.)
- 
-    Begin the conversion of the VLDB by shutting down the Volume
-    Location (VL) Servers on all three database server machines.
-    (The  instructions assume the cell has three database server
-    machines; adjust the steps accordingly  if  it  has  fewer.)
-    This causes a service outage in the cell, but the outage for
-    the entire conversion procedure should last no more than  15
-    to 20 minutes.
- 
-    Replace  the  AFS  3.1  version of the /usr/afs/bin/vlserver
-    file on all three database server machines with the AFS  3.2
-    version  of  the  file.    The new VL Server understands the
-    format of the new version of the VLDB.  The old  version  of
- 
- 
- 
-    the  VL  Server  cannot  be  run with the new version of the
-    VLDB, and vice versa.  Make sure you  replace  the  vlserver
-    binary files on each binary distribution machine; otherwise,
-    the Update Servers  overwrite  the  version  stored  on  the
-    database  server  machines  by automatically propagating the
-    old version of the binary file to the machines.
- 
-    Determine which database server machine has  the  lowest  IP
-    address;  Ubik  will use this machine as the synchronization
-    site when the VL Servers are restarted.    Remove  the  VLDB
-    from  the other two database server machines by deleting the
-    /usr/afs/db/vldb.DB0  database  and  /usr/afs/db/vldb.DBSYS1
-    log  files  from  the  other  machines.    Remove  only  the
-    /usr/afs/db/vldb.DBSYS1 log file from  the  database  server
-    machine  with  the  lowest  IP  address.   Do not remove the
-    /usr/afs/db/vldb.DB0 database file from the machine with the
-    lowest IP address.
- 
-    Copy  the  /usr/afs/db/vldb.DB0  file on the database server
-    machine with the lowest IP address to a different directory.
-    Then  execute the vldb_convert command on that machine.  The
-    command takes no  more  than  a  few  minutes  to  complete.
-    However, it displays no messages while it executes.
- 
-    When  the  command is finished, restart the VL Server on the
-    machine with the lowest IP address.   Then  restart  the  VL
-    Servers on the remaining two database server machines.  Ubik
-    elects the  database  server  machine  with  the  lowest  IP
-    address as the synchronization site and distributes the copy
-    of the new VLDB from that machine to the other two  database
-    server machines.  The VLDB is then available.
- 
-    The  vldb_convert  command  can  be also used to convert the
-    VLDB from AFS 3.2 format  back  to  AFS  3.1  format.    The
-    command's  -to  and  -from  switches are used to specify the
-    direction of the conversion.  The -to switch  specifies  the
-    version  to which the database is to be converted; the -from
-    switch indicates the version from which the database  is  to
-    be converted.
- 
-    Both  switches  accept  a  1,  to  indicate  3.1, or a 2, to
-    indicate 3.2.  When converting from 3.1 to 3.2, specify  -to
-    as  2  and  -from  as  1.   Should the need to revert to 3.1
-    arise, specify -to as 1 and -from as  2.    When  converting
-    from  3.1  to  3.2,  you  can omit both options; the command
-    automatically converts  the  database  to  the  next  higher
-    version.
- 
-    Finally,  the  command can be used to display the version of
-    the current VLDB.  The -showversion flag directs the command
-    to  display  the  version number (3.1 or 3.2) of the VLDB at
-    the time the command is issued.  Do not specify the  -to  or
-    -from switch if the -showversion flag is used.
- 
- 
- 
- NOTE
- 
-    The  vldb_convert  command  is  also  useful  as  a means of
-    removing from the VLDB  entries  for  server  machines  that
-    house no volumes.  When a file server machine name or its IP
-    address is changed, the VLDB still contains an entry for the
-    previous  name or address.  This becomes a problem only when
-    the administrators in a large cell must change the names  or
-    IP  addresses  of a significant number of machines, in which
-    case it is conceivable (though highly unlikely) that all 255
-    possible file server machine entries will be taken.
- 
-    If  this  problem  occurs  in a cell, the administrators can
-    execute vldb_convert with a value of 2 for both its -to  and
-    -from  switches.    The  command removes the entries for all
-    unreferenced servers from the VLDB.    The  steps  described
-    previously  for  executing  the  command  (shutting down the
-    servers, removing the copies of the VLDB) must  be  executed
-    as they are for initially upgrading the database.
- 
- WARNING
- 
-    Copy  the /usr/afs/db/vldb.DB0 file to a different directory
-    after  the  VL  Servers  are  shut  down  but   before   the
-    vldb_convert command is run.  The command should perform the
-    conversion without problems.  Also, it does not  remove  the
-    old  database  file  until it has successfully completed the
-    conversion.  However, if anything  happens  to  disrupt  the
-    conversion or if the operation fails for any reason, copying
-    the database beforehand allows the VLDB to be restored  from
-    the copy.
- 
-    Leave  no  VL  Servers  running  while  the conversion is in
-    progress.  If a number of VL Servers sufficient for Ubik  to
-    attain  a  quorum  are  available while the conversion is in
-    progress, changes made while the conversion is underway  are
-    lost when the new version of the VLDB is distributed.
- 
-    Ensure  that all VL Servers are referencing the same version
-    of the VLDB at all times.  The 3.1 version of the VL  Server
-    can  reference only the 3.1 version of the VLDB, and the 3.2
-    version of the VL Server can use only the 3.2 version of the
-    VLDB.    The  3.1 version of the VL Server is not compatible
-    with the 3.2 version of the VLDB, and vice versa.  For  this
-    reason, the vldb_convert command must be used to convert the
-    existing VLDB to the new format before the  new  version  of
-    the   VL   Server   distributed   from   the  cell's  binary
-    distribution machines via the Update Server can be used.
- 
-    Specify only valid, correct values for  the  -to  and  -from
-    switches.   Specifying invalid or incorrect values for these
-    switches can result in damage to the VLDB.  This is  another
-    reason  to  copy  the  vldb.DB0 database file to a different
-    directory before using the vldb_convert command.
- 
-    Finally, the entire procedure  takes  no  more  than  a  few
-    minutes   to   complete.     However,  because  volumes  are
-    inaccessible while the procedure is underway, it is best  to
-    perform the operation over a weekend or overnight to disrupt
-    the fewest users.
- 
- 
- 
- ARGUMENTS
- 
-    initcmd         is an optional string that accommodates  the
-                    command's use of the AFS command parser.  It
-                    can be omitted and ignored.
- 
-    -to             indicates the version of the VLDB  to  which
-                    the current version of the database is to be
-                    converted.  Valid values are  1,  indicating
-                    that the existing version of the database is
-                    to be converted to AFS  3.1  format,  or  2,
-                    indicating  that the existing version of the
-                    database is  to  be  converted  to  AFS  3.2
-                    format.    See  the  DESCRIPTION section for
-                    information about the possible  combinations
-                    of  the  -to  and  -from  switches  and  the
-                    effects of omitting the switches.
- 
-    -from           indicates the version of the  current  VLDB.
-                    Valid  values  are  1,  indicating  that the
-                    existing version of the database is  in  AFS
-                    3.1   format,  or  2,  indicating  that  the
-                    existing version of the database is  in  AFS
-                    3.2 format.  See the DESCRIPTION section for
-                    information about the possible  combinations
-                    of  the  -to  and  -from  switches  and  the
-                    effects of omitting the switches.
- 
-    -path           provides  the  complete  pathname   of   the
-                    vldb.DB0  database  file if the file is kept
-                    in  an  alternate  directory   (or   has   a
-                    different name).  Always include the name of
-                    the file,  even  if  it  is  vldb.DB0.    By
-                    default,  the  command converts the vldb.DB0
-                    database file in the /usr/afs/db  directory.
-                    Use  this  switch  only  if  the database is
-                    stored in a different directory  (or  has  a
-                    different name).
- 
-    -showversion    displays  the  version  (3.1  or 3.2) of the
-                    current VLDB.  Include the -path  switch  if
-                    the VLDB is stored in a directory other than
-                    /usr/afs/db.  If you use this flag, the  -to
-                    and -from switches are ignored.
- 
-    -help           prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with this one.
- 
- EXAMPLE
- 
-    The  following,  issued  on the database server machine with
-    the lowest IP address, executes the vldb_convert command  to
-    convert the VLDB from AFS 3.1 format to AFS 3.2 format:
- 
-    % vldb_convert
- 
- PRIVILEGE REQUIRED
- 
-    The  issuer  must  be able to read, delete, and write to the
-    /usr/afs/db/vldb.DB0 and  /usr/afs/db/vldb.DBSYS1  files  on
- 
- 
- 
-    all  database server machines.  The issuer must also be able
-    to insert, write to, and delete  files  in  the  /usr/afs/db
-    directories on the machines.
- 
-    In  addition,  to  install the new version of the VL Server,
-    the issuer must be able to delete the  /usr/afs/bin/vlserver
-    file  on  all  database  server  machines  (or on all binary
-    distribution machines).  The issuer must  also  be  able  to
-    insert   files   in  the  /usr/afs/bin  directories  on  the
-    machines.
- 
-    An issuer who is logged into the UNIX file  systems  of  the
-    database  server machines as "root" has the necessary rights
-    to perform the entire conversion procedure.
--- 0 ----
Index: openafs/src/man/vos.1
diff -c openafs/src/man/vos.1:1.1 openafs/src/man/vos.1:removed
*** openafs/src/man/vos.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos.1	Fri Apr 14 09:27:31 2006
***************
*** 1,322 ****
-                            AFS Commands
- 
-    1. The vos Commands
- 
-    ------------------------------------------------------------
- 
-    This   command   defines   the   vos  commands  that  system
-    administrators use to contact the Volume Server  and  Volume
-    Location  (VL)  Server.    It assumes the reader is familiar
-    with the concepts described in  AFS  System  Administrator's
-    Guide.
- 
-    System  administrators  use  vos  commands  to  instruct the
-    Volume Server to create, move, delete, replicate and  backup
-    volumes.    The  Volume  Location  (VL) Server automatically
-    records in the Volume Location Database (VLDB)  any  changes
-    in volume status and location that result from vos commands.
-    Operators can use other vos commands to  obtain  information
-    from  VLDB  records.   Vos commands also help operators dump
-    copies of volumes to disk  and  restore  them  to  the  file
-    system if necessary.
- 
-    Note that vos commands are "idempotent."  This means that if
-    execution of a certain command is interrupted in the  middle
-    by  a server or process failure, then a subsequent execution
-    of the same command picks  up  at  the  interruption  point,
-    rather  than  at the very beginning of the operation.  (This
-    does not apply  if  the  issuer  explicitly  interrupts  the
-    operation  with  ^C  or  another  interrupt signal.  In that
-    case, the volume is left locked and the issuer  must  unlock
-    it  with  vos unlock before proceeding.) Idempotency implies
-    that before executing a command, the Volume and  VL  Servers
-    check  to  see  if  running  it  will have any effect (i.e.,
-    whether the state that will result from running the  command
-    already  holds).    If  the desired end-state already holds,
-    there is no need to run the command  again,  no  matter  how
-    many times it is subsequently issued.  If the end-state does
-    not yet hold, the command should pick up where necessary  to
-    achieve it.
- 
-    Refer to the Command Summary at the end of this document for
-    a complete list of vos commands and their syntax.
- 
-    1.1 The Information in VLDB Entries
-    The Volume  Location  Database  (VLDB),  maintained  by  the
-    Volume  Location  (VL)  Server,  records  a  large  range of
-    information about all the volumes in a  cell.    A  separate
-    copy of the VLDB resides on each database server machine. To
-    keep the copies synchronized, the VL Server uses  the  AFS's
-    library of database management facilities, called Ubik.
- 
-    It  is important that the information in the VLDB correspond
-    to the status of the actual volumes on the servers  as  much
-    of  the  time as possible.  For this reason, any vos command
-    that affects volume status also  changes  the  corresponding
-    VLDB   entry   automatically,   as   noted  in  the  command
-    descriptions below.   (It  is  possible  for  the  VLDB  and
-    servers to disagree if vos operations are interrupted before
-    completion; see the vos syncserv and vos syncvldb commands.)
- 
-    There  is  an  entry  in the VLDB for each ReadWrite volume.
-    The entry also records information about  the  ReadOnly  and
-    Backup version of the volume; ReadOnly and Backup volumes do
-    AFS Command Reference Manual             The vos Commands  2
- 
- 
-    not have their own VLDB entries.  (The one exception to this
-    rule  is  that a ReadOnly volume may have its own VLDB entry
-    if its ReadWrite source has been removed.)
- 
-    The following information is available from a VLDB entry:
- 
-       - the name of the ReadWrite version of  the  volume.
-         The  ReadOnly  version  automatically has the same
-         name  with  a  .readonly  extension,  the   Backup
-         version with a .backup extension
- 
-       - the  ReadWrite volumeID number.  A volumeID number
-         is simply an identification number  guaranteed  to
-         be unique within a cell.  In almost all cases, the
-         VL    Server    allocates     volumeID     numbers
-         automatically,  but some commands allow the issuer
-         to assign volumeIDs explicitly.  Each of the three
-         versions  of  a  volume  has  a different volumeID
-         number; they often run  consecutively,  especially
-         if  the VL Server assigned them, but this is not a
-         requirement.
- 
-       - the ReadOnly volumeID number.  All copies  of  the
-         ReadOnly version share the same ID.
- 
-       - the Backup volumeID number
- 
-       - the    ReleaseClone    volumeID   number,   if   a
-         ReleaseClone  exists.    See  the  description  of
-         vos release for more about the ReleaseClone.
- 
-       - one  or  more  site  definitions,  each  of  which
-         specifies a file server machine name and partition
-         name.    Site  definitions specify the location of
-         the  ReadWrite  version  and  each  copy  of   the
-         ReadOnly  version (if any).  No site definition is
-         necessary for the Backup version, if any,  because
-         it   always  resides  at  the  same  site  as  its
-         ReadWrite source.   There  can  be  one  ReadWrite
-         definition and up to six ReadOnly definitions.
- 
-       - one or more site flags associated with each site
- 
-         One site flag tells what type of volume resides at
-         the site, and has value RW for ReadWrite or RO for
-         ReadOnly.
- 
-         The  other  possible  site  flag marks the copy at
-         that site as NEW or OLD.  Normally, this  type  of
-         flag  will not appear; its presence indicates that
-         an error occurred  as  new  ReadOnly  clones  were
-         being   distributed  to  their  sites.    See  the
-         description of the vos release command for further
-         explanation.
- 
-       - one  status  flag for each of the three versions--
-         ReadWrite,  ReadOnly   and   Backup.   This   flag
-         indicates  whether  the version actually exists at
-         at least one site: valid indicates that  it  does,
-         invalid  that it does not.  Note that there is not
-         a separate status flag for each site.
-    AFS Command Reference Manual             The vos Commands  3
- 
- 
-       - a site count, which tells how many copies exist of
-         the ReadWrite and ReadOnly versions of the volume.
-         There is only one ReadWrite copy, but as  many  as
-         six ReadOnly copies may exist.
- 
-       - an  indication if the VLDB entry is locked.  Since
-         being unlocked is the default state, there  is  no
-         explicit  indicator if the VLDB entry is unlocked.
-         See  the  descriptions   of   the   vos lock   and
-         vos unlock commands.
- 
-    The  vos listvldb  command  displays much of the information
-    from the VLDB described above.  The vos examine command also
-    displays VLDB information, in combination with volume header
-    information.
- 
-    1.2 The Information in Volume Headers
-    The previous section explained that there is a  single  VLDB
-    entry for each ReadWrite volume and all of its (ReadOnly and
-    Backup) clones.  In contrast, there  is  a  separate  volume
-    header at the site of each copy of the volume, no matter its
-    version. The volume header is the volume in a senseMit is  a
-    data  structure that records which physical memory addresses
-    on the partition are storing the files in the volume.    The
-    volume  header  binds  all  the  files  into  a logical unit
-    without requiring that they be stored in  contiguous  memory
-    blocks.
- 
-    In  addition  to  data  location,  the volume header records
-    other information about the volume,  some  of  it  redundant
-    with  the  VLDB  so  that  the  Volume Server can access the
-    information even when the VLDB is unavailable.
- 
-    The information in the volume header includes:
- 
-       - the  name  of  this  copy  of  the  volume,   with
-         .readonly or .backup extension if appropriate
- 
-       - its volumeID number
- 
-       - its  type  (RW  for ReadWrite, RO for ReadOnly, BK
-         for Backup)
- 
-       - its size in kilobytes (so 1024 means a megabyte)
- 
-       - its status at the site, which is unrelated to  the
-         locked/unlocked  status  of the VLDB entry.  There
-         are three possibilities:
- 
-            * On-line  means  that  the  volume  is   fully
-              accessible through the file system
- 
-            * needs salvage   means   that  the  volume  is
-              probably corrupted.  Run the  Salvager  using
-              the bos salvage command.
- 
-            * Off-line   means   that  the  volume  is  not
-              accessible, but there is no reason to suspect
-              that it is corrupted
- 
-       - a  Parent ID number, which is the volumeID of this
-    AFS Command Reference Manual             The vos Commands  4
- 
- 
-         volume's ReadWrite source.  If this volume is  the
-         ReadWrite version itself, this ID should match the
-         previously mentioned volumeID.
- 
-       - a Clone ID number, which is the volumeID number of
-         the  last  clone made from this volume's ReadWrite
-         source for the purposes of replication.    It  may
-         match  the  ReadOnly  volumeID or ReleaseClone ID,
-         dependingon  whether  or  not  the   release   was
-         successful.
- 
-       - a  Backup  ID number, which is the volumeID of the
-         Backup version of this volume.  If this volume  is
-         the  Backup  version  itself, this ID should match
-         the previously mentioned volumeID.
- 
-       - a quota, which is the maximum amount of disk space
-         the  ReadWrite  version  of the volume may occupy.
-         It does not apply sensibly to ReadOnly  or  Backup
-         volumes, but is reported for convenience anyway.
- 
-       - its  creation date, which is the day and time when
-         this copy of the volume was created (for  ReadOnly
-         and  Backup  copies,  this means cloned/released).
-         If   the   volume   has   been    restored    with
-         backup diskrestore,   backup volrestore   or  vos
-         restore, this is the restore time.
- 
-       - its date of last update, which is the day and time
-         when  the  contents  of  this volume last changed.
-         For ReadOnly and Backup volumes, this should match
-         the  creation  date, since they are not allowed to
-         change.
-    AFS Command Reference Manual             The vos Commands  5
- 
- 
-       - the number of times the volume has  been  accessed
-         since the later of
- 
-            * 12:00 a.m. on the day the command is issued
- 
-            * the last time the volume changed location
- 
-         An access is defined as a fetch or store operation
-         on any file system object stored in the volume.
- 
-    The vos listvol command displays information from the volume
-    header (as does the vos examine command, in combination with
-    VLDB information).
- 
-    1.3 Common Arguments and Flags
-    Most vos commands accept the  following  optional  arguments
-    and  flags.    They  are  listed in the command descriptions
-    where they apply, and are described in detail below:
- 
-    [-cell <cell name>]
- 
-    This argument specifies that the command should be run in  a
-    different  cell,  specified  by  cell  name.    By  default,
-    commands are executed in  the  local  cell,  as  defined  in
-    /usr/vice/etc/ThisCell  on  the  client machine on which the
-    command is issued.  The issuer may abbreviate cell  name  to
-    the shortest form that distinguishes it from the other cells
-    listed in /usr/vice/etc/CellServDB on the client machine  on
-    which the command is issued.
- 
-    [-noauth]
- 
-    This flag instructs the Volume and/or Volume Location Server
-    not to authenticate  the  user  of  the  command,  and  thus
-    establishes  an  unauthenticated connection between the user
-    and the server (the user is recognized as  the  unprivileged
-    user  anonymous).    It  is  useful  only when authorization
-    checking is disabled on the file server machine (during  the
-    installation  of  a  file server machine or when bos setauth
-    has been used  during  other  unusual  circumstances).    In
-    normal  circumstances,  the Volume and VL Servers allow only
-    authorized (privileged) users to issue commands that  change
-    the  status  of  a  volume or VLDB entry, and will refuse to
-    perform such an action even if the -noauth flag is used.
- 
-    [-localauth]
- 
-    This flag instructs the vos command interpreter  running  on
-    the  local  machine  to  construct a server ticket using the
-    server encryption key with the highest key version number in
-    /usr/afs/etc/KeyFile  on  the  local  machine.   The command
-    interpreter presents the ticket to the Volume and/or  Volume
-    Location Server to use in mutual authentication.
- 
-    This  argument  is  only  useful for commands issued on file
-    server machines, since client workstations  do  not  have  a
-    KeyFile.    It  is  intended for cron-type processes or jobs
-    included in the machine's /usr/afs/local/BosConfig file.  An
-    example  might  be  a  command  that  automatically runs the
-    vos backup command on certain  volumes  in  preparation  for
-    archival  backups.    See  the  chapter  in  the  AFS System
-    AFS Command Reference Manual             The vos Commands  6
- 
- 
-    Administrator's Guide about backing up the system.  The flag
-    can  also  be used if the user is unable to authenticate but
-    is logged into the local UNIX file system as "root".
- 
-    [-verbose]
- 
-    This flag tells  the  Volume  Server  and/or  VL  Server  to
-    display  messages  about  the operations they are performing
-    while executing the command.  Useful  mainly  for  debugging
-    and tracing purposes.
- 
-    [-help]
- 
-    This  flag has the same function as the vos help command: it
-    prints the command's online help message on the screen.   No
-    other  arguments  or  flags  should  be provided at the same
-    time.  Even if they are, this flag overrides them,  and  the
-    only  effect of issuing the command is that the help message
-    appears.
- 
-    1.4 The Privilege Required for vos Commands
-    The Volume and Volume Location Servers  consider  privileged
-    those  users  listed  in the file /usr/afs/etc/UserList on a
-    file server machines' local disk.  This list  is  maintained
-    on each file server machine's local disk using bos commands.
- 
-    Most  vos  commands  require privilege; only those that list
-    volume-related information do not.
--- 0 ----
Index: openafs/src/man/vos_addsite.1
diff -c openafs/src/man/vos_addsite.1:1.1 openafs/src/man/vos_addsite.1:removed
*** openafs/src/man/vos_addsite.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_addsite.1	Fri Apr 14 09:27:31 2006
***************
*** 1,108 ****
- vos addsite                AFS Commands             vos addsite
- 
- 
- NAME
- 
-    vos  addsite -- add  definition  of  ReadOnly  site to VLDB
- 
-                        entry.
- 
- 
-    vos addsite  -server <machine name for new site>
-    -partition <partition name for new site>
-    -id <volume name or ID>  [-cell <cell name>]  [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos ad   -s <machine name for new site>  -p <partition name
-    for new site>
-    -i <volume name or ID>  [-c <cell name>]  [-n]  [-l]  [-v]
-    [-h]
- 
- DESCRIPTION
- 
-    Defines  future  sites  that  will  receive  copies  of  the
-    ReadOnly  version  of  a volume, in preparation for actually
-    creating  and  distributing  the  ReadOnly   version   using
-    vos release.    A  site  is defined as a certain file server
-    machine and partition.
- 
-    The VLDB status flag for the ReadOnly version of the  volume
-    remains invalid, since an actual copy of the ReadOnly volume
-    does not yet exist at the site.
- 
-    If defining more than  one  replication  site  for  a  given
-    ReadWrite source, issue this command repeatedly.
- 
- WARNING
- 
-    Do  not  define  more  than  six  ReadOnly  sites  with this
-    command.  Each VLDB entry can store up to seven site entries
-    (the ReadWrite site counts as one).
- 
-    No more that 3500 volumes should reside on one partition.  A
-    greater  number  can  cause  the  AFS  Salvager  process  to
-    malfunction.    It  is  the issuer's responsibility to check
-    that releasing a ReadOnly volume to a site defined with this
-    command  will  not  cause  the  limit  to  be exceeded.  The
-    vos listvol command reports  the  number  of  volumes  on  a
-    partition.
- 
- ARGUMENTS
- 
-    -server         names the file server machine where the copy
-                    is to reside.  Abbreviated forms of  machine
-                    names may be allowed depending on the naming
-                    service available at the time the command is
-                    issued;  see  page  xii  in the introductory
-                    About This Manual chapter.  -partition
-                    names  the particular partition on that file
-                    server machine where the copy is to  reside.
-                    In  addition  to  the full /vicepx form of a
-                    partition  name,  three  shorter  forms  are
-                    acceptable; see page xii in the introductory
- 
- 
- 
-                    About This Manual chapter.  -id
-                    specifies   either   the  complete  name  or
-                    volumeID  number  of  the  ReadWrite  source
-                    volume.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The following, appropriate in the Transarc Corporation cell,
-    defines a ReadOnly site for the cell's root.afs volume.
- 
-    % vos ad fs7.transarc.com /vicepb root.afs
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos listvol
- 
-    vos release
--- 0 ----
Index: openafs/src/man/vos_apropos.1
diff -c openafs/src/man/vos_apropos.1:1.1 openafs/src/man/vos_apropos.1:removed
*** openafs/src/man/vos_apropos.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_apropos.1	Fri Apr 14 09:27:31 2006
***************
*** 1,64 ****
- vos apropos                AFS Commands             vos apropos
- 
- 
- NAME
- 
-    vos apropos -- show each help entry containing keyword.
- 
- 
-    vos apropos  -topic <help string>  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos ap  -t <help string>  [-h]
- 
- DESCRIPTION
- 
-    Displays  the  first  line  of  the  help  entry for any vos
-    command  that  has  help  string  in  its  name   or   short
-    description.
- 
- ARGUMENTS
- 
-    -topic          specifies  the keyword string to search for.
-                    If it is more than a single  word,  surround
-                    it  with  double quotes or other delimiters.
-                    Type all help strings for  vos  commands  in
-                    all   lowercase  letters,  except  the  word
-                    "VLDB."
- 
-    -help           prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- OUTPUT
- 
-    The  first  line  of a command's online help entry names the
-    command and briefly describes what it does.  The vos apropos
-    command  displays  that first line for any vos command where
-    help string is part of the command name or first line.
- 
-    To see the remaining lines in a help  entry,  which  provide
-    the  command's  alias  (if any) and syntax, use the vos help
-    command.
- 
- EXAMPLE
- 
-    The following lists all vos  commands  that  have  the  word
-    "lock" in their operation code or short online description.
- 
-        % vos ap lock
-        lock: lock VLDB entry for a volume
-        unlock: release lock on VLDB entry for a volume
-        unlockvldb: unlock all the locked entries in the VLD
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    vos help
--- 0 ----
Index: openafs/src/man/vos_backup.1
diff -c openafs/src/man/vos_backup.1:1.1 openafs/src/man/vos_backup.1:removed
*** openafs/src/man/vos_backup.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_backup.1	Fri Apr 14 09:27:31 2006
***************
*** 1,72 ****
- vos backup                 AFS Commands              vos backup
- 
- 
- NAME
- 
-    vos backup -- create Backup volume version of one ReadWrite
- 
-                        volume.
- 
- 
-    vos backup  -id <volume name or ID>  [-cell <cell name>]
-    [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos backup  -i  <volume name or ID>  [-c <cell name>]  [-n]
-    [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Clones the indicated ReadWrite volume  to  create  a  Backup
-    version.    Names  the  Backup  version  by adding a .backup
-    extension to the ReadWrite source's name.    It  places  the
-    Backup  version  at  the  same  site  as  the ReadWrite, and
-    changes the VLDB status flag for the Backup to valid.
- 
-    If a Backup version already exists, this new clone  replaces
-    it.  The status flag remains valid.
- 
- ARGUMENTS
- 
-    -id             specifies   either   the  complete  name  or
-                    volumeID  number  of  the  ReadWrite  source
-                    volume.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following  creates  a  Backup  version  of  the  volume
-    user.smith.
- 
-    % vos backup user.smith
- 
- PRIVILEGE REQUIRED
- 
- 
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos backupsys
--- 0 ----
Index: openafs/src/man/vos_backupsys.1
diff -c openafs/src/man/vos_backupsys.1:1.1 openafs/src/man/vos_backupsys.1:removed
*** openafs/src/man/vos_backupsys.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_backupsys.1	Fri Apr 14 09:27:31 2006
***************
*** 1,155 ****
- vos backupsys              AFS Commands           vos backupsys
- 
- 
- NAME
- 
-    vos   backupsys -- create  Backup  volume  version  of  all
- 
-                        indicated ReadWrite volumes.
- 
- 
-    vos backupsys  [-prefix <common prefix on volume(s)>]
-    [-server <machine name>]  [-partition <partition name>]
-    [-cell <cell name>]  [-noauth]  [-localauth]  [-verbose]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos backups  [-pr <common prefix on volume(s)>]  [-s
-    <machine name>]
-    [-pa <partition name>]  [-c <cell name>]  [-n]  [-l]  [-v]
-    [-h]
- 
- DESCRIPTION
- 
-    Clones each indicated ReadWrite  volume  to  make  a  Backup
-    version  of  it.    Names  each  Backup  version by adding a
-    .backup extension to the name of its ReadWrite source.    It
-    places  each  Backup  at  the  same  site as its source, and
-    changes the VLDB status flag for each Backup to valid.
- 
-    If a Backup version already exists for  a  volume,  the  new
-    clone replaces it.  The status flag remains valid.
- 
-    By  combining  the -prefix, -server and -partition arguments
-    in different ways, it is possible to create Backup copies of
-    varying  numbers  of  volumes.  The possibilities are listed
-    here from most to least inclusive
- 
-    To create a Backup version of:
- 
-       - every ReadWrite volume in  the  system,  omit  all
-         three  arguments.    This could take a rather long
-         time  to  execute,  depending  on  the  number  of
-         volumes.
- 
-       - every  ReadWrite  volume  whose name begins with a
-         certain character string  (for  example,  sys.  or
-         user.), regardless of site, use -prefix.
- 
-       - every  ReadWrite  volume on a file server machine,
-         specify the file server name with -server.
- 
-       - every ReadWrite volume that resides on a partition
-         of  the same name (for instance, on /vicepa on any
-         file server machine), specify the  partition  name
-         with -partition.
- 
-       - every ReadWrite volume on a certain partition of a
-         file server  machine,  specify  both  -server  and
-         -partition.
- 
- 
- 
-       - every  ReadWrite volume with a certain prefix that
-         resides on a file server machine, combine  -prefix
-         and  -server.    The  -prefix argument may also be
-         combined with  -partition,  or  both  -server  and
-         -partition, in this way.
- 
-       - a  single ReadWrite volume, give its complete name
-         as -prefix.  This is actually better done with the
-         vos backup   command,   which   employs   a   more
-         streamlined technique for finding a single volume.
- 
- ARGUMENTS
- 
-    -prefix         specifies a character string of any  length.
-                    Every  volume  whose  name  begins with this
-                    exact string  will  be  cloned  (subject  to
-                    modulations  from  -server  and -partition).
-                    Include field separators (such  as  periods)
-                    if   appropriate.    This  argument  may  be
-                    combined with -server and/or -partition.
- 
-    -server         names the  file  server  machine  where  the
-                    ReadWrite     source    volume(s)    reside.
-                    Abbreviated forms of machine  names  may  be
-                    allowed  depending  on  the  naming  service
-                    available at the time the command is issued;
-                    see  page xii in the introductory About This
-                    Manual  chapter.    This  argument  may   be
-                    combined with -prefix and/or -partition.
- 
-    -partition      names  the  particular  partition  where the
-                    ReadWrite  source  volume(s)  reside.     In
-                    addition  to  the  full  /vicepx  form  of a
-                    partition  name,  three  shorter  forms  are
-                    acceptable; see page xii in the introductory
-                    About This Manual chapter.    This  argument
-                    may be combined with -prefix and/or -server.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- 
- 
- EXAMPLES
- 
-    The  following  creates  a Backup version of every volume in
-    the cell's file system whose name begins with "user".
- 
-    % vos backups user
- 
-    The following, appropriate in the Transarc Corporation cell,
-    creates  a Backup version of every volume on the file server
-    machine fs3.transarc.com.
- 
-    % vos backups -s fs3.transarc.com
- 
-    The following, appropriate in the Transarc Corporation cell,
-    creates  a  Backup  version  of  every volume on the /vicepc
-    partition of the file server machine fs5.transarc.com.
- 
-    % vos backups -s fs5.transarc.com -p c
- 
-    The following, appropriate in the Transarc Corporation cell,
-    creates  a Backup version of every volume on the file server
-    machine db1.transarc.com whose name begins with "sys".
- 
-    % vos backups sys db1.transarc.com
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos backup
--- 0 ----
Index: openafs/src/man/vos_create.1
diff -c openafs/src/man/vos_create.1:1.1 openafs/src/man/vos_create.1:removed
*** openafs/src/man/vos_create.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_create.1	Fri Apr 14 09:27:31 2006
***************
*** 1,115 ****
- vos create                 AFS Commands              vos create
- 
- 
- NAME
- 
-    vos   create -- create   (empty)   ReadWrite   volume   and
- 
-                        associated VLDB entry.
- 
- 
-    vos create  -server <machine name>  -partition <partition
-    name>       -name <volume name>  [-cell <cell name>]
-    [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos c  -s <machine name>  -p <partition name>  -na <volume
-    name>
-    [-c <cell name>]  [-no]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Creates a ReadWrite volume, names it volume name and  places
-    it at the site specified by machine name and partition name.
-    The  volume  automatically  receives  a   volumeID   number,
-    recorded  in  both the VLDB and the volume header.  The VLDB
-    status flag for the ReadWrite site is set to valid.
- 
-    If this command succeeds, then the volume is  available  for
-    use, though it must be mounted in the file system before its
-    contents are accessible.  Use  the  fs  mkmount  command  to
-    mount a volume.
- 
-    This  command  creates  a  default  ACL  associated with the
-    volume's "root directory" (which  takes  the  same  name  as
-    volume's  mount  point  when  the  volume  is  mounted  with
-    fs mkmount).  The ACL grants  all  seven  access  rights  to
-    system:administrators.    The volume's space quota is set to
-    5000 kilobyte blocks by default.
- 
-    The Volume Location Server also pre-allocates,  and  records
-    in  the  VLDB,  volumeID numbers for the ReadOnly and Backup
-    versions that may be created later.  It  does  not  actually
-    create  those  types  of  volumes  or  place  anything  at a
-    ReadOnly or Backup site, so the status  flags  for  ReadOnly
-    and Backup are set to invalid.
- 
- WARNING
- 
-    No more that 3500 volumes should reside on one partition.  A
-    greater  number  can  cause  the  AFS  Salvager  process  to
-    malfunction.    It  is  the issuer's responsibility to check
-    that issuing this command will not cause  the  limit  to  be
-    exceeded.    The  vos listvol  command reports the number of
-    volumes on a partition.
- 
- 
- 
- ARGUMENTS
- 
-    -server         names the file server machine  on  which  to
-                    create    the    new    ReadWrite    volume.
-                    Abbreviated forms of machine  names  may  be
-                    allowed  depending  on  the  naming  service
-                    available at the time the command is issued;
-                    see  page xii in the introductory About This
-                    Manual chapter.  -partition
-                    names  the  particular  partition  where the
-                    ReadWrite volume is to reside.  In  addition
-                    to  the  full  /vicepx  form  of a partition
-                    name, three shorter  forms  are  acceptable;
-                    see  page xii in the introductory About This
-                    Manual chapter.  -name
-                    specifies  a  name for the ReadWrite volume,
-                    preferably descriptive of its contents.   It
-                    may be no longer than 22 characters, but may
-                    contain  upper-   and   lowercase   letters,
-                    numbers  and  punctuation.    By convention,
-                    periods separate the fields in a name.    Do
-                    not  use  the extension .backup or .readonly
-                    on ReadWrite volume names; the Volume Server
-                    automatically  adds  these  extensions  when
-                    creating those volume types.
- 
-    -cell           specifies the  cell  in  which  to  run  the
-                    command.    See section 8.3 in the Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to assign  the  identity  anonymous  to  the
-                    issuer.    See  section 8.3 in the Reference
-                    Manual for more details.  -localauth
-                    constructs  a server ticket using a key from
-                    /usr/afs/etc/KeyFile.  See  section  8.3  in
-                    the   Reference  Manual  for  more  details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to report on what they  are  doing  as  they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  8.3 in the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The following creates the ReadWrite volume user.pat  on  the
-    /vicepf partition of fs4.transarc.com.
- 
-    % vos c fs4.transarc.com /vicepf user.pat
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
--- 0 ----
Index: openafs/src/man/vos_delentry.1
diff -c openafs/src/man/vos_delentry.1:1.1 openafs/src/man/vos_delentry.1:removed
*** openafs/src/man/vos_delentry.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_delentry.1	Fri Apr 14 09:27:31 2006
***************
*** 1,159 ****
- vos delentry               AFS Commands            vos delentry
- 
- 
- NAME
- 
-    vos delentry -- remove specified entry from VLDB.
- 
- 
-    vos delentry  -id <volume name or ID>
-    [-prefix <prefix of volume whose VLDB entry is to be
-    deleted>]
-    [-server <machine name>]  [-partition <partition name>]
-    [-cell <cell name>]  [-noauth]  [-localauth]  [-verbose]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos de  -i <volume name or ID>
-    [-pr <prefix of volume whose VLDB entry is to be deleted>]
-          [-s <machine name>]  [-pa <partition name>]  [-c <cell
-    name>]
-    [-n]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Removes  the VLDB entry for the indicated volume(s) from the
-    VLDB.  Each volume may be any of the three types (ReadWrite,
-    ReadOnly  or  Backup),  but  the  entire entry is removed no
-    matter which type is provided.  The command has no effect on
-    the actual volumes on file server machines, if they exist.
- 
-    This  command  is  useful  if  the  system  administrator is
-    certain that a volume removal was not recorded in  the  VLDB
-    (perhaps the vos zap command was used), and does not want to
-    take the  time  to  use  vos syncserv  and  vos syncvldb  to
-    synchronize an entire file server machine.
- 
-    By  using  the -id argument alone, or combining the -prefix,
-    -server and -partition arguments in different  ways,  it  is
-    possible  to  remove  the  VLDB entry for varying numbers of
-    volumes.  To remove the VLDB entry for:
- 
-       - a single volume,  provide  its  complete  name  or
-         volumeID number as -id.
- 
-       - every  volume  whose  name  begins  with a certain
-         character string (for  example,  sys.  or  user.),
-         regardless of site, use -prefix.
- 
-       - every  volume listed as residing on a certain file
-         server machine, specify the file server name  with
-         -server.
- 
-       - every  volume listed as residing on a partition of
-         the same name (for instance,  on  /vicepa  on  any
-         file  server  machine), specify the partition name
-         with -partition.
- 
-       - every volume on a  certain  partition  of  a  file
-         server   machine,   specify   both   -server   and
-         -partition.
- 
-       - every volume with a certain prefix that resides on
-         a   file   server  machine,  combine  -prefix  and
- 
- 
- 
-         -server.    The  -prefix  argument  may  also   be
-         combined  with  -partition,  or  both  -server and
-         -partition, in this way.
- 
- WARNING
- 
-    This command should not be  used  as  the  standard  way  to
-    remove a volume, as it is likely to put the VLDB out of sync
-    with the volumes on servers.  Use vos remove instead.
- 
- ARGUMENTS
- 
-    -id             specifies  either  the  complete   name   or
-                    volumeID  number of the volume, which may be
-                    ReadWrite, ReadOnly or Backup.   The  entire
-                    entry  is  removed,  no matter which type is
-                    provided.  Provide  this  argument  OR  some
-                    combination    of   -prefix,   -server   and
-                    -partition.
- 
-    -prefix         specifies a character string of any  length.
-                    Every  VLDB  listing  a  volume  whose  name
-                    begins  with  this  exact  string  will   be
-                    removed (subject to modulations from -server
-                    and -partition).  Include  field  separators
-                    (such  as  periods)  if  appropriate.   This
-                    argument may be combined with -server and/or
-                    -partition.
- 
-    -server         names  a  file  server machine.  If the VLDB
-                    entry mentions this file server  machine  as
-                    the  site  for  a  volume, the entry will be
-                    removed.  Abbreviated forms of machine names
-                    may  be  allowed  depending  on  the  naming
-                    service available at the time the command is
-                    issued;  see  page  xii  in the introductory
-                    About This Manual chapter.    This  argument
-                    may   be   combined   with   -prefix  and/or
-                    -partition.
- 
-    -partition      names  a  partition.    If  the  VLDB  entry
-                    mentions  this  partition  as the site for a
-                    volume, the  entry  will  be  removed.    In
-                    addition  to  the  full  /vicepx  form  of a
-                    partition  name,  three  shorter  forms  are
-                    acceptable; see page xii in the introductory
-                    About This Manual chapter.    This  argument
-                    may be combined with -prefix and/or -server.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
- 
- 
- 
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLES
- 
-    The   following  removes  the  VLDB  entry  for  the  volume
-    user.temp.
- 
-    % vos del user.temp
- 
-    The following removes all VLDB entries that describe volumes
-    stored on fs3.transarc.com whose names begin with the string
-    "test".
- 
-    % vos del -pr test -s fs3.transarc.com
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos remove vos remsite vos syncserv vos syncvldb vos zap
--- 0 ----
Index: openafs/src/man/vos_dump.1
diff -c openafs/src/man/vos_dump.1:1.1 openafs/src/man/vos_dump.1:removed
*** openafs/src/man/vos_dump.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_dump.1	Fri Apr 14 09:27:31 2006
***************
*** 1,126 ****
- vos dump                   AFS Commands                vos dump
- 
- 
- NAME
- 
-    vos dump -- convert volume into ASCII format and place in a
- 
-                        file.
- 
- 
-    vos dump  -id <volume name or ID>  -time <dump from time>
-    [-file <dump file>]  [-cell <cell name>]  [-noauth]
-    [-localauth]
-    [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos du  -i <volume name or ID>  -t <dump from time>  [-f
-    <dump file>]
-    [-c <cell name>]  [-n]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Converts the contents of the indicated volume, which may  be
-    of  any  type,  into ASCII format.  If the -file argument is
-    provided, the converted volume contents are  placed  in  it.
-    If  the  argument is not provided, the contents are directed
-    to standard output (stdout), from which the issuer may  pipe
-    them elsewhere if desired.
- 
-    It  is  possible  to  dump either the entire volume, or only
-    those files in it  modified  since  a  specified  time  (the
-    latter   is   referred  to  as  a  "incremental"  dump),  by
-    specifying the proper value for -time.
- 
-    Dumping does not affect any status  or  site  flags  in  the
-    volume  header  or  VLDB.  It does, however, make the volume
-    inaccessible during the duration of the dump.
- 
- ARGUMENTS
- 
-    -id             specifies  either  the  complete   name   or
-                    volumeID  number of the volume, which may be
-                    ReadWrite, ReadOnly or Backup.
- 
-    -time           determines  whether  the  dump  is  full  or
-                    incremental,  and  in  the latter case, from
-                    what date the dump is done.  There are three
-                    types of legal values:
- 
-                  - 0 creates a full dump.
- 
-                  - mm/dd/yy  specifies  12:00  a.m. on the
-                    indicated  date  (month/day/year)   and
-                    creates  an  incremental dump including
-                    only elements  with  modification  time
-                    stamps  later than this date.  Examples
-                    : 1/23/90, 10/7/89.
- 
-                  - "mm/dd/yy  hh:mm"  specifies   a   time
-                    "hour:minutes"  on  the  indicated date
-                    (month/day/year)   and    creates    an
-                    incremental    dump    including   only
-                    elements with modification time  stamps
- 
- 
- 
-                    later  than this time.  The time should
-                    be  in  24-hour  format  (for  example,
-                    20:30  is  8:30  p.m.)    Surround  the
-                    entire instance with quotes because  it
-                    contains  a space.  Examples : "1/23/90
-                    22:30", "10/7/89 3:45".
- 
-    -file           directs the dump into  the  indicated  file,
-                    which  is  created  in  the  current working
-                    directory if no full or relative pathname is
-                    provided.    If  the issuer does not provide
-                    this  argument,  the  dump  is  directed  to
-                    standard output (stdout).
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  trace  their  execution  of the command.
-                    See section 8.3 in the Reference Manual  for
-                    more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLES
- 
-    The  following executes a full dump of the volume user.terry
-    into the file  /afs/transarc.com/common/dumps/terry.dump  in
-    the current working directory.
- 
-    % vos dump user.terry 0 terry.dump
- 
-    The  following  executes  an  incremental dump of the volume
-    user.smith into the file smith.900131.dump  in  the  current
-    working  directory.    Only  those  files in the volume with
-    modification time stamps later than 6:00 p.m. on 31 February
-    1990 are included in the dump.
- 
-    % vos dump user.smith "1/31/90 18:00" smith.090131.dump
- 
- PRIVILEGE REQUIRED
- 
-    Issuer  must  be listed in /usr/afs/etc/UserList on -server,
-    and must have WRITE access in the directory where  the  dump
-    file is to reside.
- 
- MORE INFORMATION
- 
-    vos restore
--- 0 ----
Index: openafs/src/man/vos_examine.1
diff -c openafs/src/man/vos_examine.1:1.1 openafs/src/man/vos_examine.1:removed
*** openafs/src/man/vos_examine.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_examine.1	Fri Apr 14 09:27:31 2006
***************
*** 1,177 ****
- vos examine                AFS Commands             vos examine
- 
- 
- NAME
- 
-    vos examine -- show information from volume header and VLDB
- 
-                        about one volume.
- 
- 
-    vos examine  -id <volume name or ID>  [-cell <cell name>]
-    [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos e  -i <volume name or ID>  [-c <cell name>]  [-n]  [-l]
-    [-v]  [-h]
- 
-    vos volinfo -i <volume name or ID>  [-c <cell name>]  [-n]
-    [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Formats and displays information from both  the  VLDB  entry
-    and the volume header for the indicated volume, which may be
-    of any of the three types.
- 
- ARGUMENTS
- 
-    -id             specifies  either  the  complete   name   or
-                    volumeID  number of the volume, which may be
-                    ReadWrite, ReadOnly or Backup.
- 
-    -cell           specifies the  cell  in  which  to  run  the
-                    command.    See section 8.3 in the Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to assign  the  identity  anonymous  to  the
-                    issuer.    See  section 8.3 in the Reference
-                    Manual for more details.  -localauth
-                    constructs  a server ticket using a key from
-                    /usr/afs/etc/KeyFile.  See  section  8.3  in
-                    the   Reference  Manual  for  more  details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to report on what they  are  doing  as  they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  8.3 in the
-                    Reference Manual for more details.
- 
- OUTPUT
- 
-    The first seven lines of the output  show  information  from
-    the  volume  header,  and  the remaining lines come from the
-    VLDB.  Sections 8.1 in the Reference  Manual  and  VOSHEADER
-    provide  more  complete  explanations  of  these fields than
-    appear here.
- 
-    The first line of the  output  shows  information  from  the
-    volume header, in this order:
- 
- 
- 
-       - the volume's name.
- 
-       - its volumeID.
- 
-       - its  type  (RW  for ReadWrite, RO for ReadOnly, BK
-         for Backup).
- 
-       - its size in kilobytes (so 1000 means a megabyte).
- 
-       - its status at the server.  The possible values are
-         On-line,  Off-line and needs salvage, the meanings
-         of which  section  8.2  in  the  Reference  Manual
-         explains  in  full.    In short, On-line indicates
-         that the volume is accessible, whereas  the  other
-         two indicate a possible problem with the volume.
- 
-    The second line shows the volume's site (file server machine
-    and partition).
- 
-    The  third  line  shows  the   Parent   (ReadWrite),   Clone
-    (ReleaseClone  or  Backup)  and Backup volume IDs associated
-    with this volume.  One should match the volumeID number that
-    appears on the first line.
- 
-    The  fourth  line  shows the quota allotted to the ReadWrite
-    copy of the volume, expressed in kilobyte blocks.
- 
-    The fifth line shows the creation date of this volume.    If
-    the   volume  has  been  restored  with  backup diskrestore,
-    backup  volrestore or vos restore, this is the restore time.
- 
-    The sixth line shows the update date when  the  contents  of
-    this  volume last changed.  For ReadOnly and Backup volumes,
-    this should match the creation date.
- 
-    The seventh line reports how many times the volume has  been
-    accessed since the later of
- 
-       - 12:00 a.m. on the day the command is issued
- 
-       - the last time the volume changed location
- 
-    An  access  is  defined as a fetch or store operation on any
-    file system object stored in the volume.
- 
-    Following a blank line,  information  from  the  VLDB  entry
-    appears:
- 
-    If  the  VLDB  entry  is  locked, a LOCKED indicator appears
-    alone on a line at the top of this part of the output.
- 
-    The volumeID numbers allocated to the  ReadWrite,  ReadOnly,
-    Backup  versions of the volume, and the ReleaseClone version
-    if it exists.  The first three types are also marked with  a
-    status  flag  of  either  valid  or invalid.  The valid flag
-    indicates that at least one copy  of  that  version  of  the
-    volume  exists  at  an  actual site.  If the ReleaseClone ID
-    appears here, then one or  more  OLD  or  NEW  flags  should
-    appear on the site definition lines below.
- 
-    The  next  line  indicates  the  number  of  separate  sites
- 
- 
- 
-    (partition/file server machine pairs)  where  copies  exist.
-    It  should  match the number of sites shown on the following
-    line(s).
- 
-    Each of the remaining lines show where  the  ReadWrite  copy
-    (and  by  implication, Backup) and each ReadOnly copy of the
-    volume resides, specified by machine  name,  partition  name
-    and  type  (RW  or RO).  The presence of NEW or OLD flags on
-    these lines indicates a failed release; they  should  appear
-    only if the ReleaseClone ID also appears above.
- 
- EXAMPLE
- 
-    The  following shows the output for the Transarc Corporation
-    cell's volume called usr with two ReadOnly replication sites
-    (this  volume is mounted at /afs/transarc.com/usr).  For the
-    sake of illustration, the output shows the volume as locked.
-    If it weren't, the LOCKED line would simply be missing.
- 
-        % vos examine usr
-        usr             536870981 RW   3459 K On-line
-             fs2.transarc.com /vicepb
-             Parent 5360870981   Clone 536870982   Backup 536870
-             MaxQuota      40000 K
-             Creation    Mon Jun 12 15:22:06 1989
-             Last Update Fri Jun 16 09:34:35 1989
-             5719 accesses in the past day
- 
-                LOCKED
-                readWriteID  536870981  valid
-                readOnlyID   536870982  valid
-                backUpID     536870983  invalid
-            number of sites -> 3
-            server fs1.transarc.com partition /vicepa RO Site
-            server fs3.transarc.com partition /vicepa RO Site
-            server fs2.transarc.com partition /vicepb RW Site
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    vos diskrestore               vos listvol                   
- 
-    vos listvldb   vos restore
--- 0 ----
Index: openafs/src/man/vos_help.1
diff -c openafs/src/man/vos_help.1:1.1 openafs/src/man/vos_help.1:removed
*** openafs/src/man/vos_help.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_help.1	Fri Apr 14 09:27:31 2006
***************
*** 1,77 ****
- vos help                   AFS Commands                vos help
- 
- 
- NAME
- 
-    vos help -- show syntax of specified vos command(s) or list
- 
-                        functional description for all of them.
- 
- 
-                                   +
-    vos help  [-topic <help string> ]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-                            +
-    vos h  [-t <help string> ]  [-h]
- 
- DESCRIPTION
- 
-    Displays the first line  (name  and  short  description)  of
-    every  vos  command's  help  entry,  if  no  help  string is
-    provided.  For each operation code specified with -topic, it
-    outputs  the  entire  help  entry.    See the Output section
-    below.
- 
- ARGUMENTS
- 
-    -topic          specifies the operation  code(s)  for  which
-                    syntax is to be provided.  If it is omitted,
-                    the  output   instead   provides   a   short
-                    description of all vos commands.
- 
-    -help           prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  8.3 in the
-                    Reference Manual for more details.
- 
- OUTPUT
- 
-    The online help entry for each vos command consists  of  two
-    or three lines:
- 
-       - The  first  line  names  the  command  and briefly
-         describes what it does.
- 
-       - If the command has aliases, they  will  appear  on
-         the next line.
- 
-       - The  final line, which begins with "Usage:", lists
-         the  command's  arguments   and   flags   in   the
-         prescribed  order.    Online  help entries use the
-         same  symbols  (brackets,  etc.)  as  the  command
-         definitions in this manual.  For an explanation of
-         their meaning, see  page  v  of  the  introductory
-         About This Manual chapter.
- 
- 
- 
- EXAMPLE
- 
-    The  following  displays  the  online  help  entry  for  the
-    vos create command.
- 
-        %vos help create
-        vos create: create a new volume
-        Usage: vos create -server <machine name> -partition
-        <partition name> -name <volume name> [-cell <cell name>]
-        [-noauth] [-localauth] [-verbose] [-help]
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    vos apropos
--- 0 ----
Index: openafs/src/man/vos_listpart.1
diff -c openafs/src/man/vos_listpart.1:1.1 openafs/src/man/vos_listpart.1:removed
*** openafs/src/man/vos_listpart.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_listpart.1	Fri Apr 14 09:27:31 2006
***************
*** 1,83 ****
- vos listpart               AFS Commands            vos listpart
- 
- 
- NAME
- 
-    vos  listpart -- show  all AFS partitions on specified file
- 
-                        server machine.
- 
- 
-    vos listpart  -server <machine name>  [-cell <cell name>]
-    [-noauth]    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos listp  -s <machine name>  [-c <cell name>]  [-n]  [-l]
-    [-v]  [-h]
- 
- DESCRIPTION
- 
-    Lists all of the valid AFS partitions on the indicated  file
-    server machine, without consulting the VLDB.
- 
- ARGUMENTS
- 
-    -server         names  the  file server machine for which to
-                    list the partitions.  Abbreviated  forms  of
-                    machine  names  may  be allowed depending on
-                    the naming service available at the time the
-                    command  is  issued;  see  page  xii  in the
-                    introductory  About  This  Manual   chapter.
-                    -cell
-                    specifies the  cell  in  which  to  run  the
-                    command.    See section 8.3 in the Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to assign  the  identity  anonymous  to  the
-                    issuer.    See  section 8.3 in the Reference
-                    Manual for more details.  -localauth
-                    constructs  a server ticket using a key from
-                    /usr/afs/etc/KeyFile.  See  section  8.3  in
-                    the   Reference  Manual  for  more  details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to report on what they  are  doing  as  they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  8.3 in the
-                    Reference Manual for more details.
- 
- OUTPUT
- 
-    The output consists of a list of partition names of the form
-    /vicepx, following the header:
- 
-    The partitions on the server are:
- 
-    The  last  line  of  the  output reports the total number of
-    partitions.
- 
- 
- 
- EXAMPLE
- 
-    The following lists the partitions on fs1.transarc.com.
- 
-        % vos listpart fs1.transarc.com
-        The partitions on the server are:
-            /vicepa
-            /vicepb
-            /vicepc
-            /vicepd
-        Total -> 4
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    vos partinfo
--- 0 ----
Index: openafs/src/man/vos_listvldb.1
diff -c openafs/src/man/vos_listvldb.1:1.1 openafs/src/man/vos_listvldb.1:removed
*** openafs/src/man/vos_listvldb.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_listvldb.1	Fri Apr 14 09:27:31 2006
***************
*** 1,207 ****
- vos listvldb               AFS Commands            vos listvldb
- 
- 
- NAME
- 
-    vos listvldb -- show information from the VLDB.
- 
- 
-    vos listvldb  [-name <volume name or ID>]  [-server <machine
-    name>]       [-partition <partition name>]  [-locked]
-    [-quiet]
-    [-cell <cell name>]  [-noauth]  [-localauth]  [-verbose]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos listvl  [-na <volume name or ID>]  [-s <machine name>]
-              [-p <partition name>]  [-lock]  [-q]  [-c <cell
-    name>]  [-no]  [-loca]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Formats and displays information from the VLDB entry for the
-    volume(s) indicated by  the  combination  of  the  arguments
-    provided.    The  possibilities are listed here from most to
-    least inclusive
- 
-    To display:
- 
-       - every entry in the  VLDB,  provide  no  arguments.
-         This  can  take a very long time, depending on the
-         number of entries.
- 
-       - every VLDB entry  that  mentions  a  certain  file
-         server  machine  as  the  site  of  a ReadWrite or
-         ReadOnly  version  of  a   volume,   specify   the
-         machine's name with -server.
- 
-       - every VLDB entry that mentions a certain partition
-         on any file  server  machine  as  the  site  of  a
-         ReadWrite or ReadOnly version of a volume, specify
-         the partition name with -partition.
- 
-       - every VLDB entry that mentions a certain partition
-         on  a certain file server machine as the site of a
-         ReadWrite or ReadOnly version of a volume, combine
-         -server and -partition.
- 
-       - a  single  VLDB entry, specify a volume name or ID
-         number with -name.
- 
-       - the VLDB entry only for the  volumes  with  locked
-         VLDB  entries found at a certain site, combine the
-         -locked flag with any  of  arguments  that  define
-         sites.
- 
- ARGUMENTS
- 
-    -name           specifies   either   the  complete  name  or
-                    volumeID number of a volume of  any  of  the
-                    three types.
- 
-    -server         names  a  file  server machine.  Abbreviated
-                    forms  of  machine  names  may  be   allowed
- 
- 
- 
-                    depending on the naming service available at
-                    the time the command is issued; see page xii
-                    in   the   introductory  About  This  Manual
-                    chapter.  This argument may be combined with
-                    -partition.
- 
-    -partition      names  a partition.  In addition to the full
-                    /vicepx form  of  a  partition  name,  three
-                    shorter  forms  are acceptable; see page xii
-                    in  the  introductory  About   This   Manual
-                    chapter.  This argument may be combined with
-                    -server.
- 
-    -locked         indicates that the  output  will  show  only
-                    locked  VLDB entries.  May be used alone, or
-                    combined with one or more of -name,  -server
-                    or -partition.
- 
-    -quiet          suppresses  the  lines  that  appear  at the
-                    beginning  and  end  of  the  output,  which
-                    specify the machine/partition the listing is
-                    for,  and  the  total  number   of   entries
-                    reported.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- OUTPUT
- 
-    The  first  line  specifies the machine and/or partition for
-    which output is given.  If the -quiet flag  is  added,  this
-    line does not appear.
- 
-    The  VLDB  entry  for  each  volume  includes  the following
-    information:
- 
-       - If the VLDB entry is locked,  a  LOCKED  indicator
-         appears alone on a line at the top of the output.
- 
-       - The normal first line displays the volume's name.
- 
-       - Next   appear   the   volumeID   numbers  for  the
-         ReadWrite, ReadOnly, Backup copies of the  volume,
-         and  for  the ReleaseClone copy if it exists.  The
- 
- 
- 
-         first three types are also marked  with  a  status
-         flag  of  either valid or invalid.  The valid flag
-         indicates that at least one copy of  that  version
-         of  the  volume  exists at an actual site.  If the
-         ReleaseClone ID appears here, then one or more OLD
-         or  NEW flags should appear on the site definition
-         lines below.
- 
-       - The next-to-last  line  indicates  the  number  of
-         separate   sites  (partition/file  server  machine
-         pairs) where copies exist.  It  should  match  the
-         number of sites shown on the following line(s).
- 
-       - Each   of  the  remaining  lines  show  where  the
-         ReadWrite copy (and by  implication,  Backup)  and
-         each   ReadOnly   copy   of  the  volume  resides,
-         specified by file server machine  name,  partition
-         name  and type (RW or RO).  The presence of NEW or
-         OLD  flags  on  these  lines  indicates  a  failed
-         release;   they   should   appear   only   if  the
-         ReleaseClone ID also appears above.
- 
-    If the output includes more than one VLDB  entry,  the  very
-    last  line  of  the output shows the total number of entries
-    reported.  This line does not appear if the -quiet  flag  is
-    used.
- 
- EXAMPLE(S)
- 
-    The   following   displays  VLDB  information  the  Transarc
-    Corporation volume called usr, which has with  two  ReadOnly
-    replication sites:
- 
-        % vos listvldb usr
-        usr
-                readWriteID  536870981  valid
-                readOnlyID   536870982  valid
-                backUpID     536870983  invalid
-            number of sites -> 3
-            server fs1.transarc.com partition /vicepa RO Site
-            server fs3.transarc.com partition /vicepa RO Site
-            server fs2.transarc.com partition /vicepb RW Site
- 
-    The  following  shows  entries  for  two of the volumes that
-    reside on fs4.transarc.com.  The VLDB entry for the first is
-    currently locked.
- 
-        % vos listvldb -s fs4.transarc.com
-            .       .           .        .
-            .       .           .        .
-                LOCKED
-        user.smith
-                readWriteID  278541326  valid
-                readOnlyID   278541327  invalid
-                backUpID     278542328  valid
-            number of sites -> 1
-            server fs4.transarc.com partition /vicepg RW Site
- 
- 
- 
-        user.terry
-                readWriteID  354287190  valid
-                readOnlyID   354287191  invalid
-                backUpID     354287192  valid
-            number of sites -> 1
-            server fs4.transarc.com partition /vicepc RW Site
-            .       .           .        .
-            .       .           .        .
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    vos examine vos listvol vos lock vos unlock vos unlockvldb
--- 0 ----
Index: openafs/src/man/vos_listvol.1
diff -c openafs/src/man/vos_listvol.1:1.1 openafs/src/man/vos_listvol.1:removed
*** openafs/src/man/vos_listvol.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_listvol.1	Fri Apr 14 09:27:31 2006
***************
*** 1,225 ****
- vos listvol                AFS Commands             vos listvol
- 
- 
- NAME
- 
-    vos listvol -- show information from volume header(s).
- 
- 
-    vos listvol  -server <machine name>  [-partition <partition
-    name>]  [-fast]
-    [-long]  [-quiet]  [-cell <cell name>]  [-noauth]
-    [-localauth]
-    [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos listvo  -s <machine name>  [-p <partition name>]  [-f]
-    [-lon]  [-q]
-    [-c <cell name>]  [-n]  [-loc]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Formats  and  displays information from the volume header of
-    the indicated volumes: the volume's name,  volumeID  number,
-    type, size and status at the server.
- 
-    To display volume header information for:
- 
-       - every volume on a file server machine, specify the
-         machine's name with -server.
- 
-       - every volume at a  particular  site,  provide  the
-         file  server  machine  name  with  -server and the
-         partition with -partition.
- 
- ARGUMENTS
- 
-    -server         names a file server  machine.    Abbreviated
-                    forms   of  machine  names  may  be  allowed
-                    depending on the naming service available at
-                    the time the command is issued; see page xii
-                    in  the  introductory  About   This   Manual
-                    chapter.  This argument may be combined with
-                    -partition.
- 
-    -partition      names a partition.  In addition to the  full
-                    /vicepx  form  of  a  partition  name, three
-                    shorter forms are acceptable; see  page  xii
-                    in   the   introductory  About  This  Manual
-                    chapter.    The  -server  argument  must  be
-                    provided along with this argument.
- 
-    -fast           indicates  that  the  output  should display
-                    only the volumeID numbers of all volumes  at
-                    the indicated location.
- 
-    -long           indicates that the output should include the
-                    IDs  of  all  volumes  associated  with  the
-                    volume,   the   ReadWrite   volume's  quota,
-                    creation date and  update  date.    See  the
-                    Output section below.
- 
-    -quiet          suppresses  the  lines  that  appear  at the
-                    beginning and end of the output, which total
- 
- 
- 
-                    the number of volumes listed.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- OUTPUT
- 
-    By  default,  the  output  puts  the volumes in alphabetical
-    order by name and lists for each volume:
- 
-       - the volume name.
- 
-       - the volumeID number.
- 
-       - the type (possible values: RW  for  ReadWrite,  RO
-         for ReadOnly and BK for Backup).
- 
-       - the current size in Kbytes.
- 
-       - the status at the server.  The possible values are
-         On-line,  Off-line  and  needs salvage.    On-line
-         indicates  that  the volume is accessible, whereas
-         the other two indicate a possible problem with the
-         volume.    See section 8.2 in the Reference Manual
-         for further details.
- 
-    The first line of the output tells how many  volumes  appear
-    in  the  listing,  and  the  last line how many of those are
-    on-line, off-line and busy.  These lines do  not  appear  if
-    the -quiet flag is used.
- 
-    If the -fast flag is added, the output lists only the volume
-    ID number of each volume, arranged in  increasing  numerical
-    order, and omits the last line.
- 
-    If  the  -long flag is added, the output includes all of the
-    information in the default listing and  adds  the  following
-    for each volume.
- 
-       - the site (file server machine and partition)
- 
-       - the  Parent  (ReadWrite),  Clone  (ReleaseClone or
-         Backup) and Backup volume IDs associated with  the
-         volume.    One  should  match the regular volumeID
- 
- 
- 
-         number.  See section 8.2 in the  Reference  Manual
-         for  a  more  complete  explanation.   the maximum
-         quota  allotted  to  the  ReadWrite  copy  of  the
-         volume, in kilobytes
- 
-       - the  creation  date.    If  the  volume  has  been
-         restored         with          backup diskrestore,
-         backup volrestore  or  vos   restore,  this is the
-         restore time.
- 
-       - the update date, when the contents of this  volume
-         last  changed.    For ReadOnly and Backup volumes,
-         this should match the creation date.
- 
-       - the number of times the volume has  been  accessed
-         since the later of
- 
-            * 12:00 a.m. on the day the command is issued
- 
-            * the last time the volume changed location
- 
-         An access is defined as a fetch or store operation
-         on any file system object stored in the volume.
- 
- EXAMPLES
- 
-    The following shows selected parts of  the  default  listing
-    for the /vicepb partition on fs2.transarc.com.
- 
-        % vos listvol fs2.transarc.com b
-        Total number of volumes on server fs2.transarc.com
-                                      \ partition /vicepb :
-        sys                   1969534847 RW       1582 K On-
-        sys.backup            1969535105 BK       1582 K On-
-              .                    .     .         .   .
-              .                    .     .         .   .
-        user.pat              1969534536 RW      17518 K On-
-        user.pat.backup       1969534538 BK      17537 K On-
-        Total volumes onLine 66 ; Total volumes offLine 0 ;
-                                                   Total bus
- 
-    The following shows the output when the -fast flag is added.
- 
-        % vos listvol fs2.transarc.com b -fast
-        Total number of volumes on server fs2.transarc.com
-                                        partition /vicepb :
-         1969516782
-         1969516784
-             .
-             .
-         1969535796
-        Total volumes onLine 66 ; Total volumes offLine 0 ;
-                                                   Total bus
- 
- 
- 
-    The following shows two volumes from the output that appears
-    when the -long flag is added.
- 
-        % vos listvol fs2.transarc.com b -long
-        Total number of volumes on server fs2.transarc.com
-                                      \ partition /vicepb :
-              .                   .      .         .   .
-              .                   .      .         .   .
-        user.pat              1969534536 RW      17518 K On-
-             fs2.transarc.com /vicepb
-             Parent 1969534536 Clone 0          Backup 19695
-             MaxQuota      20000 K
-             Creation    Mon Jun 12 09:02:25 1989
-             Last Update Thu Jan  4 17:39:34 1990
-             1573 accesses in the past day
-        user.pat.backup       1969534538 BK      17537 K On-
-             fs2.transarc.com /vicepb
-             Parent 1969534536 Clone 0          Backup 19695
-             MaxQuota      20000 K
-             Creation    Fri Jan  5 06:37:59 1990
-             Last Update Fri Jan  5 06:37:59 1990
-             0 accesses in the past day
-               .                   .      .         .   .
-               .                   .      .         .   .
-        Total volumes onLine 66 ; Total volumes offLine 0 ;
-                                                   Total bus
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    backup diskrestore
- 
-    backup volrestore
- 
-    vos examine vos listvldb vos restore
--- 0 ----
Index: openafs/src/man/vos_lock.1
diff -c openafs/src/man/vos_lock.1:1.1 openafs/src/man/vos_lock.1:removed
*** openafs/src/man/vos_lock.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_lock.1	Fri Apr 14 09:27:31 2006
***************
*** 1,74 ****
- vos lock                   AFS Commands                vos lock
- 
- 
- NAME
- 
-    vos lock -- lock a volume entry in the VLDB.
- 
- 
-    vos lock  -id <volume name or ID>  [-cell <cell name>]
-    [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos lo  -i <volume name or ID>  [-c <cell name>]  [-n]  [-l]
-    [-v]  [-h]
- 
- DESCRIPTION
- 
-    Locks  the VLDB entry for the indicated volume, such that no
-    one else can execute an operation that requires  writing  in
-    that  entry.  Note that this blocks operations on all of the
-    volume  associated  with  that  entry,  not  just  the   one
-    specified as -id.
- 
- WARNING
- 
-    This command should not be used in normal circumstances.  It
-    is useful if the system administrator  wishes  to  guarantee
-    that  no  one  else manipulates the volume until the lock is
-    released, and there is reason to believe that  locking  will
-    not happen automatically.
- 
- ARGUMENTS
- 
-    -id             specifies   either   the  complete  name  or
-                    volumeID number of a volume of  the  any  of
-                    the three types.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- 
- 
- EXAMPLE
- 
-    The following locks the VLDB entry for user.terry.
- 
-    % vos lo user.terry
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos unlock vos unlockvldb
--- 0 ----
Index: openafs/src/man/vos_move.1
diff -c openafs/src/man/vos_move.1:1.1 openafs/src/man/vos_move.1:removed
*** openafs/src/man/vos_move.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_move.1	Fri Apr 14 09:27:31 2006
***************
*** 1,125 ****
- vos move                   AFS Commands                vos move
- 
- 
- NAME
- 
-    vos move -- move volume to specified other site.
- 
- 
-    vos move  -id <volume name or ID>
-    -fromserver <machine name on source>
-    -frompartition <partition name on source>
-    -toserver <machine name on destination>
-    -topartition <partition name on destination>
-    [-cell <cell name>]  [-noauth]  [-verbose]  [-localauth]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos m  -i <volume name or ID>  -froms <machine name on
-    source>
-    -fromp <partition name on source>  -tos <machine name on
-    destination>
-    -top <partition name on destination>  [-c <cell name>]  [-n]
-    [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Moves  the  indicated ReadWrite volume from its current site
-    (specified  with  -fromserver  and  -frompartition)  to  the
-    destination    site    (specified    with    -toserver   and
-    -topartition).
- 
-    This command automatically removes the Backup copy from  the
-    current  site,  if it exists.  To create a new Backup at the
-    destination site, use vos backup.
- 
-    It is not possible actually to move  a  ReadOnly  or  Backup
-    volume.    For ReadOnly volumes, the corresponding action is
-    to  create  a  new  ReadOnly  site  (with  vos addsite   and
-    vos release)   and   then   remove  an  existing  one  (with
-    vos remove).  The only way to move a  Backup  volume  is  to
-    move its ReadWrite source and then issue vos backup.
- 
- WARNING
- 
-    No more that 3500 volumes should reside on one partition.  A
-    greater  number  can  cause  the  AFS  Salvager  process  to
-    malfunction.    It  is  the issuer's responsibility to check
-    that issuing this command will not cause  the  limit  to  be
-    exceeded.    The  vos listvol  command reports the number of
-    volumes on a partition.
- 
- ARGUMENTS
- 
-    -id             specifies  either  the  complete   name   or
-                    volumeID number of a ReadWrite volume.
- 
-    -fromserver     names  the  file  server  machine  where the
-                    volume currently resides.  Abbreviated forms
-                    of machine names may be allowed depending on
-                    the naming service available at the time the
-                    command  is  issued;  see  page  xii  in the
-                    introductory  About  This  Manual   chapter.
-                    -frompartition
- 
- 
- 
-                    names  the  partition   where   the   volume
-                    currently  resides.  In addition to the full
-                    /vicepx form  of  a  partition  name,  three
-                    shorter  forms  are acceptable; see page xii
-                    in  the  introductory  About   This   Manual
-                    chapter.
- 
-    -toserver       names  the  file server machine to which the
-                    volume should move.   Abbreviated  forms  of
-                    machine  names  may  be allowed depending on
-                    the naming service available at the time the
-                    command  is  issued;  see  page  xii  in the
-                    introductory  About  This  Manual   chapter.
-                    -topartition
-                    names the  partition  to  which  the  volume
-                    should  move.    In  addition  to  the  full
-                    /vicepx form  of  a  partition  name,  three
-                    shorter  forms  are acceptable; see page xii
-                    in  the  introductory  About   This   Manual
-                    chapter.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following  moves  the volume user.smith from /vicepb on
-    fs3.transarc.com to /vicepg on fs7.transarc.com.
- 
-    % vos move user.smith fs3.transarc.com b fs7.transarc.com g
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must  be  listed  in  /usr/afs/etc/UserList  on  both
-    -fromserver and -toserver.
- 
- MORE INFORMATION
- 
-    vos addsite    vos listvol    vos remove
- 
-    vos backup     vos release
--- 0 ----
Index: openafs/src/man/vos_partinfo.1
diff -c openafs/src/man/vos_partinfo.1:1.1 openafs/src/man/vos_partinfo.1:removed
*** openafs/src/man/vos_partinfo.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_partinfo.1	Fri Apr 14 09:27:31 2006
***************
*** 1,93 ****
- vos partinfo               AFS Commands            vos partinfo
- 
- 
- NAME
- 
-    vos partinfo -- show available and total space on specified
- 
-                        partition(s).
- 
- 
-    vos partinfo  -server <machine name>  [-partition <partition
-    name>]       [-cell <cell name>]  [-noauth]  [-localauth]
-    [-verbose]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos p  -s <machine name>  [-p <partition name>]  [-c <cell
-    name>]
-    [-n]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Lists the amount of space available and total size on either
-    all  of  the partitions on the indicated file server machine
-    (if -partition is omitted) or  the  specified  partition  on
-    that file server machine.  The VLDB is not consulted.
- 
- ARGUMENTS
- 
-    -server         names  the  file server machine for which to
-                    inspect the partitions.   Abbreviated  forms
-                    of machine names may be allowed depending on
-                    the naming service available at the time the
-                    command  is  issued;  see  page  xii  in the
-                    introductory  About  This  Manual   chapter.
-                    -partition
-                    names the particular partition  to  inspect.
-                    In  addition  to  the full /vicepx form of a
-                    partition  name,  three  shorter  forms  are
-                    acceptable; see page xii in the introductory
-                    About This Manual chapter.
- 
-    -cell           specifies the  cell  in  which  to  run  the
-                    command.    See section 8.3 in the Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to assign  the  identity  anonymous  to  the
-                    issuer.    See  section 8.3 in the Reference
-                    Manual for more details.  -localauth
-                    constructs  a server ticket using a key from
-                    /usr/afs/etc/KeyFile.  See  section  8.3  in
-                    the   Reference  Manual  for  more  details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to report on what they  are  doing  as  they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  8.3 in the
-                    Reference Manual for more details.
- 
- 
- 
- OUTPUT
- 
-    Note: The total partition size reported in this command  may
-    not agree with the same figure in the output of the standard
-    UNIX df command.  The df total size includes  some  reserved
-    space that does not show up in this report, and so is likely
-    to be about 10% larger.
- 
-    The output reports the amount of space available  and  total
-    space for each specified partition.
- 
- EXAMPLE
- 
-    The following lists all the partitions on fs2.transarc.com.
- 
-        % vos p fs2.transarc.com
-        Free space on partition /vicepa : 27301 K blocks out
-        Free space on partition /vicepb : 13646 K blocks out
-        Free space on partition /vicepc : 31798 K blocks out
-        Free space on partition /vicepd : 33302 K blocks out
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
- 
-    vos listpart
--- 0 ----
Index: openafs/src/man/vos_release.1
diff -c openafs/src/man/vos_release.1:1.1 openafs/src/man/vos_release.1:removed
*** openafs/src/man/vos_release.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_release.1	Fri Apr 14 09:27:31 2006
***************
*** 1,223 ****
- vos release                AFS Commands             vos release
- 
- 
- NAME
- 
-    vos release -- place ReadOnly versions of a ReadOnly volume
- 
-                        at  the  sites  indicated  in  the  VLDB
-                        entry.
- 
- 
-    vos release  -id <volume name or ID>  [-f]  [-cell <cell
-    name>]      [-noauth]  [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos rel  -i <volume name or ID>  [-f]  [-c <cell name>]
-    [-n]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Clones  the  indicated ReadWrite volume and places a copy of
-    the clone at each ReadOnly site indicated in the VLDB entry.
-    Each  copy  is  named  after  the ReadWrite source, with the
-    addition of a .readonly extension.  When at least  one  site
-    successfully receives its copy of the clone, the VLDB status
-    flag for ReadOnly is set to valid.
- 
-    The issuer must already  have  defined  the  ReadOnly  sites
-    using vos  addsite.
- 
-    The vos release command is no more difficult to use than any
-    other vos  command,  but  exactly  what  happens  internally
-    during   its   execution   is  somewhat  complicated.    The
-    complexity is necessary in order to ensure that  all  copies
-    of  the  volume's  ReadOnly version match both the ReadWrite
-    source and each other.  If all the ReadOnly copies  are  not
-    the  same,  then users might see different data depending on
-    which copy of the volume they  happen  to  access--obviously
-    not  a  satisfactory  situation.    To  make  sure  that all
-    ReadOnly copies match each other and the  ReadWrite  source,
-    releases  should  be  "all-or-nothing"--either  all ReadOnly
-    sites receive the new clone, or all sites keep the  ReadOnly
-    version they currently have.
- 
-    The  "all-or-nothing"  requirement has two main implications
-    that affect the issuer:
- 
-       - he or she needs to be  alert  for  error  messages
-         that  indicate  an  unsuccessful  release,  and/or
-         check  the  VLDB  entry  to  make   sure   certain
-         error-signalling flags are not present
- 
-       - he  or  she  needs to decide whether to use the -f
-         flag
- 
-    The   following   two   subsections   discuss   these    two
-    implications.
- 
-    Flags that indicate a failed release
- 
-    If  the vos release command fails before the ReadOnly volume
-    is in place at every defined site,  an  error  message  will
-    specify which sites did not receive the ReadOnly volume.  To
- 
- 
- 
-    give the issuer a backup method for determining if a release
-    has  completed  (and  for  its own internal use), the Volume
-    Server and VL Server set various flags while  executing  the
-    following  vos release steps.  The presence of some of these
-    flags after an apparent completion signals failure.    After
-    determining  the  cause  of  the  failure, the issuer should
-    attempt to eliminate the cause and then  continue  to  issue
-    the  vos release commands as many times as necessary to make
-    sure the release completes successfully.
- 
-    The steps during a release, and the flags set, are
- 
-       1. Before cloning begins, the  VL  Server  sets  the
-          site flag for the present ReadOnly entries in the
-          VLDB to OLD.
- 
-       2. The  VL  Server  sets  the  site  flag  for   the
-          ReadWrite source to NEW.
- 
-       3. The Volume Server clones the ReadWrite source, if
-          required.   It  assigns  the  clone  a  temporary
-          volumeID  number  and  the  VL  Server  puts that
-          number in the releaseClone field in the  source's
-          VLDB  entry.  (The discussion below on the use of
-          the -f flag  describes  when  the  Volume  Server
-          should  make  a  new  clone,  and how it uses the
-          releaseClone  ID  in  case  a  release   is   not
-          completely successful.)
- 
-       4. The  Volume  Server  distributes  a  copy  of the
-          ReleaseClone to  each  ReadOnly  site  previously
-          defined  in the VLDB (using vos addsite).  The VL
-          Server changes the site flag  for  each  ReadOnly
-          site  from  OLD  to  NEW  as  soon  as  the  site
-          successfully receives the new clone.
- 
-       5. When all the  ReadOnly  copies  are  successfully
-          released,  the  VL Server clears all the NEW site
-          flags, leaving that part of the site  flag  field
-          empty.    Because  it  is  no  longer needed, the
-          Volume Server deletes the ReleaseClone  from  the
-          system and its ID from the VLDB.
- 
-    The  presence of NEW and/or OLD site flags in the VLDB after
-    the "completion" of a release  indicates  that  it  was  not
-    successful.    As  mentioned  above, an unsuccessful release
-    unfortunately makes it possible that  Cache  Managers  could
-    see  different versions of a volume, depending on which File
-    Server they contact.  In practice, this is likely to  happen
-    only  if they flush their caches in order to pick up the new
-    release, but the operator should avert  the  possibility  by
-    taking  whatever  steps  are  necessary  to make the release
-    successful.
- 
-    Using the -f flag
- 
-    If the issuer wants to make  sure  that  the  Volume  Server
-    releases  a brand new clone to the ReadOnly sites, he or she
-    can include the -f flag.    The  flag  "forces"  the  Volume
-    Server  to  make  a new clone of the ReadWrite source volume
-    and distribute it to all the possible ReadOnly sites.
- 
- 
- 
-    If the issuer does not  include  the  -f  flag,  the  Volume
-    Server's  course  of  action  depends  on whether all of the
-    ReadOnly sites already have identical copies of the volume:
- 
-       - If all the sites currently have the same copy, the
-         Volume Server infers that the previous vos release
-         command must have completed successfully, and that
-         no  new  ReadOnly  sites  have been defined since.
-         Assuming that the issuer wants to release a  brand
-         new   clone,  the  Volume  Server  makes  one  and
-         distributes it to all the defined sites.
- 
-       - If all the sites do not have the same  copy,  then
-         the   Volume  Server  concludes  that  either  the
-         previous vos release command failed in the  middle
-         or  else  a system administrator has defined a new
-         ReadOnly site since the last release.  (A possible
-         reason  for  failure  of  a release is that one or
-         more sites were inaccessible at the  time.)    The
-         Volume  Server  does  not need to make an entirely
-         new clone, however.  Instead, it  distributes  the
-         clone  with the releaseClone volumeID to the sites
-         that do not have it yet (step 3 in  the  Reference
-         Manual  above  defines the ReleaseClone).  If this
-         release also fails, the operator  needs  to  issue
-         more  vos release  commands  until  the  same copy
-         exists at all sites.
- 
- WARNING
- 
-    There should be a maximum of seven sites defined in the VLDB
-    entry  for  the  volume  (one  ReadWrite  site and up to six
-    ReadOnly sites).
- 
-    No more that 3500 volumes should reside on one partition.  A
-    greater  number  can  cause  the  AFS  Salvager  process  to
-    malfunction.  It is the  issuer's  responsibility  to  check
-    that  issuing  this  command  will not cause the limit to be
-    exceeded.  The vos listvol command  reports  the  number  of
-    volumes on a partition.
- 
- ARGUMENTS
- 
-    -id             specifies   either   the  complete  name  or
-                    volumeID number of a ReadWrite volume.
- 
-    -f              determines whether the Volume Server makes a
-                    new  clone  before  distributing  it  to the
-                    ReadOnly  sites,  in  interaction  with  the
-                    state  of  the  ReadOnly  copies  already at
-                    sites.  The section entitled  Using  the  -f
-                    flag describes all the issues.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
- 
- 
- 
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following  clones the ReadWrite volume usr and releases
-    it to the ReadOnly sites defined in its VLDB entry.
- 
-    % vos release usr
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos addsite vos listvol
- 
-    vos syncserv vos syncvldb
--- 0 ----
Index: openafs/src/man/vos_remove.1
diff -c openafs/src/man/vos_remove.1:1.1 openafs/src/man/vos_remove.1:removed
*** openafs/src/man/vos_remove.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_remove.1	Fri Apr 14 09:27:31 2006
***************
*** 1,124 ****
- vos remove                 AFS Commands              vos remove
- 
- 
- NAME
- 
-    vos remove -- remove specified volume from a site.
- 
- 
-    vos remove  -server <machine name>  -partition <partition
-    name>       -id <volume name or ID> [-cell <cell name>]
-    [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos remo  -s <machine name>  -p <partition name>
-    -i <volume name or ID>  [-c <cell name>]  [-n]  [-l]  [-v]
-    [-h]
- 
- DESCRIPTION
- 
-    Removes  the  indicated  volume  from  the site specified by
-    -server and -partition.  The VLDB records the removal,  with
-    the precise results described below.
- 
-    Use  this  command  to  remove  any  of  the  three types of
-    volumes; the exact effect differs for the types:
- 
-       - Removing a ReadWrite volume automatically  removes
-         its  associated  Backup  copy  as  well.  The site
-         information for both  is  removed  from  the  VLDB
-         entry,  and their status flags are set to invalid,
-         but their volumeIDs are still recorded.   ReadOnly
-         sites,  if  any, are not affected.  The whole VLDB
-         entry is removed if there are no ReadOnly sites.
- 
-       - Removing ReadOnly  copies  is  on  a  site-by-site
-         basis, as specified by -server and -partition. The
-         specified site is erased from the VLDB entry.   If
-         no ReadOnly sites remain, the VLDB status flag for
-         ReadOnly changes  to  invalid,  but  the  ReadOnly
-         volumeID is still recorded.
- 
-       - Removing  a Backup copy marks it as invalid in the
-         VLDB entry, but does not erase its volumeID.
- 
-    This command is appropriate  in  almost  all  circumstances.
-    Other  commands  (vos delentry, vos remsite and vos zap) are
-    available for removing  volumes  or  VLDB  entries,  but  by
-    definition  they  can  put the volumes and VLDB out of sync.
-    Use them only in  the  special  circumstances  mentioned  in
-    their command descriptions.
- 
- ARGUMENTS
- 
-    -server         names  the  file  server  machine  where the
-                    volume  resides.    Abbreviated   forms   of
-                    machine  names  may  be allowed depending on
-                    the naming service available at the time the
-                    command  is  issued;  see  page  xii  in the
-                    introductory  About  This  Manual   chapter.
-                    -partition
-                    names the particular partition  to  inspect.
-                    In  addition  to  the full /vicepx form of a
- 
- 
- 
-                    partition  name,  three  shorter  forms  are
-                    acceptable; see page xii in the introductory
-                    About This Manual chapter.
- 
-    -id             specifies  either  the  complete   name   or
-                    volumeID  number  of  a volume of the any of
-                    the three types. When removing a ReadOnly or
-                    Backup volume, avoid accidently removing the
-                    ReadWrite source by:
- 
-                    EITHER specifying the appropriate extension 
-                    if providing a name
- 
-                    OR using the appropriate volumeID number if 
- 
-    -cell           specifies the  cell  in  which  to  run  the
-                    command.    See section 8.3 in the Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to assign  the  identity  anonymous  to  the
-                    issuer.    See  section 8.3 in the Reference
-                    Manual for more details.  -localauth
-                    constructs  a server ticket using a key from
-                    /usr/afs/etc/KeyFile.  See  section  8.3  in
-                    the   Reference  Manual  for  more  details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to report on what they  are  doing  as  they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  8.3 in the
-                    Reference Manual for more details.
- 
- EXAMPLES
- 
-    The following removes the ReadWrite  volume  user.terry  and
-    its  Backup  version,  if  any,  from their site (/vicepc on
-    fs3.transarc.com).
- 
-    % vos remo fs3.transarc.com c user.terry
- 
-    The following removes the ReadOnly volume  root.afs.readonly
-    from one of its sites, /vicepa on fs1.transarc.com.
- 
-    % vos remo fs1.transarc.com a root.afs.readonly
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- 
- 
- MORE INFORMATION
- 
-    vos delentry vos remsite vos zap
--- 0 ----
Index: openafs/src/man/vos_remsite.1
diff -c openafs/src/man/vos_remsite.1:1.1 openafs/src/man/vos_remsite.1:removed
*** openafs/src/man/vos_remsite.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_remsite.1	Fri Apr 14 09:27:31 2006
***************
*** 1,100 ****
- vos remsite                AFS Commands             vos remsite
- 
- 
- NAME
- 
-    vos  remsite -- remove ReadOnly site definition from a VLDB
- 
-                        entry.
- 
- 
-    vos remsite  -server <machine name>  -partition <partition
-    name>        -id <volume name or ID>  [-cell <cell name>]
-    [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos rems  -s <machine name>  -p <partition name>
-    -i <volume name or ID>  [-c <cell name>]  [-n]  [-l]  [-v]
-    [-h]
- 
- DESCRIPTION
- 
-    Removes the ReadOnly replication site specified by  -machine
-    and -partition from the VLDB entry for the indicated volume,
-    which is ReadWrite.
- 
- WARNING
- 
-    This command should not be  used  as  the  standard  way  to
-    remove a ReadOnly volume, as it can put the VLDB out of sync
-    with the volumes on servers.  Use vos remove instead.
- 
-    This command is useful for removing ReadOnly sites that were
-    mistakenly  created with the vos addsite command, before the
-    vos release command actually releases them.  If  a  ReadOnly
-    copy  already  exists  at  the  site,  it  is  not affected.
-    However, if this ReadOnly site was the last site housing any
-    version  of  the  volume,  then  the  entire VLDB entry will
-    disappear, even if a copy  of  the  ReadOnly  version  still
-    actually  exists  at  the site.  The discrepancy will not be
-    noticed until someone runs the vos syncserv and vos syncvldb
-    commands.
- 
- ARGUMENTS
- 
-    -server         specifies  the  file  server machine part of
-                    the   site   definition   to   be   removed.
-                    Abbreviated  forms  of  machine names may be
-                    allowed  depending  on  the  naming  service
-                    available at the time the command is issued;
-                    see page xii in the introductory About  This
-                    Manual chapter.  -partition
-                    specifies the partition  name  part  of  the
-                    site  definition to be removed.  In addition
-                    to the full  /vicepx  form  of  a  partition
-                    name,  three  shorter  forms are acceptable;
-                    see page xii in the introductory About  This
-                    Manual chapter.  -id
-                    specifies  either  the  complete   name   or
-                    volumeID number of a ReadWrite volume.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
- 
- 
- 
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following  removes the mistakenly defined ReadOnly site
-    viceph on fs5.transarc.com from the VLDB  entry  for  volume
-    root.cell.
- 
-    % vos remsite fs5.transarc.com h root.cell
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos delentry vos remove vos zap
--- 0 ----
Index: openafs/src/man/vos_rename.1
diff -c openafs/src/man/vos_rename.1:1.1 openafs/src/man/vos_rename.1:removed
*** openafs/src/man/vos_rename.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_rename.1	Fri Apr 14 09:27:31 2006
***************
*** 1,70 ****
- vos rename                 AFS Commands              vos rename
- 
- 
- NAME
- 
-    vos rename -- rename a volume.
- 
- 
-    vos rename  -oldname <old volume name>
-    -newname <new volume name> [-cell <cell name>]
-    [-noauth]  [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos ren  -o <old volume name>  -ne <new volume name>  [-c
-    <cell name>]
-    [-no]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Changes the name of ReadWrite volume specified with -oldname
-    to the name specified with  -newname.    The  names  of  the
-    ReadWrite's  ReadOnly copies and Backup copy, if any, change
-    automatically to match.
- 
-    After issuing this command, remember to  correct  any  mount
-    points  that  refer  to the old volume name, by removing the
-    old mount point with fs rmmount and creating a new one  with
-    fs mkmount.
- 
- ARGUMENTS
- 
-    -oldname        is the current name of the ReadWrite volume.
- 
-    -newname        is the desired new name for the volume.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- 
- 
- EXAMPLE
- 
-    The following changes the mistaken volume name sun3_41.afsws
-    to the correct alternative sun3_41.usr.afsws.
- 
-    % vos ren sun3_41.afsws sun3_41.usr.afsws
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
--- 0 ----
Index: openafs/src/man/vos_restore.1
diff -c openafs/src/man/vos_restore.1:1.1 openafs/src/man/vos_restore.1:removed
*** openafs/src/man/vos_restore.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_restore.1	Fri Apr 14 09:27:31 2006
***************
*** 1,123 ****
- vos restore                AFS Commands             vos restore
- 
- 
- NAME
- 
-    vos restore -- convert ASCII file into proper volume format
- 
-                        and
-                        place it into the file system.
- 
- 
-    vos restore  -server <machine name>  -partition <partition
-    name>        -name <name of volume to restore>  [-file <dump
-    file>]      [-id <volume ID>]  [-cell <cell name>]
-    [-noauth]  [-localauth]
-    [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos res  -s <machine name>  -p <partition name>
-    -na <name of volume to be restored>  [-f <dump file>]  [-i
-    <volume ID>]
-    [-c <cell name>]  [-no]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Converts the dump file indicated with -file from ASCII  into
-    the  volume  format appropriate for the machine specified as
-    -server, and restores it as a ReadWrite volume to  the  site
-    specified by -server and -partition.  It assigns it the name
-    indicated with -name,  and  resets  the  volume's  "creation
-    date,"  stored  in  the  volume header, to match the restore
-    time.  If -file is not provided,  the  issuer  must  provide
-    input  from  standard  input  (stdin),  presumably through a
-    pipe.
- 
-    The issuer may optionally specify a volumeID number as  -id,
-    but  this  is  not  generally recommended; the Volume Server
-    allocates one otherwise.  If used, it  should  be  a  number
-    that  the  issuer  knows  is  available and has a particular
-    reason for using.
- 
-    If the name indicated is the name of an existing (ReadWrite)
-    volume,  the  contents  of  the dump file will overwrite the
-    existing volume, after the command interpreter  prompts  for
-    confirmation  that  this  is acceptable.  The volume retains
-    its current volumeID number.
- 
- ARGUMENTS
- 
-    -server         names the file server machine onto which  to
-                    restore  the  volume.   Abbreviated forms of
-                    machine names may be  allowed  depending  on
-                    the naming service available at the time the
-                    command is  issued;  see  page  xii  in  the
-                    introductory   About  This  Manual  chapter.
-                    -partition
-                    names  the  partition  onto which to restore
-                    the volume.  In addition to the full /vicepx
-                    form  of  a  partition  name,  three shorter
-                    forms are acceptable; see page  xii  in  the
-                    introductory   About  This  Manual  chapter.
-                    -name
-                    specifies  the  name  under which to restore
- 
- 
- 
-                    the volume.   If  a  volume  already  exists
-                    under  that  name,  it  will  be overwritten
-                    after   the   issuer   is    prompted    for
-                    confirmation.
- 
-    -file           names the dump file the Volume Server should
-                    restore.  If the issuer provides a  full  or
-                    relative  pathname,  the Volume Server looks
-                    for the file there; otherwise  it  looks  in
-                    the  current  working  directory.    If  the
-                    issuer does not provide this argument, he or
-                    she  must  provide  input  through  standard
-                    input (stdin).
- 
-    -id             specifies the volumeID number to  assign  to
-                    the restored volume.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following  restores  the  contents  of  the  dump  file
-    /afs/transarc.com/common/dumps/terry.dump  to  the   /vicepc
-    partition  on  fs3.transarc.com.    The  restored  volume is
-    called user.terry.
- 
-    % cd /afs/transarc.com/common/dumps  % vos res terry.dump
-    fs3.transarc.com c user.terry
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos dump vos examine
- 
-    vos listvol
--- 0 ----
Index: openafs/src/man/vos_status.1
diff -c openafs/src/man/vos_status.1:1.1 openafs/src/man/vos_status.1:removed
*** openafs/src/man/vos_status.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_status.1	Fri Apr 14 09:27:31 2006
***************
*** 1,137 ****
- vos status                 AFS Commands              vos status
- 
- 
- NAME
- 
-    vos status -- report activity of Volume Server.
- 
- 
-    vos status  -server <machine name>  [-cell <cell name>]
-    [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos st  -s <machine name>  [-c <cell name>]  [-n]  [-l]
-    [-v]  [-h]
- 
- DESCRIPTION
- 
-    Reports  on  what the Volume Server on a certain file server
-    machine is doing at the moment the command is  issued.    If
-    there is no activity, it returns nothing.
- 
-    Useful  mainly if there is concern that the Volume Server is
-    not performing requested actions.
- 
- ARGUMENTS
- 
-    -server         names a file server  machine.    Abbreviated
-                    forms   of  machine  names  may  be  allowed
-                    depending on the naming service available at
-                    the time the command is issued; see page xii
-                    in  the  introductory  About   This   Manual
-                    chapter.  -cell
-                    specifies the  cell  in  which  to  run  the
-                    command.    See section 8.3 in the Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to assign  the  identity  anonymous  to  the
-                    issuer.    See  section 8.3 in the Reference
-                    Manual for more details.  -localauth
-                    constructs  a server ticket using a key from
-                    /usr/afs/etc/KeyFile.  See  section  8.3  in
-                    the   Reference  Manual  for  more  details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to report on what they  are  doing  as  they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  8.3 in the
-                    Reference Manual for more details.
- 
- 
- 
- OUTPUT
- 
-    There are two possible types of output.
- 
-    The following message indicates that the  Volume  Server  is
-    not currently performing any actions.
- 
-        No active transactions on machine name
- 
-    The  other  possible output is a set of information which is
-    probably  more  useful  to  programmers   than   to   system
-    administrators.    A  full  understanding  of all the fields
-    requires familiarity with the code for the Volume Server, as
-    many  of  the  fields report ID numbers and flag values that
-    the Volume Server sets for internal use.
- 
-    Among the fields of possible interest  to  an  administrator
-    are:
- 
-       - created  on  the  first  line, which indicates the
-         time at which this transaction started
- 
-       - attachFlags on the second line, where a  value  of
-         offline indicates that the volume is not available
-         for other read or  write  operations  during  this
-         transaction
- 
-       - volume  on  the  third  line,  which specifies the
-         affected volume's ID number
- 
-       - partition on the third line, which indicates where
-         the  affected  volume resides (at the beginning of
-         the transaction if this is a move)
- 
-       - procedure on the third line, which  indicates  the
-         internal subprocedure being executed
- 
-    A  fourth  line  may appear during certain transactions, and
-    includes the following fields:
- 
-       - packetRead tracks  whether  information  is  being
-         read  into  the volume.  Its absolute value is not
-         informative, but the way it changes shows  whether
-         the vos restore command is executing properly.  As
-         vos status is issued repeatedly during a  restore,
-         readNext should increase monotonically to indicate
-         that information is being read into the volume.
- 
-       - packetSend tracks  whether  information  is  being
-         sent out of the volume.  Its absolute value is not
-         informative, but the way it changes shows  whether
-         the  vos dump  command  is executing properly.  As
-         vos status is issued  repeatedly  during  a  dump,
-         transmitNext   should  increase  monotonically  to
-         indicate that  information  is  being  transferred
-         from the volume into the dump file.
- 
-    The lastReceiveTime and lastSendTime are for internal use.
- 
- 
- 
- EXAMPLE
- 
-    The  following  illustrates the kind of output that might be
-    seen if the Volume Server on fs1.transarc.com is executing a
-    dump when this command is issued.
- 
-        % vos status fs1.transarc.com
-        --------------------------------------------
-        transaction: 575  created: Tue Jan 2 8:34:56 1990
-        attachFlags: offline
-        volume: 536871080 partition: /vicepb procedure: Dump
-        packetRead: 2 lastReceiveTime: 113313 packetSend: 24
-            lastSendTime: 113317
-        --------------------------------------------
- 
- PRIVILEGE REQUIRED
- 
-    None.
- 
- MORE INFORMATION
--- 0 ----
Index: openafs/src/man/vos_syncserv.1
diff -c openafs/src/man/vos_syncserv.1:1.1 openafs/src/man/vos_syncserv.1:removed
*** openafs/src/man/vos_syncserv.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_syncserv.1	Fri Apr 14 09:27:31 2006
***************
*** 1,105 ****
- vos syncserv               AFS Commands            vos syncserv
- 
- 
- NAME
- 
-    vos  syncserv -- synchronize  VLDB  entries  that mention a
- 
-                        given site with volume headers.
- 
- 
-    vos syncserv  -server <machine name>  [-partition <partition
-    name>]       [-cell <cell name>]  [-noauth]  [-localauth]
-    [-verbose]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos syncs  -s <machine name>  [-p <partition name>]
-    [-c <cell name>]  [-n]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Finds and inspects the VLDB entries for volumes  (ReadWrite,
-    ReadOnly  and  Backup)  residing  on the file server machine
-    specified by -serverMEITHER all of the volumes OR  only  the
-    volumes  on  the optionally specified -partition.  It checks
-    that everything in the VLDB entry is correct, including  the
-    reported  sites  of  all  copies  (even though that requires
-    looking at volumes on servers other than  -server).    There
-    are several possible changes it can make:
- 
-       - If  a  volume  header  is marked Off-line, but the
-         corresponding  VLDB  entry  is  normal,  then  the
-         volume is brought on-line. (Note that the Off-line
-         flag does not indicate the volume is corrupted.)
- 
-       - If there are two  copies  of  a  given  volume  at
-         different  sites,  both marked Off-line, the newer
-         volume is brought on-line and  the  older  one  is
-         deleted  from  its  site  and  the  VLDB.    (This
-         situation  could  arise  if  the  execution  of  a
-         vos move command were interrupted).
- 
-       - If a volume recorded in the VLDB does not exist at
-         the  indicated  site,  then  the  VLDB  entry   is
-         changed.  In the case of ReadWrite, Backup and the
-         last site for ReadOnly, that  means  changing  the
-         appropriate VLDB status flag to invalid.
- 
-    Run  this  command,  preferably on all file server machines,
-    after vos syncvldb has been run on all file server machines.
- 
- ARGUMENTS
- 
-    -server         names the file server machine for  which  to
-                    check  entries  in  the  VLDB.   Abbreviated
-                    forms  of  machine  names  may  be   allowed
-                    depending on the naming service available at
-                    the time the command is issued; see page xii
-                    in   the   introductory  About  This  Manual
-                    chapter.  -partition
-                    names  the partition for which to check VLDB
-                    entries.  In addition to  the  full  /vicepx
-                    form  of  a  partition  name,  three shorter
- 
- 
- 
-                    forms are acceptable; see page  xii  in  the
-                    introductory   About  This  Manual  chapter.
-                    -cell
-                    specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following alters the VLDB entries of volumes whose site
-    definitions mention fs3.transarc.com  to  match  the  volume
-    header.
- 
-    % vos syncserv fs3.transarc.com
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos move vos syncvldb
--- 0 ----
Index: openafs/src/man/vos_syncvldb.1
diff -c openafs/src/man/vos_syncvldb.1:1.1 openafs/src/man/vos_syncvldb.1:removed
*** openafs/src/man/vos_syncvldb.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_syncvldb.1	Fri Apr 14 09:27:31 2006
***************
*** 1,105 ****
- vos syncvldb               AFS Commands            vos syncvldb
- 
- 
- NAME
- 
-    vos  syncvldb -- synchronize VLDB entry with volume headers
- 
-                        at given site.
- 
- 
-    vos syncvldb  -server <machine name>  [-partition <partition
-    name>]       [-cell <cell name>]  [-noauth]  [-localauth]
-    [-verbose]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos syncv  -s <machine name>  [-p <partition name>]  [-c
-    <cell name>]
-    [-n]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Inspects the volumes  housed  on  the  file  server  machine
-    indicated with -serverMEITHER all of the volumes OR only the
-    volumes on the optionally specified -partition.   It  checks
-    that  the  VLDB  properly  records every volume whose volume
-    header is marked On-line.  In case  of  discrepancies,  this
-    command  alters  VLDB  entries to reflect the true status of
-    volumes on -server.  It has other side effects:
- 
-       - If it finds a Backup volume whose ReadWrite source
-         no  longer exists at the same site, it removes the
-         Backup.  The  VLDB  status  flag  for  the  Backup
-         changes to invalid.  The issuer will have to issue
-         the vos backup command to create a new  Backup  if
-         desired.
- 
-       - The  VL  Server  keeps track of the next available
-         volumeID number with  a  counter.    This  command
-         changes the counter to the highest volumeID number
-         found.
- 
-       - If it encounters multiple  ReadOnly  copies  of  a
-         volume  at  the  same  site,  or  multiple  Backup
-         copies, it removes all  but  the  newest  one  (as
-         determined  by  the  Creation  Date  field  in the
-         volume header) from that site.
- 
-    After running this command, execute vos syncserv, preferably
-    on all file server machines in the cell.
- 
- ARGUMENTS
- 
-    -server         names  the file server machine from which to
-                    compare    volumes    to    VLDB    entries.
-                    Abbreviated  forms  of  machine names may be
-                    allowed  depending  on  the  naming  service
-                    available at the time the command is issued;
-                    see page xii in the introductory About  This
-                    Manual chapter.  -partition
-                    names the partition from  which  to  compare
-                    volumes to VLDB entries.  In addition to the
-                    full /vicepx form of a partition name, three
- 
- 
- 
-                    shorter  forms  are acceptable; see page xii
-                    in  the  introductory  About   This   Manual
-                    chapter.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The  following  makes  sure that the VLDB matches the volume
-    headers found at sites on fs4.transarc.com.
- 
-    % vos syncvldb fs4.transarc.com
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos backup vos syncserv
--- 0 ----
Index: openafs/src/man/vos_unlock.1
diff -c openafs/src/man/vos_unlock.1:1.1 openafs/src/man/vos_unlock.1:removed
*** openafs/src/man/vos_unlock.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_unlock.1	Fri Apr 14 09:27:31 2006
***************
*** 1,78 ****
- vos unlock                 AFS Commands              vos unlock
- 
- 
- NAME
- 
-    vos unlock -- unlock an entry in the VLDB.
- 
- 
-    vos unlock  -id <volume name or ID>  [-cell <cell name>]
-    [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos unlock -i <volume name or ID>  [-c <cell name>]  [-n]
-    [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Releases  the  lock  on  the  VLDB  entry  for the indicated
-    volume.
- 
- WARNING
- 
-    This command should not be used under normal circumstances.
- 
-    It is useful if the VLDB entry is locked  but  there  is  no
-    reason to suspect inconsistency within the volume or between
-    it and  the  VLDB.    Note  that  it  is  possible  to  list
-    information  from  locked  VLDB  entries,  even  though they
-    cannot be manipulated in other ways.
- 
-    The vos unlockvldb unlocks several VLDB entries at once,  or
-    even  the  entire  VLDB.   The vos lock command locks a VLDB
-    entry so that no one else may perform an action  that  would
-    require writing the VLDB.
- 
- ARGUMENTS
- 
-    -id             specifies   either   the  complete  name  or
-                    volumeID number of a volume of  any  of  the
-                    three types.
- 
-    -cell           specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLE(S)
- 
- 
- 
-    The following unlocks the VLDB entry for user.terry.
- 
-    % vos unlock user.terry
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos lock vos unlockvldb
--- 0 ----
Index: openafs/src/man/vos_unlockvldb.1
diff -c openafs/src/man/vos_unlockvldb.1:1.1 openafs/src/man/vos_unlockvldb.1:removed
*** openafs/src/man/vos_unlockvldb.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_unlockvldb.1	Fri Apr 14 09:27:31 2006
***************
*** 1,115 ****
- vos unlockvldb             AFS Commands          vos unlockvldb
- 
- 
- NAME
- 
-    vos  unlockvldb -- unlock  all  specified locked entries in
- 
-                        the VLDB.
- 
- 
-    vos unlockvldb  [-server <machine name>]  [-partition
-    <partition name>]
-    [-cell <cell name>]  [-noauth]  [-localauth]  [-verbose]
-    [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos unlockv  [-s <machine name>] [-p <partition name>]
-    [-c <cell name>]  [-n]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Releases the lock on  the  VLDB  entries  indicated  by  the
-    combination of arguments provided.  To unlock:
- 
-       - all entries in the VLDB, provide no arguments.
- 
-       - all  entries that mention a file server machine in
-         a site definition, provide its name with -server.
- 
-       - all entries that mention a partition on  any  file
-         server  machine  in a site definition, provide the
-         partition name with -partition.
- 
-       - all entries that mention a specific site,  provide
-         both -server and -partition.
- 
-       - a   single  volume,  use  the  vos unlock  command
-         instead.
- 
- WARNING
- 
-    This   command   should   not   be   issued   under   normal
-    circumstances.
- 
-    It  is  useful if VLDB entries for volumes at a certain site
-    are locked but there is no reason to  suspect  inconsistency
-    within  the volume or between it and the VLDB.  Note that it
-    is possible to list information from  locked  VLDB  entries,
-    even though they cannot be manipulated in other ways.
- 
-    The  vos lock command locks a VLDB entry so that no one else
-    may perform an action that would require writing the VLDB.
- 
- ARGUMENTS
- 
-    -server         names the file server machine for  which  to
-                    unlock  VLDB  entries.  Abbreviated forms of
-                    machine names may be  allowed  depending  on
-                    the naming service available at the time the
-                    command is  issued;  see  page  xii  in  the
-                    introductory   About  This  Manual  chapter.
-                    -partition
-                    names the partition for which to unlock VLDB
- 
- 
- 
-                    entries.  In addition to  the  full  /vicepx
-                    form  of  a  partition  name,  three shorter
-                    forms are acceptable; see page  xii  in  the
-                    introductory   About  This  Manual  chapter.
-                    -cell
-                    specifies  the  cell  in  which  to  run the
-                    command.  See section 8.3 in  the  Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to  assign  the  identity  anonymous  to the
-                    issuer.  See section 8.3  in  the  Reference
-                    Manual for more details.  -localauth
-                    constructs a server ticket using a key  from
-                    /usr/afs/etc/KeyFile.    See  section 8.3 in
-                    the  Reference  Manual  for  more   details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to  report  on  what  they are doing as they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not  provide  any  other  arguments or flags
-                    with this one.    See  section  8.3  in  the
-                    Reference Manual for more details.
- 
- EXAMPLES
- 
-    The following unlocks all locked entries in the VLDB.
- 
-    % vos unlockvldb
- 
-    The  following  unlocks all locked VLDB entries that mention
-    /vicepa in a site definition.
- 
-    % vos unlockvldb -p a
- 
-    The following unlocks all locked VLDB entries that refer  to
-    volumes on the /vicepc partition of fs3.transarc.com.
- 
-    % vos unlockvldb fs3.transarc.com c
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos lock vos unlock
--- 0 ----
Index: openafs/src/man/vos_zap.1
diff -c openafs/src/man/vos_zap.1:1.1 openafs/src/man/vos_zap.1:removed
*** openafs/src/man/vos_zap.1:1.1	Mon Jul 16 14:48:32 2001
--- openafs/src/man/vos_zap.1	Fri Apr 14 09:27:31 2006
***************
*** 1,128 ****
- vos zap                    AFS Commands                 vos zap
- 
- 
- NAME
- 
-    vos zap -- remove a volume from its site without writing to
- 
-                        the VLDB.
- 
- 
-    vos zap  -server <machine name>  -partition <partition name>
-           -id <volume ID>  [-force]  [-cell <cell name>]
-    [-noauth]
-    [-localauth]  [-verbose]  [-help]
- 
- ACCEPTABLE ABBREVIATIONS/ALIASES
- 
-    vos z  -s <machine name>  -p <partition name>  -i <volume
-    ID>
-    [-f]  [-c <cell name>]  [-n]  [-l]  [-v]  [-h]
- 
- DESCRIPTION
- 
-    Removes the volume with the volumeID  number  -id  from  the
-    site  defined  by -server and -partition, without attempting
-    to change the corresponding VLDB entry.
- 
-    The -force flag removes  a  volume  even  if  it  cannot  be
-    "attached" (brought online), which can happen either because
-    the volume is extremely  damaged  or  because  the  Salvager
-    functioned  abnormally.    Without  this  flag, this command
-    cannot remove volumes that are not attachable.  See also the
-    WARNINGS section.
- 
- WARNINGS
- 
-    This  command  should  not  be  used  as the standard way to
-    remove a volume, as it is likely to put the VLDB out of sync
-    with the volumes on servers.  Use vos remove instead.
- 
-    This  command  is useful in situations where it is important
-    to delete the volume,  but  for  some  reason  the  VLDB  is
-    unreachable  (the  VL  Server  may be down).  The issuer may
-    remove the VLDB entry later with vos remove or vos delentry,
-    or  it  will  be  removed  automatically  when  someone runs
-    vos syncserv and vos syncvldb.
- 
-    To remove a ReadOnly site defined in the  VLDB  by  mistake,
-    before  a copy actually exists at the site, use vos remsite.
-    To remove an entire VLDB entry without affecting volumes  at
-    their sites, use vos delentry.
- 
-    Do not use the -force flag if the volume is online, but only
-    when attempts  to  remove  the  volume  with  vos remove  or
-    vos zap  have  failed and/or the volume definitely cannot be
-    attached.  After using -force, make sure that  the  volume's
-    VLDB   entry   is   also   removed  (issue  vos delentry  if
-    necessary).
- 
-    Adding the -force flag makes the command  take  considerably
-    longerMabout   as   long   as  a  salvage  of  the  relevant
-    partitionMsince the Volume Server examines all inodes on the
-    partition for traces of the volume.
- 
- 
- 
- ARGUMENTS
- 
-    -server         names  the file server machine from which to
-                    remove the volume.    Abbreviated  forms  of
-                    machine  names  may  be allowed depending on
-                    the naming service available at the time the
-                    command  is  issued;  see  page  xii  in the
-                    introductory  About  This  Manual   chapter.
-                    -partition
-                    names the partition from which to remove the
-                    volume.    In  addition  to the full /vicepx
-                    form of  a  partition  name,  three  shorter
-                    forms  are  acceptable;  see page xii in the
-                    introductory About This Manual chapter.
- 
-    -id             specifies the volumeID number of the  volume
-                    to  remove, which may be of any of the three
-                    types.  The volume name is not acceptable.
- 
-    -force          tells the Volume Server to delete the volume
-                    even  though  it cannot be attached (brought
-                    online).  Use only after failed attempts  to
-                    remove  the  volume  with vos remove and vos
-                    zap without this flag.
- 
-    -cell           specifies the  cell  in  which  to  run  the
-                    command.    See section 8.3 in the Reference
-                    Manual for more details.  -noauth
-                    tells the Volume and Volume Location Servers
-                    to assign  the  identity  anonymous  to  the
-                    issuer.    See  section 8.3 in the Reference
-                    Manual for more details.  -localauth
-                    constructs  a server ticket using a key from
-                    /usr/afs/etc/KeyFile.  See  section  8.3  in
-                    the   Reference  Manual  for  more  details.
-                    -verbose
-                    tells the Volume and Volume Location Servers
-                    to report on what they  are  doing  as  they
-                    execute the command.  See section 8.3 in the
-                    Reference Manual for more details.  -help
-                    prints the online help for this command.  Do
-                    not provide any  other  arguments  or  flags
-                    with  this  one.    See  section  8.3 in the
-                    Reference Manual for more details.
- 
- EXAMPLE
- 
-    The following removes the  volume  with  volumeID  536870988
-    from  /vicepf of fs6.transarc.com, without noting the change
-    in the VLDB.
- 
-    % vos zap fs6.transarc.com f 536870988
- 
- 
- 
- PRIVILEGE REQUIRED
- 
-    Issuer must be listed in /usr/afs/etc/UserList on -server.
- 
- MORE INFORMATION
- 
-    vos delentry vos remove vos remsite
--- 0 ----
Index: openafs/src/packaging/Debian/CellServDB
diff -c /dev/null openafs/src/packaging/Debian/CellServDB:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/CellServDB	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 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
Index: openafs/src/packaging/Debian/ConfigUtils.pm
diff -c openafs/src/packaging/Debian/ConfigUtils.pm:1.1 openafs/src/packaging/Debian/ConfigUtils.pm:1.1.2.1
*** openafs/src/packaging/Debian/ConfigUtils.pm:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/ConfigUtils.pm	Thu Mar 23 15:20:31 2006
***************
*** 24,26 ****
--- 24,34 ----
  	 }
  
  1;
+ openafs-dbserver: non-standard-dir-perm
+ openafs-dbserver: non-standard-dir-perm
+ openafs-dbserver: non-standard-dir-perm
+ openafs-dbserver: non-standard-dir-perm
+ openafs-dbserver: non-standard-dir-perm
+ openafs-dbserver: non-standard-dir-perm
+ openafs-dbserver: non-standard-dir-perm
+ openafs-dbserver: non-standard-dir-perm
Index: openafs/src/packaging/Debian/README.Debian
diff -c openafs/src/packaging/Debian/README.Debian:1.1 openafs/src/packaging/Debian/README.Debian:1.1.2.1
*** openafs/src/packaging/Debian/README.Debian:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/README.Debian	Thu Mar 23 15:20:31 2006
***************
*** 1,25 ****
! openafs for Debian
! ----------------------
  
! * No manual pages are included.  I need to find out if versions exist
!   that are OK for copyright reasons.
  
! * Documentation can be found at http://www.openafs.org.  If want to
! set up a new cell, read the docs there and then look at the example
! session in configuration-transcript.txt.gz in this directory.  You
! should also read README.servers.  The procedure outlined in these two
! files is much simpler and more secure than the one in the Openafs
! documentation, but the Openafs documentation provides useful
! background.
  
! *  AFS users may be confused by the directory layout.  The files that
!    normally go in /usr/vice/etc go in /etc/openafs.  The cache should
!    be mounted on /var/cache/openafs.
! 
! * The libopenafs-dev package only includes static libraries because
!   AFS does not build shared libs.
! 
! 
! 
! 
!  -- Sam Hartman <hartmans@mit.edu>, Fri,  3 Nov 2000 23:41:41 -0500
--- 1,126 ----
!                             OpenAFS for Debian
  
! Introduction
  
!   For an OpenAFS client system, install openafs-client and a kernel
!   module.  See README.modules for information on how to build the kernel
!   module for your system.  Then, read /etc/openafs/afs.conf to understand
!   the client configuration options.  The openafs-client package will
!   attempt to guess at a good cache configuration based on the size of your
!   cache, but you may want to tune it further.  There are also other
!   options configured in that file you may want to consider.
! 
!   The AFS client cache must be on an ext2 or ext3 partition.  Other file
!   systems often do not support the semantics required by the AFS kernel
!   module and will cause afsd to abort (to avoid kernel panics).  In
!   particular, XFS, ReiserFS, and tmpfs will NOT work.  If you are using
!   one of those file systems and don't have a spare partition for a
!   separate file system for the cache, you need to use the -memcache option
!   to afsd (although this is not always stable) or create a large file with
!   dd, create an ext2 file system in it with mkfs, and then mount it with
!   mount -o loop for use as a cache partition.
! 
!   FAM does not work correctly with AFS except for directories that are
!   world-readable since it does not run in the user's security context and
!   therefore doesn't have the user's AFS tokens.  If you are using FAM,
!   you'll encounter errors from file managers such as Nautilus that use it
!   if you browse restricted AFS directories.  Instead of FAM, install
!   gamin, which runs in the user's security context and works correctly
!   with AFS.
! 
!   For information on how to set up an OpenAFS server, read README.servers.
!   You will want the openafs-fileserver package for a file server and,
!   additionally, the openafs-dbserver package for a database server.
! 
! Documentation
! 
!   For the complete OpenAFS manual, install openafs-doc.  This is the same
!   documentation as found at <http://www.openafs.org/>, and is
!   unfortunately outdated in several respects, but it's the best that we
!   have at present.
! 
!   If want to set up a new cell, read README.servers and then look at the
!   example session in configuration-transcript.txt.gz in this directory.
!   The procedure outlined in these two files is much simpler and more
!   secure than the one in the OpenAFS documentation, but the OpenAFS
!   documentation provides useful background.
! 
! Changes Relative to Stock OpenAFS
! 
!   Long-time AFS users may be confused by the directory layout.  The files
!   that normally go in /usr/vice/etc go in /etc/openafs.  The cache should
!   be mounted on /var/cache/openafs.  The server files have been moved
!   around even more; see README.servers for the details.
! 
!   The OpenAFS kernel module is named openafs, not libafs, to better match
!   normal Linux kernel module naming standards.  The Debian source package
!   only builds one kernel module that matches the kernel source tree it is
!   built against and does not attempt to build separate SMP and non-SMP
!   modules against the same tree.  Doing so does not work on all platforms.
!   To distinguish between an SMP and a non-SMP kernel module package, use
!   --append_to_version; see README.modules for more information.
! 
!   The AFS up utility is installed as afs-up, since the standard name is
!   rather generic.
! 
!   The libopenafs-dev package only includes static libraries and there are
!   no shared library packages.  The shared libraries built by AFS are not
!   compatible with Debian policy.  They do not have a stable ABI or an
!   appropriate SONAME.
! 
!   kaserver is not included.  New AFS cells should use Kerberos v5 rather
!   than the old K4-based kaserver KDC.
! 
!   The OpenAFS PAM modules have been built with pthreads rather than the
!   standard LWP AFS libraries for compatibility with a threaded sshd.
! 
! PAM Authentication
! 
!   Any new OpenAFS cell is strongly encouraged to use Kerberos v5 for
!   authentication.  If you want PAM to automatically obtain AFS credentials
!   and you are using Kerberos v5, you will want to install the libpam-krb5
!   and libpam-openafs-session packages and then put something like the
!   following in /etc/pam.d/common-auth:
! 
!       auth    [success=ok default=1]  pam_krb5.so ignore_root
!       auth    [default=done]          pam_openafs_session.so
!       auth    required                pam_unix.so nullok_secure try_first_pass
! 
!   and something like the following in /etc/pam.d/common-session:
! 
!       session optional        pam_krb5.so ignore_root
!       session optional        pam_openafs_session.so
!       session required        pam_unix.so
! 
!   You'll probably also want the following in /etc/pam.d/common-account:
! 
!       account required        pam_krb5.so ignore_root
!       account required        pam_unix.so
! 
!   There are, of course, many variations depending on what different
!   mechanism you want to use and how you want to handle fallbacks.
! 
!   If you are still using Kerberos v4 and the OpenAFS kaserver (or a KDC
!   that understands the same protocol) for authentication, you can instead
!   use the libpam-openafs-kaserver package and a configuration like:
! 
!       auth    sufficient      pam_afs.so ignore_root
!       auth    required        pam_unix.so nullok_secure try_first_pass
! 
!   in /etc/pam.d/common-auth and:
! 
!       session optional        pam_afs.so
!       session required        pam_unix.so
! 
!   in /etc/pam.d/common-session.  Use pam_afs.krb.so instead of pam_afs.so
!   if you also want the PAM module to acquire a ticket cache for you.  If
!   using this configuration with sshd, you may need to disable privilege
!   separation to get everything working properly.  I've had mixed results
!   with that.  Obviously, converting to Kerberos v5 authentication is
!   strongly preferred.
! 
!   If you are using the kaserver as your KDC, you may also want to install
!   the openafs-kpasswd package to get the administrative utilities for
!   managing those Kerberos accounts.
  
!  -- Russ Allbery <rra@debian.org>, Tue Dec 27 15:53:28 2005
Index: openafs/src/packaging/Debian/README.modules
diff -c openafs/src/packaging/Debian/README.modules:1.1 openafs/src/packaging/Debian/README.modules:1.1.2.1
*** openafs/src/packaging/Debian/README.modules:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/README.modules	Thu Mar 23 15:20:31 2006
***************
*** 1,35 ****
! 		       Building Kernel Modules
! ----------------------------------------
  
  
!  The easiest way to get AFS modules is to install prebuilt modules.
! Fore example if you are running kernel 2.2.18 you might try
  
! apt-get install openafs-modules-2.2.18
  
! If this doesn't work, then you will need to build your own modules.
! This means having kernel sources available.  You should install a
! kernel sources package and untar it in /usr/src.  Then, install
! openafs-modules-source.
  
! apt-get install openafs-modules-source
  
! Next, unpack openafs-modules-source
  
! cd /usr/src
! tar xzf openafs.tar.gz
  
! Now, change into your kernel source tree.  You should then create a
! .config file; the easiest way to do this is to run make menuconfig or
! to copy in a kernel configuration from the same version of the kernel.
! Debian kernel packages store a copy of their kernel configuration in
! /boot/config.version_number.  Finally build the modules
  
! make-kpkg configure
! make-kpkg modules_image
  
! You may need to use the --append_to_version switch to add version suffixes
! like -686 if your modules install into /lib/modules/version-686.
! Ignore any errors about genchanges.sh failing.  An openafs-modules deb
! should be created.  Use dpkg -i to install this version.
  
--- 1,93 ----
!                          Building Kernel Modules
  
+ Introduction
  
!   The easiest way to get AFS modules is to install prebuilt modules.  For
!   example, if you are running kernel 2.4.27-2-686-smp, you might try:
  
!       apt-get install openafs-modules-2.4.27-2-686-smp
  
!   Pre-built modules are not provided with Debian (building and maintaining
!   them in Debian proper poses too many problems), but many organizations
!   that use OpenAFS build their own and provide them locally.
  
!   If this doesn't work, you will need to build your own modules.  There
!   are two methods for doing this.
  
!   When following either method, be aware that the Debian package creates a
!   module named openafs, not libafs as is used by upstream.  It also
!   prefers not to add the .mp extension for modules built for SMP kernels;
!   the indication of whether the module is for an SMP kernel should go into
!   the package name via something like --append_to_version, not into the
!   file name of the module.
  
! module-assistant
  
!   This method is the best one to use when using the kernels that come with
!   Debian, since module-assistant knows how to get the right header files
!   to build modules for your currently running kernel.
  
!   First, install module-assistant and then prepare the kernel headers and
!   install openafs-modules-source:
  
!       apt-get install module-assistant
!       module-assistant prepare openafs-modules
  
+   (If you want to build modules for a different kernel than your currently
+   running one, pass the -l flag to module-assistant.  See the man page.)
+   module-assistant may be able to find the right packages itself or it may
+   tell you to install particular packages.  Once you've finished with
+   that, build the module with:
+ 
+       module-assistant auto-build openafs-modules
+ 
+   You may prefer to pass module-assistant the -t flag to get more
+   conventional output.  If everything works correctly, the openafs-modules
+   deb should be created in /usr/src.  You can use dpkg -i to install it.
+ 
+   module-assistant will take care of naming the openafs-modules package
+   correctly so that it matches the name of the kernel-image package and
+   installs its modules into the correct directory.
+ 
+ make-kpkg
+ 
+   This method works well when you're also building your own kernel, rather
+   than using the pre-packaged Debian one.
+ 
+   Install a kernel source package and untar it in /usr/src.  Then, install
+   openafs-modules-source.
+ 
+       apt-get install openafs-modules-source
+ 
+   Next, unpack openafs-modules-source:
+ 
+       cd /usr/src
+       tar xzf openafs.tar.gz
+ 
+   Now, change into your kernel source tree.  You should then create a
+   .config file; the easiest way to do this is to run make menuconfig or to
+   copy in a kernel configuration from the same version of the kernel.
+   Debian kernel packages store a copy of their kernel configuration in
+   /boot/config.version_number.
+ 
+   The kernel configuration needs to be identical to the configuration that
+   produced the kernel that you're using.  Ideally, you would build the
+   kernel image you're going to use with make-kpkg kernel_image and install
+   that along with the module image, although as long as the configuration
+   is identical, you may be able to get away with using a pre-built kernel.
+   (A better approach, if you're using pre-built kernels, may be to use
+   module-assistant as described above.)
+ 
+   Finally, build the modules:
+ 
+       make-kpkg modules_image
+ 
+   You may need to use the --append_to_version switch to add version
+   suffixes like -686 or -smp to match your kernel and install the OpenAFS
+   module into a directory like /lib/modules/version-686.  Be aware that
+   the Debian OpenAFS packages build either a regular module or an SMP
+   module, not both, so the generated package will only work with a kernel
+   with the same SMP configuration.
+ 
+   An openafs-modules deb should be created in /usr/src.  Use dpkg -i to
+   install this package.
Index: openafs/src/packaging/Debian/README.servers
diff -c openafs/src/packaging/Debian/README.servers:1.1 openafs/src/packaging/Debian/README.servers:1.1.2.1
*** openafs/src/packaging/Debian/README.servers:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/README.servers	Thu Mar 23 15:20:31 2006
***************
*** 1,47 ****
! 		 Setting up a Debian OpenAFS Server
  
! These packages include binaries with FHS-compatible path names.  Here
! is a map from AFS paths to FHS paths:
  
! /usr/afs/etc		/etc/openafs/server
! /usr/afs/local		/etc/openafs/server-local
! /usr/afs/db		/var/lib/openafs/db
! /usr/afs/logs		/var/log/openafs
! /usr/afs/bin		/usr/lib/openafs
! 
! 
! Scripts are provided to configure a single database/file server.  The
! afs-newcell script sets up the initial databases and configures
! bosserver.  After running this script, get tokens in the cell and run
! the afs-rootvol script to populate the root volume and root.cell.  A
! sample transcript of configuring an AFS cell can be found in
! /usr/share/doc/openafs-dbserver/configuration-transcript.txt.gz.  This
! transcript assumes you are using MIT Kerberos and the openafs-krb5
! package.  Similar steps could be taken with Heimdal.
! 
! Another issue is upgrades.  It is likely that future versions of this
! package will install for example /usr/lib/openafs/fileserver.package
! instead of /usr/lib/openafs/fileserver.  The postinst script will
! create links the actual binaries.  Upgrades will not replace the old
! binaries, but a script will be provided to roll the links forward to
! the new versions.  The intent is that people could install the new
! package on all their servers and then quickly move the links before
! restarting the bosserver.
! 
! 		      Adding Additional Servers
! 
! If you decide one server is not enough, here is roughly what needs to
! happen:
! 
! 1) Copy securely (using scp , encrypted Kerberized rcp or some other
!    secure method) /etc/openafs/server to the new server.
! 
! 2) Start a bosserver.
! 
! 3) If the machine is to be a file server, create an fs instance using
!    bos create.  For file servers this is all you need to do.
! 
! 4) For database servers, you also need to do a bos addhost on all
!    servers (including the new server) to add the new server to
!    /etc/openafs/server/CellServDB.  Then create ptserver and vlserver
!    instances.
--- 1,392 ----
!                     Setting up a Debian OpenAFS Server
  
! Introduction
  
!   This document describes how to set up an OpenAFS server using the Debian
!   packages.  If you are not already familiar with the basic concepts of
!   OpenAFS, you should review the documentation at:
! 
!       <http://www.openafs.org/doc/index.htm>
! 
!   particularly the AFS Administrator's Guide.  This documentation is
!   somewhat out of date (it doesn't talk about how to use a Kerberos v5 KDC
!   instead of the AFS kaserver, for example), but it's a good introduction
!   to the basic concepts and servers you will need to run.
! 
!   The Debian OpenAFS packages follow the FHS and therefore use different
!   paths than the standard AFS documentation or the paths that experienced
!   AFS administrators may be used to.  In the first column below are the
!   traditional paths, and in the second column, the Debian paths:
! 
!       /usr/afs/etc        /etc/openafs/server
!       /usr/afs/local      /etc/openafs/server-local
!       /usr/afs/db         /var/lib/openafs/db
!       /usr/afs/logs       /var/log/openafs
!       /usr/afs/bin        /usr/lib/openafs
!       /usr/vice/etc       /etc/openafs
! 
!   The AFS kaserver (a Kerberos v4 KDC) is not packaged for Debian.  Any
!   new OpenAFS installation should use Kerberos v5 for authentication in
!   conjunction with either the tools packaged in the openafs-krb5 package
!   or the Heimdal KDC.  When setting up a new cell, you should therefore
!   not set up a kaserver as described in the AFS Administrator's Guide, and
!   you will need to follow a slightly different method of setting the cell
!   key.
! 
! Creating a New Cell
! 
!   For documentation on adding a server to an existing cell, see below.
! 
!   These instructions assume that you are using MIT Kerberos and the
!   openafs-krb5 package.  If you are using Heimdal instead, some of the
!   steps will be slightly different (Heimdal can write the AFS KeyFile
!   directly, for example, so you don't have to use asetkey).  The
!   afs-newcell and afs-rootvol scripts are the same, however.
! 
!   /usr/share/doc/openafs-dbserver/configuration-transcript.txt.gz has a
!   transcript of the results of these directions, which you may want to
!   follow along with as you do this.
! 
!   1.  If you do not already have a Kerberos KDC (Key Distribution Center,
!       the daemon that handles Kerberos authentication) configured, do so.
!       You can run the KDC on the same system as your OpenAFS db server,
!       although if you plan on using Kerberos for other things, you may
!       eventually want to use separate systems.  If you do not have a
!       Kerberos realm set up already, you can do so in Debian with:
! 
!           apt-get install krb5-admin-server
!           krb5_newrealm
! 
!       This will install a KDC and kadmind server (the server that handles
!       password changes and account creations) on the local system.  Please
!       be aware that the security of everything that uses Kerberos for
!       authentication, including AFS, depends on the security of the KDC.
! 
!       The name of your Kerberos realm should, for various reasons, be in
!       all uppercase and be a domain name that you control, although
!       neither is technically required.
! 
!       Right now, for the aklog from openafs-krb5 to work, you need to
!       enable krb4 support (either full or nopreauth) and run krb524d.
!       Eventually this will no longer be necessary.
! 
!   2.  It is traditional (and recommended) in AFS (and for Kerberos) to
!       give administrators two separate Kerberos principals, one regular
!       principal to use for regular purposes and a separate admin principal
!       to use for privileged actions.  This is similar to the distinction
!       between a regular user and the root user in Unix, except that
!       everyone can have their own separate root identity.  Kerberos
!       recommends username/admin as the admin principal for username, and
!       this will work for AFS as well.
! 
!       If you have not already created such an admin principal for yourself
!       in your Kerberos realm, do so now (using kadmin.local on your KDC,
!       unless you have a local method that you prefer).  Also create a
!       regular (non-admin) principal for yourself if you have not already;
!       this is the identity that you'll use for regular operations, like
!       storing files or reading mail.  To do this with kadmin.local, run
!       that program and then run the commands:
! 
!           addprinc username/admin
!           addprinc username
! 
!       at the kadmin prompt.  You'll be prompted for passwords for both
!       accounts.
! 
!       If the KDC is not on the same system that the OpenAFS db server will
!       be on, you will also need to give your admin principal the rights to
!       download the afs keytab in /etc/krb5kdc/kadm5.acl by adding a lines
!       like:
! 
!           username/admin@REALM    *
! 
!       where REALM is your Kerberos realm and username/admin is the admin
!       principal that you created.  That line gives you full admin access
!       to the Kerberos v5 realm.  You can be more restrictive if you want;
!       see the kadmind man page for the syntax.
! 
!   3.  Install the OpenAFS db server package on an appropriate system with:
! 
!           apt-get install openafs-dbserver openafs-krb5
! 
!       The openafs-krb5 package will be used to create the AFS KeyFile.
! 
!       As part of this installation, you will need to configure
!       openafs-client with the cell you are creating as the local cell name
!       and the server on which you're working as the db server.  This name
!       is technically arbitrary but should, for various reasons, be a valid
!       domain name that you control; unlike Kerberos realms, it should be
!       in all lowercase.  Enter the name of the local system when prompted
!       for the names of your OpenAFS db servers.  Don't start the client;
!       that will happen below.  For right now, say that you don't want it
!       to start at boot.  You can change that later with dpkg-reconfigure
!       openafs-client.
! 
!       If you have already installed openafs-client and configured it for
!       some other cell, you do need to configure it to point to your new
!       cell for these instructions to work.  Stop the AFS client on the
!       system with /etc/init.d/openafs-client stop and then run:
! 
!            dpkg-reconfigure openafs-client
! 
!       pointing it to the new cell you're about to create instead.
!       Remember, your cell name should be in lowercase.  If you have had to
!       do this several times, double-check /etc/openafs/CellServDB when
!       you're done and make sure that there is only one entry for your new
!       cell at the top of that file and that it lists the correct IP
!       address for your new db server.
! 
!       In order to complete the AFS installation, you will also need a
!       working AFS client installed on that system, which means that you
!       need to install an OpenAFS kernel module.  Please see:
! 
!           /usr/share/doc/openafs-client/README.modules
! 
!       for information on how to do that.
! 
!   4.  Create an AFS principal in Kerberos.  This is the AFS service
!       principal, used by clients to authenticate to AFS and for AFS
!       servers to authenticate to each other.  It *must* be a DES key; AFS
!       does not support any other encryption type.  Run kadmin.local on
!       your KDC and then, at the kadmin.local prompt, run:
! 
!           addprinc -randkey -e des-cbc-crc:v4 afs
! 
!       If your Kerberos realm name does not match your AFS cell name (if,
!       for instance, you have one Kerberos realm with multiple AFS cells),
!       use "afs/cell.name" as the name of the principal above instead of
!       just "afs", where cell.name is the name of your new AFS cell.
! 
!   5.  On the db server, download this key into a keytab.  If this is the
!       same system as the KDC, you can use kadmin.local again.  If not, you
!       should use kadmin (make sure that krb5-user is installed), and you
!       may need to pass -p username/admin to kadmin to tell it what
!       principal to authenticate as.  Whichever way you get into kadmin,
!       run:
! 
!           ktadd -k /tmp/afs.keytab -e des-cbc-crc:v4 afs
! 
!       (or afs/cell.name if you used that instead).  In the message that
!       results, note the kvno number reported, since you'll need it later
!       (it will normally be 3).
! 
!       Don't forget the -e des-cbc-crc:v4 to force the afs key to be DES.
!       You can verify this with:
! 
!           getprinc afs
! 
!       and checking to be sure that the only key listed is a DES key.  If
!       there are multiple keys listed, delprinc the afs principal, delete
!       the /tmp/afs.keytab file, and then start over with addprinc, making
!       sure not to forget the -e option.
! 
!   6.  Create the AFS KeyFile with:
! 
!           asetkey add <kvno> /tmp/afs.keytab afs
! 
!       (or afs/cell.name if you used that instead).  <kvno> should be
!       replaced by the kvno number reported by kadmin.  This tells AFS the
!       Kerberos key that it should use, making it match the key in the
!       Kerberos KDC.
! 
!   7.  If the name of your Kerberos realm does not match the name of your
!       AFS cell, tell AFS what Kerberos realm to use with:
! 
!           echo REALM > /etc/openafs/server/krb.conf
! 
!       where REALM is the name of your Kerberos realm.  If your AFS cell
!       and Kerberos realm have the same name, this is unnecessary.
! 
!   8.  Create some space to use for AFS volumes.  You can set up a separate
!       AFS file server on a different system from the Kerberos KDC and AFS
!       db server, and for a larger cell you will want to do so, but when
!       getting started you can make the db server a file server as well.
!       For a production cell, you will want to create a separate partition
!       devoted to AFS and mount it as /vicepa (and may want to make
!       multiple partitions mounted as /vicepb, /vicepc, etc.), but for
!       testing purposes, you can use the commands below to create a
!       zero-filled file, create a file system in it, and then mount it:
! 
!           dd if=/dev/zero of=/var/lib/openafs/vicepa bs=1024k count=32
!           mke2fs /var/lib/openafs/vicepa
!           mkdir /vicepa
!           mount -oloop /var/lib/openafs/vicepa /vicepa
! 
!       mke2fs will ask you if you're sure you want to create a file system
!       on a non-block device; say yes.
! 
!   9.  Run afs-newcell.  This will prompt you to be sure that the above
!       steps have been complete and will ask you for the Kerberos principal
!       to use for AFS administrative access.  You should use the
!       username/admin principal discussed above.  afs-newcell sets up the
!       initial protection database (which stores users and groups),
!       configures the AFS database and file server daemons, and creates the
!       root volume for AFS clients.
! 
!       At the completion of this step, you should see bosserver and several
!       other AFS server processes running, and you should be able to see
!       the status of those processes with:
! 
!           bos status localhost -local
! 
!       bosserver is a master server that starts and monitors all the
!       individual AFS servers, and bos is the program used to send it
!       commands.
! 
!       Now, you should be able to run:
! 
!           kinit username/admin@REALM
!           aklog cell.name -k REALM
! 
!       where username/admin is the admin principal discussed above, REALM
!       is the name of your Kerberos realm, and cell.name is the name of
!       your AFS cell.  This will obtain Kerberos tickets and AFS tokens in
!       your Kerberos realm and new AFS cell.  You should be able to see
!       your AFS tokens by running:
! 
!           tokens
! 
!       Finally, you should be able to see the status of the AFS server
!       processes with:
! 
!           bos status <hostname>
! 
!       where <hostname> is the hostname of the local system, once you've
!       done the above.  This tests authenticated bos access as your admin
!       principal (rather than using the local KeyFile to authenticate).
! 
!   10. Run afs-rootvol.  This creates the basic AFS volume structure for
!       your new cell, including the top-level volume, the mount point for
!       your cell in the AFS root volume, and the mount points for all known
!       public cells.  It will prompt you to be sure that the above steps
!       are complete and then will ask you what file server and partition to
!       create the volume on.  If you were following the above instructions,
!       use the local hostname and "a" as the partition (without the
!       quotes), which will use /vicepa.
! 
!       After this command completes, you should be able to /bin/ls /afs and
!       see your local cell (and, if you aren't using dynroot, mount points
!       for several other cells).  Note that if you're not using fakestat,
!       run /bin/ls rather than just ls to be sure that ls isn't aliased to
!       ls -F, ls --color, or some other option that would stat each file in
!       /afs, since this would require contacting lots of foreign cells and
!       could take a very long time.
! 
!       You should now be able to cd to /afs/cell.name where cell.name is
!       the AFS cell name that you used.  Currently, there isn't anything in
!       your cell except two volumes, user and service, created by
!       afs-rootvol.  To make modifications, cd to /afs/.cell.name (note the
!       leading period) and make changes there.  To make those changes show
!       up at /afs/cell.name, run vos release root.cell.  For more details
!       on what you can do now, see the AFS Administrator's Reference.
! 
!   11. While this is optional, you probably want to add AFSDB records to
!       DNS for your new AFS cell.  These special DNS records let AFS
!       clients find the db servers for your cell without requiring local
!       configuration.  To do this, create a DNS record like:
! 
!           <cell>.        3600    IN      AFSDB   1 <server>.
! 
!       where <cell> is the name of your AFS cell and <server> is the name
!       of your db server.  Note the trailing periods to prevent the DNS
!       server from appending the origin.  You can, of course, choose what
!       you prefer for the lifetime.  The 1 is not a priority; it's a
!       special indicator saying that this record is for an AFS database
!       server.
! 
!       If you have multiple db servers (see below for adding new ones), you
!       should create multiple records of this type, one per db server.
! 
!   Congratulations!  You now have an AFS cell.  If any of the above steps
!   failed, please check the steps carefully and make sure that you've done
!   them all in order.  If that doesn't reveal the cause of the problem,
!   please feel free to submit a bug report with reportbug.  Include as many
!   details as possible on exactly what you typed and exactly what you saw
!   as a result, particularly any error messages.
! 
! Adding Additional Servers
! 
!   If you decide one server is not enough, or if you're adding a server to
!   an existing cell, here is roughly what you should do:
! 
!   1.  Copy securely (using scp, encrypted Kerberos rcp, or some other
!       secure method) all of /etc/openafs/server to the new server.
! 
!   2.  Install the openafs-fileserver package on the new server.
! 
!   3.  If the machine is to be a file server, create an fs instance using
!       bos create:
! 
!           bos create <host> fs fs -cmd /usr/lib/openafs/fileserver \
!               -cmd /usr/lib/openafs/volserver \
!               -cmd /usr/lib/openafs/salvager -localauth
! 
!       For a file server, this is all you have to do.
! 
!   4.  For database servers, also install openafs-dbserver and then use bos
!       addhost to add the new server to /etc/openafs/server/CellServDB:
! 
!           bos addhost <server> <new-server>
! 
!       for each db server <server> in your cell (including the new one).
!       Then, restart the ptserver and vlserver instances on each of your
!       existing servers with:
! 
!           bos restart <server> ptserver
!           bos restart <server> vlserver
! 
!       It's best to wait a few seconds after doing this for each server
!       before doing the next server so that voting finishes and you never
!       lose a quorum.
! 
!       Only after ptserver and vlserver have been restarted on each of your
!       existing servers, create ptserver and vlserver instances on the new
!       server:
! 
!           bos create <host> ptserver simple /usr/lib/openafs/ptserver \
!               -localauth
!           bos create <host> vlserver simple /usr/lib/openafs/vlserver \
!               -localauth
! 
!       The existing servers should then propagate the database to the new
!       server.  If you are using buserver, you will need to do the same
!       thing for it as with ptserver and vlserver.
! 
!       Note that you do not need to run a file server on a db server if you
!       don't want to (and larger sites probably will not want to), but you
!       always need to have the openafs-fileserver package installed on db
!       servers.  It contains the bosserver binary and some of the shared
!       infrastructure.
! 
!   5.  If you added a new db server, configure your clients to use it.  If
!       you are using AFSDB records in DNS, you can just add a new record
!       (see point 10 in the instructions for creating a new cell).
!       Otherwise, clients will need to have the new server IP address added
!       to their /etc/openafs/CellServDB file (or /usr/vice/etc/CellServDB
!       for non-Debian clients using the standard AFS paths), and the client
!       will have to be restarted before it will know about the new db
!       server.
! 
!   The standard rule of thumb is that all of your database servers and file
!   servers should ideally be running the same version of OpenAFS.  However,
!   in practice OpenAFS is fairly good at backward compatibility and you can
!   generally mix and match different versions.  Be careful, though, to
!   ensure that all of your database servers are built the same when it
!   comes to options like --enable-supergroups (enabled in the Debian
!   packages).
! 
! Upgrades
! 
!   Currently, during an upgrade of the openafs-fileserver package, all
!   services will be stopped and restarted.  If openafs-dbserver is upgraded
!   without upgrading openafs-fileserver, those server binaries will not be
!   stopped and restarted; that restart will have to be done by hand.
! 
!   It is possible that future versions of this package will install for
!   example /usr/lib/openafs/fileserver.package instead of
!   /usr/lib/openafs/fileserver and then create links to the actual binaries
!   in postinst.  Upgrades would then not replace the old binaries, but
!   instead a script will be provided to roll the links forward to the new
!   versions.  The intent is that people could install the new package on
!   all their servers and then quickly move the links before restarting the
!   bosserver.  This has not yet been implemented.
Index: openafs/src/packaging/Debian/TODO
diff -c openafs/src/packaging/Debian/TODO:1.1 openafs/src/packaging/Debian/TODO:1.1.2.1
*** openafs/src/packaging/Debian/TODO:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/TODO	Thu Mar 23 15:20:31 2006
***************
*** 1 ****
! * Get bos restrict working
--- 1,13 ----
! * Get bos restrict working.
! 
! * The configuration transcript and the README.servers file would be best
!   read together, but preferrably with some nicer formatting (such as HTML
!   with a style sheet to set off the transcript in a different background
!   color).
! 
! * Consider including the kdump executable in the kernel module package.
!   openafs-client would have to provide a wrapper script to run the
!   appropriate kdump and the kernel module package would need to install
!   the kdump executable, maybe in /usr/lib/openafs, named after the kernel
!   image installed.
! 
Index: openafs/src/packaging/Debian/afs-newcell
diff -c openafs/src/packaging/Debian/afs-newcell:1.1 openafs/src/packaging/Debian/afs-newcell:1.1.2.1
*** openafs/src/packaging/Debian/afs-newcell:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/afs-newcell	Thu Mar 23 15:20:31 2006
***************
*** 1,19 ****
  #!/usr/bin/perl -w
  # Copyright (C) 2000 by Sam Hartman
! # This file may be copied either under the terms of the GNU GPL or the IBM Public License
! # either version 2 or later of the GPL or version 1.0 or later of the IPL.
  
  use Term::ReadLine;
  use strict;
  use Debian::OpenAFS::ConfigUtils;
  use Getopt::Long;
! use vars qw($admin $server
! 	   $requirements_met  $shutdown_needed);
  my $rl = new Term::ReadLine('afs-newcell');
  
  =head1  NAME
  
!    afs-newcell - Set up initial database server for AFS cell.
  
  =head1 SYNOPSIS
  
--- 1,20 ----
  #!/usr/bin/perl -w
  # Copyright (C) 2000 by Sam Hartman
! # This file may be copied either under the terms of the GNU GPL or the IBM
! # Public License either version 2 or later of the GPL or version 1.0 or later
! # of the IPL.
  
  use Term::ReadLine;
  use strict;
  use Debian::OpenAFS::ConfigUtils;
  use Getopt::Long;
! use Socket qw(inet_ntoa);
! use vars qw($admin $server $requirements_met $shutdown_needed);
  my $rl = new Term::ReadLine('afs-newcell');
  
  =head1  NAME
  
! afs-newcell - Set up initial database server for AFS cell
  
  =head1 SYNOPSIS
  
***************
*** 21,37 ****
  
  =head1 DESCRIPTION
  
- 
  This script sets up the initial AFS database and configures the first
  database/file server.
  
! The B<requirements-met> option specifies that the initial requirements
! have been met and that the script can proceed without displaying the
! initial banner or asking for confirmation.
! 
! The B<admin> option specifies the name of the administrative user.
! This user will be given system:administrators and susers permission in
! the cell.
  
  =head1 AUTHOR
  
--- 22,36 ----
  
  =head1 DESCRIPTION
  
  This script sets up the initial AFS database and configures the first
  database/file server.
  
! The B<--requirements-met> option specifies that the initial requirements have
! been met and that the script can proceed without displaying the initial
! banner or asking for confirmation.
! 
! The B<--admin> option specifies the name of the administrative user.  This
! user will be given system:administrators and susers permission in the cell.
  
  =head1 AUTHOR
  
***************
*** 39,59 ****
  
  =cut
  
! # main script
  
! GetOptions (
! 	    "requirements-met" => \$requirements_met, 
! 	    "admin=s" => \$admin);
  
  unless ($requirements_met) {
!   print <<eoreqs;
! 			    Prerequisites
  
  In order to set up a new AFS cell, you must meet the following:
  
  1) You need a working Kerberos realm with Kerberos4 support.  You
!    should install Heimdal with Kth-kerberos compatibility or MIT
!    Kerberos5.
  
  2) You need to create the single-DES AFS key and load it into
     /etc/openafs/server/KeyFile.  If your cell's name is the same as
--- 38,57 ----
  
  =cut
  
! # Flush all output immediately.
! $| = 1;
  
! GetOptions ("requirements-met" => \$requirements_met, "admin=s" => \$admin);
  
  unless ($requirements_met) {
!     print <<eoreqs;
!                             Prerequisites
  
  In order to set up a new AFS cell, you must meet the following:
  
  1) You need a working Kerberos realm with Kerberos4 support.  You
!    should install Heimdal with KTH Kerberos compatibility or MIT
!    Kerberos 5.
  
  2) You need to create the single-DES AFS key and load it into
     /etc/openafs/server/KeyFile.  If your cell's name is the same as
***************
*** 66,191 ****
  3) This machine should have a filesystem mounted on /vicepa.  If you
     do not have a free partition, then create a large file by using dd
     to extract bytes from /dev/zero.  Create a filesystem on this file
!    and mount it using -oloop.  
  
  4) You will need an administrative principal created in a Kerberos
! realm.  This principal will be added to susers and
! system:administrators and thus will be able to run administrative
! commands.  Generally the user is a root instance of some administravie
! user.  For example if jruser is an administrator then it would be
! reasonable to create jruser/root and specify jruser/root as the user
! to be added in this script.
  
  5) The AFS client must not be running on this workstation.  It will be
! at the end of this script.
  
  eoreqs
  
!   $_ = $rl->readline("Do you meet these requirements? [y/n] ");
!   unless (/^y/i ) {
!     print "Run this script again when you meet the requirements\n";
!     exit(1);
!   }
! 	
! 		if ($> != 0) {
! die "This script should almost always be run as root.  Use the --requirements-met option to run as non-root.\n";
! }
  }
  open(MOUNT, "mount |") or die "Failed to run mount: $!\n";
  while(<MOUNT>) {
! if(m:^AFS:) {
! print "The AFS client is currently running on this workstation.\n";
! print "Please restart this script after running /etc/init.d/openafs-client stop\n";
! exit(1);
! }
  }
  close MOUNT;
  
  unless ( -f "/etc/openafs/server/KeyFile") {
!   print "You do not have an AFS keyfile.  Please create this using asetkey from openafs-krb5 or 
! the bos addkey command";
!   exit(1);
  }
  
  print "If the fileserver is not running, this may hang for 30 seconds.\n";
  run("/etc/init.d/openafs-fileserver stop");
! $server = `hostname`;
  chomp $server;
! $admin = $rl->readline("What administrative principal should be used? ") unless $admin;
!  die "Please specify an administrative user\n" unless $admin;
! $admin =~ s:/:.:g;
! if($admin =~ /@/) {
! die "The administrative user must be in the same realm as the cell and no realm may be specified.\n";
  }
! open(CELL, "/etc/openafs/server/ThisCell") 
!   or die "Cannot open /etc/openafs/server/ThisCell: $!\n";
  my $cell = <CELL>;
  chomp $cell;
  
! run( "echo \\>$cell >/etc/openafs/server/CellServDB");
  run("/etc/init.d/openafs-fileserver start");
  $shutdown_needed = 1;
! run ("bos addhost $server $server -localauth ||true");
! run("bos adduser $server $admin -localauth");
! unwind("bos removeuser $server $admin -localauth");
! if ( -f "/var/lib/openafs/db/prdb.DB0" ) {
!   die "Protection database already exists; cell already partially created\n";
!  }
! open(PRDB, "|pt_util -p /var/lib/openafs/db/prdb.DB0 -w ")
! or die "Unable to start pt_util: $!\n";
! print PRDB "$admin 128/20 1 -204 -204\n";
  print PRDB "system:administrators 130/20 -204 -204 -204\n";
! print PRDB" $admin 1\n";
  close PRDB;
! unwind( "rm /var/lib/openafs/db/prdb* ");
! # Start up ptserver and vlserver
  run("bos create $server ptserver simple /usr/lib/openafs/ptserver -localauth");
  unwind("bos delete $server ptserver -localauth");
- 
  run("bos create $server vlserver simple /usr/lib/openafs/vlserver -localauth");
  unwind("bos delete $server vlserver -localauth");
  
! run( "bos create $server fs fs ".
!      "-cmd /usr/lib/openafs/fileserver ".
!      "-cmd /usr/lib/openafs/volserver ".
!      "-cmd /usr/lib/openafs/salvager -localauth");
! unwind( "bos delete $server fs -localauth ");
  
  print "Waiting for database elections: ";
  sleep(30);
  print "done.\n";
! # Past this point we want to control when bos shutdown happens
  $shutdown_needed = 0;
! unwind( "bos shutdown $server -localauth ");
  run("vos create $server a root.afs -localauth");
! # bring up client
! run("echo $cell >/etc/openafs/ThisCell");
  run("/etc/init.d/openafs-client force-start");
  my $afs_running = 0;
! open(MOUNT, "mount |") or die "Failed to run mount: $!\n";
  while(<MOUNT>) {
! if(m:^AFS:) {
! 	$afs_running = 1;
  }
- 	}
  unless ($afs_running) {
! print "*** The AFS client failed to start.\n";
! print  "Please fix whatever problem kept it from running.\n";
! 	exit(1);
  }
  
! print <<eomsg; 
! Now, get tokens as $admin in the $cell cell.  Then, run
! afs-rootvol.
! eomsg
! 
! 
! 
! 
  @unwinds = ();
  END {
! # If we fail before all the instances are created, we need to perform 
! # our own bos shutdown
!     system("bos shutdown $server -localauth") if $shutdown_needed;
!   run(pop @unwinds) while @unwinds;
!   }
--- 64,279 ----
  3) This machine should have a filesystem mounted on /vicepa.  If you
     do not have a free partition, then create a large file by using dd
     to extract bytes from /dev/zero.  Create a filesystem on this file
!    and mount it using -oloop.
  
  4) You will need an administrative principal created in a Kerberos
!    realm.  This principal will be added to susers and
!    system:administrators and thus will be able to run administrative
!    commands.  Generally the user is a root or admin instance of some
!    administrative user.  For example if jruser is an administrator then
!    it would be reasonable to create jruser/admin (or jruser/root) and
!    specify that as the user to be added in this script.
  
  5) The AFS client must not be running on this workstation.  It will be
!    at the end of this script.
  
  eoreqs
+ #'# cperl-mode
  
!     $_ = $rl->readline("Do you meet these requirements? [y/n] ");
!     unless (/^y/i ) {
!         print "Run this script again when you meet the requirements\n";
!         exit(1);
!     }
! 
!     if ($> != 0) {
!         die "This script should almost always be run as root.  Use the\n"
!             . "--requirements-met option to run as non-root.\n";
!     }
  }
+ 
+ # Make sure the AFS client is not already running.
  open(MOUNT, "mount |") or die "Failed to run mount: $!\n";
  while(<MOUNT>) {
!     if (m:^AFS:) {
!         print "The AFS client is currently running on this workstation.\n";
!         print "Please restart this script after running"
!             . " /etc/init.d/openafs-client stop\n";
!         exit(1);
!     }
  }
  close MOUNT;
  
+ # Make sure there is a keyfile.
  unless ( -f "/etc/openafs/server/KeyFile") {
!     print "You do not have an AFS keyfile.  Please create this using\n";
!     print "asetkey from openafs-krb5 or the bos addkey command\n";
!     exit(1);
  }
  
+ # Stop the file server.
  print "If the fileserver is not running, this may hang for 30 seconds.\n";
  run("/etc/init.d/openafs-fileserver stop");
! 
! # Get the local hostname.  Use the fully-qualified hostname to be safer.
! $server = `hostname -f`;
  chomp $server;
! my $ip = gethostbyname $server;
! if (inet_ntoa($ip) eq '127.0.0.1') {
!     print "\n";
!     print "Your hostname $server resolves to 127.0.0.1, which AFS cannot\n";
!     print "cope with.  Make sure your hostname resolves to a non-loopback\n";
!     print "IP address.  (Check /etc/hosts and make sure that your hostname\n";
!     print "isn't listed on the 127.0.0.1 line.  If it is, removing it from\n";
!     print "that line will probably solve this problem.)\n";
!     exit(1);
  }
! 
! # Determine the admin principal.
! $admin = $rl->readline("What administrative principal should be used? ")
!     unless $admin;
! print "\n";
! die "Please specify an administrative user\n" unless $admin;
! my $afs_admin = $admin;
! $afs_admin =~ s:/:.:g;
! if ($afs_admin =~ /@/) {
!     die "The administrative user must be in the same realm as the cell and\n"
!         . "no realm may be specified.\n";
! }
! 
! # Determine the local cell.  This should be configured via debconf, from the
! # openafs-client configuration, when openafs-fileserver is installed.
! open(CELL, "/etc/openafs/server/ThisCell")
!     or die "Cannot open /etc/openafs/server/ThisCell: $!\n";
  my $cell = <CELL>;
  chomp $cell;
  
! # Make sure the new cell is configured in the client CellServDB.
! open(CELLSERVDB, "/etc/openafs/CellServDB")
!     or die "Cannot open /etc/openafs/CellServDB: $!\n";
! my $found = 0;
! while (<CELLSERVDB>) {
!     next unless /^>\Q$cell\E\s/;
!     while (<CELLSERVDB>) {
!         last if /^>/;
!         my ($dbserver) = split ' ';
!         if ($dbserver eq inet_ntoa($ip)) {
!             $found = 1;
!             last;
!         }
!     }
!     last;
! }
! unless ($found) {
!     print "\n";
!     print "The new cell $cell is not configured in /etc/openafs/CellServDB\n";
!     print "Add configuration like:\n\n";
!     print ">$cell\n";
!     print inet_ntoa($ip), "\n\n";
!     print "to that file before continuing.\n";
!     exit(1);
! }
! 
! # Write out a new CellServDB for the local cell containing only this server.
! if (-f "/etc/openafs/server/CellServDB") {
!     print "/etc/openafs/server/CellServDB already exists, renaming to .old\n";
!     rename("/etc/openafs/server/CellServDB",
!            "/etc/openafs/server/CellServDB.old")
!         or die "Cannot rename /etc/openafs/server/CellServDB: $!\n";
! }
! open(CELLSERVDB, "> /etc/openafs/server/CellServDB")
!     or die "Cannot create /etc/openafs/server/CellServDB: $!\n";
! print CELLSERVDB ">$cell\n";
! print CELLSERVDB inet_ntoa($ip), "\t\t\t#$server\n";
! close CELLSERVDB or die "Cannot write to /etc/openafs/server/CellServDB: $!\n";
! 
! # Now, we should be able to start bos and add the admin user.
  run("/etc/init.d/openafs-fileserver start");
  $shutdown_needed = 1;
! run("bos adduser $server $afs_admin -localauth");
! unwind("bos removeuser $server $afs_admin -localauth");
! 
! # Create the initial protection database using pt_util.  This is safer than
! # the standard mechanism of starting the cell in noauth mode until the first
! # user has been created.
! if (-f "/var/lib/openafs/db/prdb.DB0") {
!     warn "ERROR: Protection database already exists; cell already partially\n";
!     warn "ERROR: created.   If you do not want the current database, remove\n";
!     warn "ERROR: all files in /var/lib/openafs/db and then run this program\n";
!     warn "ERROR: again.\n";
!     exit(1);
! }
! print "\nCreating initial protection database.  This will print some errors\n";
! print "about an id already existing and a bad ubik magic.  These errors can\n";
! print "be safely ignored.\n\n";
! open(PRDB, "| pt_util -p /var/lib/openafs/db/prdb.DB0 -w")
!     or die "Unable to start pt_util: $!\n";
! print PRDB "$afs_admin 128/20 1 -204 -204\n";
  print PRDB "system:administrators 130/20 -204 -204 -204\n";
! print PRDB " $afs_admin 1\n";
  close PRDB;
! unwind("rm /var/lib/openafs/db/prdb*");
! print "\n";
! 
! # We should now be able to start ptserver and vlserver.
  run("bos create $server ptserver simple /usr/lib/openafs/ptserver -localauth");
  unwind("bos delete $server ptserver -localauth");
  run("bos create $server vlserver simple /usr/lib/openafs/vlserver -localauth");
  unwind("bos delete $server vlserver -localauth");
  
! # Create a file server as well.
! run("bos create $server fs fs"
!     . " -cmd /usr/lib/openafs/fileserver"
!     . " -cmd /usr/lib/openafs/volserver"
!     . " -cmd /usr/lib/openafs/salvager -localauth");
! unwind("bos delete $server fs -localauth");
  
+ # Pause for a while for ubik to catch up.
  print "Waiting for database elections: ";
  sleep(30);
  print "done.\n";
! 
! # Past this point we want to control when bos shutdown happens.
  $shutdown_needed = 0;
! unwind("bos shutdown $server -localauth -wait");
  run("vos create $server a root.afs -localauth");
! unwind("vos remove $server a root.afs -localauth");
! 
! # We should now be able to bring up the client (it may need root.afs to exist
! # if not using dynroot).  We override whatever default cell was configured for
! # the client, just in case it was pointing to some other cell.
! open(THIS, "> /etc/openafs/ThisCell")
!     or die "ERROR: Cannot create /etc/openafs/ThisCell: $!\n";
! print THIS "$cell\n";
! close THIS or die "ERROR: Cannot write to /etc/openafs/ThisCell: $!\n";
  run("/etc/init.d/openafs-client force-start");
+ 
+ # Verify that AFS has managed to start.
  my $afs_running = 0;
! open(MOUNT, "mount |") or die "ERROR: Failed to run mount: $!\n";
  while(<MOUNT>) {
!     if (m:^AFS:) {
!         $afs_running = 1;
!     }
  }
  unless ($afs_running) {
!     print "ERROR: The AFS client failed to start.\n";
!     print "ERROR: Please fix whatever problem kept it from running.\n";
!     exit(1);
  }
+ print "\n";
+ print "Now, get tokens as $admin in the $cell cell.\n";
+ print "Then, run afs-rootvol.\n";
  
! # Success, so clear the unwind commands.
  @unwinds = ();
+ 
+ # If we fail before all the instances are created, we need to back out of
+ # everything we did as much as possible.
  END {
!     if ($shutdown_needed || @unwinds) {
!         print "\nCell setup failed, ABORTING\n";
!     }
!     system("bos shutdown $server -localauth -wait") if $shutdown_needed;
!     run(pop @unwinds) while @unwinds;
! }
Index: openafs/src/packaging/Debian/afs-rootvol
diff -c openafs/src/packaging/Debian/afs-rootvol:1.1 openafs/src/packaging/Debian/afs-rootvol:1.1.2.1
*** openafs/src/packaging/Debian/afs-rootvol:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/afs-rootvol	Thu Mar 23 15:20:31 2006
***************
*** 1,157 ****
  #!/usr/bin/perl -w
  # Copyright (C) 2000 by Sam Hartman
! # This file may be copied either under the terms of the GNU GPL or the IBM Public License
! # either version 2 or later of the GPL or version 1.0 or later of the IPL.
  
  use strict;
  use Term::ReadLine;
  use Getopt::Long;
  
! =head1  NAME
  
!    afs-rootvol - Generate and populate root volumes for new AFS cells.
  
  =head1 SYNOPSIS
  
! B<afs-rootvol> [B<--requirements-met>] [B<--server> server-name] [B<--partition> partition-letter]
  
  =head1 DESCRIPTION
  
! This script sets up an AFS cell's root volumes.  It assumes that you
! already have a fileserver and database servers.  The fileserver should
! have an empty root.afs.
!   This script creates root.cell, user, service and populates root.afs.  
  
  =head1 AUTHOR
  
  Sam Hartman <hartmans@debian.org>
  
  =cut
! 
! use vars qw($rl $server  $part $requirements_met);
! use vars qw( @unwinds);
! use Debian::OpenAFS::ConfigUtils;
! 
  
  # This subroutine creates a volume, mounts it and then sets the access
  # to allow read by anyuser.  The volume is scheduled for deletion in
  # case of error.
! # mkvol(volume, mount)
! 		    sub mkvol($$) {
! 		      my ($vol, $mnt) = @_;
! 		      run("vos create $server $part $vol -localauth");
! 		      unwind("vos remove $server $part $vol -localauth");
! 		      run("fs mkm $mnt $vol ");
! 		      run("fs sa $mnt system:anyuser rl");
! 		    }
  
! # main script
  $rl = new Term::ReadLine('AFS');
! 
! 
! GetOptions (
! 	    "requirements-met" => \$requirements_met, 
! 	    "server=s" => \$server,
! 	    "partition=s" => \$part
! 	    );
  unless ($requirements_met) {
!       print <<eotext;
! 			    Prerequisites
  
! In order to set up the root.afs volume, you must meet the following pre-conditions:
  
  1) The cell must be configured, running a database server with a
     volume location and protection server.  The afs-newcell script will
     set up these services.
  
! 2)  You must be logged into the cell with  tokens in
!    system:administrators and with a principal that is in the susers
     file of the servers in the cell.
  
  3) You need a fileserver in the cell with partitions mounted and a
!    root.afs volume created.   Presumably, it has no volumes on it,
     although the script will work so long as nothing besides root.afs
     exists.  The afs-newcell script will set up the file server.
  
  4) The AFS client must be running pointed at the new cell.
  eotext
      $_ = $rl->readline("Do you meet these conditions? (y/n) ");
      unless (/^y/i ) {
! 	print "Please restart the script when you meet these conditions.\n";
! 	exit(1);
      }
- 	
- 		if ($> != 0) {
- die "This script should almost always be run as root.  Use the --requirements-met option to run as non-root.\n";
  }
  
! }
! # Get configuration information we need
  open(CELL, "/etc/openafs/server/ThisCell")
! or die "Unable to find out what cell this machine serves: $!\n";
  my $cell = <CELL>;
  close CELL;
  chomp $cell;
  
  unless ($server) {
!   print <<eotext; 
! You will need to select a server (hostname) and AFS
! partition on which to create the root volumes.
  eotext
  
!   $server = $rl->readline("What AFS Server should volumes be placed on? ");
!   die "Please select a server.\n" unless $server;
  }
  unless ($part) {
!   $part = $rl    ->readline("What partition? [a] ");
! $part = "a" unless $part;
  }
  
  
! run("fs sa /afs system:anyuser rl");
! 
  run("vos create $server $part root.cell -localauth");
  unwind("vos remove $server $part root.cell -localauth");
! # We make root.cell s:anyuser readable after we mount in the next
! # loop.
! 
  
  open(CELLSERVDB, "/etc/openafs/CellServDB")
      or die "Unable to open /etc/openafs/CellServDB: $!\n";
! while(<CELLSERVDB>) {
      chomp;
!     if (/^>\s*([a-z0-9_\-.]+)/ ) {
! 	run("fs mkm /afs/$1 root.cell -cell $1  -fast");
! 	unwind ("fs rmm /afs/$1");
      }
  }
  
  run("fs sa /afs/$cell system:anyuser rl");
! run ("fs mkm /afs/.$cell root.cell -cell $cell -rw");
! unwind ("fs rmm /afs/.$cell");
! run("fs mkm /afs/.root.afs root.afs -rw");
! unwind ("fs rmm /afs/.root.afs");
! 
! mkvol( "user", "/afs/$cell/user" );
! mkvol( "service", "/afs/$cell/service" );
  
! $cell =~ /^([^.]*)/;
  my $cellpart = $1;
! run("ln -s /afs/$cell /afs/$cellpart");
! unwind ("rm /afs/$cellpart");
! run( "ln -s /afs/.$cell /afs/.$cellpart" );
! unwind ("rm /afs/.$cellpart");
! 
! run( "vos addsite $server $part root.afs -localauth" );
! run( "vos addsite $server $part root.cell -localauth" );
! run( "vos release root.afs -localauth" );
! run( "vos release root.cell -localauth" );
! unwind( "vos remove $server $part root.cell.readonly -localauth ");
! unwind( "vos remove $server $part root.afs.readonly -localauth ");
  
  @unwinds = ();
  
  END {
!   run(pop @unwinds) while @unwinds;
!   }
! 
--- 1,194 ----
  #!/usr/bin/perl -w
  # Copyright (C) 2000 by Sam Hartman
! # This file may be copied either under the terms of the GNU GPL or the IBM
! # Public License either version 2 or later of the GPL or version 1.0 or later
! # of the IPL.
  
  use strict;
+ use Debian::OpenAFS::ConfigUtils;
  use Term::ReadLine;
  use Getopt::Long;
+ use vars qw($rl $server $part $requirements_met);
  
! =head1 NAME
  
! afs-rootvol - Generate and populate root volumes for new AFS cells.
  
  =head1 SYNOPSIS
  
! B<afs-rootvol> [B<--requirements-met>] [B<--server> I<server-name>]
! [B<--partition> I<partition-letter>]
  
  =head1 DESCRIPTION
  
! This script sets up an AFS cell's root volumes.  It assumes that you already
! have a fileserver and database servers.  The fileserver should have an empty
! root.afs.  This script creates root.cell, user, and service and populates
! root.afs.
  
  =head1 AUTHOR
  
  Sam Hartman <hartmans@debian.org>
  
  =cut
! #'# cperl-mode
  
  # This subroutine creates a volume, mounts it and then sets the access
  # to allow read by anyuser.  The volume is scheduled for deletion in
  # case of error.
! sub mkvol($$) {
!     my ($vol, $mnt) = @_;
!     run("vos create $server $part $vol -localauth");
!     unwind("vos remove $server $part $vol -localauth");
!     run("fs mkm $mnt $vol ");
!     run("fs sa $mnt system:anyuser rl");
! }
  
! # Main script.  Flush all output immediately.
! $| = 1;
  $rl = new Term::ReadLine('AFS');
! GetOptions ("requirements-met" => \$requirements_met,
!             "server=s" => \$server,
!             "partition=s" => \$part);
  unless ($requirements_met) {
!     print <<eotext;
!                             Prerequisites
  
! In order to set up the root.afs volume, you must meet the following
! pre-conditions:
  
  1) The cell must be configured, running a database server with a
     volume location and protection server.  The afs-newcell script will
     set up these services.
  
! 2) You must be logged into the cell with tokens in for a user in
!    system:administrators and with a principal that is in the UserList
     file of the servers in the cell.
  
  3) You need a fileserver in the cell with partitions mounted and a
!    root.afs volume created.  Presumably, it has no volumes on it,
     although the script will work so long as nothing besides root.afs
     exists.  The afs-newcell script will set up the file server.
  
  4) The AFS client must be running pointed at the new cell.
  eotext
+ 
      $_ = $rl->readline("Do you meet these conditions? (y/n) ");
      unless (/^y/i ) {
!         print "Please restart the script when you meet these conditions.\n";
!         exit(1);
!     }
!     if ($> != 0) {
!         die "This script should almost always be run as root.  Use the\n"
!             . "--requirements-met option to run as non-root.\n";
      }
  }
  
! # Get configuration information we need.
  open(CELL, "/etc/openafs/server/ThisCell")
!     or die "Unable to find out what cell this machine serves: $!\n";
  my $cell = <CELL>;
  close CELL;
  chomp $cell;
  
  unless ($server) {
!     print <<eotext;
! 
! You will need to select a server (hostname) and AFS partition on which to
! create the root volumes.
! 
  eotext
  
!     $server = $rl->readline("What AFS Server should volumes be placed on? ");
!     die "Please select a server.\n" unless $server;
  }
  unless ($part) {
!     $part = $rl->readline("What partition? [a] ");
!     $part = "a" unless $part;
  }
+ print "\n";
  
+ # Make sure the user has tokens.  Forgetting to do this is a common error.
+ my $status = system("tokens | grep Expires > /dev/null");
+ if ($status != 0) {
+     die "You appear to not have AFS tokens.  Obtain tokens (with aklog,\n"
+         . "for example) and then run this script again.\n";
+ }
  
! # Figure out where root.afs is.  There are two possibilities: either we aren't
! # running with dynroot, and root.afs is therefore accessible as /afs, or we
! # are running with dynroot, in which case we have to create root.cell first
! # and then mount root.afs under it.
! #
! # Always create root.cell first; we may need it if running with dynroot, and
! # it doesn't hurt to do it now regardless.
! my $rootmnt = "/afs";
  run("vos create $server $part root.cell -localauth");
  unwind("vos remove $server $part root.cell -localauth");
! my $dynroot = (-d "$rootmnt/$cell/.");
! if ($dynroot) {
!     run("fs mkm /afs/$cell/.root.afs root.afs -rw");
!     unwind("fs rmm /afs/$cell/.root.afs");
!     $rootmnt = "/afs/$cell/.root.afs";
! }
! run("fs sa $rootmnt system:anyuser rl");
  
+ # Scan CellServDB and create the cell mount points for every cell found there.
+ # Force these commands to succeed, since it's possible to end up with
+ # duplicate entries in CellServDB (and the second fs mkm will fail).
  open(CELLSERVDB, "/etc/openafs/CellServDB")
      or die "Unable to open /etc/openafs/CellServDB: $!\n";
! while (<CELLSERVDB>) {
      chomp;
!     if (/^>\s*([a-z0-9_\-.]+)/) {
!         run("fs mkm $rootmnt/$1 root.cell -cell $1 -fast || true");
!         unwind("fs rmm $rootmnt/$1 || true");
      }
  }
  
+ # Now, create the read/write mount points for root.cell and root.afs and set
+ # root.cell system:anyuser read.
  run("fs sa /afs/$cell system:anyuser rl");
! run("fs mkm $rootmnt/.$cell root.cell -cell $cell -rw");
! unwind("fs rmm $rootmnt/.$cell");
! run("fs mkm $rootmnt/.root.afs root.afs -rw");
! unwind("fs rmm $rootmnt/.root.afs");
! 
! # Create the user and service mount point volumes to fit the semi-standard AFS
! # cell layout.
! mkvol("user", "/afs/$cell/user");
! mkvol("service", "/afs/$cell/service");
  
! # Strip the domain off of the cell name and create the short symlinks.
! $cell =~ /^([^.]+)/;
  my $cellpart = $1;
! if ($cellpart && $cellpart ne $cell) {
!     run("ln -s $cell $rootmnt/$cellpart");
!     unwind("rm $rootmnt/$cellpart");
!     run("ln -s .$cell $rootmnt/.$cellpart");
!     unwind("rm $rootmnt/.$cellpart");
! }
! if ($dynroot) {
!     run("fs rmm /afs/$cell/.root.afs");
!     unwind("fs mkm /afs/$cell/.root.afs root.afs -rw");
! }
! 
! # Now, replicate the infrastructure volumes.
! run("vos addsite $server $part root.afs -localauth");
! run("vos addsite $server $part root.cell -localauth");
! run("vos release root.afs -localauth");
! run("vos release root.cell -localauth");
! unwind("vos remove $server $part root.cell.readonly -localauth");
! unwind("vos remove $server $part root.afs.readonly -localauth");
  
+ # Success, so clear the unwind commands.
  @unwinds = ();
  
+ # If we fail before all the instances are created, we need to back out of
+ # everything we did as much as possible.
  END {
!     if (@unwinds) {
!         print "\nRoot volume setup failed, ABORTING\n";
!     }
!     run(pop @unwinds) while @unwinds;
! }
Index: openafs/src/packaging/Debian/afs.conf
diff -c /dev/null openafs/src/packaging/Debian/afs.conf:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/afs.conf	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1,129 ----
+ # -*- sh -*-
+ # Copyright 2000, International Business Machines Corporation and others.
+ # All Rights Reserved.
+ # 
+ # This software has been released under the terms of the IBM Public
+ # License.  For details, see the LICENSE file in the top-level source
+ # directory or online at http://www.openafs.org/dl/license10.html
+ 
+ # Configuration information for AFS client.
+ 
+ # The following options are maintained by debconf.  To change them, run
+ # dpkg-reconfigure openafs-client.
+ #
+ #   AFS_CLIENT          Whether to start the AFS client at boot
+ #   AFS_AFSDB           Whether to use AFSDB DNS records to find VLDB servers
+ #   AFS_CRYPT           Whether to enable fcrypt encryption
+ #   AFS_DYNROOT         Whether to use a dynamic /afs directory
+ #   AFS_FAKESTAT        Whether to fake stat data for mount points
+ 
+ test -f /etc/openafs/afs.conf.client && . /etc/openafs/afs.conf.client
+ 
+ # Set to "-verbose" for a lot of debugging information from afsd.  Only useful
+ # for debugging as it prints a LOT of information.
+ VERBOSE=
+ 
+ # AFS client configuration options.
+ #
+ # Here is a (mostly) complete list of flags that afsd accepts and that are
+ # useful here:
+ #
+ #   -blocks     The number of blocks available in the workstation cache.
+ #   -files      The target number of files in the workstation cache (Default:
+ #               1000).
+ #   -rootvol    The name of the root volume to use.
+ #   -stat       The number of stat cache entries.
+ #   -hosts      List of servers to check for volume location info FOR THE
+ #               HOME CELL.
+ #   -memcache   Use an in-memory cache rather than disk.
+ #   -cachedir   The base directory for the workstation cache.
+ #   -mountdir   The directory on which the AFS is to be mounted.
+ #   -confdir    The configuration directory.
+ #   -nosettime  Don't keep checking the time to avoid drift (default).
+ #   -settime    Keep checking the time to avoid drift.
+ #   -verbose    Be chatty.
+ #   -debug      Print out additional debugging info.
+ #   -daemons    The number of background daemons to start (Default: 2).
+ #   -rmtsys     Also fires up an afs remote sys call (e.g. pioctl, setpag)
+ #               support daemon 
+ #   -chunksize  2^n is the chunksize to be used (Default: use a kernel
+ #               module default).
+ #   -dcache     The number of data cache entries.
+ #   -prealloc   Number of preallocated "small" memory blocks
+ #   -waitclose  Make close calls always synchronous (slows them down, though)
+ #   -files_per_subdir   Number of files per cache subdir (Default: 2048).
+ #
+ # Using the memory cache is not recommended.  It's less stable than the disk
+ # cache and doesn't improve performance as much as it might sound.
+ #
+ # The default behavior is to pick one of the following option sets based on
+ # the size of the AFS cache, as follows:
+ #
+ #           cache < 128MB       $SMALL
+ #   128MB < cache < 512MB       $MEDIUM
+ #   512MB < cache < 1GB         $LARGE
+ #     1GB < cache < 2GB         $XLARGE
+ #     2GB < cache               $XXLARGE
+ #
+ # You can override that default behavior by setting OPTIONS below.
+ XXLARGE="-chunksize 20 -files 80000 -dcache 10000 -stat 15000 -daemons 6 -volumes 500"
+ XLARGE="-chunksize 20 -files 50000 -dcache 10000 -stat 15000 -daemons 5 -volumes 250"
+ LARGE="-chunksize 18 -files 25000 -dcache 10000 -stat 15000 -daemons 5 -volumes 200"
+ MEDIUM="-chunksize 18 -files 10000 -dcache 5000 -stat 7500 -daemons 3 -volumes 200"
+ SMALL="-chunksize 18 -files 2500 -dcache 2000 -stat 3000 -daemons 2 -volumes 200"
+ 
+ # The default behavior is to pick one of the above settings as described
+ # above.  You can override this by setting OPTIONS explicitly to either one of
+ # the above variables or to any set of flags that you prefer.
+ OPTIONS=AUTOMATIC
+ 
+ # The default value for the client sysname (as returned by fs sysname) is
+ # determined during the kernel module build and is taken from the architecture
+ # and the major Linux kernel version.  Accesses to directories named "@sys" in
+ # AFS will be internally redirected to a directory by this name by the AFS
+ # client, allowing a single path to resolve to different directories depending
+ # on the client architecture.
+ #
+ # If you would like to override the client sysname, uncomment this line and
+ # set the variable to a space-separated list of sysnames.  The AFS client will
+ # attempt to resolve @sys to each directory name in the order given.
+ #AFS_SYSNAME=""
+ 
+ # If you want to prefer particular servers for replicated volumes, you can
+ # configure that by defining an afs_server_prefs function here and then
+ # uncommenting the setting of AFS_POST_INIT below.  For more information, see
+ # fs help setserverprefs and fs getserverprefs (for the current values).
+ 
+ #afs_server_prefs() {
+ #    fs setserverprefs <host> <rank>
+ #}
+ 
+ # If you want to always run some command after starting OpenAFS, you can put
+ # it here.  Note that you cannot run multiple commands, even combined with &&
+ # or ; or similar shell meta-characters.  If you want to run multiple
+ # commands, define a shell function instead and put the name of the shell
+ # function here.
+ AFS_POST_INIT=
+ 
+ # Uncomment this line if you defined an afs_server_prefs function.  (If you
+ # have other commands that you also want to run, you'll have to put them in
+ # that function, as you can only run one function.)
+ #AFS_POST_INIT=afs_server_prefs
+ 
+ # If you want to always run some command before shutting down OpenAFS, you can
+ # put it here.  The same caveat applies about multiple commands.
+ AFS_PRE_SHUTDOWN=
+ 
+ # If you are having problems with AFS shutting down cleanly or the system not
+ # rebooting because the partition the AFS cache was on could not be unmounted,
+ # try installing lsof and uncommenting this.  This will cause all processes
+ # with open AFS files to be killed before unmounting AFS if the runlevel being
+ # switched to is 0 or 6.
+ #
+ # Warning: This means /etc/init.d/openafs-client stop will kill all processes
+ # with files open in AFS rather than returning an error saying the file system
+ # is busy.  This is probably what you want when the whole system is shutting
+ # down, but often *not* what you want when just stopping and restarting the
+ # client.  The code doesn't run unless the runlevel is 0 or 6, but still, be
+ # sure that this is what you want before enabling it.
+ #AFS_PRE_SHUTDOWN=kill_all_afs
Index: openafs/src/packaging/Debian/changelog
diff -c openafs/src/packaging/Debian/changelog:1.1 openafs/src/packaging/Debian/changelog:1.1.2.1
*** openafs/src/packaging/Debian/changelog:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/changelog	Thu Mar 23 15:20:31 2006
***************
*** 1,3 ****
--- 1,577 ----
+ openafs (1.4.0-4) unstable; urgency=low
+ 
+   * Hopefully fix sparc64 kernel support.  Thanks, Troy Benjegerdes.
+     (Closes: #219429)
+   * Document the need to restart ptserver and vlserver on the existing
+     database servers when adding a new one.  Thanks, Niklas Edmundsson.
+     (Closes: #349659)
+   * Include xstat_cm_test and xstat_fs_test in openafs-client, as they're
+     quite useful for debugging.
+ 
+  -- Russ Allbery <rra@debian.org>  Tue, 14 Mar 2006 21:07:07 -0800
+ 
+ openafs (1.4.0-3) unstable; urgency=low
+ 
+   * Apply upstream patch from Chas Williams to be more careful about what
+     dentry is used in renames, avoiding a kernel fault when renaming
+     dentries accessed through multiple paths (such as RO and RW).
+   * Apply patch to allow the module to build with the Ubuntu kernel.
+     Thanks, BjÃ¶rn Torkelsson.  (Closes: #342607)
+   * Stop unconditionally forcing the compiler to cc or gcc in configure,
+     allowing, among other things, building the kernel module with a
+     compiler other than the default system compiler.  (Closes: #338306)
+   * Call kernel-version correctly from prep-modules, which fixes build
+     issues with manually-built kernels.  (Closes: #344851)
+   * Backport man pages from upstream CVS.  (Closes: #79763)
+   * Include afsmonitor and livesys in openafs-client.
+   * Include volinfo in openafs-fileserver.
+   * Document FAM's lack of support for AFS's security model and recommend
+     gamin instead.  (Closes: #343246)
+   * Add a hint to README.Debian on what to do about the cache partition if
+     running ReiserFS or XFS without a spare partition.
+   * Use make install into debian/tmp rather than make dest.  make dest is
+     mostly for Transarc compatibility and make install looks more like a
+     typical package and makes it easier to evaluate differences in FHS
+     location between upstream and Debian.  As a side effect, there's no
+     need to mess with the @sys link.  (Closes: #165909)
+   * Install more files with dh_install rather than install commands in
+     debian/rules so that *.install shows a more complete picture of what
+     goes into each package.
+   * Don't ignore make distclean errors.
+ 
+  -- Russ Allbery <rra@debian.org>  Tue, 27 Dec 2005 15:34:16 -0800
+ 
+ openafs (1.4.0-2) unstable; urgency=low
+ 
+   * Install more of the standard OpenAFS utilities.  (Closes: #138851)
+     - openafs-dbserver: Install prdb_check and vldb_check.
+     - openafs-fileserver: Install voldump.
+     - openafs-client: Install fstrace, scout, and up (as afs-up).
+     - Modify fstrace to load its catalog from /usr/share/openafs.
+   * Do not install kpwvalid.  The default version does little useful and
+     the kpwvalid binary must be in AFS for it to take effect.
+   * Overhaul the way kernel modules are built.
+     - Recommend linux-image rather than kernel-image for newer kernels.
+     - Always recommend the kernel package; since it's only a recommends,
+       there's no need to special-case the hand-built kernel case.
+     - Be less fragile about how the kernel version is used in prep-modules
+       to support other ways kernel modules are built.  (Closes: #341836)
+     - Add Build-Depends and Uploaders to the openafs-modules-source
+       control file.
+     - Remove unused parts of prep-modules and heavily comment it.
+   * openafs-client should only recommend the AFS kernel module.  Many of
+     the client programs will work in unauthenticated mode without it, and
+     openafs-fileserver depends on it (but doesn't require the kernel
+     module).  (Closes: #342095)
+   * openafs-modules-source no longer has to depend on as many libraries.
+   * Suggest the same PAM settings for pam_krb5 that libpam-krb5 does.
+   * Update uploader address.
+ 
+  -- Russ Allbery <rra@debian.org>  Tue,  6 Dec 2005 23:34:18 -0800
+ 
+ openafs (1.4.0-1) unstable; urgency=low
+ 
+   * New upstream version.
+     - Builds correctly with 2.6.13 kernels and software suspend.
+     - Builds correctly with 2.6.12-10.  (Closes: #337883)
+   * Install afsd in /sbin rather than /usr/sbin.  While putting /usr in
+     AFS isn't as common as it once was, no reason to make it harder than
+     it needs to be.
+   * Update CellServDB to the 2005-10-15 grand.central.org version.
+   * Install NEWS as an upstream changelog.
+   * Add a watch file.
+   * Remove the unused and uninstalled make-links script.
+ 
+  -- Russ Allbery <rra@stanford.edu>  Sun,  6 Nov 2005 21:37:40 -0800
+ 
+ openafs (1.4rc4-1) unstable; urgency=low
+ 
+   * New upstream version.
+     - Correctly handle root.afs becoming replicated after the client
+       starts.  This should resolve the problems with AFS eventually
+       failing on the first system using a new cell.  (Closes: #88906)
+   * When kill_all_afs is enabled in /etc/openafs/afs.conf, only kill AFS
+     processes if the runlevel is 0 or 6.  You really only want this when
+     the system is shutting down.  (Closes: #325347)
+   * Remove the init script check of the cache file system and instead
+     improve the check in afsd.  The init script check used stat, which is
+     in /usr/bin and therefore not fair game for init scripts.
+   * Set PATH in the init script, just in case.
+   * libpam-openafs-kaserver must depend on openafs-client, not just
+     recommend it, since acquiring tokens requires that the client be
+     running.
+   * Expand README.Debian and include information about PAM configuration.
+   * Link libpam-openafs-kaserver's doc directory to openafs-client.
+   * Make the short descriptions shorter.
+   * Translation updates.
+     - Portuguese (Brazil), thanks AndrÃ© LuÃ­s Lopes.
+ 
+  -- Russ Allbery <rra@stanford.edu>  Wed, 21 Sep 2005 13:36:34 -0700
+ 
+ openafs (1.4rc1-1) unstable; urgency=low
+ 
+   * New upstream version.
+   * Install pam_afs.krb.so on hppa.  I believe the new PAM module build
+     process fixes the issue that was being worked around before.
+   * Improve the documentation and scripts for setting up new servers or a
+     new cell.  afs-rootvol can now be run from a client configured to use
+     dynroot.  afs-newcell generates the server CellServDB directly to work
+     around oddities with bos addhost.  There are many other, more minor
+     improvements as well.  Thanks to Faheem Mitha and Sergio Gelato for
+     analysis and patches.  (Closes: #322638)
+   * Update the configuration transcript to reflect the current packages,
+     messages, and instructions.  Thanks, Faheem Mitha.
+   * Fill in the server CellServDB with information about the local cell,
+     if available in the client CellServDB, rather than always initializing
+     it to contain just the name of the cell.
+   * Detect AFS caches on non-ext2/ext3 file systems and abort AFS client
+     initialization.  (Closes: #249315)
+   * Provide a way of setting sysname in afs.conf.  (Closes: #324694)
+   * Don't create the unused /etc/openafs/AFSLog file.  (Closes: #120097)
+   * Redo how library object files are found for the PAM module build to
+     avoid assuming C locale character set behavior.  (Closes: #323582)
+   * Remove the openafs-client warning against dynroot for the first system
+     in a cell now that afs-rootvol can cope.  Provide some basic
+     documentation of the CellAlias syntax in that message until we have a
+     real man page.
+   * Suggest openafs-doc.
+   * Update standards version to 3.6.2 for the kernel module packages (no
+     changes required).
+   * Translation updates.
+     - Czech, thanks Martin Sin.
+     - Vietnamese, thanks Clytie Siddall.
+     - French, thanks Christian Perrier.
+ 
+  -- Russ Allbery <rra@stanford.edu>  Fri, 26 Aug 2005 01:30:21 -0700
+ 
+ openafs (1.3.87-1) unstable; urgency=low
+ 
+   * New upstream version.
+     - Fixes build problems with 2.6.12.3 and later.  (Closes: #320099)
+   * Add support for ppc64, thanks Andreas Jochens.  (Closes: #322020)
+   * Improve the openafs-client init script.
+     - Update the default client options based on the cache tuning synopsis
+       by Jeffrey Hutzelman, including setting a larger chunksize for all
+       default option sets.  (Closes: #303944)
+     - Choose the client options based on the cache size by default.
+     - Move the code to build the options string to the init script from
+       afs.conf so that afs.conf is pure configuration.
+     - Add an AFS_PRE_SHUTDOWN hook called before shutting down the client.
+     - Provide a shutdown hook, disabled by default, that kills all
+       processes with files open in /afs.  Enabling this ensures a more
+       reliable clean shutdown and umounting of the cache partition, but
+       may not always be what the admin wants.
+     - Improve the readability of the output on start.
+     - Significantly improve the comments in afs.conf.
+     - Remove the code to set -nosettime as it's now the default.
+   * Move the openafs-client init script and afs.conf file we use into the
+     debian directory rather than patching the upstream version.  We've
+     diverged so much that there's no point in continuing to merge changes.
+   * Diagnose unsupported architectures earlier and with a clearer error.
+   * Suppress error messages from a missing kernel version header since
+     they occur normally when doing the regular package build and are just
+     confusing.  Instead, print an error in kern-sysname and abort if the
+     kernel version could not be determined.
+   * Rework how PAM modules are handled.
+     - Build against the pthread-aware libraries.  (Closes: #297804)
+     - Use the shared library objects instead of building separate PIC
+       objects, eliminating the need for many Makefile modifications.
+     - Include pam_afs.krb.so as well.  (Closes: #165972)
+   * Don't include the empty /usr/src/modules directory in
+     openafs-modules-source, only the tarball, to match how other kernel
+     module source packages behave.  (Closes: #244685)
+   * Update config.guess and config.sub.
+   * Translation updates.
+     - French, thanks Christian Perrier.  (Closes: #318807)
+     - Vietnamese, thanks Clytie Siddall.  (Closes: #319705)
+     - Czech, thanks Martin Sin.  (Closes: #319940)
+ 
+  -- Russ Allbery <rra@stanford.edu>  Sun, 14 Aug 2005 14:41:48 -0700
+ 
+ openafs (1.3.82-2) unstable; urgency=low
+ 
+   * Output error messages from heredocs in the init script with cat rather
+     than echo.  Thanks, Reid Barton.  (Closes: #311729)
+   * Make bosserver less picky about permissions and remove the attempt to
+     set /etc/openafs/server-local not-world-readable since dh_fixperms was
+     overridding it anyway.  (Closes: #312921)
+   * Fix some spacing and capitalization errors in the debconf templates.
+     Thanks, Clytie Siddall.  (Closes: #316597)
+   * Initial Czech translation, thanks Martin Sin.  (Closes: #310699)
+   * New Vietnamese translation, thanks Clytie Siddall.  (Closes: #316598)
+   * Update standards version to 3.6.2 (no changes required).
+ 
+  -- Russ Allbery <rra@stanford.edu>  Mon, 11 Jul 2005 17:34:13 -0700
+ 
+ openafs (1.3.82-1) unstable; urgency=medium
+ 
+   * New upstream version.  (Closes: #307699)
+     - Proper locking for preempt kernels.  This bug manifested as an
+       inability to shut down AFS cleanly.  (Closes: #308399, #304040)
+     - Correctly handle the inotify semaphore.  (Closes: #303495)
+   * Repackage upstream to remove MacOS-specific files covered by the APSL.
+     Remove the WINNT directory to save space since we have to repackage
+     anyway.  Provide a get-orig-source target to do the repackaging.
+   * libpam-openafs-kaserver: Fix compilation so that the PAM module isn't
+     missing symbols and therefore unusable.  (Closes: #308844)
+   * Apply patch from Chas Williams to fix stale cache data from deleted
+     files, a bug introduced in 1.3.82.
+   * In all cases, only build the module appropriate to the kernel we're
+     building against.  Building an SMP module against a non-SMP kernel
+     fails due to missing defines.  (Closes: #225907)
+   * README.modules: Add documentation for module-assistant and recommend
+     it when using Debian kernels.  Mention divergences from upstream in
+     module naming.  (Closes: #253168)  Emphasize that the kernel source
+     tree used for make-kpkg must be identically configured to the kernel
+     the module will be used with.
+   * Update copyright with more complete information from upstream
+     src/LICENSE.
+   * Simplify clean target.  Upstream make distclean is now better.
+ 
+  -- Russ Allbery <rra@stanford.edu>  Tue, 10 May 2005 21:09:55 -0700
+ 
+ openafs (1.3.81-5) unstable; urgency=low
+ 
+   * Handle modules named either with or without the .mp extension on SMP
+     hosts.  (Closes: #305389, #307280, #307797)
+   * README.Debian: Document that the client cache partition must be ext2
+     or ext3 and that XFS and ReiserFS will not work.  upserver and
+     upclient are now provided.  Provide some information about why
+     kaserver is not provided.  (Closes: #249315)
+   * Overhaul the module build rules.
+     - Use debhelper to build the module binary package.
+     - Let debhelper handle the module postinst and prerm control scripts.
+     - Properly support modules_config and modules_clean.
+     - Break the build process into configure, build, install, and binary
+       rules, paralleling the regular build rules and making it easier to
+       maintain the make-kpkg build targets.
+     - Include the kernel version in the long description.
+     - Update standards version of module packages to 3.6.1.
+     - Include the copyright and basic documentation in the module binary
+       package.  Otherwise, policy requires an exact versioned dependency
+       on the package containing the copyright file.
+   * Update standards version to 3.6.1.
+     - Install Debian::OpenAFS::ConfigUtils in /usr/share, not /usr/lib.
+     - Always enable debugging symbols and disable optimization if noopt is
+       set in DEB_BUILD_OPTIONS.  (Alas, this doesn't entirely work; the
+       upstream makefiles don't always honor the configure options.)
+     - /etc/init.d/openafs-fileserver restart starts bosserver if it's not
+       already running.
+   * Update debhelper compatibility level to V4.
+     - Remove all *.conffiles control files.  They're no longer needed.
+     - Use misc:Depends to get debconf dependencies.
+     - Use dh_install rather than the movefiles script.
+   * openafs-dbserver doesn't need to depend on debconf.
+   * Use dh_perl to get the correct Perl dependency for openafs-dbserver.
+   * Remove unnecessary build dependencies.
+   * Depend on comerr-dev rather than e2fslibs-dev.
+   * Remove unnecessary preinst for openafs-fileserver.
+   * Clean up and reformat package build rules.
+   * Update lintian overrides.
+ 
+  -- Russ Allbery <rra@stanford.edu>  Sat,  7 May 2005 20:57:12 -0700
+ 
+ openafs (1.3.81-4) unstable; urgency=low
+ 
+   * make-kpkg doesn't run fakeroot for us but instead expects the module
+     rules file to use $(ROOT_CMD) appropriately.  (Closes: #237861)
+   * Put the compiled modules into KPKG_DEST_DIR if set.  This appears to
+     be preferred over DEB_DEST by the make-kpkg documentation.  Thanks,
+     Jonas Smedegaard.  (Closes: #206403)
+   * Add a check to afs-newcell to ensure the local hostname doesn't
+     resolve to 127.0.0.1.  (Closes: #163751)
+   * Exclude .svn directories from the modules source tarball.
+   * Fix genchanges for module builds to not fail when trying to remove a
+     nonexistent file.
+     * New French translations from Christian Perrier, Closes: #305780
+ 
+  -- Russ Allbery <rra@stanford.edu>  Sun, 17 Apr 2005 00:00:27 -0700
+ 
+ openafs (1.3.81-3) unstable; urgency=low
+ 
+   * Patch from kcr to fix osconf.m4 so that sparc defines afs_pthread_env
+     and thus builds.
+ 
+  -- Sam Hartman <hartmans@debian.org>  Wed,  6 Apr 2005 19:54:24 -0400
+ 
+ openafs (1.3.81-2) unstable; urgency=low
+ 
+   * Oops, update debian/sysname because hppa is hppa not parisc-*-linux-*
+     since we now use dpkg --print-installation-architecture
+ 
+  -- Sam Hartman <hartmans@debian.org>  Wed,  6 Apr 2005 11:10:14 -0400
+ 
+ openafs (1.3.81-1) unstable; urgency=low
+ 
+   * New Upstream version
+   * Use Linux 2.4 as the claimed userspace OS for alpha; hopefully this
+     resolves the  largefile issue and allows us to build again, Closes: #271923
+ 
+  -- Sam Hartman <hartmans@debian.org>  Wed,  6 Apr 2005 08:08:29 -0400
+ 
+ openafs (1.3.80-1) UNRELEASED; urgency=low
+ 
+   *  New upstream version, Closes: #297781
+   * I think this works on sparc better and definitely works on 2.6.10, Closes: #283488
+   * Make thiscell a high debconf value, Closes: #302939
+   * New upstream version (1.3.79)
+         - Works with 2.6.10, Closes: #296835
+   * Use amd64 not x86_64 for sysname script, Closes: #296855
+   * Patches from kcr
+       - Loosen dependencies for client and modules
+       - Enable debugging
+       - Some callbacks later stuff and fix short bitfield
+       - Fix permissions on /etc/openafs/server-local, Closes: #271460
+   
+   * Versions 1.3.79 an newer work on amd64, Closes: #262382
+ 
+  -- Sam Hartman <hartmans@debian.org>  Mon,  4 Apr 2005 00:32:42 -0400
+ 
+ openafs (1.3.77-1) unstable; urgency=low
+ 
+   * New upstream version
+   * Target for unstable not experimental
+   * New CellServDB
+   * OpenAFS seems not to have a changelog available, so stop shipping it.
+   * Build openafs.ko not libafs.ko so the right name appears in lsmod
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sat,  8 Jan 2005 20:02:23 -0500
+ 
+ openafs (1.3.74-1) experimental; urgency=low
+ 
+   * New upstream version
+ 
+  -- Sam Hartman <hartmans@mit.edu>  Mon, 15 Nov 2004 16:58:02 -0500
+ 
+ openafs (1.3.73-1) experimental; urgency=low
+ 
+   * New upstream version
+     -  Works with 2.6.8 and 2.6.9, Closes: #277521
+   * Remove call to dh_suidregister
+   * Update sysname to prefer 2.4 on more arches for largefile issues
+   * Patch from pnelson@ANDREW.CMU.EDU to add x86_64 support to sysname scripts
+   * debian/sysname: Use installation architecture 
+ 
+  -- Sam Hartman <hartmans@debian.org>  Wed, 27 Oct 2004 20:42:12 -0400
+ 
+ openafs (1.3.71-1) experimental; urgency=low
+ 
+   * New upstream version
+ 
+  -- Sam Hartman <hartmans@mit.edu>  Tue, 31 Aug 2004 09:45:59 -0400
+ 
+ openafs (1.3.70-1) experimental; urgency=low
+ 
+   * New upstream version
+   * debian/kern-sysname: 2.6* not 2.6
+   * Enable supergroups and largefile-fileserver
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sun, 15 Aug 2004 18:56:48 -0400
+ 
+ openafs (1.3.65-1) experimental; urgency=low
+ 
+   * New upstream Version, Closes: #256580
+ 
+  -- Sam Hartman <hartmans@debian.org>  Mon, 28 Jun 2004 19:40:30 -0400
+ 
+ openafs (1.3.64-2) experimental; urgency=low
+ 
+   * Allow loading of a .ko file not just .o
+ 
+  -- Sam Hartman <hartmans@debian.org>  Mon, 31 May 2004 13:46:05 -0400
+ 
+ openafs (1.3.64-1) experimental; urgency=low
+ 
+   * New upstream version
+   * Add 2.6 to kern-sysname for i386
+   * Apply patch from
+     /afs/cs.cmu.edu/user/jhutz/junk/openafs-patches/openafs-build-on-linux26  which correctly generates 2.6 modules, Closes: #234284
+   * use make only_libafs not dest_only_libafs
+     - AS a result, build times are much faster, Closes: #144781
+   * Correct module build scripts to install module package from new location
+   * Fix afslocaldir to be /etc/openafs/server-local, Closes: #237154
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sun, 30 May 2004 18:12:54 -0400
+ 
+ openafs (1.2.12-1) unstable; urgency=medium
+ 
+   * New upstream version
+   * Medium urgency because this version fixes a significant server crash
+     bug.  Windows clients, particularly greater than version 1.3.70 tend
+     to crash openafs servers.
+   * Cause openafs-kpasswd to conflict  with kerberos4kth-clients, Closes:
+     #277844 
+   * Conflict between libopenafs-dev and arla-dev, Closes: #274788
+ 
+  -- Sam Hartman <hartmans@debian.org>  Fri, 22 Oct 2004 16:21:29 -0400
+ 
+ openafs (1.2.11-3) unstable; urgency=high
+ 
+   * Now that libopenafs-dev contains binaries, it should have shared
+     library dependencies, Closes: #267509
+   * New fr.po from Christian Perrier, Closes: #237098
+ 
+  -- Sam Hartman <hartmans@debian.org>  Tue, 24 Aug 2004 12:10:02 -0400
+ 
+ openafs (1.2.11-2) unstable; urgency=low
+ 
+   * Install rxgen
+   * Install upserver and upclient
+   * Mark as version 1.2.11, Closes: #255883
+ 
+  -- Sam Hartman <hartmans@debian.org>  Thu, 12 Aug 2004 14:27:39 -0400
+ 
+ openafs (1.2.11-1) unstable; urgency=high
+ 
+   * Versions prior to 1.2.10 stopped working with multiple servers in a
+     cell because of a ubik bug prompting the 1.2.11 release.
+   * Fix afs startup script not to start afsd if already running; really
+     fixed in 1.2.10-3, but not documented, Closes: #219702
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sat, 10 Jan 2004 16:37:33 -0500
+ 
+ openafs (1.2.10-3) unstable; urgency=low
+ 
+   * Fix Openafs not to include kernel headers from /usr/include,
+   Closes: #220600 
+   * Fix typo in openafs templates, Closes: #215714
+   * New French translations, Closes: #216158
+   * Build-depend on e2fslibs-dev to get appropriate headers
+ 
+  -- Sam Hartman <hartmans@debian.org>  Thu, 20 Nov 2003 16:02:45 -0500
+ 
+ openafs (1.2.10-2) unstable; urgency=low
+ 
+   * New Brazilian Portuguese (pt_BR) translations, Closes: #208035
+   * Don't conflict with ircd, Closes: #204865
+   * Fix wording of question about using dynroot, Closes: #209332
+   * New French debconf translations, sorry about the delay in including these, Closes: #203608
+   * Avoid yes/no construction in openafs-client templates, Closes: #198476
+   * Fix libpam-openafs-kaserver to include the symbols it needs, patch
+     from Daniel Joseph Barnhart Clark , Closes: #194818
+ 
+  -- Sam Hartman <hartmans@debian.org>  Mon, 13 Oct 2003 00:38:42 -0400
+ 
+ openafs (1.2.10-1) unstable; urgency=low
+ 
+   * New upstream version
+   * net/*.h included properly by kernel module, Closes: #204642
+   * Don't build libafsrpc or libafsauthent, as we can't exactly use them
+     because they contain non-pic code, Closes: #203456
+   * I think I finally build the PAM module on hppa, Closes: #179679
+   * Decnet includes should work now because of the change of the net
+     symlink, Closes: #204486
+   * Escape $ in debian/rules, Closes: #204185
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sun, 24 Aug 2003 18:03:21 -0400
+ 
+ openafs (1.2.9-3) unstable; urgency=low
+ 
+   * Add support for kernel headers, thanks to Patrick Sodre, 
+     Closes: #173137 
+   * Add patch to support the Debian 2.4.21 Kernel sources, thanks to amu,
+     Closes: #198774
+   * Add chronyd to list of programs we assume set the clock, thanks RISKO
+     Gergely, Closes: #201725
+   * Fix template formatting (extra leading spaces), Closes: #198477
+   * New French translations, thanks Christian Perrier, Closes: #198719
+   * Fix PAM problem on hppa, Closes: #179679
+   * Don't translate defaults: Closes: #198384
+   * Fix movefiles error handling and errors exposed by this change.  The
+     contents of libopenafs-dev  were somewhat wrong because of this.
+   * Make /usr/src/modules root.src 775, Closes: #201733
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sat, 26 Jul 2003 18:03:31 -0400
+ 
+ openafs (1.2.9-2) unstable; urgency=low
+ 
+   * Fix   to not build PAM krb since we don't install it and it breaks alpha, Closes: #189548
+   * Don't install pagsh man page symlink since we no longer link to
+     undocumented, Closes: #189860
+ 
+  -- Sam Hartman <hartmans@debian.org>  Mon, 21 Apr 2003 21:05:51 -0400
+ 
+ openafs (1.2.9-1) unstable; urgency=low
+ 
+   * Literal newline fixes, Closes: #175627
+   * Require new kernel modules per upstream change.
+   * New upstream version
+   * Fix section of libopenafs-dev to libdevel
+   * openafs-client stop should shut down afsd if it is running even if afs
+     not mounted, Closes: #188000
+       * Fix to build on alpha again; PAM patch was broken
+   * Report i386_linux24 not linux22 on i386, Closes: #187789
+   * Convert to po-debconf, patch from Andre Luis Lopes, CLoses: #187901
+   * Fix from Lamont to build on hppa, Closes: #179679
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sun, 13 Apr 2003 17:21:54 -0400
+ 
+ openafs (1.2.8-4) unstable; urgency=low
+ 
+   * Fix from Eduard Bloch to compile on kernels with variable numbers of
+     CPUs; he is not sure it actually works yet though, Closes: #178505
+   * Patch that might possibly fix the fails to build on recent unstable;
+     definitely fixes a bug in include path handling, but I am not sure it
+     is a correct patch since I cannot reproduce the problem, Closes: #178154
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sun,  2 Feb 2003 14:08:14 -0500
+ 
+ openafs (1.2.8-3) unstable; urgency=medium
+ 
+   * Patch from Eduard Bloch <blade@debian.org> to build the PAM module for
+     kaserver users; the main thing this patch does in create a bunch of
+     PIC object files so it is a policy-conformant shared library, Closes:
+     #174668 
+   * Do not include -I/usr/include and especially -I/usr/include/sys in the
+     PAM Makefile so gcc 3.2 works; already fixed upstream, Closes: #176538
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sun, 19 Jan 2003 17:44:53 -0500
+ 
+ openafs (1.2.8-2) unstable; urgency=low
+ 
+   * Convert v5 principal names to v4 style names in rxkad 2b.  Especially
+     important for rcmd vs host
+   * Fix debian/rules clean to remove  generated files, Closes: #174625
+   * Fix AFS not to declare errno, Closes: #174059
+ 
+  -- Sam Hartman <hartmans@debian.org>  Fri,  3 Jan 2003 15:28:30 -0500
+ 
+ openafs (1.2.8-1) unstable; urgency=low
+ 
+   * New upstream version
+ 
+  -- Sam Hartman <hartmans@debian.org>  Tue, 10 Dec 2002 23:43:46 -0500
+ 
+ openafs (1.2.7-3) unstable; urgency=low
+ 
+   * Apparently OpenAFS and  ircd conflict on a UDP port, so you can't use
+     both at once, Closes: #150242
+   * Patch from seph to add -nosettime when ntp is installed, Closes: #155123
+   * Fix bosserver  shutdown on restart after upgrade, Closes :#155586
+   * Install translate_et, Closes: #138672
+   * Allow byacc instead of bison
+   
+  -- Sam Hartman <hartmans@debian.org>  Tue,  3 Dec 2002 22:30:44 -0500
+ 
+ openafs (1.2.7-2) unstable; urgency=low
+ 
+   * Fix uss to build with bison 1.50 and 1.75 so we can throw away the
+     resulting binaries, Closes: #164366
+   * Evaluate all limited range of comparison warnings; a warning in
+     rxkad_client.c remains but is harmless, other warnings pointed to
+     potential problems that were fixed, Closes: #162754
+   * Fix s390 modules to actually build, Closes: #162772
+ 
+  -- Sam Hartman <hartmans@debian.org>  Sun, 20 Oct 2002 15:20:19 -0400
+ 
+ openafs (1.2.7-1) unstable; urgency=low
+ 
+   * Fix typo in templates, Closes: #150356
+   
+   * New upstream version
+ 
+  -- Sam Hartman <hartmans@debian.org>  Thu, 26 Sep 2002 16:11:25 -0400
+ 
  openafs (1.2.6-1) unstable; urgency=low
  
  
***************
*** 308,318 ****
    * Only run init script once; confusion with DH_OPTIONS
    * Fix bosserver to look in /usr/openafs/lib so it restarts correctly every Sunday.
    * Upload to Debian (Gloses: BUG#69336)
!  -- Sam Hartman <hartmans@debian.org>  Wed,  6 Dec 2000 11:21:53 -0500
! 
! Do not generate .map file for module; depmod complains.  * 
  
!  --
  
  openafs (1.0.1-1) unstable; urgency=low
  
--- 882,890 ----
    * Only run init script once; confusion with DH_OPTIONS
    * Fix bosserver to look in /usr/openafs/lib so it restarts correctly every Sunday.
    * Upload to Debian (Gloses: BUG#69336)
!   * Do not generate .map file for module; depmod complains.
  
!  -- Sam Hartman <hartmans@debian.org>  Wed,  6 Dec 2000 11:21:53 -0500
  
  openafs (1.0.1-1) unstable; urgency=low
  
***************
*** 434,440 ****
  
   -- unknown <hartmans@snorklewacker.mit.edu>  Fri,  3 Nov 2000 23:41:41 -0500
  
- Local variables:
- mode: debian-changelog
- add-log-mailing-address "hartmans@snorklewacker.mit.edu"
- End:
--- 1006,1008 ----
Index: openafs/src/packaging/Debian/compat
diff -c /dev/null openafs/src/packaging/Debian/compat:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/compat	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1 ----
+ 4
Index: openafs/src/packaging/Debian/control
diff -c openafs/src/packaging/Debian/control:1.1 openafs/src/packaging/Debian/control:1.1.2.1
*** openafs/src/packaging/Debian/control:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/control	Thu Mar 23 15:20:31 2006
***************
*** 2,15 ****
  Section: net
  Priority: optional
  Maintainer: Sam Hartman <hartmans@debian.org>
! Build-Depends: debhelper (>= 2.2.20), libncurses5-dev, libpam0g-dev, bison, docbook-to-man, flex, autoconf, automake, perl
! Standards-Version: 3.5.0
  
  Package: openafs-client
! Architecture: i386 powerpc sparc alpha s390 ia64
! Depends: ${shlibs:Depends}, debconf,  openafs-modules-source|openafs-modules1
! Conflicts: arla, openafs-modules
! Description: The AFS distributed filesystem- client support
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
--- 2,18 ----
  Section: net
  Priority: optional
  Maintainer: Sam Hartman <hartmans@debian.org>
! Uploaders: Russ Allbery <rra@debian.org>
! Build-Depends: debhelper (>= 4.1.16), libncurses5-dev, libpam0g-dev, bison, docbook-to-man, flex, perl, comerr-dev
! Standards-Version: 3.6.2
  
  Package: openafs-client
! Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
! Depends: ${shlibs:Depends}, ${misc:Depends}
! Recommends: openafs-modules-source (>= 1.2.9) | openafs-modules2
! Suggests: openafs-doc
! Conflicts: arla, openafs-modules1
! Description: AFS distributed filesystem client support
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
***************
*** 19,42 ****
  
  Package: openafs-kpasswd
  Priority: extra
! Architecture: i386 powerpc sparc alpha  s390 ia64
! Depends: ${shlibs:Depends}, openafs-client (= ${Source-Version})
! Conflicts: krb5-user, heimdal-clients
! Description: The AFS distributed filesystem- old password changing
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
   .
!  This package provides kpasswd and kas, utilities needed by the 
!  Transarc kaserver to create users and change passwords.  Only install
!  this package if you are already using kaserver; generally you should
!  not install this package for new cells or for cells using Kerberos5.
  
  Package: openafs-fileserver
! Architecture: i386 powerpc sparc alpha s390 ia64
! Depends: ${shlibs:Depends}, debconf, openafs-client (= ${Source-Version})
  Recommends: ntp
! Description: The AFS distributed filesystem- file server
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
--- 22,46 ----
  
  Package: openafs-kpasswd
  Priority: extra
! Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
! Depends: ${shlibs:Depends}, openafs-client
! Conflicts: krb5-user, heimdal-clients, kerberos4kth-clients
! Description: AFS distributed filesystem old password changing
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
   .
!  This package provides kpasswd and kas, utilities needed by the OpenAFS
!  kaserver to create users and change passwords.  Only install this package
!  if you are already using kaserver; generally you should not install this
!  package for new cells or for cells using Kerberos v5.
  
  Package: openafs-fileserver
! Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
! Depends: ${shlibs:Depends}, ${misc:Depends}, openafs-client
  Recommends: ntp
! Suggests: openafs-doc
! Description: AFS distributed filesystem file server
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
***************
*** 45,56 ****
   installed on any machine that will export files into AFS.
  
  Package: openafs-dbserver
! Architecture: i386 powerpc sparc alpha s390 ia64
! Depends: ${shlibs:Depends}, debconf, openafs-fileserver (= ${Source-Version}), openafs-client (= ${Source-Version}), perl5
  Conflicts: openafs-ptutil
  Replaces: openafs-ptutil
  Provides: openafs-ptutil
! Description: The AFS distributed filesystem- database server
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
--- 49,61 ----
   installed on any machine that will export files into AFS.
  
  Package: openafs-dbserver
! Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
! Depends: ${shlibs:Depends}, ${perl:Depends}, openafs-fileserver, openafs-client
! Suggests: openafs-doc
  Conflicts: openafs-ptutil
  Replaces: openafs-ptutil
  Provides: openafs-ptutil
! Description: AFS distributed filesystem database server
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
***************
*** 60,69 ****
   protection servers.
  
  Package: libopenafs-dev
! Section: devel
! Architecture: i386 powerpc sparc alpha s390 ia64
  Priority: extra
! Description: The AFS distributed filesystem- development libraries
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
--- 65,77 ----
   protection servers.
  
  Package: libopenafs-dev
! Section: libdevel
! Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
  Priority: extra
! Depends: ${shlibs:Depends}
! Suggests: openafs-doc
! Conflicts: arla-dev
! Description: AFS distributed filesystem development libraries
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
***************
*** 73,84 ****
  
  Package: openafs-modules-source
  Priority: extra
! Depends: bison, flex, debhelper, libpam0g-dev, libncurses5-dev, kernel-package
  Architecture: all
! Description: The AFS distributed filesystem- Module Sources
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
   .
   This package provides source to the AFS kernel modules.
  
--- 81,103 ----
  
  Package: openafs-modules-source
  Priority: extra
! Depends: bison, flex, debhelper (>= 4.0.0), kernel-package | module-assistant
  Architecture: all
! Description: AFS distributed filesystem kernel module source
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
   .
   This package provides source to the AFS kernel modules.
  
+ Package: libpam-openafs-kaserver
+ Priority: extra
+ Depends: ${shlibs:Depends}, openafs-client
+ Architecture: i386 powerpc sparc alpha s390 ia64 hppa amd64 ppc64
+ Description: AFS distributed filesystem kaserver PAM module
+  AFS is a distributed filesystem allowing cross-platform sharing of
+  files among multiple computers.  Facilities are provided for access
+  control, authentication, backup and administrative management.
+  .
+  This package provides a PAM module for existing  sites using the AFS
+  kaserver for authentication.  New sites should use a Kerberos v5
Index: openafs/src/packaging/Debian/control.module
diff -c openafs/src/packaging/Debian/control.module:1.1 openafs/src/packaging/Debian/control.module:1.1.2.1
*** openafs/src/packaging/Debian/control.module:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/control.module	Thu Mar 23 15:20:31 2006
***************
*** 2,16 ****
  Section: net
  Priority: optional
  Maintainer: Sam Hartman <hartmans@debian.org>
! Standards-Version: 3.1.1
  
  Package: openafs-modules-=KVERS
! Conflicts: openafs-client (<< 1.2.2-0)
! Provides: openafs-modules1
  Architecture: any
! Description: The AFS distributed filesystem- Kernel Module
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
   .
!  This package provides the kernel module for the filesystem
--- 2,20 ----
  Section: net
  Priority: optional
  Maintainer: Sam Hartman <hartmans@debian.org>
! Uploaders: Russ Allbery <rra@debian.org>
! Build-Depends: debhelper (>= 4.1.16), flex, bison
! Standards-Version: 3.6.2
  
  Package: openafs-modules-=KVERS
! Conflicts: openafs-client (<< 1.2.9)
! Provides: openafs-modules2
  Architecture: any
! Recommends: =IMG-=KVERS
! Description: AFS distributed filesystem kernel module
   AFS is a distributed filesystem allowing cross-platform sharing of
   files among multiple computers.  Facilities are provided for access
   control, authentication, backup and administrative management.
   .
!  This package provides the compiled AFS kernel module for kernel
!  version =KVERS.
Index: openafs/src/packaging/Debian/copyright
diff -c openafs/src/packaging/Debian/copyright:1.1 openafs/src/packaging/Debian/copyright:1.1.2.1
*** openafs/src/packaging/Debian/copyright:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/copyright	Thu Mar 23 15:20:31 2006
***************
*** 1,9 ****
  This package was debianized by Sam Hartman <hartmans@debian.org> on
  Fri,  3 Nov 2000 23:41:41 -0500.
  
! It was downloaded from the Openafs CVS repository.
  
! Upstream Maintainers(s):openafs-gatekeepers@openafs.org
  
  Copyright:
  
--- 1,20 ----
  This package was debianized by Sam Hartman <hartmans@debian.org> on
  Fri,  3 Nov 2000 23:41:41 -0500.
  
! It was downloaded from either:
  
!     http://www.openafs.org/release/
!     /afs/grand.central.org/software/openafs/
! 
! Upstream Maintainers:
! 
!     openafs-gatekeepers@openafs.org
! 
! The upstream source has been repackaged to remove the src/packaging/MacOS
! directory, which contained a file (afssettings.m) that was covered under
! the Apple Public Source License 2.0.  This license is not considered
! DFSG-free.  Since the repackaging was needed anyway, the WINNT directory
! was also dropped, reducing the size of the upstream tarball by 8MB.
  
  Copyright:
  
***************
*** 240,242 ****
--- 251,343 ----
     party to this Agreement will bring a legal action under this Agreement
     more than one year after the cause of action arose. Each party waives
     its rights to a jury trial in any resulting litigation.
+ 
+ Kerberos 5 ticket support in rxkad is subject to the following copyright:
+ /*
+  * Copyright (c) 1995, 1996, 1997, 2002 Kungliga Tekniska Högskolan
+  * (Royal Institute of Technology, Stockholm, Sweden).
+  * All rights reserved.
+  * 
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+  * are met:
+  * 
+  * 1. Redistributions of source code must retain the above copyright
+  *    notice, this list of conditions and the following disclaimer.
+  * 
+  * 2. Redistributions in binary form must reproduce the above copyright
+  *    notice, this list of conditions and the following disclaimer in the
+  *    documentation and/or other materials provided with the distribution.
+  * 
+  * 3. Neither the name of the Institute nor the names of its contributors
+  *    may be used to endorse or promote products derived from this software
+  *    without specific prior written permission.
+  * 
+  * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
+  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  */
+ 
+ Some code in rxkad/ticket5.c is subject to the following copyright:
+ /*
+  * Copyright 1992, 2002 by the Massachusetts Institute of Technology.
+  * All Rights Reserved.
+  *
+  * Export of this software from the United States of America may
+  *   require a specific license from the United States Government.
+  *   It is the responsibility of any person or organization contemplating
+  *   export to obtain such a license before exporting.
+  * 
+  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+  * distribute this software and its documentation for any purpose and
+  * without fee is hereby granted, provided that the above copyright
+  * notice appear in all copies and that both that copyright notice and
+  * this permission notice appear in supporting documentation, and that
+  * the name of M.I.T. not be used in advertising or publicity pertaining
+  * to distribution of the software without specific, written prior
+  * permission.  Furthermore if you modify this software you must label
+  * your software as modified software and not distribute it in such a
+  * fashion that it might be confused with the original M.I.T. software.
+  * M.I.T. makes no representations about the suitability of
+  * this software for any purpose.  It is provided "as is" without express
+  * or implied warranty.
+  */
+ 
+ Some portions of Rx are subject to the following license:
+ /*
+  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
+  * unrestricted use provided that this legend is included on all tape
+  * media and as a part of the software program in whole or part.  Users
+  * may copy or modify Sun RPC without charge, but are not authorized
+  * to license or distribute it to anyone else except as part of a product or
+  * program developed by the user or with the express written consent of
+  * Sun Microsystems, Inc.
+  *
+  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
+  * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
+  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
+  *
+  * Sun RPC is provided with no support and without any obligation on the
+  * part of Sun Microsystems, Inc. to assist in its use, correction,
+  * modification or enhancement.
+  *
+  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
+  * OR ANY PART THEREOF.
+  *
+  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
+  * or profits or other special, indirect and consequential damages, even if
+  * Sun has been advised of the possibility of such damages.
+  *
+  * Sun Microsystems, Inc.
+  * 2550 Garcia Avenue
+  * Mountain View, California  94043
+  */
Index: openafs/src/packaging/Debian/genchanges.sh
diff -c openafs/src/packaging/Debian/genchanges.sh:1.1 openafs/src/packaging/Debian/genchanges.sh:1.1.2.1
*** openafs/src/packaging/Debian/genchanges.sh:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/genchanges.sh	Thu Mar 23 15:20:31 2006
***************
*** 2,22 ****
  # genchanges.sh - generate a changes file for a deb file generated via
  #	the make-kpkg utility
  
! # KSRC KMAINT and KEMAIL are expected to be passed through the environment
  
  set -e
  umask 022
  
- #KVERS=`cat debian/KVERS`
  MODVERS=`cat debian/VERSION | sed s/:/\+/`
  ARCH=`dpkg --print-architecture`
  
  mprefix=`grep Package: debian/control.module | cut -d' ' -f 2 | cut -d= -f 1`
- 
- # the changes file's name
  chfile="$KSRC/../$mprefix${KVERS}${INT_SUBARCH}_${MODVERS}_${ARCH}.changes"
  
  dpkg-genchanges -b ${KMAINT:+-m"$KMAINT <$KEMAIL>"} -u"$KSRC/.." \
! 	-cdebian/control > "$chfile"
! #pgp -fast ${KMAINT:+-u"$KMAINT"} < "$chfile.pt" > "$chfile"
! rm "$chfile.pt"
--- 2,19 ----
  # genchanges.sh - generate a changes file for a deb file generated via
  #	the make-kpkg utility
  
! # KSRC, KVERS, KMAINT, and KEMAIL are expected to be passed through the
! # environment.
  
  set -e
  umask 022
  
  MODVERS=`cat debian/VERSION | sed s/:/\+/`
  ARCH=`dpkg --print-architecture`
  
  mprefix=`grep Package: debian/control.module | cut -d' ' -f 2 | cut -d= -f 1`
  chfile="$KSRC/../$mprefix${KVERS}${INT_SUBARCH}_${MODVERS}_${ARCH}.changes"
  
  dpkg-genchanges -b ${KMAINT:+-m"$KMAINT <$KEMAIL>"} -u"$KSRC/.." \
!     -cdebian/control > "$chfile"
! #debsign "$chfile"
Index: openafs/src/packaging/Debian/kern-sysname
diff -c openafs/src/packaging/Debian/kern-sysname:1.1.2.1 openafs/src/packaging/Debian/kern-sysname:1.1.2.2
*** openafs/src/packaging/Debian/kern-sysname:1.1.2.1	Sun Jan 30 23:14:37 2005
--- openafs/src/packaging/Debian/kern-sysname	Thu Mar 23 15:20:31 2006
***************
*** 1,68 ****
  #!/bin/sh
  case `arch` in
  i[3456]86)
! 	case $KVERS in
! 	    2.2*)
! 		echo i386_linux22
! 		;;
! 	    2.4*)
! 		echo i386_linux24
! 		;;
! 	    esac
! ;;
!     ia64)
! 	case $KVERS in
! 	    2.4*)
! 		echo ia64_linux24
! 		;;
! 	    2.6*)
! 		echo ia64_linux26
! 		;;
! 	    esac
! 	;;
!     alpha)
! 	case $KVERS in
! 	    2.2*)
! 		echo alpha_linux_22
! 		;;
! 	    2.4*)
! 		echo alpha_linux_24
! 		;;
! 	    esac
! ;;
!     sparc)
! 	case $KVERS in
! 	    2.2*)
! 		echo sparc_linux22
! 		;;
! 	    2.4*)
! 		echo sparc_linux24
! 		;;
! 	    esac
! 	;;
!     sparc64)
!         case $KVERS in
! 	    2.2*)
! 		echo sparc64_linux22
! 		;;
! 	    2.4*)
! 		echo sparc64_linux24
! 		;;
! 	    esac
! 	;;
! 	    
!     ppc)
! 	case $KVERS in
! 	    2.2*)
! 		echo ppc_linux22
! 		;;
! 	    2.4*)
! 		echo ppc_linux24
! 		;;
! 	    esac
! 	    ;;
! 	*)
! 	echo ERROr:  sysname not yet known
! 	exit 1
! 
  esac
--- 1,97 ----
  #!/bin/sh
+ 
+ if [ x"$KVERS" = x ] ; then
+     echo "ERROR: no kernel version" >&2
+     echo "  ($KSRC/include/linux/version.h not found?)" >&2
+     echo UNKNOWN
+     exit 1
+ fi
+ 
  case `arch` in
  i[3456]86)
!     case $KVERS in
!     2.2*)
!         echo i386_linux22
!         ;;
!     2.4*)
!         echo i386_linux24
!         ;;
!     2.6*)
!         echo i386_linux26
!         ;;
!     esac
!     ;;
! x86_64)
!     case $KVERS in
!     2.4*)
!         echo amd64_linux24
!         ;;
!     2.6*)
!         echo amd64_linux26
!         ;;
!     esac
!     ;;
! ia64)
!     echo ia64_linux24
!     ;;
! alpha)
!     case $KVERS in
!     2.2*)
!         echo alpha_linux_22
!         ;;
!     2.4*)
!         echo alpha_linux_24
!         ;;
!     esac
!     ;;
! sparc)
!     case $KVERS in
!     2.2*)
!         echo sparc_linux22
!         ;;
!     2.4*)
!         echo sparc_linux24
!         ;;
!     esac
!     ;;
! sparc64)
!     case $KVERS in
!     2.2*)
!         echo sparc64_linux22
!         ;;
!     2.4*)
!         echo sparc64_linux24
!         ;;
!     esac
!     ;;
! ppc)
!     case $KVERS in
!     2.2*)
!         echo ppc_linux22
!         ;;
!     2.4*)
!         echo ppc_linux24
!         ;;
!     2.6)
!         echo ppc_linux26
!         ;;
!     esac
!     ;;
! ppc64)
!     case $KVERS in
!     2.4*)
!         echo ppc64_linux24
!         ;;
!     2.6*)
!         echo ppc64_linux26
!         ;;
!     esac
!     ;;
! s390)
!     echo s390_linux24
!     ;;
! *)
!     echo "ERROR: unsupported architecture" >&2
!     echo UNKNOWN
!     exit 1
  esac
Index: openafs/src/packaging/Debian/kernel-version
diff -c /dev/null openafs/src/packaging/Debian/kernel-version:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/kernel-version	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1,15 ----
+ #!/usr/bin/perl
+ #
+ # Extract the kernel version from the kernel version header file.  Takes the
+ # kernel source path as its only argument.  If the version header couldn't be
+ # found, print nothing and exit quietly.
+ 
+ my $ksrc = shift;
+ unless ($ksrc && open (VERSION, "$ksrc/include/linux/version.h")) {
+     exit 0;
+ }
+ my $line = <VERSION>;
+ if ($line =~ /"(.+)"/) {
+     print "$1\n";
+ }
+ exit 0;
Index: openafs/src/packaging/Debian/libopenafs-dev.dirs
diff -c /dev/null openafs/src/packaging/Debian/libopenafs-dev.dirs:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/libopenafs-dev.dirs	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1 ----
+ usr/lib
Index: openafs/src/packaging/Debian/libopenafs-dev.install
diff -c /dev/null openafs/src/packaging/Debian/libopenafs-dev.install:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/libopenafs-dev.install	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1,8 ----
+ debian/tmp/usr/bin/rxgen                usr/bin
+ 
+ debian/tmp/usr/include                  usr
+ 
+ debian/tmp/usr/lib/*.a                  usr/lib
+ debian/tmp/usr/lib/afs                  usr/lib
+ 
+ debian/doc/man1/rxgen.1                 usr/share/man/man1
Index: openafs/src/packaging/Debian/libpam-openafs-kaserver.dirs
diff -c /dev/null openafs/src/packaging/Debian/libpam-openafs-kaserver.dirs:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/libpam-openafs-kaserver.dirs	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1,2 ----
+ lib/security
+ usr/share/doc
Index: openafs/src/packaging/Debian/openafs-client.config
diff -c openafs/src/packaging/Debian/openafs-client.config:1.1 openafs/src/packaging/Debian/openafs-client.config:1.1.2.1
*** openafs/src/packaging/Debian/openafs-client.config:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/openafs-client.config	Thu Mar 23 15:20:31 2006
***************
*** 1,6 ****
  #!/bin/sh -e
  
! . /usr/share/debconf/confmodule ||exit
  
  db_version 2.0
  if [ -r /etc/openafs/ThisCell ] ; then
--- 1,6 ----
  #!/bin/sh -e
  
! . /usr/share/debconf/confmodule || exit
  
  db_version 2.0
  if [ -r /etc/openafs/ThisCell ] ; then
***************
*** 15,21 ****
      IFS=: read mountpoint cachedir cachesize  </etc/openafs/cacheinfo
      db_set openafs-client/cachesize $cachesize
      fi
! db_input medium openafs-client/thiscell ||true
  db_input critical openafs-client/cachesize ||true
  db_go
  test -f /etc/openafs/afs.conf &&. /etc/openafs/afs.conf
--- 15,21 ----
      IFS=: read mountpoint cachedir cachesize  </etc/openafs/cacheinfo
      db_set openafs-client/cachesize $cachesize
      fi
! db_input high openafs-client/thiscell ||true
  db_input critical openafs-client/cachesize ||true
  db_go
  test -f /etc/openafs/afs.conf &&. /etc/openafs/afs.conf
Index: openafs/src/packaging/Debian/openafs-client.docs
diff -c openafs/src/packaging/Debian/openafs-client.docs:1.1 openafs/src/packaging/Debian/openafs-client.docs:1.1.2.1
*** openafs/src/packaging/Debian/openafs-client.docs:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/openafs-client.docs	Thu Mar 23 15:20:31 2006
***************
*** 2,6 ****
  debian/README.servers
  debian/configuration-transcript.txt
  debian/README.modules
- NEWS
- RELNOTES-1.2.6
--- 2,4 ----
Index: openafs/src/packaging/Debian/openafs-client.install
diff -c /dev/null openafs/src/packaging/Debian/openafs-client.install:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/openafs-client.install	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1,224 ----
+ debian/afs.conf                         etc/openafs
+ 
+ debian/tmp/usr/bin/afsmonitor           usr/bin
+ debian/tmp/usr/bin/bos                  usr/bin
+ debian/tmp/usr/bin/cmdebug              usr/bin
+ debian/tmp/usr/bin/fs                   usr/bin
+ debian/tmp/usr/bin/klog                 usr/bin
+ debian/tmp/usr/bin/livesys              usr/bin
+ debian/tmp/usr/bin/pagsh                usr/bin
+ debian/tmp/usr/bin/pts                  usr/bin
+ debian/tmp/usr/bin/scout                usr/bin
+ debian/tmp/usr/bin/sys                  usr/bin
+ debian/tmp/usr/bin/tokens               usr/bin
+ debian/tmp/usr/bin/translate_et         usr/bin
+ debian/tmp/usr/bin/udebug               usr/bin
+ debian/tmp/usr/bin/unlog                usr/bin
+ debian/tmp/usr/bin/up                   usr/bin
+ debian/tmp/usr/bin/xstat_cm_test        usr/bin
+ debian/tmp/usr/bin/xstat_fs_test        usr/bin
+ 
+ debian/tmp/usr/sbin/rxdebug             usr/bin
+ debian/tmp/usr/sbin/vos                 usr/bin
+ 
+ debian/tmp/usr/sbin/backup              usr/sbin
+ debian/tmp/usr/sbin/butc                usr/sbin
+ debian/tmp/usr/sbin/fms                 usr/sbin
+ debian/tmp/usr/sbin/fstrace             usr/sbin
+ 
+ debian/tmp/usr/sbin/afsd                sbin
+ 
+ src/afs/afszcm.cat                      usr/share/openafs
+ 
+ debian/CellServDB                       usr/share/openafs
+ 
+ debian/doc/man1/afs.1                   usr/share/man/man1
+ debian/doc/man1/afsmonitor.1            usr/share/man/man1
+ debian/doc/man1/bos.1                   usr/share/man/man1
+ debian/doc/man1/bos_addhost.1           usr/share/man/man1
+ debian/doc/man1/bos_addkey.1            usr/share/man/man1
+ debian/doc/man1/bos_adduser.1           usr/share/man/man1
+ debian/doc/man1/bos_apropos.1           usr/share/man/man1
+ debian/doc/man1/bos_create.1            usr/share/man/man1
+ debian/doc/man1/bos_delete.1            usr/share/man/man1
+ debian/doc/man1/bos_exec.1              usr/share/man/man1
+ debian/doc/man1/bos_getdate.1           usr/share/man/man1
+ debian/doc/man1/bos_getlog.1            usr/share/man/man1
+ debian/doc/man1/bos_getrestart.1        usr/share/man/man1
+ debian/doc/man1/bos_help.1              usr/share/man/man1
+ debian/doc/man1/bos_install.1           usr/share/man/man1
+ debian/doc/man1/bos_listhosts.1         usr/share/man/man1
+ debian/doc/man1/bos_listkeys.1          usr/share/man/man1
+ debian/doc/man1/bos_listusers.1         usr/share/man/man1
+ debian/doc/man1/bos_prune.1             usr/share/man/man1
+ debian/doc/man1/bos_removehost.1        usr/share/man/man1
+ debian/doc/man1/bos_removekey.1         usr/share/man/man1
+ debian/doc/man1/bos_removeuser.1        usr/share/man/man1
+ debian/doc/man1/bos_restart.1           usr/share/man/man1
+ debian/doc/man1/bos_salvage.1           usr/share/man/man1
+ debian/doc/man1/bos_setauth.1           usr/share/man/man1
+ debian/doc/man1/bos_setcellname.1       usr/share/man/man1
+ debian/doc/man1/bos_setrestart.1        usr/share/man/man1
+ debian/doc/man1/bos_shutdown.1          usr/share/man/man1
+ debian/doc/man1/bos_start.1             usr/share/man/man1
+ debian/doc/man1/bos_startup.1           usr/share/man/man1
+ debian/doc/man1/bos_status.1            usr/share/man/man1
+ debian/doc/man1/bos_stop.1              usr/share/man/man1
+ debian/doc/man1/bos_uninstall.1         usr/share/man/man1
+ debian/doc/man1/cmdebug.1               usr/share/man/man1
+ debian/doc/man1/fs.1                    usr/share/man/man1
+ debian/doc/man1/fs_apropos.1            usr/share/man/man1
+ debian/doc/man1/fs_checkservers.1       usr/share/man/man1
+ debian/doc/man1/fs_checkvolumes.1       usr/share/man/man1
+ debian/doc/man1/fs_cleanacl.1           usr/share/man/man1
+ debian/doc/man1/fs_copyacl.1            usr/share/man/man1
+ debian/doc/man1/fs_diskfree.1           usr/share/man/man1
+ debian/doc/man1/fs_examine.1            usr/share/man/man1
+ debian/doc/man1/fs_exportafs.1          usr/share/man/man1
+ debian/doc/man1/fs_flush.1              usr/share/man/man1
+ debian/doc/man1/fs_flushmount.1         usr/share/man/man1
+ debian/doc/man1/fs_flushvolume.1        usr/share/man/man1
+ debian/doc/man1/fs_getcacheparms.1      usr/share/man/man1
+ debian/doc/man1/fs_getcellstatus.1      usr/share/man/man1
+ debian/doc/man1/fs_getclientaddrs.1     usr/share/man/man1
+ debian/doc/man1/fs_getserverprefs.1     usr/share/man/man1
+ debian/doc/man1/fs_help.1               usr/share/man/man1
+ debian/doc/man1/fs_listacl.1            usr/share/man/man1
+ debian/doc/man1/fs_listcells.1          usr/share/man/man1
+ debian/doc/man1/fs_listquota.1          usr/share/man/man1
+ debian/doc/man1/fs_lsmount.1            usr/share/man/man1
+ debian/doc/man1/fs_messages.1           usr/share/man/man1
+ debian/doc/man1/fs_mkmount.1            usr/share/man/man1
+ debian/doc/man1/fs_newcell.1            usr/share/man/man1
+ debian/doc/man1/fs_quota.1              usr/share/man/man1
+ debian/doc/man1/fs_rmmount.1            usr/share/man/man1
+ debian/doc/man1/fs_setacl.1             usr/share/man/man1
+ debian/doc/man1/fs_setcachesize.1       usr/share/man/man1
+ debian/doc/man1/fs_setcell.1            usr/share/man/man1
+ debian/doc/man1/fs_setclientaddrs.1     usr/share/man/man1
+ debian/doc/man1/fs_setquota.1           usr/share/man/man1
+ debian/doc/man1/fs_setserverprefs.1     usr/share/man/man1
+ debian/doc/man1/fs_setvol.1             usr/share/man/man1
+ debian/doc/man1/fs_storebehind.1        usr/share/man/man1
+ debian/doc/man1/fs_sysname.1            usr/share/man/man1
+ debian/doc/man1/fs_whereis.1            usr/share/man/man1
+ debian/doc/man1/fs_whichcell.1          usr/share/man/man1
+ debian/doc/man1/fs_wscell.1             usr/share/man/man1
+ debian/doc/man1/klog.1                  usr/share/man/man1
+ debian/doc/man1/livesys.1               usr/share/man/man1
+ debian/doc/man1/pagsh.1                 usr/share/man/man1
+ debian/doc/man1/pts.1                   usr/share/man/man1
+ debian/doc/man1/pts_adduser.1           usr/share/man/man1
+ debian/doc/man1/pts_apropos.1           usr/share/man/man1
+ debian/doc/man1/pts_chown.1             usr/share/man/man1
+ debian/doc/man1/pts_creategroup.1       usr/share/man/man1
+ debian/doc/man1/pts_createuser.1        usr/share/man/man1
+ debian/doc/man1/pts_delete.1            usr/share/man/man1
+ debian/doc/man1/pts_examine.1           usr/share/man/man1
+ debian/doc/man1/pts_help.1              usr/share/man/man1
+ debian/doc/man1/pts_listentries.1       usr/share/man/man1
+ debian/doc/man1/pts_listmax.1           usr/share/man/man1
+ debian/doc/man1/pts_listowned.1         usr/share/man/man1
+ debian/doc/man1/pts_membership.1        usr/share/man/man1
+ debian/doc/man1/pts_removeuser.1        usr/share/man/man1
+ debian/doc/man1/pts_rename.1            usr/share/man/man1
+ debian/doc/man1/pts_setfields.1         usr/share/man/man1
+ debian/doc/man1/pts_setmax.1            usr/share/man/man1
+ debian/doc/man1/rxdebug.1               usr/share/man/man1
+ debian/doc/man1/scout.1                 usr/share/man/man1
+ debian/doc/man1/sys.1                   usr/share/man/man1
+ debian/doc/man1/tokens.1                usr/share/man/man1
+ debian/doc/man1/translate_et.1          usr/share/man/man1
+ debian/doc/man1/udebug.1                usr/share/man/man1
+ debian/doc/man1/unlog.1                 usr/share/man/man1
+ debian/doc/man1/up.1                    usr/share/man/man1
+ debian/doc/man1/vos.1                   usr/share/man/man1
+ debian/doc/man1/vos_addsite.1           usr/share/man/man1
+ debian/doc/man1/vos_apropos.1           usr/share/man/man1
+ debian/doc/man1/vos_backup.1            usr/share/man/man1
+ debian/doc/man1/vos_backupsys.1         usr/share/man/man1
+ debian/doc/man1/vos_changeaddr.1        usr/share/man/man1
+ debian/doc/man1/vos_create.1            usr/share/man/man1
+ debian/doc/man1/vos_delentry.1          usr/share/man/man1
+ debian/doc/man1/vos_dump.1              usr/share/man/man1
+ debian/doc/man1/vos_examine.1           usr/share/man/man1
+ debian/doc/man1/vos_help.1              usr/share/man/man1
+ debian/doc/man1/vos_listaddrs.1         usr/share/man/man1
+ debian/doc/man1/vos_listpart.1          usr/share/man/man1
+ debian/doc/man1/vos_listvldb.1          usr/share/man/man1
+ debian/doc/man1/vos_listvol.1           usr/share/man/man1
+ debian/doc/man1/vos_lock.1              usr/share/man/man1
+ debian/doc/man1/vos_move.1              usr/share/man/man1
+ debian/doc/man1/vos_partinfo.1          usr/share/man/man1
+ debian/doc/man1/vos_release.1           usr/share/man/man1
+ debian/doc/man1/vos_remove.1            usr/share/man/man1
+ debian/doc/man1/vos_remsite.1           usr/share/man/man1
+ debian/doc/man1/vos_rename.1            usr/share/man/man1
+ debian/doc/man1/vos_restore.1           usr/share/man/man1
+ debian/doc/man1/vos_status.1            usr/share/man/man1
+ debian/doc/man1/vos_syncserv.1          usr/share/man/man1
+ debian/doc/man1/vos_syncvldb.1          usr/share/man/man1
+ debian/doc/man1/vos_unlock.1            usr/share/man/man1
+ debian/doc/man1/vos_unlockvldb.1        usr/share/man/man1
+ debian/doc/man1/vos_zap.1               usr/share/man/man1
+ debian/doc/man1/xstat_cm_test.1         usr/share/man/man1
+ debian/doc/man1/xstat_fs_test.1         usr/share/man/man1
+ 
+ debian/doc/man5/CellServDB.5            usr/share/man/man5
+ debian/doc/man5/NetInfo.5               usr/share/man/man5
+ debian/doc/man5/NetRestrict.5           usr/share/man/man5
+ debian/doc/man5/ThisCell.5              usr/share/man/man5
+ debian/doc/man5/afs.5                   usr/share/man/man5
+ debian/doc/man5/afs_cache.5             usr/share/man/man5
+ debian/doc/man5/afsmonitor.5            usr/share/man/man5
+ debian/doc/man5/afszcm.cat.5            usr/share/man/man5
+ debian/doc/man5/butc.5                  usr/share/man/man5
+ debian/doc/man5/butc_logs.5             usr/share/man/man5
+ debian/doc/man5/cacheinfo.5             usr/share/man/man5
+ debian/doc/man5/tapeconfig.5            usr/share/man/man5
+ 
+ debian/doc/man8/afsd.8                  usr/share/man/man8
+ debian/doc/man8/backup.8                usr/share/man/man8
+ debian/doc/man8/backup_adddump.8        usr/share/man/man8
+ debian/doc/man8/backup_addhost.8        usr/share/man/man8
+ debian/doc/man8/backup_addvolentry.8    usr/share/man/man8
+ debian/doc/man8/backup_addvolset.8      usr/share/man/man8
+ debian/doc/man8/backup_apropos.8        usr/share/man/man8
+ debian/doc/man8/backup_dbverify.8       usr/share/man/man8
+ debian/doc/man8/backup_deldump.8        usr/share/man/man8
+ debian/doc/man8/backup_deletedump.8     usr/share/man/man8
+ debian/doc/man8/backup_delhost.8        usr/share/man/man8
+ debian/doc/man8/backup_delvolentry.8    usr/share/man/man8
+ debian/doc/man8/backup_delvolset.8      usr/share/man/man8
+ debian/doc/man8/backup_diskrestore.8    usr/share/man/man8
+ debian/doc/man8/backup_dump.8           usr/share/man/man8
+ debian/doc/man8/backup_dumpinfo.8       usr/share/man/man8
+ debian/doc/man8/backup_help.8           usr/share/man/man8
+ debian/doc/man8/backup_interactive.8    usr/share/man/man8
+ debian/doc/man8/backup_jobs.8           usr/share/man/man8
+ debian/doc/man8/backup_kill.8           usr/share/man/man8
+ debian/doc/man8/backup_labeltape.8      usr/share/man/man8
+ debian/doc/man8/backup_listdumps.8      usr/share/man/man8
+ debian/doc/man8/backup_listhosts.8      usr/share/man/man8
+ debian/doc/man8/backup_listvolsets.8    usr/share/man/man8
+ debian/doc/man8/backup_quit.8           usr/share/man/man8
+ debian/doc/man8/backup_readlabel.8      usr/share/man/man8
+ debian/doc/man8/backup_restoredb.8      usr/share/man/man8
+ debian/doc/man8/backup_savedb.8         usr/share/man/man8
+ debian/doc/man8/backup_scantape.8       usr/share/man/man8
+ debian/doc/man8/backup_setexp.8         usr/share/man/man8
+ debian/doc/man8/backup_status.8         usr/share/man/man8
+ debian/doc/man8/backup_volinfo.8        usr/share/man/man8
+ debian/doc/man8/backup_volrestore.8     usr/share/man/man8
+ debian/doc/man8/backup_volsetrestore.8  usr/share/man/man8
+ debian/doc/man8/butc.8                  usr/share/man/man8
+ debian/doc/man8/fms.8                   usr/share/man/man8
+ debian/doc/man8/fstrace.8               usr/share/man/man8
+ debian/doc/man8/fstrace_apropos.8       usr/share/man/man8
+ debian/doc/man8/fstrace_clear.8         usr/share/man/man8
+ debian/doc/man8/fstrace_dump.8          usr/share/man/man8
+ debian/doc/man8/fstrace_help.8          usr/share/man/man8
+ debian/doc/man8/fstrace_lslog.8         usr/share/man/man8
+ debian/doc/man8/fstrace_lsset.8         usr/share/man/man8
+ debian/doc/man8/fstrace_setlog.8        usr/share/man/man8
+ debian/doc/man8/fstrace_setset.8        usr/share/man/man8
Index: openafs/src/packaging/Debian/openafs-client.lintian
diff -c openafs/src/packaging/Debian/openafs-client.lintian:1.1 openafs/src/packaging/Debian/openafs-client.lintian:1.1.2.1
*** openafs/src/packaging/Debian/openafs-client.lintian:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/openafs-client.lintian	Thu Mar 23 15:20:31 2006
***************
*** 1,3 ****
- openafs-client: link-to-undocumented-manpage
  openafs-client: non-standard-dir-perm
  openafs-client: postinst-uses-db-input
--- 1,2 ----
Index: openafs/src/packaging/Debian/openafs-client.postinst
diff -c openafs/src/packaging/Debian/openafs-client.postinst:1.1 openafs/src/packaging/Debian/openafs-client.postinst:1.1.2.1
*** openafs/src/packaging/Debian/openafs-client.postinst:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/openafs-client.postinst	Thu Mar 23 15:20:31 2006
***************
*** 1,82 ****
  #! /bin/sh
! # postinst script for openafs
  
  set -e
  
- # summary of how this script can be called:
- #        * <postinst> `configure' <most-recently-configured-version>
- #        * <old-postinst> `abort-upgrade' <new version>
- #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
- #          <new-version>
- #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
- #          <failed-install-package> <version> `removing'
- #          <conflicting-package> <version>
- 
  case "$1" in
!     configure)
  
!     update-alternatives --install /usr/bin/pagsh pagsh /usr/bin/pagsh.openafs 100 \
!     --slave /usr/share/man/man1/pagsh.1.gz pagsh.1.gz /usr/share/man/man1/pagsh.openafs.1.gz
  
- 	test -d /afs || mkdir /afs
      . /usr/share/debconf/confmodule
  
! 	db_version 2.0
! 
! 	db_get openafs-client/thiscell
! 	echo $RET >/etc/openafs/ThisCell
! 	THISCELL=$RET
! 
! 	if test -f /etc/openafs/CellServDB; then :
! 	    else cp /usr/share/openafs/CellServDB \
! 	      /etc/openafs
! 	    fi
! 	if grep  -q -F "$RET" /etc/openafs/CellServDB&& [ "x$RET" != "x" ]  ; then :
! 		else db_input critical  openafs-client/cell-info || true
! 	    db_input high openafs-client/run-client ||true
! 	    db_go
! 	    db_get openafs-client/cell-info
! 	    if [ "x$RET" != "x" ] ; then
! 		echo \>$THISCELL >/etc/openafs/CellServDB.new
! 		perl -MSocket -e 'foreach (@ARGV) {' \
! 		        -e '@a=gethostbyname($_) and ' \
! 		        -e 'printf("%s\t\t# %s\n",inet_ntoa($a[4]),$a[0]) }' $RET \
! 		    >>/etc/openafs/CellServDB.new
! 			if [ `wc -l </etc/openafs/CellServDB.new` -eq 1 ] ; then
! 			    echo None of the hostnames resolved to an address 2>&1
! 			    db_reset openafs-client/cell-info ||true
! 			    exit 1
! 			 fi
! 		    cat /etc/openafs/CellServDB.new \
! 		      /etc/openafs/CellServDB  >/etc/openafs/CellServDB.tmp
! 		    mv /etc/openafs/CellServDB.tmp \
! 		      /etc/openafs/CellServDB
! 		    rm /etc/openafs/CellServDB.new
! 		fi
! 	    fi
! 		    
! 	db_get openafs-client/cachesize
! 	echo /afs:/var/cache/openafs:$RET >/etc/openafs/cacheinfo
! 
! 	db_get openafs-client/run-client
! 	echo AFS_CLIENT=$RET >/etc/openafs/afs.conf.client
! 	db_get openafs-client/afsdb
! 	echo AFS_AFSDB=$RET >>/etc/openafs/afs.conf.client
! 	db_get openafs-client/crypt
! 	echo AFS_CRYPT=$RET >>/etc/openafs/afs.conf.client
! db_get openafs-client/dynroot
! echo AFS_DYNROOT=$RET >>/etc/openafs/afs.conf.client
! db_get openafs-client/fakestat
! echo AFS_FAKESTAT=$RET >>/etc/openafs/afs.conf.client
      ;;
  
!     abort-upgrade|abort-remove|abort-deconfigure)
! 
      ;;
  
!     *)
!         echo "postinst called with unknown argument \`$1'" >&2
!         exit 0
      ;;
  esac
  
--- 1,90 ----
  #! /bin/sh
! #
! # Summary of how this script can be called:
! #
! #  * <postinst> `configure' <most-recently-configured-version>
! #  * <old-postinst> `abort-upgrade' <new version>
! #  * <conflictor's-postinst> `abort-remove' `in-favour' <package>
! #    <new-version>
! #  * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
! #    <failed-install-package> <version> `removing'
! #    <conflicting-package> <version>
  
  set -e
  
  case "$1" in
! configure)
!     update-alternatives --install /usr/bin/pagsh pagsh \
!         /usr/bin/pagsh.openafs 100  \
!         --slave /usr/share/man/man1/pagsh.1.gz pagsh.1.gz \
!         /usr/share/man/man1/pagsh.openafs.1.gz
  
!     test -d /afs || mkdir /afs
  
      . /usr/share/debconf/confmodule
+     db_version 2.0
  
!     db_get openafs-client/thiscell
!     echo $RET >/etc/openafs/ThisCell
!     THISCELL=$RET
! 
!     if test -f /etc/openafs/CellServDB ; then
!         :
!     else
!         cp /usr/share/openafs/CellServDB /etc/openafs
!     fi
! 
!     # If ThisCell is not in CellServDB, we have to prompt the user for the
!     # VLDB servers.  Unfortunately, we can't do this in config because we
!     # need the CellServDB file, which is part of the package.  We have to
!     # override a lintian warning for this since prompts at installation time
!     # are frowned upon.
!     if grep -q -F "$RET" /etc/openafs/CellServDB && [ "x$RET" != "x" ] ; then
!         :
!     else
!         db_input critical openafs-client/cell-info || true
!         db_input high openafs-client/run-client || true
!         db_go
!         db_get openafs-client/cell-info
!         if [ "x$RET" != "x" ] ; then
!             echo \>$THISCELL > /etc/openafs/CellServDB.new
!             perl -MSocket -e 'foreach (@ARGV) {' \
!                 -e '@a=gethostbyname($_) and ' \
!                 -e 'printf("%s\t\t# %s\n",inet_ntoa($a[4]),$a[0]) }' $RET \
!                     >>/etc/openafs/CellServDB.new
!             if [ `wc -l </etc/openafs/CellServDB.new` -eq 1 ] ; then
!                 echo None of the hostnames resolved to an address 2>&1
!                 db_reset openafs-client/cell-info || true
!                 exit 1
!             fi
!             cat /etc/openafs/CellServDB.new /etc/openafs/CellServDB \
!                 >/etc/openafs/CellServDB.tmp
!             mv /etc/openafs/CellServDB.tmp /etc/openafs/CellServDB
!             rm /etc/openafs/CellServDB.new
!         fi
!     fi
!                     
!     db_get openafs-client/cachesize
!     echo /afs:/var/cache/openafs:$RET >/etc/openafs/cacheinfo
! 
!     db_get openafs-client/run-client
!     echo AFS_CLIENT=$RET >/etc/openafs/afs.conf.client
!     db_get openafs-client/afsdb
!     echo AFS_AFSDB=$RET >>/etc/openafs/afs.conf.client
!     db_get openafs-client/crypt
!     echo AFS_CRYPT=$RET >>/etc/openafs/afs.conf.client
!     db_get openafs-client/dynroot
!     echo AFS_DYNROOT=$RET >>/etc/openafs/afs.conf.client
!     db_get openafs-client/fakestat
!     echo AFS_FAKESTAT=$RET >>/etc/openafs/afs.conf.client
      ;;
  
! abort-upgrade|abort-remove|abort-deconfigure)
      ;;
  
! *)
!     echo "postinst called with unknown argument '$1'" >&2
!     exit 0
      ;;
  esac
  
***************
*** 86,90 ****
  #DEBHELPER#
  
  exit 0
- 
- 
--- 94,96 ----
Index: openafs/src/packaging/Debian/openafs-client.templates
diff -c openafs/src/packaging/Debian/openafs-client.templates:1.1 openafs/src/packaging/Debian/openafs-client.templates:1.1.2.1
*** openafs/src/packaging/Debian/openafs-client.templates:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/openafs-client.templates	Thu Mar 23 15:20:31 2006
***************
*** 1,85 ****
  Template: openafs-client/cell-info
  Type: string
! Description: What hosts are DB servers for your home cell?
!  AFS uses the file /etc/openafs/CellServDB to hold the list of servers
!  that should be contacted to find parts of a cell.  The cell you claim
!  this workstation belongs to is not in that file.  Enter the host
!  names of the database servers separated by spaces.
!  IMPORTANT: If you are creating a new cell and this machine is to be
!  a database server in that cell, only enter this machine's name; add
!  the other servers later after they are functioning. Also, do not
!  enable the AFS client to start at boot on this server until the cell
!  is configured.  When you are ready you can edit
   /etc/openafs/afs.conf.client to enable the client.
  
  Template: openafs-client/thiscell
  Type: string
! Description:  What AFS cell does this workstation belong to?
!    AFS filespace is organized into cells or administrative domains.
!    Each workstation belongs to one cell.  Usually the cell is the DNS
!    domain name of the site.
  
  Template: openafs-client/cachesize
  Type: string
  Default: 50000
! Description:  How large is your AFS cache (kb)? 
!    AFS uses a  area of the disk to cache remote files for faster
!    access.  This cache will be mounted on /var/cache/openafs.  It is
!    important that the cache not overfill the partition it is located
!    on.  Often, people find it useful to dedicate a partition to their
!    AFS cache.
  
  Template: openafs-client/run-client
  Type: boolean
  Default: true
! Description: Run Openafs client now and at boot?
!  Should the Openafs filesystem be started and mounted at boot?
!  Normally, most users who install the openafs-client package expect to
!  run it at boot.  However, if you are planning on setting up a new
!  cell or are on a laptop, you may not want it started at boot time.
!  If you answer no to this question, run /etc/init.d/openafs-client
!  force-start to run.
  
  Template: openafs-client/afsdb
  Type: boolean
  Default: true
! Description: Look up AFS cells in DNS?
!  In order to contact an AFS cell, you need the IP addresses of the
!  cell's database servers.  Normally, this information is read from
!  /etc/openafs/CellServDB.  However, if Openafs cannot find a cell in
!  that file it can use DNS to look for AFSDB records that contain the
   information.
  
  Template: openafs-client/crypt
  Type: boolean
  Default: true
! Description: ENcrypt authenticated traffic with AFS fileserver? 
!  AFS provides a weak form of encryption that can optionally be used
!  between a client and the fileservers.  While this encryption is weaker
!  than DES and thus is not sufficient for highly confidential data, it
!  does provide some confidentiality and is likely to make the job of a
!  casual attacker significantly more difficult.
  
  Template: openafs-client/dynroot
  Type: boolean
  Default: false
! Description: Dynamically generate the contents of /afs?
!  /afs generally contains an entry for each cell that a client can talk to.  
   Traditionally, these entries were generated by servers in the client's
   home cell.  However, OpenAFS clients can generate the contents of /afs
   dynamically based on the contents of /etc/openafs/CellServDB and DNS.
   .
!  If you generate /afs dynamically, you may need to create 
!  /etc/openafs/CellAliases to include aliases for common cells.
!  DO NOT SELECT THIS OPTION IF YOU ARE CREATING A NEW CELL.
  
  Template: openafs-client/fakestat
! type: boolean
! default: true
! Description: Use fakestat to avoid hangs when listing /afs?
!  Because AFS is a global file space, operations on the /afs directory
!  can generate significant network traffic.  If some AFS cells are
!  unavailable then looking at /afs using ls or a graphical file browser
!  may hang your machine for minutes.  AFS has an option to simulate
!  answers to these operations locally to avoid these hangs.  You want
!  this option under most circumstances.
--- 1,93 ----
  Template: openafs-client/cell-info
  Type: string
! _Description: What hosts are DB servers for your home cell?
!  AFS uses the file /etc/openafs/CellServDB to hold the list of servers that
!  should be contacted to find parts of a cell.  The cell you claim this
!  workstation belongs to is not in that file.  Enter the host names of the
!  database servers separated by spaces. IMPORTANT: If you are creating a new
!  cell and this machine is to be a database server in that cell, only enter
!  this machine's name; add the other servers later after they are
!  functioning. Also, do not enable the AFS client to start at boot on this
!  server until the cell is configured.  When you are ready you can edit
   /etc/openafs/afs.conf.client to enable the client.
  
  Template: openafs-client/thiscell
  Type: string
! _Description:  What AFS cell does this workstation belong to?
!  AFS filespace is organized into cells or administrative domains.
!  Each workstation belongs to one cell.  Usually the cell is the DNS
!  domain name of the site.
  
  Template: openafs-client/cachesize
  Type: string
  Default: 50000
! _Description:  How large is your AFS cache (kB)?
!  AFS uses an area of the disk to cache remote files for faster
!  access.  This cache will be mounted on /var/cache/openafs.  It is
!  important that the cache not overfill the partition it is located
!  on.  Often, people find it useful to dedicate a partition to their
!  AFS cache.
  
  Template: openafs-client/run-client
  Type: boolean
  Default: true
! _Description: Run Openafs client now and at boot?
!  Should the Openafs filesystem be started and mounted at boot? Normally,
!  most users who install the openafs-client package expect to run it at
!  boot.  However, if you are planning on setting up a new cell or are on a
!  laptop, you may not want it started at boot time.  If you choose not
!  to start AFS at boot, run /etc/init.d/openafs-client force-start to
!  start the client when you wish to run it.
  
  Template: openafs-client/afsdb
  Type: boolean
  Default: true
! _Description: Look up AFS cells in DNS?
!  In order to contact an AFS cell, you need the IP addresses of the cell's
!  database servers.  Normally, this information is read from
!  /etc/openafs/CellServDB.  However, if Openafs cannot find a cell in that
!  file, it can use DNS to look for AFSDB records that contain the
   information.
  
  Template: openafs-client/crypt
  Type: boolean
  Default: true
! _Description: Encrypt authenticated traffic with AFS fileserver?
!  AFS provides a weak form of encryption that can optionally be used between
!  a client and the fileservers.  While this encryption is weaker than DES
!  and thus is not sufficient for highly confidential data, it does provide
!  some confidentiality and is likely to make the job of a casual attacker
!  significantly more difficult.
  
  Template: openafs-client/dynroot
  Type: boolean
  Default: false
! _Description: Dynamically generate the contents of /afs?
!  /afs generally contains an entry for each cell that a client can talk to.
   Traditionally, these entries were generated by servers in the client's
   home cell.  However, OpenAFS clients can generate the contents of /afs
   dynamically based on the contents of /etc/openafs/CellServDB and DNS.
   .
!  If you generate /afs dynamically, you may need to create
!  /etc/openafs/CellAlias to include aliases for common cells.  (The syntax
!  of this file is one line per alias, with the cell name, a space, and then
!  the alias for that cell.)
  
  Template: openafs-client/fakestat
! Type: boolean
! Default: true
! _Description: Use fakestat to avoid hangs when listing /afs?
!  Because AFS is a global file space, operations on the /afs directory can
!  generate significant network traffic.  If some AFS cells are unavailable
!  then looking at /afs using ls or a graphical file browser may hang your
!  machine for minutes.  AFS has an option to simulate answers to these
!  operations locally to avoid these hangs.  You want this option under most
!  circumstances.
! 4
! 4
! 4
! 4
! 4
! 4
! 4
! 4
Index: openafs/src/packaging/Debian/openafs-dbserver.dirs
diff -c openafs/src/packaging/Debian/openafs-dbserver.dirs:1.1 openafs/src/packaging/Debian/openafs-dbserver.dirs:1.1.2.1
*** openafs/src/packaging/Debian/openafs-dbserver.dirs:1.1	Mon Aug 26 16:52:02 2002
--- openafs/src/packaging/Debian/openafs-dbserver.dirs	Thu Mar 23 15:20:31 2006
***************
*** 2,4 ****
--- 2,12 ----
  var/lib/openafs/db
  usr/share/man/man8
  usr/sbin
+ usr/share/doc
+ usr/share/doc
+ usr/share/doc
+ usr/share/doc
+ usr/share/doc
+ usr/share/doc
+ usr/share/doc
+ usr/share/doc
Index: openafs/src/packaging/Debian/openafs-dbserver.install
diff -c /dev/null openafs/src/packaging/Debian/openafs-dbserver.install:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/openafs-dbserver.install	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1,24 ----
+ debian/tmp/usr/sbin/prdb_check          usr/sbin
+ debian/tmp/usr/sbin/pt_util             usr/sbin
+ debian/tmp/usr/sbin/vldb_check          usr/sbin
+ 
+ debian/afs-rootvol                      usr/sbin
+ debian/afs-newcell                      usr/sbin
+ 
+ debian/tmp/usr/lib/openafs/buserver     usr/lib/openafs
+ debian/tmp/usr/lib/openafs/ptserver     usr/lib/openafs
+ debian/tmp/usr/lib/openafs/vlserver     usr/lib/openafs
+ 
+ debian/ConfigUtils.pm                   usr/share/perl5/Debian/OpenAFS
+ 
+ debian/doc/man5/BackupLog.5             usr/share/man/man5
+ debian/doc/man5/VLLog.5                 usr/share/man/man5
+ debian/doc/man5/bdb.DB0.5               usr/share/man/man5
+ debian/doc/man5/prdb.DB0.5              usr/share/man/man5
+ debian/doc/man5/vldb.DB0.5              usr/share/man/man5
+ 
+ debian/doc/man8/buserver.8              usr/share/man/man8
+ debian/doc/man8/prdb_check.8            usr/share/man/man8
+ debian/doc/man8/ptserver.8              usr/share/man/man8
+ debian/doc/man8/vldb_check.8            usr/share/man/man8
+ debian/doc/man8/vlserver.8              usr/share/man/man8
Index: openafs/src/packaging/Debian/openafs-dbserver.lintian
diff -c /dev/null openafs/src/packaging/Debian/openafs-dbserver.lintian:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/openafs-dbserver.lintian	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1 ----
+ openafs-dbserver: non-standard-dir-perm
Index: openafs/src/packaging/Debian/openafs-fileserver.init
diff -c openafs/src/packaging/Debian/openafs-fileserver.init:1.1 openafs/src/packaging/Debian/openafs-fileserver.init:1.1.2.1
*** openafs/src/packaging/Debian/openafs-fileserver.init:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/openafs-fileserver.init	Thu Mar 23 15:20:31 2006
***************
*** 34,40 ****
  	echo -n "Stopping $DESC: "
      bos shutdown localhost -wait -localauth
  	start-stop-daemon --stop --quiet  \
! 		--exec $DAEMON
  	echo "$NAME."
  	;;
    #reload)
--- 34,40 ----
  	echo -n "Stopping $DESC: "
      bos shutdown localhost -wait -localauth
  	start-stop-daemon --stop --quiet  \
! 		--user root --name bosserver
  	echo "$NAME."
  	;;
    #reload)
***************
*** 56,62 ****
  	#	just the same as "restart".
  	#
  	echo -n "Restarting $DESC: "
!     bos restart localhost -localauth -bos
  	sleep 1
  	echo "$NAME."
  	;;
--- 56,67 ----
  	#	just the same as "restart".
  	#
  	echo -n "Restarting $DESC: "
!         if pidof $DAEMON > /dev/null ; then
!             bos restart localhost -localauth -bos
!         else
!             start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
!                 --exec $DAEMON
!         fi
  	sleep 1
  	echo "$NAME."
  	;;
Index: openafs/src/packaging/Debian/openafs-fileserver.install
diff -c /dev/null openafs/src/packaging/Debian/openafs-fileserver.install:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/openafs-fileserver.install	Thu Mar 23 15:20:31 2006
***************
*** 0 ****
--- 1,31 ----
+ debian/tmp/usr/sbin/bosserver           usr/sbin
+ debian/tmp/usr/sbin/voldump             usr/sbin
+ debian/tmp/usr/sbin/volinfo             usr/sbin
+ 
+ debian/tmp/usr/lib/openafs/up*          usr/sbin
+ 
+ debian/tmp/usr/lib/openafs/fileserver   usr/lib/openafs
+ debian/tmp/usr/lib/openafs/salvager     usr/lib/openafs
+ debian/tmp/usr/lib/openafs/volserver    usr/lib/openafs
+ 
+ debian/doc/man5/BosConfig.5             usr/share/man/man5
+ debian/doc/man5/BosLog.5                usr/share/man/man5
+ debian/doc/man5/FORCESALVAGE.5          usr/share/man/man5
+ debian/doc/man5/FileLog.5               usr/share/man/man5
+ debian/doc/man5/KeyFile.5               usr/share/man/man5
+ debian/doc/man5/NoAuth.5                usr/share/man/man5
+ debian/doc/man5/SALVAGE.fs.5            usr/share/man/man5
+ debian/doc/man5/SalvageLog.5            usr/share/man/man5
+ debian/doc/man5/VolserLog.5             usr/share/man/man5
+ debian/doc/man5/afs_volume_header.5     usr/share/man/man5
+ debian/doc/man5/salvage.lock.5          usr/share/man/man5
+ debian/doc/man5/sysid.5                 usr/share/man/man5
+ 
+ debian/doc/man8/bosserver.8             usr/share/man/man8
+ debian/doc/man8/fileserver.8            usr/share/man/man8
+ debian/doc/man8/salvager.8              usr/share/man/man8
+ debian/doc/man8/upclient.8              usr/share/man/man8
+ debian/doc/man8/upserver.8              usr/share/man/man8
+ debian/doc/man8/voldump.8               usr/share/man/man8
+ debian/doc/man8/volinfo.8               usr/share/man/man8
+ debian/doc/man8/volserver.8             usr/share/man/man8
Index: openafs/src/packaging/Debian/openafs-fileserver.lintian
diff -c openafs/src/packaging/Debian/openafs-fileserver.lintian:1.1 openafs/src/packaging/Debian/openafs-fileserver.lintian:1.1.2.1
*** openafs/src/packaging/Debian/openafs-fileserver.lintian:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/openafs-fileserver.lintian	Thu Mar 23 15:20:31 2006
***************
*** 1,2 ****
- openafs-fileserver: link-to-undocumented-manpage
  openafs-fileserver: non-standard-dir-perm
--- 1 ----
Index: openafs/src/packaging/Debian/openafs-fileserver.postinst
diff -c openafs/src/packaging/Debian/openafs-fileserver.postinst:1.1 openafs/src/packaging/Debian/openafs-fileserver.postinst:1.1.2.1
*** openafs/src/packaging/Debian/openafs-fileserver.postinst:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/openafs-fileserver.postinst	Thu Mar 23 15:20:31 2006
***************
*** 1,46 ****
  #!/bin/sh -e
  
! # summary of how this script can be called:
! #        * <postinst> `configure' <most-recently-configured-version>
! #        * <old-postinst> `abort-upgrade' <new version>
! #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
! #          <new-version>
! #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
! #          <failed-install-package> <version> `removing'
! #          <conflicting-package> <version>
  
  case "$1" in
!     configure)
! 
! 	. /usr/share/debconf/confmodule
! 
! 	db_version 2.0
! 
! 	db_get openafs-fileserver/thiscell
! 	echo $RET >/etc/openafs/server/ThisCell
! 	if [ -f /etc/openafs/server/CellServDB ] ; then :
! 	    else echo \>$RET >/etc/openafs/server/CellServDB
! 	    fi
! 	    if [ "x$2" != "x" ] ; then
! 		if dpkg --compare-versions $2 lt 1.2.0-1 ; then
! 		    mv /etc/openafs/server-local/BosConfig /etc/openafs/BosConfig ||true
! 		    mv /etc/openafs/server-local/sysid /var/lib/openafs ||true
! 		    fi
! 		fi
      ;;
  
!     abort-upgrade|abort-remove|abort-deconfigure)
! 
      ;;
  
!     *)
!         echo "postinst called with unknown argument \`$1'" >&2
!         exit 0
      ;;
  esac
  
! # dh_installdeb will replace this with shell code automatically
! # generated by other debhelper scripts.
  #DEBHELPER#
  
  exit 0
--- 1,55 ----
  #!/bin/sh -e
+ #
+ # Summary of how this script can be called:
+ #
+ #  * <postinst> `configure' <most-recently-configured-version>
+ #  * <old-postinst> `abort-upgrade' <new version>
+ #  * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+ #    <new-version>
+ #  * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+ #    <failed-install-package> <version> `removing'
+ #    <conflicting-package> <version>
  
! set -e
  
  case "$1" in
! configure)
!     . /usr/share/debconf/confmodule
!     db_version 2.0
! 
!     db_get openafs-fileserver/thiscell
!     echo $RET >/etc/openafs/server/ThisCell
! 
!     if [ -f /etc/openafs/server/CellServDB ] ; then
!         :
!     else
!         sed -n "/^>$RET/,/^>/p" /etc/openafs/CellServDB | sed '$d' \
!             >/etc/openafs/server/CellServDB
!         if [ ! -s /etc/openafs/server/CellServDB ] ; then
!             echo ">$RET" >/etc/openafs/server/CellServDB
!         fi
!     fi
!     if [ "x$2" != "x" ] ; then
!         if dpkg --compare-versions $2 lt 1.2.0-1 ; then
!             mv /etc/openafs/server-local/BosConfig \
!                 /etc/openafs/BosConfig || true
!             mv /etc/openafs/server-local/sysid /var/lib/openafs || true
!         fi
!     fi
!     db_stop
      ;;
  
! abort-upgrade|abort-remove|abort-deconfigure)
      ;;
  
! *)
!     echo "postinst called with unknown argument \`$1'" >&2
!     exit 0
      ;;
  esac
  
! # dh_installdeb will replace this with shell code automatically generated by
! # other debhelper scripts.
  #DEBHELPER#
  
  exit 0
Index: openafs/src/packaging/Debian/openafs-fileserver.postrm
diff -c openafs/src/packaging/Debian/openafs-fileserver.postrm:1.1 openafs/src/packaging/Debian/openafs-fileserver.postrm:1.1.2.1
*** openafs/src/packaging/Debian/openafs-fileserver.postrm:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/openafs-fileserver.postrm	Thu Mar 23 15:20:31 2006
***************
*** 38,41 ****
  
  #DEBHELPER#
  
- 
--- 38,40 ----
Index: openafs/src/packaging/Debian/openafs-fileserver.templates
diff -c openafs/src/packaging/Debian/openafs-fileserver.templates:1.1 openafs/src/packaging/Debian/openafs-fileserver.templates:1.1.2.1
*** openafs/src/packaging/Debian/openafs-fileserver.templates:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/openafs-fileserver.templates	Thu Mar 23 15:20:31 2006
***************
*** 1,31 ****
  Template: openafs-fileserver/thiscell
  Type: string
! Description: What cell does this server serve files for?
   AFS fileservers belong to a cell.  They have the key for that cell's
!  Kerberos service and serve volumes into that cell.  Normally, this
!  cell is the same cell as the workstation's client belongs to.
! Description-de: Für welche Zelle liefert der Server Dateien?
!  AFS-Dateiserver gehören zu einer Zelle. Die Server haben den Schlüssel
!  für den Kerberos-Service der Zelle und stellen Volumes für die Zelle
!  bereit. Normalerweise ist die Zelle identisch mit der des Clients
  
! template: openafs-fileserver/bosconfig_moved
  Type: boolean
! default: true
! Description: Upgrading will move files to new locations; continue? 
!  Between Openafs 1.1 and Openafs 1.2, several files moved.  In
!  particular,  files in /etc/openafs/server-local have been distributed
!  to other locations.  The BosConfig file is now located in
!  /etc/openafs and the other files are located in /var/lib/openafs.  If
!  you continue with this upgrade, these files will be moved. You should
!  use the bos restart command to  reload your servers.  Any
!  configuration changes made before you do so will be lost.
  
! template: openafs-fileserver/alpha-broken
  Type: note
! Description: OpenAFS Fileserv Probably does not work!
   You are running the OpenAFS file server package on an alpha.  This
!  probably doesn't work; the DES code is flaky on the alpha, along with
!  the threaded file server.  Likely, the fileserver will simply fail to
!  start, but if it does load, data corruption may result.  You have been
!  warned.
--- 1,26 ----
  Template: openafs-fileserver/thiscell
  Type: string
! _Description: What cell does this server serve files for?
   AFS fileservers belong to a cell.  They have the key for that cell's
!  Kerberos service and serve volumes into that cell.  Normally, this cell is
!  the same cell as the workstation's client belongs to.
  
! Template: openafs-fileserver/bosconfig_moved
  Type: boolean
! Default: true
! _Description: Upgrading will move files to new locations; continue?
!  Between Openafs 1.1 and Openafs 1.2, several files moved.  In particular,
!  files in /etc/openafs/server-local have been distributed to other
!  locations.  The BosConfig file is now located in /etc/openafs and the
!  other files are located in /var/lib/openafs.  If you continue with this
!  upgrade, these files will be moved.  You should use the bos restart
!  command to reload your servers.  Any configuration changes made before
!  you do so will be lost.
  
! Template: openafs-fileserver/alpha-broken
  Type: note
! _Description: OpenAFS file server probably does not work!
   You are running the OpenAFS file server package on an alpha.  This
!  probably doesn't work; the DES code is flaky on the alpha, along with the
!  threaded file server.  Likely, the fileserver will simply fail to start,
!  but if it does load, data corruption may result.  You have been warned.
Index: openafs/src/packaging/Debian/openafs-kpasswd.install
diff -c /dev/null openafs/src/packaging/Debian/openafs-kpasswd.install:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/openafs-kpasswd.install	Thu Mar 23 15:20:32 2006
***************
*** 0 ****
--- 1,23 ----
+ debian/tmp/usr/bin/kpasswd              usr/bin
+ 
+ debian/tmp/usr/sbin/kas                 usr/bin
+ 
+ debian/doc/man1/kpasswd.1               usr/share/man/man1
+ 
+ debian/doc/man8/kas.8                   usr/share/man/man8
+ debian/doc/man8/kas_apropos.8           usr/share/man/man8
+ debian/doc/man8/kas_create.8            usr/share/man/man8
+ debian/doc/man8/kas_delete.8            usr/share/man/man8
+ debian/doc/man8/kas_examine.8           usr/share/man/man8
+ debian/doc/man8/kas_forgetticket.8      usr/share/man/man8
+ debian/doc/man8/kas_help.8              usr/share/man/man8
+ debian/doc/man8/kas_interactive.8       usr/share/man/man8
+ debian/doc/man8/kas_list.8              usr/share/man/man8
+ debian/doc/man8/kas_listtickets.8       usr/share/man/man8
+ debian/doc/man8/kas_noauthentication.8  usr/share/man/man8
+ debian/doc/man8/kas_quit.8              usr/share/man/man8
+ debian/doc/man8/kas_setfields.8         usr/share/man/man8
+ debian/doc/man8/kas_setpassword.8       usr/share/man/man8
+ debian/doc/man8/kas_statistics.8        usr/share/man/man8
+ debian/doc/man8/kas_stringtokey.8       usr/share/man/man8
+ debian/doc/man8/kas_unlock.8            usr/share/man/man8
Index: openafs/src/packaging/Debian/openafs-modules-source.docs
diff -c openafs/src/packaging/Debian/openafs-modules-source.docs:1.1 openafs/src/packaging/Debian/openafs-modules-source.docs:1.1.2.1
*** openafs/src/packaging/Debian/openafs-modules-source.docs:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/openafs-modules-source.docs	Thu Mar 23 15:20:32 2006
***************
*** 2,5 ****
  debian/README.servers
  debian/configuration-transcript.txt
  debian/README.modules
- NEWS
--- 2,4 ----
Index: openafs/src/packaging/Debian/prep-modules
diff -c openafs/src/packaging/Debian/prep-modules:1.1 openafs/src/packaging/Debian/prep-modules:1.1.2.1
*** openafs/src/packaging/Debian/prep-modules:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/prep-modules	Thu Mar 23 15:20:32 2006
***************
*** 1,55 ****
  #! /bin/sh
  
  set -e
  
! if [ $# -ne 2 ]; then
! 	echo Usage: $0 kernelsource-location control-template
! 	exit 1
  fi
  
  
  changelog="$1/debian/changelog"
  if [ -n "$KVERS" ] && [ -n "$KDREV" ]; then
!   linuxversion=$KVERS${INT_SUBARCH}
!   kernversion=$KDREV
! 
! elif [ ! -f $changelog ]; then
!         linuxversion=`awk '{ if (NR==1) v=$3; else if (NR==2) p=$3; else if (NR==3) s=$3; \
!                 else if (NR==4) { e=$3; exit; } } \
!                 END { printf("%s.%s.%s%s\n",v,p,s,e); }' $1/Makefile`
! 
!         if [ -z "$KDREV" ]; then
!           kernversion=$linuxversion-0
!         else
! 	    linuxversion=${linuxversion}${INT_SUBARCH}
!           kernversion=$KDREV
!         fi
! 
  else
!         linuxversion=`head -1 $changelog | \
!                 sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\1/'`
!         kernversion=`head -1 $changelog | \
!                 sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\2/'`
  fi
  
! pkgversion=`head -1 debian/changelog | \
! 	sed -e 's/.*(\([^)]*\)).*/\1/'`
! 
! pkgupversion=`echo $pkgversion | cut -d- -f 1`
! pkgupversion2=`perl -e "\"$pkgupversion\" =~ /(.*?)(\d+)\D*$/;"'printf $1 . ($2+1);'`
! 
! sed -e s/=KVERS/$linuxversion/g -e s/=KREVS/$kernversion/g -e s/=AVERS/$pkgupversion/g -e s/=2AVERS/$pkgupversion2/g $2
  
! mprefix=`grep Package: $2 | cut -d' ' -f 2 | cut -d= -f 1`
! 
! rm -f debian/tmp/usr/share/doc/$mprefix$linuxversion
  
  
! epochversion=`echo $kernversion | sed -n -e 's/^\([0-9]*\):.*/\1/p' -e 's/.*//'`
! kernversion="$pkgversion+`echo $kernversion | sed -e 's/^[0-9]*://'`"
  
! if [ -n "$epochversion" ]; then
!   kernversion=$epochversion:$kernversion
  fi
! echo "$kernversion" > debian/VERSION
! echo "$linuxversion" > debian/KVERS
--- 1,103 ----
  #! /bin/sh
+ #
+ # Prepares to build kernel modules.  This script figures out and munges
+ # version strings.  The goal is:
+ #
+ #  * Set the package name to openafs-modules-$(KVERS) where $(KVERS) is the
+ #    major kernel revision plus the debian subrevision and whatever
+ #    architecture string is appropriate if building against the stock Debian
+ #    kernels.  $(KVERS) should be identical to the version component contained
+ #    in the Debian kernel package names.
+ #
+ #  * Make the package recommend either kernel-image-$(KVERS) or
+ #    linux-image-$(KVERS) as appropriate for the kernel version that we're
+ #    building against.  Use recommend rather than depends since the user may
+ #    have built their own kernel outside of the Debian package infrastructure.
+ #
+ #  * Save the version number of the binary package in debian/VERSION for later
+ #    use by dh_gencontrol.  This will be the version number of the source
+ #    package followed by a + and the version number of the kernel package that
+ #    we're building against.  If the kernel package version contains an epoch,
+ #    try to hack our way into doing the right thing by using that epoch number
+ #    as our own.  This isn't quite the right thing, but seems reasonably good.
+ #
+ # This script generates debian/control from debian/control.module using sed.
+ # Unfortunately, substvars cannot be used since the name of the package is
+ # modified and substvars happens too late.  It also outputs debian/VERSION,
+ # containing the version of the binary package.
  
  set -e
  
! if [ "$#" -ne 1 ]; then
!     echo Usage: $0 kernelsource-location
!     exit 1
  fi
  
+ # We can get the kernel version from one of three places.  If KVERS and KDREV
+ # are both already set in the environment (which will be the case when invoked
+ # by make-kpkg or module-assistant), use them.  Otherwise, if we have a kernel
+ # source directory that contains debian/changelog (generated by make-kpkg),
+ # parse that file to find the version information.  Finally, if neither works,
+ # extract the kernel version from the kernel headers, append INT_SUBARCH to
+ # that version if it's available, and assume a kernel package revision of -0
+ # if none is provided.
+ #
+ # Set the variables $afs_kvers, which will hold the revision of the kernel,
+ # and $afs_kdrev, which will hold the version of the kernel package that we're
+ # building against.
  
  changelog="$1/debian/changelog"
  if [ -n "$KVERS" ] && [ -n "$KDREV" ]; then
!     afs_kvers="${KVERS}${INT_SUBARCH}"
!     afs_kdrev="${KDREV}"
! elif [ ! -f "$changelog" ] ; then
!     if [ -n "$KVERS" ] ; then
!         afs_kvers="$KVERS"
!     else
!         afs_kvers=`perl debian/kernel-version "$1"`
!     fi
!     if [ -z "$KDREV" ] ; then
!         afs_kdrev="${afs_kvers}-0"
!     else
!         afs_kvers="${afs_kvers}${INT_SUBARCH}"
!         afs_kdrev="${KDREV}"
!     fi
  else
!     if [ -n "$KVERS" ] ; then
!         afs_kvers="$KVERS"
!     else
!         afs_kvers=`head -1 "$changelog" \
!             | sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\1/'`
!     fi
!     afs_kdrev=`head -1 "$changelog" \
!         | sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\2/'`
  fi
  
! # Determine the kernel package name.  For right now, assume linux-image for
! # 2.6.12 and later, and kernel-image for anything earlier.  If this doesn't
! # work for someone, please submit a bug with the details.
  
! if dpkg --compare-versions "$afs_kvers" ge "2.6.12" ; then
!     afs_image=linux-image
! else
!     afs_image=kernel-image
! fi
  
+ # Generate the control file from the template.
  
! sed -e "s/=KVERS/${afs_kvers}/g" -e "s/=IMG/${afs_image}/g" \
!     debian/control.module > debian/control
  
! # Now, calcuate the binary package version.  Extract the epoch from the kernel
! # package revision and add it to the beginning of the binary package version
! # if present.  Then, concatenate the source version, '+', and the kernel
! # package revision without the epoch.
! 
! afs_version=`head -1 debian/changelog | sed -e 's/.*(\([^)]*\)).*/\1/'`
! afs_epoch=`echo ${afs_kdrev} | sed -n -e 's/^\([0-9]*\):.*/\1/p'`
! afs_version="${afs_version}+`echo ${afs_kdrev} | sed -e 's/^[0-9]*://'`"
! if [ -n "$afs_epoch" ] ; then
!     afs_version="${afs_epoch}:${afs_version}"
  fi
! 
! echo "$afs_version" > debian/VERSION
Index: openafs/src/packaging/Debian/pt_util.sgml
diff -c openafs/src/packaging/Debian/pt_util.sgml:1.1 openafs/src/packaging/Debian/pt_util.sgml:1.1.2.1
*** openafs/src/packaging/Debian/pt_util.sgml:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/pt_util.sgml	Thu Mar 23 15:20:32 2006
***************
*** 182,185 ****
  sgml-local-catalogs:nil
  sgml-local-ecat-files:nil
  End:
- -->
--- 182,184 ----
Index: openafs/src/packaging/Debian/rules
diff -c openafs/src/packaging/Debian/rules:1.1 openafs/src/packaging/Debian/rules:1.1.2.1
*** openafs/src/packaging/Debian/rules:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/rules	Thu Mar 23 15:20:32 2006
***************
*** 9,276 ****
  # Uncomment this to turn on verbose mode. 
  #export DH_VERBOSE=1
  
- # This is the debhelper compatability version to use.
- export DH_COMPAT=2
- 
  # This has to be exported to make some magic below work.
  export DH_OPTIONS
  
! # The AFS sysname is determined by a script
! KVERS=`awk '{ if (NR==1) v=$$3; else if (NR==2) p=$$3; else if (NR==3) s=$$3; \
!        else if (NR==4) { e=$$3; exit; } } \
!        END { printf("%s.%s.%s%s\n",v,p,s,e); }' $(KSRC)/Makefile`
! SYS_NAME=$(shell KVERS=$(KVERS) sh debian/sysname)
! package=openafs
! srcpkg = openafs-modules-source
! modulepkg=$(shell echo openafs-modules-$(KVERS)${INT_SUBARCH})
  ifndef KSRC
! KSRC=/usr/src/linux
  endif
! MODDIR=..
! LINTIAN_PACKAGES= openafs-client openafs-fileserver
  export KSRC 
  export KVERS
  
  
  configure: configure-stamp
  configure-stamp:
  	dh_testdir
! 	-ln -s @sys/dest dest
! 	-ln -s $(SYS_NAME) @sys
! #	sh regen.sh
! 	 afslogsdir=/var/log/openafs sh configure --with-afs-sysname=$(SYS_NAME) --disable-kernel-module \
! 	--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
! 	--localstatedir=/var/lib 
! 	install -d $(SYS_NAME)/dest/root.client/usr/vice/etc
! 	install -d dest/root.server/usr/afs/bin
! 
  	touch configure-stamp
  
  build: configure-stamp build-stamp
  build-stamp:
  	dh_testdir
! 
! 	$(MAKE) dest 
! 	-rm $(SYS_NAME)/dest/include/crypt.h
  	touch build-stamp
  
  clean:
  	dh_testdir
  	dh_testroot
! 	rm -f build-stamp configure-stamp build-modules-stamp
! 	# Add here commands to clean up after the build process.
! 	-$(MAKE) -ki distclean
! 	-rm -rf obj dest $(SYS_NAME) @sys Makefile debian/openafs-client.init
! 	-rm -rf config.status config.cache lib include
  	dh_clean
  
  install: DH_OPTIONS=
  install: build
  	dh_testdir
  	dh_testroot
- 	dh_clean -k
  	dh_installdirs
! 	mkdir -p debian/openafs-dbserver/usr/share/man/man8
! 		/usr/bin/docbook-to-man debian/pt_util.sgml >debian/openafs-dbserver/usr/share/man/man8/pt_util.8
! 	for foo in $(LINTIAN_PACKAGES) ; do \
! 		install -d debian/$$foo/usr/share/lintian/overrides; \
! 		cp debian/$$foo.lintian debian/$$foo/usr/share/lintian/overrides/$$foo; \
! 		done
! 	for pkg in openafs-dbserver openafs-fileserver openafs-kpasswd; do \
! 		ln -s openafs-client debian/$$pkg/usr/share/doc/$$pkg; \
! 		done
! 	# Add here commands to install the package into debian/tmp.
! 	cat debian/filelist |sh debian/movefiles
! 	mv debian/openafs-client/usr/bin/pagsh  \
! 	debian/openafs-client/usr/bin/pagsh.openafs
! 
! 	cp debian/CellServDB debian/openafs-client/usr/share/openafs
! 	cp dest/root.client/usr/vice/etc/afs.rc debian/openafs-client.init
! 	cp dest/root.client/usr/vice/etc/afs.conf debian/openafs-client/etc/openafs/afs.conf
! 	install -m 755 -o root -g root debian/afs-rootvol debian/openafs-dbserver/usr/sbin
! 	install -g root -o root -m 755 debian/afs-newcell \
! 		debian/openafs-dbserver/usr/sbin
! 	install -D -m 644 debian/ConfigUtils.pm \
! 		debian/openafs-dbserver/usr/lib/perl5/Debian/OpenAFS/ConfigUtils.pm
! 	(cd debian&&pod2man --section 8 --center "Debian GNU/Linux"  \
! 		afs-rootvol ) >debian/openafs-dbserver/usr/share/man/man8/afs-rootvol.8
! 	(cd debian&&pod2man --section 8 --center "Debian GNU/Linux"  \
! 		afs-newcell ) >debian/openafs-dbserver/usr/share/man/man8/afs-newcell.8
! 	# No, includes should not have the x bit set
! 	find debian/libopenafs-dev/usr/include -type f -print | \
! 		xargs chmod a-x
! 	# And drop the pam modules
! 	rm debian/libopenafs-dev/usr/lib/*pam*
  
! # Build architecture-independent files here.
! # Pass -i to all debhelper commands in this target to reduce clutter.
  binary-indep: DH_OPTIONS=-i
  binary-indep: build install binary-source
- 	# Need this version of debhelper for DH_OPTIONS to work.
- 	dh_testversion 1.1.17
  	dh_testdir
  	dh_testroot
! #	dh_installdebconf
  	dh_installdocs
- 	dh_installexamples
- 	dh_installmenu
- #	dh_installemacsen
- #	dh_installpam
- #	dh_installinit
- 	dh_installcron
- #	dh_installmanpages
- 	dh_installinfo
- 	dh_undocumented
- 	dh_installchangelogs   ChangeLog
  	dh_link
  	dh_compress
  	dh_fixperms
- 	# You may want to make some executables suid here.
- 	dh_suidregister
  	dh_installdeb
- #	dh_perl
  	dh_gencontrol
  	dh_md5sums
  	dh_builddeb
  
! # Build architecture-dependent files here.
! # Pass -a to all debhelper commands in this target to reduce clutter.
  binary-arch: DH_OPTIONS=-a
  binary-arch: build install
- 	# Need this version of debhelper for DH_OPTIONS to work.
- 	dh_testversion 1.1.17
  	dh_testdir
  	dh_testroot
! 	dh_installdebconf
  	dh_installdocs
! 	dh_installexamples
! 	dh_installmenu
! #	dh_installemacsen
! #	dh_installpam
  	DH_OPTIONS= dh_installinit -popenafs-client -r -- defaults 25 18
  	DH_OPTIONS= dh_installinit -popenafs-fileserver -r
- 	dh_installcron
- #	dh_installmanpages
- 	dh_installinfo
- 	dh_undocumented
- 	dh_installchangelogs   ChangeLog
- 	dh_strip
  	dh_link
  	dh_compress
  	dh_fixperms
- 	# You may want to make some executables suid here.
  	chmod 700 debian/openafs-client/var/cache/openafs
- 	chmod 700 debian/openafs-fileserver/etc/openafs/server
  	chmod 700 debian/openafs-dbserver/var/lib/openafs/db
  	chmod 700 debian/openafs-fileserver/var/lib/openafs/cores
! 	dh_suidregister
  	dh_installdeb
- #	dh_makeshlibs
- #	dh_perl
  	dh_shlibdeps
  	dh_gencontrol
  	dh_md5sums
  	dh_builddeb
  
! binary:   binary-indep binary-arch
! .PHONY: build clean binary-indep binary-arch binary install configure
! 
! ############################Module package support
! kdist_image:  build-modules
! 	$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. binary-modules
! 	$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. clean
! 
! kdist:  build-modules
! 	$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. KERNEL_DEPENDS=y binary-modules
! 	KSRC="$(KSRC)" KMAINT="$(KMAINT)" KEMAIL="$(KEMAIL)" \
! 		sh -v debian/genchanges.sh
! 	$(MAKE) $(MFLAGS) -f debian/rules MODDIR=$(KSRC)/.. clean
  
  
- 
- kdist_config: configure
- 
- kdist_clean: clean
- 
- ############################ source stuff #################################
  binary-source:
! # Perform some tests
! 	test -f debian/rules
! 	test `id -u` = "0"
! 
! 
! # Setup everything first
  	-rm -rf debian/$(srcpkg) debian/substvars
- 	install -d debian/$(srcpkg)
- # Clean up the sources	
  	install -d debian/$(srcpkg)/usr/src/modules/$(package)
! 	find . \( -name \*.o -o -path ./debian/$(srcpkg) -o -path \*/CVS -o -path ./src/WINNT  \
! 		-o -path ./obj -o -path ./$(SYS_NAME)  \
! 	-o \( -path ./debian/\* -type d \) \
! 	-o -path ./debian/\*debhelper \) -prune -o -print | \
! 		cpio -admp debian/$(srcpkg)/usr/src/modules/$(package)
! 	( cd debian/$(srcpkg)/usr/src/modules/$(package)&& \
! 		$(MAKE) -f debian/rules clean && \
! 	rm -rf src/libafs/rx src/libafs/afs src/libafs/afsint; \
! 		mv debian/kern-sysname debian/sysname)
! 	chown -R root.root debian/$(srcpkg)
  	find debian/$(srcpkg) -type d | xargs chmod 755
  	find debian/$(srcpkg) -type f -perm -100 | xargs chmod 755
  	find debian/$(srcpkg) -type f -not -perm -100 | xargs chmod 644
  	cd debian/$(srcpkg)/usr/src && \
! 	  tar cf $(package).tar modules && \
! 	  $(RM) -r modules/$(package)
  	gzip -9 debian/$(srcpkg)/usr/src/$(package).tar
  	chmod 644 debian/$(srcpkg)/usr/src/$(package).tar.gz
- ############################ modules stuff #################################
  
! build-modules: build-modules-stamp
  
! build-modules-stamp: 
! 	-ln -s @sys/dest dest
! 	-ln -s $(SYS_NAME) @sys
! 	sh configure --with-afs-sysname=$(SYS_NAME) --with-linux-kernel-headers=$(KSRC)
! 	make dest_only_libafs
  	touch build-modules-stamp
  
! binary-modules: build-modules
! # Perform some tests
! 	test -f debian/rules
! 	test `id -u` = "0"
! 
! # Setup everything first
! 	-rm -rf debian/$(modulepkg) debian/substvars
! 	install -d debian/$(modulepkg)
! 
! # Install the software
! 	install -d -g root -o root -m 755 debian/$(modulepkg)/lib/modules/$(KVERS)/fs
! 	install -g root -o root -m 755  dest/root.client/usr/vice/etc/modload/*.o \
! 		debian/$(modulepkg)/lib/modules/$(KVERS)/fs
! # Fix some stuff up
! 	install -d -o root -g root -m 755 debian/$(modulepkg)/usr/share/doc
! 	ln -s openafs-client debian/$(modulepkg)/usr/share/doc/$(modulepkg)
! 	rm -rf debian/$(modulepkg)/usr/include
! ifeq ($(KERNEL_DEPENDS),y)
! 	sh debian/prep-modules $(KSRC) debian/control.module > debian/control
! else
! 	sh debian/prep-modules $(KSRC) debian/control.module-image > debian/control
! endif
  
! # Install control files
! 	install -d -o root -g root -m 755 debian/$(modulepkg)/DEBIAN
! 	install -p -o root -g root -m 755 debian/prerm.mod \
! 		debian/$(modulepkg)/DEBIAN/prerm
! 	install -p -o root -g root -m 755 debian/postinst.mod \
! 		debian/$(modulepkg)/DEBIAN/postinst
! 
! # And now.. for the final packaging!
! 	find debian/$(modulepkg) -type f | grep -v "./DEBIAN" | xargs md5sum | \
! 		sed -e 's#debian/$(modulepkg)/##' > debian/$(modulepkg)/DEBIAN/md5sums
! 
! 	dpkg-gencontrol -isp \
! 		-p$(modulepkg) \
! 		-v`cat debian/VERSION` \
! 		-Pdebian/$(modulepkg)
! 	chown -R root.root debian/$(modulepkg)
! 	chmod -R go=rX debian/$(modulepkg)
! 	dpkg --build debian/$(modulepkg) $(MODDIR)
--- 9,281 ----
  # Uncomment this to turn on verbose mode. 
  #export DH_VERBOSE=1
  
  # This has to be exported to make some magic below work.
  export DH_OPTIONS
  
! ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
!     DEBIAN_OPT_FLAGS = --disable-optimize --disable-lwp-optimize
!     DEBIAN_KERN_FLAGS = --disable-kernel-optimize
! else
!     DEBIAN_OPT_FLAGS =
!     DEBIAN_KERN_FLAGS =
! endif
! 
  ifndef KSRC
!     KSRC = /usr/src/linux
  endif
! ifndef KPKG_DEST_DIR
!     KPKG_DEST_DIR = ..
! endif
! KVERS := $(shell perl debian/kernel-version $(KSRC))
  export KSRC 
  export KVERS
+ export KPKG_DEST_DIR
+ 
+ SYS_NAME  := $(shell KSRC="$(KSRC)" KVERS="$(KVERS)" sh debian/sysname)
  
+ package    = openafs
+ srcpkg     = openafs-modules-source
+ modulepkg := openafs-modules-$(KVERS)${INT_SUBARCH}
+ moduledir := debian/$(modulepkg)/lib/modules/$(KVERS)/fs
+ 
+ # These packages have lintian overrides.
+ LINTIAN_PACKAGES = openafs-dbserver openafs-client openafs-fileserver
+ 
+ # The /usr/share/doc directory for these packages should be a symlink to
+ # /usr/share/doc/openafs-client.  Any package on this list must depend on
+ # openafs-client.
+ DOC_PACKAGES = libpam-openafs-kaserver openafs-dbserver openafs-fileserver \
+ 	openafs-kpasswd
+ 
+ # These variable is used only by get-orig-source, which will normally only be
+ # run by maintainers.
+ VERSION   = 1.4.0
+ UPSTREAM  = /afs/grand.central.org/software/openafs/$(VERSION)
+ 
+ # Download the upstream source and do the repackaging that we have to do for
+ # DFSG reasons.  This assumes AFS is mounted, as it's generally only used by
+ # the package maintainers.
+ get-orig-source:
+ 	cp $(UPSTREAM)/openafs-$(VERSION)-src.tar.bz2 .
+ 	tar xjf openafs-$(VERSION)-src.tar.bz2
+ 	rm openafs-$(VERSION)-src.tar.bz2
+ 	rm -r openafs-$(VERSION)/src/packaging/MacOS
+ 	rm -r openafs-$(VERSION)/src/WINNT
+ 	tar cf openafs_$(VERSION).orig.tar openafs-$(VERSION)
+ 	rm -r openafs-$(VERSION)
+ 	gzip -9 openafs_$(VERSION).orig.tar
  
  configure: configure-stamp
  configure-stamp:
+ 	@if test x"$(SYS_NAME)" = x"UNKNOWN" ; then exit 1 ; fi
  	dh_testdir
! 	afslogsdir=/var/log/openafs afslocaldir=/etc/openafs/server-local \
! 	    sh configure \
! 	    --with-afs-sysname=$(SYS_NAME) --disable-kernel-module \
! 	    --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
! 	    --localstatedir=/var/lib --enable-supergroups \
! 	    --enable-largefile-fileserver --enable-debug --enable-lwp-debug \
! 	    $(DEBIAN_OPT_FLAGS)
! 	chmod a+x src/libafs/make_kbuild_makefile.pl         
  	touch configure-stamp
  
  build: configure-stamp build-stamp
  build-stamp:
  	dh_testdir
! 	mkdir -p $(CURDIR)/debian/tmp
! 	$(MAKE) install_nolibafs DESTDIR=$(CURDIR)/debian/tmp
! 	chmod +x debian/afs-rootvol debian/afs-newcell debian/doc/build-man
! 	cd debian/doc && ./build-man
  	touch build-stamp
  
  clean:
  	dh_testdir
  	dh_testroot
! 	rm -f build-stamp configure-stamp
! 	rm -f build-modules-stamp configure-modules-stamp
! ifeq (Makefile,$(wildcard Makefile))
! 	$(MAKE) distclean
! endif
! 	rm -rf debian/doc/man1 debian/doc/man5 debian/doc/man8
  	dh_clean
  
  install: DH_OPTIONS=
  install: build
  	dh_testdir
  	dh_testroot
  	dh_installdirs
! 	dh_install
! 
! 	set -e; for pkg in $(LINTIAN_PACKAGES) ; do \
! 	    install -d debian/$$pkg/usr/share/lintian/overrides; \
! 	    install -m 644 -c debian/$$pkg.lintian \
! 	        debian/$$pkg/usr/share/lintian/overrides/$$pkg; \
! 	done
! 	set -e; for pkg in $(DOC_PACKAGES) ; do \
! 	    ln -s openafs-client debian/$$pkg/usr/share/doc/$$pkg; \
! 	done
! 
! 	mv debian/openafs-client/usr/bin/pagsh \
! 	    debian/openafs-client/usr/bin/pagsh.openafs
! 	mv debian/openafs-client/usr/share/man/man1/pagsh.1 \
! 	    debian/openafs-client/usr/share/man/man1/pagsh.openafs.1
! 	mv debian/openafs-client/usr/bin/up \
! 	    debian/openafs-client/usr/bin/afs-up
! 	mv debian/openafs-client/usr/share/man/man1/up.1 \
! 	    debian/openafs-client/usr/share/man/man1/afs-up.1
! 
! 	install -m 644 -c debian/tmp/usr/lib/pam_afs.so.1 \
! 	    debian/libpam-openafs-kaserver/lib/security/pam_afs.so
! 	install -m 644 -c debian/tmp/usr/lib/pam_afs.krb.so.1 \
! 	    debian/libpam-openafs-kaserver/lib/security/pam_afs.krb.so
! 
! 	install -d debian/openafs-dbserver/usr/share/man/man8
! 	/usr/bin/docbook-to-man debian/pt_util.sgml \
! 	    >debian/openafs-dbserver/usr/share/man/man8/pt_util.8
! 	( cd debian && pod2man --section 8 --center "Debian GNU/Linux" \
! 	    afs-rootvol ) \
! 	    >debian/openafs-dbserver/usr/share/man/man8/afs-rootvol.8
! 	( cd debian && pod2man --section 8 --center "Debian GNU/Linux" \
! 	    afs-newcell ) \
! 	    >debian/openafs-dbserver/usr/share/man/man8/afs-newcell.8
  
! # Build architecture-independent files here.  Pass -i to all debhelper
! # commands in this target to reduce clutter.
  binary-indep: DH_OPTIONS=-i
  binary-indep: build install binary-source
  	dh_testdir
  	dh_testroot
! 	dh_installchangelogs NEWS
  	dh_installdocs
  	dh_link
  	dh_compress
  	dh_fixperms
  	dh_installdeb
  	dh_gencontrol
  	dh_md5sums
  	dh_builddeb
  
! # Build architecture-dependent files here.  Pass -a to all debhelper commands
! # in this target to reduce clutter.
  binary-arch: DH_OPTIONS=-a
  binary-arch: build install
  	dh_testdir
  	dh_testroot
! 	dh_installchangelogs NEWS
  	dh_installdocs
! 	dh_installdebconf
  	DH_OPTIONS= dh_installinit -popenafs-client -r -- defaults 25 18
  	DH_OPTIONS= dh_installinit -popenafs-fileserver -r
  	dh_link
+ 	dh_strip
  	dh_compress
  	dh_fixperms
  	chmod 700 debian/openafs-client/var/cache/openafs
  	chmod 700 debian/openafs-dbserver/var/lib/openafs/db
+ 	chmod 700 debian/openafs-fileserver/etc/openafs/server
  	chmod 700 debian/openafs-fileserver/var/lib/openafs/cores
! 	dh_perl
  	dh_installdeb
  	dh_shlibdeps
  	dh_gencontrol
  	dh_md5sums
  	dh_builddeb
  
! binary: binary-indep binary-arch
  
+ #####################  Building openafs-modules-source  ######################
  
  binary-source:
! 	dh_testdir
! 	dh_testroot
  	-rm -rf debian/$(srcpkg) debian/substvars
  	install -d debian/$(srcpkg)/usr/src/modules/$(package)
! 	find . \( -name \*.o -o -path ./debian/$(srcpkg) -o -path \*/CVS \
! 	    -o -path \*/.svn -o -path ./src/WINNT  \
! 	    -o -path ./obj -o -path ./$(SYS_NAME)  \
! 	    -o \( -path ./debian/\* -type d \) \
! 	    -o -path ./debian/\*debhelper \) -prune -o -print | \
! 	        cpio -admp debian/$(srcpkg)/usr/src/modules/$(package)
! 	cd debian/$(srcpkg)/usr/src/modules/$(package) && \
! 	    $(MAKE) -f debian/rules clean && \
! 	    mv debian/kern-sysname debian/sysname
! 	-cd debian/$(srcpkg)/usr/src/modules/$(package) && \
! 	    rm -rf src/libafs/rx src/libafs/afs src/libafs/afsint
! 	chown -R root.src debian/$(srcpkg)
  	find debian/$(srcpkg) -type d | xargs chmod 755
  	find debian/$(srcpkg) -type f -perm -100 | xargs chmod 755
  	find debian/$(srcpkg) -type f -not -perm -100 | xargs chmod 644
+ 	chmod 775 debian/$(srcpkg)/usr/src/modules
  	cd debian/$(srcpkg)/usr/src && \
! 	    tar cf $(package).tar modules && \
! 	    rm -r modules
  	gzip -9 debian/$(srcpkg)/usr/src/$(package).tar
  	chmod 644 debian/$(srcpkg)/usr/src/$(package).tar.gz
  
! ####################  Module package support (make-kpkg)  ####################
! 
! kdist_configure: configure-modules-stamp
! 
! kdist_image: build-modules-stamp
! 	$(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-modules
! 	$(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean
! 
! kdist: build-modules-stamp
! 	$(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules binary-modules
! 	KSRC="$(KSRC)" KMAINT="$(KMAINT)" KEMAIL="$(KEMAIL)" \
! 	    sh -v debian/genchanges.sh
! 	$(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean
! 
! kdist_clean:
! 	$(ROOT_CMD) $(MAKE) $(MFLAGS) -f debian/rules clean
  
! ########################  Kernel module build rules  #########################
! 
! configure-modules: configure-modules-stamp
! configure-modules-stamp:
! 	@if test x"$(SYS_NAME)" = x"UNKNOWN" ; then exit 1 ; fi
! 	@if test x"$(KVERS)" = x ; then \
! 	    echo 'No version in $(KSRC)/include/linux/version.h' >&2 ; \
! 	    exit 1 ; \
! 	fi
! 	sh debian/prep-modules $(KSRC)
! 	sh configure --with-afs-sysname=$(SYS_NAME) \
! 	    --with-linux-kernel-headers=$(KSRC) --prefix=`pwd`/debian/tmp \
! 	    --enable-debug --enable-lwp-debug --enable-kernel-debug \
! 	    $(DEBIAN_OPT_FLAGS) $(DEBIAN_KERN_FLAGS)
! 	touch configure-modules-stamp
! 
! build-modules: build-modules-stamp
! build-modules-stamp: configure-modules-stamp
! 	make only_libafs
  	touch build-modules-stamp
  
! install-modules: build-modules-stamp
! 	dh_testdir
! 	dh_testroot
! 	dh_clean -k
! 	cd src/libafs && make install
! 	install -d -g root -o root -m 755 $(moduledir)
! 	install -g root -o root -m 755 debian/tmp/lib/openafs/*o $(moduledir)/
! 	if test -f $(moduledir)/openafs.o \
! 	        -a ! -f $(moduledir)/openafs.mp.o ; then \
! 	    ln $(moduledir)/openafs.o $(moduledir)/openafs.mp.o || exit 1 ; \
! 	fi
  
! binary-modules: install-modules
! 	dh_testdir
! 	dh_testroot
! 	dh_installchangelogs NEWS
! 	dh_installdocs
! 	dh_installmodules
! 	dh_strip
! 	dh_link
! 	dh_compress
! 	dh_fixperms
! 	dh_installdeb
! 	dh_gencontrol -- -v`cat debian/VERSION`
! 	dh_md5sums
! 	dh_builddeb --destdir="$(KPKG_DEST_DIR)"
! 
! .PHONY: build clean binary-indep binary-arch binary install configure
! .PHONY: kdist_configure kdist_image kdist kdist_clean binary-source
Index: openafs/src/packaging/Debian/sysname
diff -c openafs/src/packaging/Debian/sysname:1.1 openafs/src/packaging/Debian/sysname:1.1.2.2
*** openafs/src/packaging/Debian/sysname:1.1	Mon Aug 26 16:52:03 2002
--- openafs/src/packaging/Debian/sysname	Thu Mar 23 16:07:50 2006
***************
*** 1,28 ****
  #!/bin/sh
! case `arch` in
!     alpha)
! 	echo alpha_linux_22
! 	;;
  i[3456]86)
! 	echo i386_linux22
! ;;
!     ia64)
      echo ia64_linux24
! ;;
!     parisc*)
! 	echo parisc_linux24
! 	;;
!     ppc)
! 	echo ppc_linux22
! 	;;
!     sparc|sparc64)
! 	echo sparc_linux22
! 	;;
!     s390)
!     echo s390_linux22
!     ;;
! 	*)
! 	echo ERROr:  sysname not yet known
! 	exit 1
! 
  esac
--- 1,40 ----
  #!/bin/sh
! # Maps Debian architectures to AFS sysnames for building the clients and
! # libraries.  This doesn't worry about the kernel version; kern-sysname
! # does that when building the kernel module.
! #
! # Not all architectures are listed, only those that OpenAFS supports.
! 
! case `dpkg --print-installation-architecture` in
! alpha)
!     echo alpha_linux_24
!     ;;
! amd64)
!     echo amd64_linux24
!     ;;
! hppa)
!     echo parisc_linux24
!     ;;
  i[3456]86)
!     echo i386_linux24
!     ;;
! ia64)
      echo ia64_linux24
!     ;;
! powerpc)
!     echo ppc_linux24
!     ;;
! ppc64)
!     echo ppc64_linux24
!     ;;
! s390)
!     echo s390_linux24
!     ;;
! sparc|sparc64)
!     echo sparc_linux24
!     ;;
! *)
!     echo "ERROR: unsupported architecture" >&2
!     echo UNKNOWN
!     exit 1
  esac
Index: openafs/src/packaging/Debian/doc/build-man
diff -c /dev/null openafs/src/packaging/Debian/doc/build-man:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/doc/build-man	Thu Mar 23 15:24:28 2006
***************
*** 0 ****
--- 1,56 ----
+ #!/bin/sh
+ #
+ # Install man pages, but fixing up paths as we go.  All of the man pages
+ # are written to use the Transarc paths, and this script fixes those paths to
+ # be correct for the chosen configure options as the man pages are installed.
+ 
+ set -e
+ 
+ manpage="$1"
+ dest="$2"
+ 
+ afsbackupdir=/var/lib/openafs/backup
+ afsbosconfigdir=/etc/openafs
+ afsconfdir=/etc/openafs/server
+ afsdbdir=/var/lib/openafs/db
+ afslocaldir=/etc/openafs/server-local
+ afslogsdir=/var/log/openafs
+ afssrvlibexecdir=/usr/lib/openafs
+ viceetcdir=/etc/openafs
+ 
+ # Build a particular man page.  Takes the section title, the section number,
+ # the filename of the POD page, and the output file.
+ buildpage () {
+     pod2man -c "$1" -r OpenAFS -s "$2" "$3" | \
+         sed -e "s%/usr/afs/local/BosConfig%${afsbosconfigdir}/BosConfig%g" \
+             -e "s%/usr/afs/etc%${afsconfdir}%g" \
+             -e "s%/usr/afs/backup%${afsbackupdir}%g" \
+             -e "s%/usr/afs/bin%${afssrvlibexecdir}%g" \
+             -e "s%/usr/afs/db%${afsdbdir}%g" \
+             -e "s%/usr/afs/local%${afslocaldir}%g" \
+             -e "s%/usr/afs/logs%${afslogsdir}%g" \
+             -e "s%/usr/vice/etc%${viceetcdir}%g" > "$4"
+ }
+ 
+ # Create the output directories.
+ mkdir -p man1 man5 man8
+ 
+ # Do the work with lots of calls to buildpage.
+ cd pod1
+ for f in *.pod ; do
+     buildpage 'AFS Command Reference' 1 "$f" \
+         ../man1/`echo "$f" | sed 's/\.pod$//'`.1
+ done
+ cd ..
+ cd pod5
+ for f in *.pod ; do
+     buildpage 'AFS File Reference' 5 "$f" \
+         ../man5/`echo "$f" | sed 's/\.pod$//'`.5
+ done
+ cd ..
+ cd pod8
+ for f in *.pod ; do
+     buildpage 'AFS Command Reference' 8 "$f" \
+         ../man8/`echo "$f" | sed 's/\.pod$//'`.8
+ done
+ cd ..
Index: openafs/src/packaging/Debian/patches/README
diff -c /dev/null openafs/src/packaging/Debian/patches/README:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/patches/README	Thu Mar 23 15:24:29 2006
***************
*** 0 ****
--- 1,9 ----
+ This directory contains patches relative to the upstream OpenAFS source.
+ It is not used automatically as part of the build process and is not
+ guaranteed to be completely up-to-date; it is intended as documentation of
+ significant divergences, a place to store patches that should be sent
+ upstream, and a place to document the current status of patches.
+ 
+ Simple Debian-specific changes that aren't of interest to upstream will
+ not be included here, such as updating config.{guess,sub} or changing
+ paths to fit with the FHS.
Index: openafs/src/packaging/Debian/patches/module-name
diff -c /dev/null openafs/src/packaging/Debian/patches/module-name:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/patches/module-name	Thu Mar 23 15:24:29 2006
***************
*** 0 ****
--- 1,49 ----
+ Upstream uses libafs as the module name, mostly for historic reasons.  It
+ also uses a different module name depending on whether the module is built
+ for SMP systems, something that Debian deals with by creating separate
+ packages.  This patch changes the name of the module to openafs and
+ removes the separate name for the SMP version.
+ 
+ Probably not acceptable upstream.
+ 
+ --- openafs-1.3.87.orig/src/libafs/MakefileProto.LINUX.in
+ +++ openafs-1.3.87/src/libafs/MakefileProto.LINUX.in
+ @@ -216,8 +216,8 @@
+  
+  # Below this line are targets when in the COMMON directory:
+  # For Linux there is no kernel NFS server.
+ -LIBAFS = libafs-${CLIENT}.${LINUX_MODULE_EXT}
+ -LIBAFS_MP = libafs-${CLIENT}.mp.${LINUX_MODULE_EXT}
+ +LIBAFS = openafs.${LINUX_MODULE_EXT}
+ +LIBAFS_MP = openafs.${LINUX_MODULE_EXT}
+  LIBAFS_EP = libafs-${CLIENT}.ep.${LINUX_MODULE_EXT}
+  LIBAFS_BM = libafs-${CLIENT}.bm.${LINUX_MODULE_EXT}
+  
+ @@ -226,10 +226,8 @@
+  INST_LIBAFS_EP = ${DESTDIR}${afskerneldir}/${LIBAFS_EP}
+  INST_LIBAFS_BM = ${DESTDIR}${afskerneldir}/${LIBAFS_BM}
+  
+ -DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS}
+ -DEST_LIBAFS_MP = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS_MP}
+ -DEST_LIBAFS_EP = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS_EP}
+ -DEST_LIBAFS_BM = ${DEST}/root.client/usr/vice/etc/modload/${LIBAFS_BM}
+ +DEST_LIBAFS = ${DEST}/root.client/usr/vice/etc/modload/openafs.o
+ +DEST_LIBAFS_MP = ${DEST}/root.client/usr/vice/etc/modload/openafs.mp.o
+  
+  
+  libafs:	$(LIBAFS) 
+ @@ -245,11 +243,11 @@
+  	echo BM Build Complete
+  
+  <linux26 linux_26 umlinux26>
+ -${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: libafs.ko
+ -	cp libafs.ko $@
+ +${LIBAFS} ${LIBAFS_MP} ${LIBAFS_EP} ${LIBAFS_BM}: openafs.ko
+ +	cp openafs.ko $@
+  
+  .FORCE:
+ -libafs.ko: .FORCE
+ +openafs.ko: .FORCE
+  	env EXTRA_CFLAGS="${EXTRA_CFLAGS}" @TOP_SRCDIR@/libafs/make_kbuild_makefile.pl ${KDIR} $@ @TOP_OBJDIR@/src/config/Makefile.config Makefile.afs Makefile.common
+  	env EXTRA_CFLAGS="${EXTRA_CFLAGS}" $(MAKE) -C ${LINUX_KERNEL_PATH} M=@TOP_OBJDIR@/src/libafs/${KDIR} modules
+          
Index: openafs/src/packaging/Debian/patches/pam
diff -c /dev/null openafs/src/packaging/Debian/patches/pam:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/patches/pam	Thu Mar 23 15:24:29 2006
***************
*** 0 ****
--- 1,158 ----
+ The standard upstream source builds the PAM modules against static
+ libraries, which means they contain non-PIC code.  This isn't allowed by
+ Debian Policy and doesn't work on some supported platforms.
+ 
+ Two approaches for fixing this have been tried.  One is to rebuild the
+ various object files that are part of the libraries PIC and then link with
+ those object files.  The other, which this implements, is to link with the
+ object files used to create the libafsauthent and libafsrpc shared
+ libraries (which can't be shipped since they don't have a stable API or
+ correct SONAME).  The latter means that the PAM modules must also be
+ linked with libpthread, but that's a feature since that means they'll work
+ with sshd built threaded.
+ 
+ Not submitted upstream yet.  The call to rx_Init should be submitted
+ upstream and would probably be accepted.  Upstream would probably rather
+ link the PAM modules against the shared libraries rather than accepting
+ this hack, which is unsuitable for Debian until the shared libraries are
+ handled more consistently.
+ 
+ --- openafs-1.3.87.orig/src/pam/Makefile.in
+ +++ openafs-1.3.87/src/pam/Makefile.in
+ @@ -25,7 +25,17 @@
+  	  afs_pam_msg.o afs_message.o AFS_component_version_number.o
+     OBJS = $(SHOBJS) test_pam.o
+  INCLUDES=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} 
+ -CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS}
+ +CFLAGS =  ${DEBUG} ${INCLUDES} ${PAM_CFLAGS} ${MT_CFLAGS}
+ +
+ +# For Debian, we link directly with the object files that would have gone
+ +# into the libafsrpc and libafsauthent shared libraries.  The shared libraries
+ +# themselves cannot be used because the interface isn't stable and they have
+ +# no SONAME, but this is the easiest way of getting PIC objects built with the
+ +# pthread API.
+ +SHLIB_OBJS	:= `ls ../shlibafsauthent/*.o | grep -v version_num` \
+ +		   `ls ../shlibafsrpc/*.o | grep -v version_num`
+ +KRB_SHLIB_OBJS	:= `ls ../shlibafsauthent/*.o | egrep -v 'version_num|ktc.o'` \
+ +		   `ls ../shlibafsrpc/*.o | grep -v version_num`
+  
+  all: test_pam ${TOP_LIBDIR}/pam_afs.so.1 ${TOP_LIBDIR}/pam_afs.krb.so.1
+  
+ @@ -39,14 +49,18 @@
+  	${CC} ${CFLAGS} -c ${srcdir}/afs_auth.c -o afs_auth.o
+  
+  afs_auth_krb.o: afs_auth.c afs_pam_msg.h afs_message.h afs_util.h
+ -	${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/afs_auth.c -o afs_auth_krb.o
+ +	${CC} ${CFLAGS} -DAFS_KERBEROS_ENV  -c ${srcdir}/afs_auth.c -o afs_auth_krb.o
+  
+  afs_util.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
+  	${CC} ${CFLAGS} -c ${srcdir}/afs_util.c -o afs_util.o
+  
+ +
+  afs_util_krb.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
+  	${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/afs_util.c -o afs_util_krb.o
+  
+ +ktc.o: ${srcdir}/../auth/ktc.c
+ +	${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/../auth/ktc.c
+ +
+  pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
+  	set -x; \
+  	case "$(SYS_NAME)" in \
+ @@ -59,8 +73,9 @@
+  			afs_setcred.o afs_auth.o afs_util.o \
+  			$(SHOBJS) $(LIBS) ;; \
+  	*linux*) \
+ -		$(CC) $(LDFLAGS) -o $@ afs_setcred.o \
+ -			afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
+ +		$(CC) $(LDFLAGS) $(PAM_CFLAGS) -o $@ afs_setcred.o \
+ +			afs_auth.o afs_util.o $(SHOBJS) $(SHLIB_OBJS) \
+ +			$(MT_LIBS) -lpam -lresolv;;\
+  	*fbsd*| *nbsd*) \
+  		$(CC) $(LDFLAGS) -o $@ afs_setcred.o \
+  			afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
+ @@ -68,7 +83,7 @@
+  		echo No link line for system $(SYS_NAME). ;; \
+  	esac
+  
+ -pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o
+ +pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o ktc.o
+  	set -x; \
+  	case "$(SYS_NAME)" in \
+  	hp_ux* | ia64_hpux*) \
+ @@ -81,7 +96,8 @@
+  			$(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
+  	*linux*) \
+  		$(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
+ -			afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
+ +			afs_auth_krb.o afs_util_krb.o ktc.o $(SHOBJS) \
+ +			$(KRB_SHLIB_OBJS) $(MT_LIBS) -lpam -lresolv;;\
+  	*fbsd*| *nbsd*) \
+  		$(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
+  			afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
+ --- openafs-1.3.87.orig/src/pam/afs_setcred.c
+ +++ openafs-1.3.87/src/pam/afs_setcred.c
+ @@ -52,7 +52,7 @@
+      int refresh_token = 0;
+      int set_expires = 0;	/* the default is to not to set the env variable */
+      int use_klog = 0;
+ -    int i;
+ +    int i, code;
+      struct pam_conv *pam_convp = NULL;
+      char my_password_buf[256];
+      char *cell_ptr = NULL;
+ @@ -281,6 +281,11 @@
+  #endif
+  	}
+  
+ +	if ((code = rx_Init(0)) != 0) {
+ +	    pam_afs_syslog(LOG_ERR, PAMAFS_KAERROR, code);
+ +	    RET(PAM_AUTH_ERR);
+ +	}
+ +
+  	if (flags & PAM_REFRESH_CRED) {
+  	    if (use_klog) {
+  		auth_ok = !do_klog(user, password, "00:00:01", cell_ptr);
+ --- openafs-1.3.87.orig/src/pam/afs_auth.c
+ +++ openafs-1.3.87/src/pam/afs_auth.c
+ @@ -314,6 +314,10 @@
+  	    if (cpid <= 0) {	/* The child process */
+  		if (logmask && LOG_MASK(LOG_DEBUG))
+  		    syslog(LOG_DEBUG, "in child");
+ +		if ((code = rx_Init(0)) != 0) {
+ +		    pam_afs_syslog(LOG_ERR, PAMAFS_KAERROR, code);
+ +		    exit(0);
+ +		}
+  		if (refresh_token || set_token)
+  		    code = ka_UserAuthenticateGeneral(KA_USERAUTH_VERSION, user,	/* kerberos name */
+  						      NULL,	/* instance */
+ @@ -363,6 +367,10 @@
+  	    pam_afs_syslog(LOG_ERR, PAMAFS_PAMERROR, errno);
+  	}
+      } else {			/* dont_fork, used by httpd */
+ +	if ((code = rx_Init(0)) != 0) {
+ +	    pam_afs_syslog(LOG_ERR, PAMAFS_KAERROR, code);
+ +	    RET(PAM_AUTH_ERR);
+ +	}
+  	if (logmask && LOG_MASK(LOG_DEBUG))
+  	    syslog(LOG_DEBUG, "dont_fork");
+  	if (refresh_token || set_token)
+ --- openafs-1.3.87.orig/Makefile.in
+ +++ openafs-1.3.87/Makefile.in
+ @@ -507,8 +507,6 @@
+  # pthread based user space RX library
+  shlibafsrpc: rx rxkad des
+  	case ${SYS_NAME} in \
+ -	amd64_linux24) \
+ -		echo Skipping shlibafsrpc for amd64_linux24 ;; \
+  	alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
+  	${COMPILE_PART1} shlibafsrpc ${COMPILE_PART2} ;; \
+  	*) \
+ @@ -517,8 +515,6 @@
+  
+  shlibafsauthent: ubik auth kauth shlibafsrpc
+  	case ${SYS_NAME} in \
+ -	amd64_linux24) \
+ -		echo Skipping shlibafsauthent for amd64_linux24 ;; \
+  	alpha_dux*|sgi_*|sun4x_*|sunx86_*|rs_aix*|*linux*|hp_ux11*|ia64_hpux*) \
+  	${COMPILE_PART1} shlibafsauthent ${COMPILE_PART2} ;; \
+  	*) \
Index: openafs/src/packaging/Debian/po/POTFILES.in
diff -c /dev/null openafs/src/packaging/Debian/po/POTFILES.in:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/po/POTFILES.in	Thu Mar 23 15:24:33 2006
***************
*** 0 ****
--- 1,2 ----
+ [type: gettext/rfc822deb] openafs-client.templates
+ [type: gettext/rfc822deb] openafs-fileserver.templates
Index: openafs/src/packaging/Debian/po/cs.po
diff -c /dev/null openafs/src/packaging/Debian/po/cs.po:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/po/cs.po	Thu Mar 23 15:24:33 2006
***************
*** 0 ****
--- 1,279 ----
+ #
+ #    Translators, if you are not familiar with the PO format, gettext
+ #    documentation is worth reading, especially sections dedicated to
+ #    this format, e.g. by running:
+ #         info -n '(gettext)PO Files'
+ #         info -n '(gettext)Header Entry'
+ #
+ #    Some information specific to po-debconf are available at
+ #            /usr/share/doc/po-debconf/README-trans
+ #         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+ #
+ #    Developers do not need to manually edit POT or PO files.
+ #
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: openafs 1.4rc1-1\n"
+ "Report-Msgid-Bugs-To: \n"
+ "POT-Creation-Date: 2005-08-18 12:47-0700\n"
+ "PO-Revision-Date: 2005-08-19 08:01+0200\n"
+ "Last-Translator: Martin Sin <martin.sin@seznam.cz>\n"
+ "Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=utf-8\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid "What hosts are DB servers for your home cell?"
+ msgstr "KterÃ© poÄÃ­taÄe jsou DB servery pro vaÅ¡i domovskou buÅˆku?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid ""
+ "AFS uses the file /etc/openafs/CellServDB to hold the list of servers that "
+ "should be contacted to find parts of a cell.  The cell you claim this "
+ "workstation belongs to is not in that file.  Enter the host names of the "
+ "database servers separated by spaces. IMPORTANT: If you are creating a new "
+ "cell and this machine is to be a database server in that cell, only enter "
+ "this machine's name; add the other servers later after they are functioning. "
+ "Also, do not enable the AFS client to start at boot on this server until the "
+ "cell is configured.  When you are ready you can edit /etc/openafs/afs.conf."
+ "client to enable the client."
+ msgstr ""
+ "AFS pouÅ¾Ã­vÃ¡ k uchovÃ¡vÃ¡nÃ­ seznamu serverÅ¯, kterÃ© majÃ­ bÃ½t kontaktovÃ¡ny pÅ™i "
+ "hledÃ¡nÃ­ ÄÃ¡stÃ­ buÅˆky, soubor /etc/openafs/CellServDB. BuÅˆka, do kterÃ© tato "
+ "stanice patÅ™Ã­, nenÃ­ ve zmÃ­nÄ›nÃ©m souboru uvedena. Zadejte mezerami oddÄ›lenÃ¡ "
+ "jmÃ©na databÃ¡zovÃ½ch serverÅ¯. DÅ®LEÅ½ITÃ‰: pokud vytvÃ¡Å™Ã­te novou buÅˆku a tento "
+ "poÄÃ­taÄ bude databÃ¡zovÃ½m serverem tÃ©to buÅˆky, pak staÄÃ­ pouze zadat jmÃ©no "
+ "poÄÃ­taÄe; ostatnÃ­ servery pÅ™idejte pozdÄ›ji aÅ¾ po jejich zprovoznÄ›nÃ­. Dokud "
+ "nebude buÅˆka nastavena, tak na tomto serveru nepovolujte spuÅ¡tÄ›nÃ­ AFS "
+ "klienta pÅ™i startu serveru. AÅ¾ budete pÅ™ipraveni, mÅ¯Å¾ete klienta povolit "
+ "Ãºpravou souboru /etc/openafs/afs.conf.client."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ msgid "What AFS cell does this workstation belong to?"
+ msgstr "Ke kterÃ© buÅˆce AFS bude tento poÄÃ­taÄ nÃ¡leÅ¾et?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ msgid ""
+ "AFS filespace is organized into cells or administrative domains. Each "
+ "workstation belongs to one cell.  Usually the cell is the DNS domain name of "
+ "the site."
+ msgstr ""
+ "SouborovÃ½ prostor systÃ©mu AFS je uspoÅ™Ã¡dÃ¡n do bunÄ›k nebo administrativnÃ­ch "
+ "domÃ©n. KaÅ¾dÃ¡ stanice patÅ™Ã­ jednÃ© buÅˆce. Obvykle je buÅˆkou domÃ©novÃ© jmÃ©no "
+ "skupiny."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid "How large is your AFS cache (kB)?"
+ msgstr "Jak velkÃ¡ je vaÅ¡e cache AFS (v kB)?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid ""
+ "AFS uses an area of the disk to cache remote files for faster access.  This "
+ "cache will be mounted on /var/cache/openafs.  It is important that the cache "
+ "not overfill the partition it is located on.  Often, people find it useful "
+ "to dedicate a partition to their AFS cache."
+ msgstr ""
+ "AFS pouÅ¾Ã­vÃ¡ urÄitÃ½ prostor na disku pro cachovÃ¡nÃ­ vzdÃ¡lenÃ½ch souborÅ¯, aby k "
+ "nim mÄ›l rychlejÅ¡Ã­ pÅ™Ã­stup. Tato cache bude pÅ™ipojena do /var/cache/openafs. "
+ "Je dÅ¯leÅ¾itÃ©, aby cache nepÅ™eplnila oblast na kterÃ© je umÃ­stÄ›na. ÄŒasto je "
+ "uÅ¾iteÄnÃ© umÃ­stit cache AFS do svÃ© vlastnÃ­ diskovÃ© oblasti."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid "Run Openafs client now and at boot?"
+ msgstr "Spustit klienta Openafs nynÃ­ a pÅ™i zavÃ¡dÄ›nÃ­ poÄÃ­taÄe?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid ""
+ "Should the Openafs filesystem be started and mounted at boot? Normally, most "
+ "users who install the openafs-client package expect to run it at boot.  "
+ "However, if you are planning on setting up a new cell or are on a laptop, "
+ "you may not want it started at boot time.  If you choose not to start AFS at "
+ "boot, run /etc/init.d/openafs-client force-start to start the client when "
+ "you wish to run it."
+ msgstr ""
+ "MÃ¡ bÃ½t souborovÃ½ systÃ©m Openafs spuÅ¡tÄ›n a pÅ™ipojen pÅ™i startu poÄÃ­taÄe? "
+ "VÄ›tÅ¡ina uÅ¾ivatelÅ¯, kteÅ™Ã­ instalujÃ­ balÃ­Äek openafs-client, oÄekÃ¡vÃ¡, Å¾e se "
+ "AFS spustÃ­ hned pÅ™i startu poÄÃ­taÄe. SamozÅ™ejmÄ›, pokud plÃ¡nujete nastavenÃ­ "
+ "novÃ© buÅˆky, nebo pokud pouÅ¾Ã­vÃ¡te laptop, pak byste zÅ™ejmÄ› AFS pÅ™i startu "
+ "spouÅ¡tÄ›t nechtÄ›li. ZvolÃ­te-li moÅ¾nost nespouÅ¡tÄ›t AFS pÅ™i startu poÄÃ­taÄe, "
+ "mÅ¯Å¾ete klienta spustit ruÄnÄ› pÅ™Ã­kazem /etc/init.d/openafs-client force-start."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid "Look up AFS cells in DNS?"
+ msgstr "Hledat buÅˆky AFS v DNS?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid ""
+ "In order to contact an AFS cell, you need the IP addresses of the cell's "
+ "database servers.  Normally, this information is read from /etc/openafs/"
+ "CellServDB.  However, if Openafs cannot find a cell in that file, it can use "
+ "DNS to look for AFSDB records that contain the information."
+ msgstr ""
+ "Pro kontaktovÃ¡nÃ­ buÅˆky AFS potÅ™ebujete znÃ¡t IP adresu databÃ¡zovÃ©ho serveru "
+ "buÅˆky. Obvykle lze tuto informaci pÅ™eÄÃ­st ze souboru /etc/openafs/"
+ "CellServDB. NicmÃ©nÄ› pokud Openafs nemÅ¯Å¾e najÃ­t buÅˆku v tomto souboru, mÅ¯Å¾e "
+ "pouÅ¾Ã­t DNS pro vyhledÃ¡nÃ­ AFSDB zÃ¡znamÅ¯, kterÃ© obsahujÃ­ poÅ¾adovanÃ© informace."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid "Encrypt authenticated traffic with AFS fileserver?"
+ msgstr "Å ifrovat autentikovanÃ½ provoz se souborovÃ½m serverem AFS?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid ""
+ "AFS provides a weak form of encryption that can optionally be used between a "
+ "client and the fileservers.  While this encryption is weaker than DES and "
+ "thus is not sufficient for highly confidential data, it does provide some "
+ "confidentiality and is likely to make the job of a casual attacker "
+ "significantly more difficult."
+ msgstr ""
+ "AFS poskytuje slabou formu Å¡ifrovÃ¡nÃ­, kterÃ¡ mÅ¯Å¾e bÃ½t nepovinnÄ› pouÅ¾ita mezi "
+ "klientem a souborovÃ½m serverem. PÅ™estoÅ¾e je toto Å¡ifrovÃ¡nÃ­ slabÅ¡Ã­ neÅ¾ DES a "
+ "tedy nenÃ­ dostateÄnÃ© pro velmi dÅ¯vÄ›rnÃ¡ data, poskytuje urÄitou formu utajenÃ­ "
+ "a urÄitÄ› tak ztÃ­Å¾Ã­ prÃ¡ci nÃ¡hodnÃ©mu ÃºtoÄnÃ­kovi."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid "Dynamically generate the contents of /afs?"
+ msgstr "Vygenerovat obsah /afs dynamicky?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "/afs generally contains an entry for each cell that a client can talk to. "
+ "Traditionally, these entries were generated by servers in the client's home "
+ "cell.  However, OpenAFS clients can generate the contents of /afs "
+ "dynamically based on the contents of /etc/openafs/CellServDB and DNS."
+ msgstr ""
+ "/afs obvykle obsahuje zÃ¡znam pro kaÅ¾dou buÅˆku, se kterou mÅ¯Å¾e klient "
+ "hovoÅ™it. TradiÄnÄ› jsou tyto zÃ¡znamy vytvÃ¡Å™eny servery v mateÅ™skÃ© buÅˆce "
+ "klienta. Klienti OpenAFS vÅ¡ak mohou generovat obsah adresÃ¡Å™e /afs dynamicky "
+ "na zÃ¡kladÄ› souboru /etc/openafs/CellServDB a systÃ©mu DNS."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "If you generate /afs dynamically, you may need to create /etc/openafs/"
+ "CellAlias to include aliases for common cells.  (The syntax of this file is "
+ "one line per alias, with the cell name, a space, and then the alias for that "
+ "cell.)"
+ msgstr ""
+ "Pokud vytvÃ¡Å™Ã­te /afs dynamicky, moÅ¾nÃ¡ budete muset vytvoÅ™it /etc/openafs/"
+ "CellAlias pro zaÄlenÄ›nÃ­ aliasÅ¯ bÄ›Å¾nÃ½ch bunÄ›k. (Syntaxe tohoto souboru je "
+ "jeden Å™Ã¡dek na alias, kterÃ½ se sklÃ¡dÃ¡ ze jmÃ©na buÅˆky, mezery a pak nÃ¡sleduje "
+ "alias pro tuto buÅˆku.)"
+ 
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid "Use fakestat to avoid hangs when listing /afs?"
+ msgstr "PouÅ¾Ã­t fakestat pro obejitÃ­ zatuhnutÃ­ pÅ™i vÃ½pisu /afs?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid ""
+ "Because AFS is a global file space, operations on the /afs directory can "
+ "generate significant network traffic.  If some AFS cells are unavailable "
+ "then looking at /afs using ls or a graphical file browser may hang your "
+ "machine for minutes.  AFS has an option to simulate answers to these "
+ "operations locally to avoid these hangs.  You want this option under most "
+ "circumstances."
+ msgstr ""
+ "ProtoÅ¾e je AFS globÃ¡lnÃ­ souborovÃ½ prostor, mohou operace na adresÃ¡Å™i /afs "
+ "vÃ½zraznÄ› zvÃ½Å¡it provoz na sÃ­ti. Pokud jsou nÄ›kterÃ© buÅˆky AFS nedosaÅ¾itelnÃ©, "
+ "pak mÅ¯Å¾e prohlÃ­Å¾enÃ­ /afs pomocÃ­ pÅ™Ã­kazu ls nebo grafickÃ©ho prohlÃ­Å¾eÄe "
+ "zpÅ¯sobit zatuhnutÃ­ poÄÃ­taÄe na dobu nÄ›kolika minut. AFS mÃ¡ volbu, kterÃ¡ "
+ "simuluje odpovÄ›di pro tyto operace a tak se snaÅ¾Ã­ vyhnout popsanÃ½m vÃ½padkÅ¯m. "
+ "Tuto volbu budete chtÃ­t pouÅ¾Ã­t ve vÄ›tÅ¡inÄ› pÅ™Ã­padÅ¯."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid "What cell does this server serve files for?"
+ msgstr "KterÃ½m buÅˆkÃ¡m mÃ¡ tento server poskytovat soubory?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid ""
+ "AFS fileservers belong to a cell.  They have the key for that cell's "
+ "Kerberos service and serve volumes into that cell.  Normally, this cell is "
+ "the same cell as the workstation's client belongs to."
+ msgstr ""
+ "SouborovÃ© servery AFS nÃ¡leÅ¾Ã­ buÅˆce. Servery majÃ­ klÃ­Ä ke sluÅ¾bÄ› Kerberos "
+ "danÃ© buÅˆky a v rÃ¡mci buÅˆky nabÃ­zejÃ­ souborovÃ© svazky. Tato buÅˆka je obvykle "
+ "shodnÃ¡ s buÅˆkou, ke kterÃ© patÅ™Ã­ klient na pracovnÃ­ stanici."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid "Upgrading will move files to new locations; continue?"
+ msgstr "UpgradovÃ¡nÃ­ pÅ™esune soubory do novÃ©ho umÃ­stÄ›nÃ­; pokraÄovat?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid ""
+ "Between Openafs 1.1 and Openafs 1.2, several files moved.  In particular, "
+ "files in /etc/openafs/server-local have been distributed to other "
+ "locations.  The BosConfig file is now located in /etc/openafs and the other "
+ "files are located in /var/lib/openafs.  If you continue with this upgrade, "
+ "these files will be moved.  You should use the bos restart command to reload "
+ "your servers.  Any configuration changes made before you do so will be lost."
+ msgstr ""
+ "Verze Openafs 1.1 a Openafs 1.2 majÃ­ pÅ™esunuty nÄ›kterÃ© soubory. PÅ™esnÄ›ji "
+ "Å™eÄeno: soubory z /etc/openafs/server-local byly pÅ™esunuty jinam. "
+ "KonfiguraÄnÃ­ soubor BosConfig je nynÃ­ umÃ­stÄ›n v /etc/openafs, ostatnÃ­ "
+ "soubory jsou uloÅ¾eny v adresÃ¡Å™i /var/lib/openafs. Pokud budete pokraÄovat v "
+ "aktualizaci, budou tyto soubory pÅ™esunuty. K opÄ›tovnÃ©mu naÄtenÃ­ vaÅ¡ich "
+ "serverÅ¯ mÅ¯Å¾ete pouÅ¾Ã­t pÅ™ikaz bos, kterÃ½ provede restart. JakÃ¡koliv zmÄ›na "
+ "konfigurace provedenÃ¡ pÅ™ed tÃ­mto restartem bude ztracena."
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid "OpenAFS file server probably does not work!"
+ msgstr "SouborovÃ½ server OpenAFS pravdÄ›podobnÄ› nepracuje!"
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid ""
+ "You are running the OpenAFS file server package on an alpha.  This probably "
+ "doesn't work; the DES code is flaky on the alpha, along with the threaded "
+ "file server.  Likely, the fileserver will simply fail to start, but if it "
+ "does load, data corruption may result.  You have been warned."
+ msgstr ""
+ "SouborovÃ½ server OpenAFS bÄ›Å¾Ã­ na Aplha systÃ©mu, coÅ¾ pravdÄ›podobnÄ› nebude "
+ "fungovat; DES kÃ³d se ve spojenÃ­ s vlÃ¡kny na souborovÃ©m serveru chovÃ¡ "
+ "podivnÄ›. SouborovÃ½ server nejpravdÄ›podobnÄ›ji vÅ¯bec nespustÃ­ nespustÃ­, ale "
+ "pokud nabÄ›hne, mÅ¯Å¾e dojÃ­t ke ztrÃ¡tÄ› dat. Byli jste varovÃ¡ni."
Index: openafs/src/packaging/Debian/po/de.po
diff -c /dev/null openafs/src/packaging/Debian/po/de.po:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/po/de.po	Thu Mar 23 15:24:33 2006
***************
*** 0 ****
--- 1,225 ----
+ #
+ #    Translators, if you are not familiar with the PO format, gettext
+ #    documentation is worth reading, especially sections dedicated to
+ #    this format, e.g. by running:
+ #         info -n '(gettext)PO Files'
+ #         info -n '(gettext)Header Entry'
+ #
+ #    Some information specific to po-debconf are available at
+ #            /usr/share/doc/po-debconf/README-trans
+ #         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+ #
+ #    Developers do not need to manually edit POT or PO files.
+ #
+ #, fuzzy
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: PACKAGE VERSION\n"
+ "Report-Msgid-Bugs-To: \n"
+ "POT-Creation-Date: 2005-08-18 12:47-0700\n"
+ "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+ "Language-Team: LANGUAGE <LL@li.org>\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=ISO-8859-15\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid "What hosts are DB servers for your home cell?"
+ msgstr ""
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid ""
+ "AFS uses the file /etc/openafs/CellServDB to hold the list of servers that "
+ "should be contacted to find parts of a cell.  The cell you claim this "
+ "workstation belongs to is not in that file.  Enter the host names of the "
+ "database servers separated by spaces. IMPORTANT: If you are creating a new "
+ "cell and this machine is to be a database server in that cell, only enter "
+ "this machine's name; add the other servers later after they are functioning. "
+ "Also, do not enable the AFS client to start at boot on this server until the "
+ "cell is configured.  When you are ready you can edit /etc/openafs/afs.conf."
+ "client to enable the client."
+ msgstr ""
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ #, fuzzy
+ msgid "What AFS cell does this workstation belong to?"
+ msgstr "Für welche Zelle liefert der Server Dateien?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ msgid ""
+ "AFS filespace is organized into cells or administrative domains. Each "
+ "workstation belongs to one cell.  Usually the cell is the DNS domain name of "
+ "the site."
+ msgstr ""
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid "How large is your AFS cache (kB)?"
+ msgstr ""
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid ""
+ "AFS uses an area of the disk to cache remote files for faster access.  This "
+ "cache will be mounted on /var/cache/openafs.  It is important that the cache "
+ "not overfill the partition it is located on.  Often, people find it useful "
+ "to dedicate a partition to their AFS cache."
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid "Run Openafs client now and at boot?"
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid ""
+ "Should the Openafs filesystem be started and mounted at boot? Normally, most "
+ "users who install the openafs-client package expect to run it at boot.  "
+ "However, if you are planning on setting up a new cell or are on a laptop, "
+ "you may not want it started at boot time.  If you choose not to start AFS at "
+ "boot, run /etc/init.d/openafs-client force-start to start the client when "
+ "you wish to run it."
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid "Look up AFS cells in DNS?"
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid ""
+ "In order to contact an AFS cell, you need the IP addresses of the cell's "
+ "database servers.  Normally, this information is read from /etc/openafs/"
+ "CellServDB.  However, if Openafs cannot find a cell in that file, it can use "
+ "DNS to look for AFSDB records that contain the information."
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid "Encrypt authenticated traffic with AFS fileserver?"
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid ""
+ "AFS provides a weak form of encryption that can optionally be used between a "
+ "client and the fileservers.  While this encryption is weaker than DES and "
+ "thus is not sufficient for highly confidential data, it does provide some "
+ "confidentiality and is likely to make the job of a casual attacker "
+ "significantly more difficult."
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid "Dynamically generate the contents of /afs?"
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "/afs generally contains an entry for each cell that a client can talk to. "
+ "Traditionally, these entries were generated by servers in the client's home "
+ "cell.  However, OpenAFS clients can generate the contents of /afs "
+ "dynamically based on the contents of /etc/openafs/CellServDB and DNS."
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "If you generate /afs dynamically, you may need to create /etc/openafs/"
+ "CellAlias to include aliases for common cells.  (The syntax of this file is "
+ "one line per alias, with the cell name, a space, and then the alias for that "
+ "cell.)"
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid "Use fakestat to avoid hangs when listing /afs?"
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid ""
+ "Because AFS is a global file space, operations on the /afs directory can "
+ "generate significant network traffic.  If some AFS cells are unavailable "
+ "then looking at /afs using ls or a graphical file browser may hang your "
+ "machine for minutes.  AFS has an option to simulate answers to these "
+ "operations locally to avoid these hangs.  You want this option under most "
+ "circumstances."
+ msgstr ""
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid "What cell does this server serve files for?"
+ msgstr "Für welche Zelle liefert der Server Dateien?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid ""
+ "AFS fileservers belong to a cell.  They have the key for that cell's "
+ "Kerberos service and serve volumes into that cell.  Normally, this cell is "
+ "the same cell as the workstation's client belongs to."
+ msgstr ""
+ "AFS-Dateiserver gehören zu einer Zelle. Die Server haben den Schlüssel für "
+ "den Kerberos-Service der Zelle und stellen Volumes für die Zelle bereit. "
+ "Normalerweise ist die Zelle identisch mit der des Clients"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid "Upgrading will move files to new locations; continue?"
+ msgstr ""
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid ""
+ "Between Openafs 1.1 and Openafs 1.2, several files moved.  In particular, "
+ "files in /etc/openafs/server-local have been distributed to other "
+ "locations.  The BosConfig file is now located in /etc/openafs and the other "
+ "files are located in /var/lib/openafs.  If you continue with this upgrade, "
+ "these files will be moved.  You should use the bos restart command to reload "
+ "your servers.  Any configuration changes made before you do so will be lost."
+ msgstr ""
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid "OpenAFS file server probably does not work!"
+ msgstr ""
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid ""
+ "You are running the OpenAFS file server package on an alpha.  This probably "
+ "doesn't work; the DES code is flaky on the alpha, along with the threaded "
+ "file server.  Likely, the fileserver will simply fail to start, but if it "
+ "does load, data corruption may result.  You have been warned."
+ msgstr ""
Index: openafs/src/packaging/Debian/po/fr.po
diff -c /dev/null openafs/src/packaging/Debian/po/fr.po:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/po/fr.po	Thu Mar 23 15:24:33 2006
***************
*** 0 ****
--- 1,292 ----
+ # translation of fr.po to French
+ #
+ #    Translators, if you are not familiar with the PO format, gettext
+ #    documentation is worth reading, especially sections dedicated to
+ #    this format, e.g. by running:
+ #         info -n '(gettext)PO Files'
+ #         info -n '(gettext)Header Entry'
+ #
+ #    Some information specific to po-debconf are available at
+ #            /usr/share/doc/po-debconf/README-trans
+ #         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+ #
+ #    Developers do not need to manually edit POT or PO files.
+ #
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: openafs 1.4rc1-1\n"
+ "Report-Msgid-Bugs-To: \n"
+ "POT-Creation-Date: 2005-08-18 12:47-0700\n"
+ "PO-Revision-Date: 2005-08-22 15:11+0200\n"
+ "Last-Translator: Christian Perrier <bubulle@debian.org>\n"
+ "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=ISO-8859-15\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ "X-Generator: KBabel 1.9.1\n"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid "What hosts are DB servers for your home cell?"
+ msgstr ""
+ "Hôtes serveurs de bases de données pour votre cellule locale (« home "
+ "cell ») :"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid ""
+ "AFS uses the file /etc/openafs/CellServDB to hold the list of servers that "
+ "should be contacted to find parts of a cell.  The cell you claim this "
+ "workstation belongs to is not in that file.  Enter the host names of the "
+ "database servers separated by spaces. IMPORTANT: If you are creating a new "
+ "cell and this machine is to be a database server in that cell, only enter "
+ "this machine's name; add the other servers later after they are functioning. "
+ "Also, do not enable the AFS client to start at boot on this server until the "
+ "cell is configured.  When you are ready you can edit /etc/openafs/afs.conf."
+ "client to enable the client."
+ msgstr ""
+ "AFS utilise le fichier /etc/openafs/CellServDB pour conserver la liste des "
+ "serveurs à contacter pour trouver les constituants d'une cellule. La cellule "
+ "dont ce poste de travail est censé faire partie n'est pas indiquée dans ce "
+ "fichier. Veuillez indiquer les noms des serveurs de bases de données, "
+ "séparés par des espaces. IMPORTANT : si vous créez une nouvelle cellule et "
+ "que cette machine doit être un serveur de bases de données dans cette "
+ "cellule, veuillez seulement indiquer le nom de cette machine. N'ajoutez les "
+ "autres serveurs que plus tard, lorsqu'ils seront opérationnels. Enfin, "
+ "n'activez pas le client AFS au démarrage tant que cette cellule n'est pas "
+ "configurée. Quand vous serez prêt, vous pourrez modifier /etc/openafs/afs."
+ "conf.client pour mettre en service le client."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ msgid "What AFS cell does this workstation belong to?"
+ msgstr "Cellule AFS dont ce poste de travail fait partie :"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ msgid ""
+ "AFS filespace is organized into cells or administrative domains. Each "
+ "workstation belongs to one cell.  Usually the cell is the DNS domain name of "
+ "the site."
+ msgstr ""
+ "L'espace des fichiers AFS est organisé en cellules ou domaines "
+ "administratifs. Chaque poste de travail appartient à une cellule. "
+ "Habituellement, la cellule est le nom de domaine du site."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid "How large is your AFS cache (kB)?"
+ msgstr "Taille de votre cache pour AFS (en kilo-octets) :"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid ""
+ "AFS uses an area of the disk to cache remote files for faster access.  This "
+ "cache will be mounted on /var/cache/openafs.  It is important that the cache "
+ "not overfill the partition it is located on.  Often, people find it useful "
+ "to dedicate a partition to their AFS cache."
+ msgstr ""
+ "AFS utilise une partie du disque pour mettre en cache des fichiers distants "
+ "et accélérer les accès. Ce cache sera monté sur /var/cache/openafs. Il est "
+ "important que le cache ne remplisse pas la partition sur laquelle il est "
+ "situé. De nombreux utilisateurs choisissent de dédier une partition pour le "
+ "cache d'AFS."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid "Run Openafs client now and at boot?"
+ msgstr "Lancer le client AFS maintenant, puis à chaque démarrage ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid ""
+ "Should the Openafs filesystem be started and mounted at boot? Normally, most "
+ "users who install the openafs-client package expect to run it at boot.  "
+ "However, if you are planning on setting up a new cell or are on a laptop, "
+ "you may not want it started at boot time.  If you choose not to start AFS at "
+ "boot, run /etc/init.d/openafs-client force-start to start the client when "
+ "you wish to run it."
+ msgstr ""
+ "Veuillez indiquer si le système de fichiers Openafs doit être mis en service "
+ "et monté au démarrage. Normalement, la majorité des utilisateurs qui "
+ "installent le paquet openafs-client s'attendent à ce qu'il soit lancé au "
+ "démarrage. Cependant, si vous prévoyez de mettre en service une nouvelle "
+ "cellule ou si vous utilisez un ordinateur portable, vous ne souhaitez peut-"
+ "être pas le lancer au démarrage. Si vous préférez ne pas le lancer au "
+ "démarrage, utilisez la commande « /etc/init.d/openafs-client force-start » "
+ "pour le lancer quand vous en aurez besoin."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid "Look up AFS cells in DNS?"
+ msgstr "Faut-il chercher les cellules AFS dans le DNS ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid ""
+ "In order to contact an AFS cell, you need the IP addresses of the cell's "
+ "database servers.  Normally, this information is read from /etc/openafs/"
+ "CellServDB.  However, if Openafs cannot find a cell in that file, it can use "
+ "DNS to look for AFSDB records that contain the information."
+ msgstr ""
+ "Afin de contacter une cellule AFS, vous avez besoin des adresses IP de ses "
+ "serveurs de bases de données. Cette information est normalement extraite de /"
+ "etc/openafs/CellServDB. Cependant, si Openafs ne peut pas trouver de cellule "
+ "dans ce fichier, il peut utiliser le DNS pour rechercher des enregistrements "
+ "AFSDB qui fourniront cette information."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid "Encrypt authenticated traffic with AFS fileserver?"
+ msgstr "Faut-il chiffrer le trafic authentifié avec le serveur de fichiers AFS ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid ""
+ "AFS provides a weak form of encryption that can optionally be used between a "
+ "client and the fileservers.  While this encryption is weaker than DES and "
+ "thus is not sufficient for highly confidential data, it does provide some "
+ "confidentiality and is likely to make the job of a casual attacker "
+ "significantly more difficult."
+ msgstr ""
+ "AFS offre un mode de chiffrement faible qu'il est possible d'utiliser entre "
+ "un client et les serveurs de fichiers. Bien que ce chiffrement soit plus "
+ "faible que DES, et donc insuffisant pour des données hautement "
+ "confidentielles, il fournit une certaine forme de confidentialité et peut "
+ "rendre une attaque non préparée nettement plus difficile."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid "Dynamically generate the contents of /afs?"
+ msgstr "Faut-il gérer le contenu de /afs dynamiquement ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "/afs generally contains an entry for each cell that a client can talk to. "
+ "Traditionally, these entries were generated by servers in the client's home "
+ "cell.  However, OpenAFS clients can generate the contents of /afs "
+ "dynamically based on the contents of /etc/openafs/CellServDB and DNS."
+ msgstr ""
+ "Le répertoire /afs contient généralement une entrée par cellule accessible à "
+ "un client donné. Traditionnellement, ces entrées ont été créées par les "
+ "serveurs dans la cellule locale de chaque client. Cependant, OpenAFS peut "
+ "gérer dynamiquement le contenu de /afs en se servant de /etc/openafs/"
+ "CellServDB et du DNS."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "If you generate /afs dynamically, you may need to create /etc/openafs/"
+ "CellAlias to include aliases for common cells.  (The syntax of this file is "
+ "one line per alias, with the cell name, a space, and then the alias for that "
+ "cell.)"
+ msgstr ""
+ "Si vous créez /afs de manière dynamique, vous aurez peut-être à créer /etc/"
+ "openafs/CellAlias pour inclure les alias des cellules communes. Ce fichier comporte une ligne par alias, avec le nom de la cellule, un espace et l'alias utilisé pour la cellule."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid "Use fakestat to avoid hangs when listing /afs?"
+ msgstr "Utiliser fakestat pour éviter les erreurs à l'affichage du contenu de /afs ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid ""
+ "Because AFS is a global file space, operations on the /afs directory can "
+ "generate significant network traffic.  If some AFS cells are unavailable "
+ "then looking at /afs using ls or a graphical file browser may hang your "
+ "machine for minutes.  AFS has an option to simulate answers to these "
+ "operations locally to avoid these hangs.  You want this option under most "
+ "circumstances."
+ msgstr ""
+ "Comme AFS est un espace global de fichiers, les opérations sur /afs peuvent "
+ "générer un trafic réseau non négligeable. Si certaines cellules sont "
+ "indisponibles, l'affichage de /afs avec ls ou avec un gestionnaire de "
+ "fichiers graphique peut stopper votre machine pour quelques minutes. AFS "
+ "comporte une option permettant de simuler les réponses à ces requêtes pour "
+ "éviter ces plantages. Cette option est utile dans la plupart des cas."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid "What cell does this server serve files for?"
+ msgstr "Cellule pour laquelle ce serveur est un serveur de fichiers :"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid ""
+ "AFS fileservers belong to a cell.  They have the key for that cell's "
+ "Kerberos service and serve volumes into that cell.  Normally, this cell is "
+ "the same cell as the workstation's client belongs to."
+ msgstr ""
+ "Les serveurs de fichiers AFS appartiennent à une cellule. Ils possèdent la "
+ "clé pour le service Kerberos de cette cellule et y mettent à disposition des "
+ "volumes. Normalement, cette cellule est la même que celle à laquelle "
+ "appartient le client."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid "Upgrading will move files to new locations; continue?"
+ msgstr "Faut-il procéder au déplacement de fichiers requis pour la mise à jour ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid ""
+ "Between Openafs 1.1 and Openafs 1.2, several files moved.  In particular, "
+ "files in /etc/openafs/server-local have been distributed to other "
+ "locations.  The BosConfig file is now located in /etc/openafs and the other "
+ "files are located in /var/lib/openafs.  If you continue with this upgrade, "
+ "these files will be moved.  You should use the bos restart command to reload "
+ "your servers.  Any configuration changes made before you do so will be lost."
+ msgstr ""
+ "Entre les versions 1.1 et 1.2 d'OpenAFS, de nombreux fichiers ont été "
+ "déplacés. Les fichiers de /etc/openafs/server-local ont notamment été "
+ "répartis sur d'autres emplacements. Le fichier BosConfig est désormais placé "
+ "dans /etc/openafs et les autres fichiers sont dans /var/lib/openafs. Si vous "
+ "poursuivez la mise à jour, ces fichiers seront déplacés. Vous devez utiliser "
+ "la commande « bos restart » pour redémarrer vos serveurs. Toutes les "
+ "modifications de configuration que vous ferez avant d'avoir effectué ces "
+ "opérations seront perdues."
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid "OpenAFS file server probably does not work!"
+ msgstr "Le serveur de fichiers OpenAFS ne fonctionne probablement pas"
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid ""
+ "You are running the OpenAFS file server package on an alpha.  This probably "
+ "doesn't work; the DES code is flaky on the alpha, along with the threaded "
+ "file server.  Likely, the fileserver will simply fail to start, but if it "
+ "does load, data corruption may result.  You have been warned."
+ msgstr ""
+ "Vous utilisez le paquet du serveur de fichier OpenAFS sur une plateforme "
+ "alpha. Cela ne fonctionne probablement pas ; le code DES est défectueux sur "
+ "ces plateformes de même que le serveur de fichiers à processus légers. Il "
+ "est probable que le serveur refusera tout simplement de démarrer. Cependant, "
+ "s'il démarre quand même, des corruptions de données peuvent avoir lieu."
+ 
Index: openafs/src/packaging/Debian/po/pt_BR.po
diff -c /dev/null openafs/src/packaging/Debian/po/pt_BR.po:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/po/pt_BR.po	Thu Mar 23 15:24:33 2006
***************
*** 0 ****
--- 1,293 ----
+ #
+ #    Translators, if you are not familiar with the PO format, gettext
+ #    documentation is worth reading, especially sections dedicated to
+ #    this format, e.g. by running:
+ #         info -n '(gettext)PO Files'
+ #         info -n '(gettext)Header Entry'
+ #
+ #    Some information specific to po-debconf are available at
+ #            /usr/share/doc/po-debconf/README-trans
+ #         or http://www.debian.org/intl/l10n/po-debconf/README-trans
+ #
+ #    Developers do not need to manually edit POT or PO files.
+ #
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: openafs\n"
+ "Report-Msgid-Bugs-To: debian-l10n-portuguese@lists.debian.org\n"
+ "POT-Creation-Date: 2005-08-18 12:47-0700\n"
+ "PO-Revision-Date: 2005-08-26 18:53-0300\n"
+ "Last-Translator: André Luís Lopes <andrelop@debian.org>\n"
+ "Language-Team: Debian-BR Project <debian-l10n-portuguese@lists.debian.org>\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=ISO-8859-1\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid "What hosts are DB servers for your home cell?"
+ msgstr "Quais hosts são servidor DB para sua célula home ?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid ""
+ "AFS uses the file /etc/openafs/CellServDB to hold the list of servers that "
+ "should be contacted to find parts of a cell.  The cell you claim this "
+ "workstation belongs to is not in that file.  Enter the host names of the "
+ "database servers separated by spaces. IMPORTANT: If you are creating a new "
+ "cell and this machine is to be a database server in that cell, only enter "
+ "this machine's name; add the other servers later after they are functioning. "
+ "Also, do not enable the AFS client to start at boot on this server until the "
+ "cell is configured.  When you are ready you can edit /etc/openafs/afs.conf."
+ "client to enable the client."
+ msgstr ""
+ "O AFS usa o arquivo /etc/openafs/CellServDB para armazenar a lista de "
+ "servidores que deverão ser contactados para se encontrar partes de uma "
+ "célula. A célula que você diz que essa estação de trabalho pertence não está "
+ "nesse arquivo. Informe os nomes de hosts dos servidore de base de dados "
+ "separados por espaços. IMPORTANTE : Caso você esteja criando uma nova célula "
+ "e esta máquina será um servidor de base de dados na célula, somente informe "
+ "o nome desta máquina. Adicione os outros servidores posteriormente depois "
+ "que os mesmos estejam funcionando. Adicionalmente, não habilite o cliente "
+ "AFS para inicialização em tempo de inicialização neste servidor até que a "
+ "célula esteja configurada. Quando você estiver terminado você poderá editar "
+ "o arquivo /etc/openafs/afs.conf.client para habilitar este cliente."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ msgid "What AFS cell does this workstation belong to?"
+ msgstr "A qual célula AFS esta estação de trabalho pertence ?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ msgid ""
+ "AFS filespace is organized into cells or administrative domains. Each "
+ "workstation belongs to one cell.  Usually the cell is the DNS domain name of "
+ "the site."
+ msgstr ""
+ "O espaço de arquivo AFS é organizado em células ou domínios administrativos. "
+ "Cada estação de trabalho pertence a uma célula. Normalmente a célula é o "
+ "nome de domínio DNS do site."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid "How large is your AFS cache (kB)?"
+ msgstr "Qual o tamanho de seu cache AFS (KB) ?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid ""
+ "AFS uses an area of the disk to cache remote files for faster access.  This "
+ "cache will be mounted on /var/cache/openafs.  It is important that the cache "
+ "not overfill the partition it is located on.  Often, people find it useful "
+ "to dedicate a partition to their AFS cache."
+ msgstr ""
+ "O AFS usa uma àrea do disco para fazer cache de arquivos remotos para acesso "
+ "mais rápido. Esse cache será montando em /var/cache/openafs. É importante "
+ "que o cache não ocupe toda a partrição na qual está localizado. Geralmente, "
+ "os usuários AFS acham útil dedicar uma partição para seus caches AFS."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid "Run Openafs client now and at boot?"
+ msgstr "Executar o cliente OpenAFS agora e em tempo de inicialização ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid ""
+ "Should the Openafs filesystem be started and mounted at boot? Normally, most "
+ "users who install the openafs-client package expect to run it at boot.  "
+ "However, if you are planning on setting up a new cell or are on a laptop, "
+ "you may not want it started at boot time.  If you choose not to start AFS at "
+ "boot, run /etc/init.d/openafs-client force-start to start the client when "
+ "you wish to run it."
+ msgstr ""
+ "O sistema de arquivos OpenAFS deverá ser iniciado e montando em tempo de "
+ "inicialização ? Normalmente, a maioria dos usuários que instalam o pacote "
+ "openafs-client esperam executá-lo em tempo de inicialização. Porém, caso "
+ "você esteja planejando configurar uma nova célula ou esteja em um laptop, "
+ "você pode não desejar iniciar o OpenAFS em tempo de inicialização. Caso você "
+ "opte por não iniciar o AFS em tempo de inicialização, execute "
+ "/etc/init.d/openafs-cliente force-start para iniciar o cliente quando "
+ "desejar executá-lo."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid "Look up AFS cells in DNS?"
+ msgstr "Procurar células AFS no DNS ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid ""
+ "In order to contact an AFS cell, you need the IP addresses of the cell's "
+ "database servers.  Normally, this information is read from /etc/openafs/"
+ "CellServDB.  However, if Openafs cannot find a cell in that file, it can use "
+ "DNS to look for AFSDB records that contain the information."
+ msgstr ""
+ "Para poder contactar uma célula AFS, você precisa dos endereços IP dos "
+ "servidores de base de dados da célula. Normalmente, esta informação é lida "
+ "de /etc/openafs/CellServDB. Porém, caso o OpenAFS não possa encontrar uma "
+ "célula nesse arquivo, o DNS poderá ser usado para pesquisar registros AFSDB "
+ "que contenham a informação."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid "Encrypt authenticated traffic with AFS fileserver?"
+ msgstr "Encriptar o tráfego autenticado com o servidor de arquivos AFS ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid ""
+ "AFS provides a weak form of encryption that can optionally be used between a "
+ "client and the fileservers.  While this encryption is weaker than DES and "
+ "thus is not sufficient for highly confidential data, it does provide some "
+ "confidentiality and is likely to make the job of a casual attacker "
+ "significantly more difficult."
+ msgstr ""
+ "O AFS fornece uma forma fraca de encriptação que pode ser opcionalmente "
+ "usada entre o cliente e os servidor de arquivos. Enquanto esta encriptação é "
+ "mais fraca do que DES e portanto não é suficiente para dados altamente "
+ "confidenciais, essa encriptação fornece alguma confidencialidade e "
+ "provavelmente torna o trabalho de um atacante casual mais difícil."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid "Dynamically generate the contents of /afs?"
+ msgstr "Gerar dinamicamente o conteúdo de /afs ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "/afs generally contains an entry for each cell that a client can talk to. "
+ "Traditionally, these entries were generated by servers in the client's home "
+ "cell.  However, OpenAFS clients can generate the contents of /afs "
+ "dynamically based on the contents of /etc/openafs/CellServDB and DNS."
+ msgstr ""
+ "O /afs geralmente contém uma entrada para cada célula com a qual o cliente "
+ "pode conversar. Tradicionalmente, essas entradas eram geradas por servidores "
+ "no célula home do cliente. Porém, clientes OpenAFS podem gerar o conteúdo "
+ "de /afs dinamicamente baseando-se no conteúdo de /etc/openafs/CellServDB e "
+ "do DNS."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "If you generate /afs dynamically, you may need to create /etc/openafs/"
+ "CellAlias to include aliases for common cells.  (The syntax of this file is "
+ "one line per alias, with the cell name, a space, and then the alias for that "
+ "cell.)"
+ msgstr ""
+ "Caso você gere o /afs dinamicamente, você pode precisar criar o /etc/openafs/"
+ "CellAlias para incluir apelidos (aliases) para células comuns. (A "
+ "sintaxe desse arquivo é uma linha por apelido, com o nome da célula, "
+ "um espaço e depois o apelido para a célula.)"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid "Use fakestat to avoid hangs when listing /afs?"
+ msgstr "Usar fakestat para evitar travadas na listagem do /afs ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid ""
+ "Because AFS is a global file space, operations on the /afs directory can "
+ "generate significant network traffic.  If some AFS cells are unavailable "
+ "then looking at /afs using ls or a graphical file browser may hang your "
+ "machine for minutes.  AFS has an option to simulate answers to these "
+ "operations locally to avoid these hangs.  You want this option under most "
+ "circumstances."
+ msgstr ""
+ "Devido ao AFS ser um espaço de arquivos global, operações no diretório /afs "
+ "podem gerar um tráfego de rede significativo. Caso algumas células AFS não "
+ "estejam disponíveis, pesquisar o /afs usando o comando \"ls\" ou um "
+ "gerenciador de arquivos gráfico pode travar sua máquina por alguns minutos. "
+ "O AFS possui uma opção para simular respostas para essas operações "
+ "localmente para evitar essas travadas. Você irá desejar usar esta opção na "
+ "maioria dos casos."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid "What cell does this server serve files for?"
+ msgstr "Para qual célula este servidor serve arquivos ?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid ""
+ "AFS fileservers belong to a cell.  They have the key for that cell's "
+ "Kerberos service and serve volumes into that cell.  Normally, this cell is "
+ "the same cell as the workstation's client belongs to."
+ msgstr ""
+ "Servidor de arquivos AFS pertencem a uma célula. Eles possuem uma chave para "
+ "cada serviço Kerberos da célula e servem volumes dentro da célula. "
+ "Normalmente, essa célula é a mesma célula da qual a estação de trabalho faz "
+ "parte."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid "Upgrading will move files to new locations; continue?"
+ msgstr "Atualizar irá mover arquivo para novos locais. Continuar ?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid ""
+ "Between Openafs 1.1 and Openafs 1.2, several files moved.  In particular, "
+ "files in /etc/openafs/server-local have been distributed to other "
+ "locations.  The BosConfig file is now located in /etc/openafs and the other "
+ "files are located in /var/lib/openafs.  If you continue with this upgrade, "
+ "these files will be moved.  You should use the bos restart command to reload "
+ "your servers.  Any configuration changes made before you do so will be lost."
+ msgstr ""
+ "Entre as versões do OpenAFS 1.1 e do OpenAFS 1.2, diversos arquivos foram "
+ "movidos. Em particular, aruivos em /etc/openafs/server-local foram "
+ "distribuídos para outros locais. O arquivo BosConfig está agora localizado "
+ "em /etc/openafs e os outros arquivos estão localizados em /var/lib/openafs. "
+ "Caso você continue com esta atualização, esses arquivos serão movidos. Você "
+ "deverá usar o comando \"bos restart\" para recarregar seus servidores. "
+ "Quaisquer mudanças em configurações feitas antes que você tenha feito isso "
+ "serão perdidas."
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid "OpenAFS file server probably does not work!"
+ msgstr "Servidor de Arquivos OpenAFS provavelmente não funciona !"
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid ""
+ "You are running the OpenAFS file server package on an alpha.  This probably "
+ "doesn't work; the DES code is flaky on the alpha, along with the threaded "
+ "file server.  Likely, the fileserver will simply fail to start, but if it "
+ "does load, data corruption may result.  You have been warned."
+ msgstr ""
+ "Você está executando o pacote do servidor de arquivos OpenAFS em uma máquina "
+ "Alpha. Isso provavelmente não funcionará. O código DES é em conjunto com o "
+ "servidor de arquivos com suporte a threads é problemático em máquinas Alpha. "
+ "Provavelmente, o servidor de arquivos irá simplesmente falhar ao iniciar. "
+ "Caso consiga ser iniciado, poderá causar corrupção de dados. Você foi "
+ "avisado."
+ 
+ #~ msgid "50000"
+ #~ msgstr "50000"
Index: openafs/src/packaging/Debian/po/vi.po
diff -c /dev/null openafs/src/packaging/Debian/po/vi.po:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/Debian/po/vi.po	Thu Mar 23 15:24:33 2006
***************
*** 0 ****
--- 1,278 ----
+ # Vietnamese translation for openafs.
+ # Copyright Â© 2005 Free Software Foundation, Inc.
+ # Clytie Siddall <clytie@riverland.net.au>, 2005.
+ # 
+ msgid ""
+ msgstr ""
+ "Project-Id-Version: openafs 1.4rc1-1\n"
+ "Report-Msgid-Bugs-To: \n"
+ "POT-Creation-Date: 2005-08-18 12:47-0700\n"
+ "PO-Revision-Date: 2005-08-19 16:26+0930\n"
+ "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+ "Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net>\n"
+ "MIME-Version: 1.0\n"
+ "Content-Type: text/plain; charset=utf-8\n"
+ "Content-Transfer-Encoding: 8bit\n"
+ "Plural-Forms: nplurals=1; plural=0\n"
+ "X-Generator: LocFactoryEditor 1.2.2\n"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid "What hosts are DB servers for your home cell?"
+ msgstr "MÃ¡y nÃ o cháº¡y trÃ¬nh phá»¥c vá»¥ cÆ¡ sá»Ÿ dá»¯ liá»‡u cho Ã´ chÃ­nh báº¡n?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:3
+ msgid ""
+ "AFS uses the file /etc/openafs/CellServDB to hold the list of servers that "
+ "should be contacted to find parts of a cell.  The cell you claim this "
+ "workstation belongs to is not in that file.  Enter the host names of the "
+ "database servers separated by spaces. IMPORTANT: If you are creating a new "
+ "cell and this machine is to be a database server in that cell, only enter "
+ "this machine's name; add the other servers later after they are functioning. "
+ "Also, do not enable the AFS client to start at boot on this server until the "
+ "cell is configured.  When you are ready you can edit /etc/openafs/afs.conf."
+ "client to enable the client."
+ msgstr ""
+ "AFS dÃ¹ng táº­p tin Â« /etc/openafs/CellServDB Â» Ä‘á»ƒ chá»©a danh sÃ¡ch cÃ¡c mÃ¡y phá»¥c vá»¥ "
+ "nÃªn Ä‘Æ°á»£c liÃªn há»‡ Ä‘á»ƒ tÃ¬m pháº§n Ã´. Báº¡n Ä‘Ã£ tuyÃªn bá»‘ mÃ¡y tráº¡m nÃ y thuá»™c má»™t Ã´ "
+ "khÃ´ng pháº£i trong táº­p tin áº¥y. HÃ£y nháº­p tÃªn mÃ¡y cá»§a nhá»¯ng mÃ¡y phá»¥c vá»¥ cÆ¡ sá»Ÿ dá»¯ "
+ "liá»‡u, Ä‘á»‹nh giá»›i báº±ng dáº¥u cÃ¡ch. QUAN TRá»ŒNG: náº¿u báº¡n Ä‘ang táº¡o má»™t Ã´ má»›i, vÃ  "
+ "mÃ¡y nÃ y sáº½ lÃ  má»™t mÃ¡y phá»¥c vá»¥ cÆ¡ sá»Ÿ dá»¯ liá»‡u trong Ã´ áº¥y, thÃ¬ báº¡n hÃ£y nháº­p chá»‰ "
+ "tÃªn mÃ¡y nÃ y thÃ´i. HÃ£y thÃªm nhá»¯ng mÃ¡y phá»¥c vá»¥ khÃ¡c láº§n sau, sau khi chÃºng "
+ "hoáº¡t Ä‘á»™ng. HÆ¡n ná»¯a, cÃ³ thá»ƒ hiá»‡u lá»±c trÃ¬nh khÃ¡ch AFS khá»Ÿi cháº¡y khi khá»Ÿi Ä‘á»™ng "
+ "mÃ¡y, chá»‰ sau khi cáº¥u hÃ¬nh Ã´ áº¥y. Khi báº¡n sáºµn sÃ ng thÃ¬ cÃ³ thá»ƒ hiá»‡u chá»‰nh táº­p "
+ "tin Â« /etc/openafs/afs.conf.client Â» Ä‘á»ƒ hiá»‡u lá»±c trÃ¬nh khÃ¡ch áº¥y."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ msgid "What AFS cell does this workstation belong to?"
+ msgstr "MÃ¡y tráº¡m nÃ y thuá»™c Ã´ AFS nÃ o?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:16
+ msgid ""
+ "AFS filespace is organized into cells or administrative domains. Each "
+ "workstation belongs to one cell.  Usually the cell is the DNS domain name of "
+ "the site."
+ msgstr ""
+ "Khoáº£ng cÃ¡ch táº­p tin loáº¡i AFS Ä‘Æ°á»£c tá»• chá»©c ra nhiá»u Ã´ hay miá»n quáº£n lÃ½. Má»—i "
+ "mÃ¡y tráº¡m thuá»™c má»™t Ã´ riÃªng láº». ThÆ°á»ng Ã´ áº¥y lÃ  tÃªn miá»n DNS cá»§a nÆ¡i Máº¡ng áº¥y."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid "How large is your AFS cache (kB)?"
+ msgstr "Báº¡n cÃ³ bá»™ nhá»› táº¡m AFS lá»›n bao nhiÃªu (theo kB)?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-client.templates:24
+ msgid ""
+ "AFS uses an area of the disk to cache remote files for faster access.  This "
+ "cache will be mounted on /var/cache/openafs.  It is important that the cache "
+ "not overfill the partition it is located on.  Often, people find it useful "
+ "to dedicate a partition to their AFS cache."
+ msgstr ""
+ "AFS dÃ¹ng má»™t vÃ¹ng trÃªn Ä‘Ä©a Ä‘á»ƒ lÆ°u táº¡m táº­p tin tá»« xa, mÃ  cho phÃ©p truy cáº­p "
+ "nhanh hÆ¡n. Bá»™ nhá»› táº¡m nÃ y sáº½ Ä‘Æ°á»£c gáº¯n vÃ o Â« /var/cache/openafs Â». Quan trá»ng "
+ "lÃ  bá»™ nhá»› táº¡m áº¥y khÃ´ng vÆ°á»£t quÃ¡ phÃ¢n vÃ¹ng á»Ÿ. ThÆ°á»ng cÃ³ Ã­ch khi dÃ¹ng má»™t phÃ¢n "
+ "vÃ¹ng chá»‰ cho bá»™ nhá»› táº¡m AFS thÃ´i."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid "Run Openafs client now and at boot?"
+ msgstr "Cháº¡y trÃ¬nh khÃ¡ch Openafs ngay bÃ¢y giá» vÃ  cÅ©ng khi khá»Ÿi Ä‘á»™ng mÃ¡y khÃ´ng?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:34
+ msgid ""
+ "Should the Openafs filesystem be started and mounted at boot? Normally, most "
+ "users who install the openafs-client package expect to run it at boot.  "
+ "However, if you are planning on setting up a new cell or are on a laptop, "
+ "you may not want it started at boot time.  If you choose not to start AFS at "
+ "boot, run /etc/init.d/openafs-client force-start to start the client when "
+ "you wish to run it."
+ msgstr ""
+ "CÃ³ nÃªn khá»Ÿi cháº¡y vÃ  gáº¯n há»‡ thá»‘ng táº­p tin Openafs khi khá»Ÿi Ä‘á»™ng mÃ¡y khÃ´ng? "
+ "BÃ¬nh thÆ°á»ng, pháº§n lá»›n ngÆ°á»i dÃ¹ng cÃ i Ä‘áº·t gÃ³i Â« openafs-client Â» thÃ¬ Ä‘á»‹nh "
+ "cháº¡y nÃ³ khi khá»Ÿi Ä‘á»™ng mÃ¡y. Tuy nhiÃªn, náº¿u báº¡n Ä‘á»‹nh thiáº¿t láº­p má»™t Ã´ má»›i, hoáº·c "
+ "cÃ³ dÃ¹ng má»™t mÃ¡y tÃ­nh xÃ¡ch tay, trong trÆ°á»ng há»£p áº¥y cÃ³ láº½ báº¡n khÃ´ng muá»‘n há»‡ "
+ "thá»‘ng táº­p tin áº¥y khá»Ÿi cháº¡y khi khá»Ÿi Ä‘á»™ng mÃ¡y. Náº¿u báº¡n chá»n khÃ´ng khá»Ÿi cháº¡y "
+ "AFS khi khá»Ÿi Ä‘á»™ng mÃ¡y thÃ¬ hÃ£y cháº¡y lá»‡nh Â« /etc/init.d/openafs-client force-"
+ "start Â» (buá»™c khá»Ÿi cháº¡y trÃ¬nh khÃ¡ch AFS) Ä‘á»ƒ khá»Ÿi cháº¡y trÃ¬nh khÃ¡ch khi mÃ  báº¡n "
+ "muá»‘n cháº¡y nÃ³."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid "Look up AFS cells in DNS?"
+ msgstr "Tra cá»©u Ã´ AFS trong DNS khÃ´ng?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:45
+ msgid ""
+ "In order to contact an AFS cell, you need the IP addresses of the cell's "
+ "database servers.  Normally, this information is read from /etc/openafs/"
+ "CellServDB.  However, if Openafs cannot find a cell in that file, it can use "
+ "DNS to look for AFSDB records that contain the information."
+ msgstr ""
+ "Äá»ƒ liÃªn há»‡ má»™t Ã´ AFS, báº¡n cáº§n cÃ³ Ä‘á»‹a chá»‰ IP cá»§a má»i mÃ¡y phá»¥c vá»¥ cÆ¡ sá»Ÿ dá»¯ "
+ "liá»‡u cá»§a nÃ³. BÃ¬nh thÆ°á»ng, thÃ´ng tin nÃ y Ä‘Æ°á»£c Ä‘á»c tá»« táº­p tin Â« /etc/openafs/"
+ "CellServDB Â». Tuy nhiÃªn, náº¿u trÃ¬nh Openafs khÃ´ng tÃ¬m tháº¥y má»™t Ã´ nÃ o Ä‘Ã³ trong "
+ "táº­p tin áº¥y thÃ¬ nÃ³ cÃ³ thá»ƒ dÃ¹ng DNS (há»‡ thá»‘ng tÃªn miá»n) Ä‘á»ƒ tÃ¬m má»¥c ghi AFSDB "
+ "chá»©a thÃ´ng tin áº¥y."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid "Encrypt authenticated traffic with AFS fileserver?"
+ msgstr ""
+ "Máº­t mÃ£ hÃ³a cÃ¡c dá»¯ liá»‡u xÃ¡c thá»±c truyá»n vá»›i trÃ¬nh phá»¥c vá»¥ táº­p tin AFS khÃ´ng?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:55
+ msgid ""
+ "AFS provides a weak form of encryption that can optionally be used between a "
+ "client and the fileservers.  While this encryption is weaker than DES and "
+ "thus is not sufficient for highly confidential data, it does provide some "
+ "confidentiality and is likely to make the job of a casual attacker "
+ "significantly more difficult."
+ msgstr ""
+ "AFS cung cáº¥p má»™t cÃ¡ch máº­t mÃ£ yáº¿u mÃ  tÃ¹y chá»n cÃ³ thá»ƒ Ä‘Æ°á»£c dÃ¹ng giá»¯a má»™t trÃ¬nh "
+ "khÃ¡ch nÃ o Ä‘Ã³ vÃ  nhá»¯ng trÃ¬nh phá»¥c vá»¥ táº­p tin khÃ¡c. DÃ¹ cÃ¡ch máº·t mÃ£ nÃ y yáº¿u hÆ¡n "
+ "DES, vÃ¬ váº­y khÃ´ng Ä‘á»§ cho dá»¯ liá»‡u quan trá»ng, nÃ³ cÃ³ cung cáº¥p má»™t má»©c Ä‘á»™ riÃªng "
+ "tÆ°, thÃ¬ sáº½ lÃ m cho ngÆ°á»i táº¥n cÃ´ng gáº·p khÃ³ khÄƒn má»™t pháº§n."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid "Dynamically generate the contents of /afs?"
+ msgstr "Táº¡o ra ná»™i dung Â« /afs Â» má»™t cÃ¡ch Ä‘á»™ng khÃ´ng?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "/afs generally contains an entry for each cell that a client can talk to. "
+ "Traditionally, these entries were generated by servers in the client's home "
+ "cell.  However, OpenAFS clients can generate the contents of /afs "
+ "dynamically based on the contents of /etc/openafs/CellServDB and DNS."
+ msgstr ""
+ "ThÆ° má»¥c Â« /afs Â» thÆ°á»ng chá»©a má»™t má»¥c ghi cho má»—i Ã´ mÃ  trÃ¬nh khÃ¡ch cÃ³ thá»ƒ liÃªn "
+ "há»‡. TrÆ°á»›c nÃ y, trÃ¬nh phá»¥c vá»¥ trong Ã´ chÃ­nh cá»§a trÃ¬nh khÃ¡c Ä‘Ã£ táº¡o ra má»¥c ghi "
+ "nÃ y. Tuy nhiÃªn, trÃ¬nh khÃ¡ch loáº¡i OpenAFS cÃ³ thá»ƒ táº¡o ra ná»™i dung Â« /afs Â» má»™t "
+ "cÃ¡ch Ä‘á»™ng, Ä‘á»±a vÃ o ná»™i dung Â« /etc/openafs/CellServDB Â» vÃ  vÃ o DNS."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:65
+ msgid ""
+ "If you generate /afs dynamically, you may need to create /etc/openafs/"
+ "CellAlias to include aliases for common cells.  (The syntax of this file is "
+ "one line per alias, with the cell name, a space, and then the alias for that "
+ "cell.)"
+ msgstr ""
+ "Náº¿u báº¡n chá»n táº¡o ra Â« /afs Â» má»™t cÃ¡ch Ä‘á»™ng, cÃ³ láº½ báº¡n sáº½ cáº§n pháº£i táº¡o Â« etc/"
+ "openafs/CellAlias Â» (bÃ­ danh Ã´) Ä‘á»ƒ gá»“m bÃ­ danh cho cÃ¡c Ã´ chung. (CÃº phÃ¡p cá»§a táº­p tin nÃ y lÃ  má»™t dÃ²ng cho má»—i bÃ­ danh, mÃ  chá»©a tÃªn Ã´, rá»“i má»™t dáº¥u cÃ¡ch, rá»“i bÃ­ danh cho Ã´ Ä‘Ã³.)"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid "Use fakestat to avoid hangs when listing /afs?"
+ msgstr ""
+ "DÃ¹ng Â« fakestat Â» (thá»‘ng kÃª giáº£) Ä‘á»ƒ trÃ¡nh há»‡ thá»‘ng treo cá»©ng khi liá»‡t kÃª Â« /"
+ "afs Â» khÃ´ng?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-client.templates:79
+ msgid ""
+ "Because AFS is a global file space, operations on the /afs directory can "
+ "generate significant network traffic.  If some AFS cells are unavailable "
+ "then looking at /afs using ls or a graphical file browser may hang your "
+ "machine for minutes.  AFS has an option to simulate answers to these "
+ "operations locally to avoid these hangs.  You want this option under most "
+ "circumstances."
+ msgstr ""
+ "VÃ¬ AFS lÃ  má»™t khoáº£ng cÃ¡ch toÃ n cá»¥c, thao tÃ¡c trÃªn thÆ° má»¥c Â« /afs Â» cÃ³ thá»ƒ táº¡o "
+ "ra nhiá»u táº£i cho máº¡ng. Náº¿u má»™t sá»‘ Ã´ AFS khÃ´ng sáºµn sÃ ng thÃ¬ viá»‡c xem Â« /afs Â» "
+ "dÃ¹ng lá»‡nh Â« ls Â» (liá»‡t kÃª) hoáº·c dÃ¹ng má»™t trÃ¬nh Ä‘á»“ há»a duyá»‡t táº­p tin thÃ¬ cÃ³ thá»ƒ "
+ "treo cá»©ng mÃ¡y báº¡n trong vÃ²ng nhiá»u phÃºt. AFS tÃ¹y chá»n cÃ³ thá»ƒ mÃ´ phá»ng tráº£ "
+ "lá»i cho thao tÃ¡c loáº¡i nÃ y má»™t cÃ¡ch Ä‘á»‹a phÆ°Æ¡ng, Ä‘á»ƒ trÃ¡nh treo cá»©ng há»‡ thá»‘ng "
+ "nhÆ° tháº¿. Äá»‡ nghi báº¡n sá»­ dá»¥ng tÃ¹y chá»n nÃ y: nÃ³ cáº§n thiáº¿t trong pháº§n lá»›n "
+ "trÆ°á»ng há»£p."
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid "What cell does this server serve files for?"
+ msgstr "TrÃ¬nh phá»¥c vá»¥ nÃ y phá»¥c vá»¥ táº­p tin cho Ã´ nÃ o?"
+ 
+ #. Type: string
+ #. Description
+ #: ../openafs-fileserver.templates:3
+ msgid ""
+ "AFS fileservers belong to a cell.  They have the key for that cell's "
+ "Kerberos service and serve volumes into that cell.  Normally, this cell is "
+ "the same cell as the workstation's client belongs to."
+ msgstr ""
+ "Má»i trÃ¬nh phá»¥c vá»¥ táº­p tin AFS thuá»™c má»™t Ã´ nÃ o Ä‘Ã³. TrÃ¬nh áº¥y cÃ³ khÃ³a cá»§a dá»‹ch "
+ "vá»¥ Kerberos cá»§a Ã´ nÃ y, vÃ  phá»¥c vá»¥ khá»‘i Ä‘Ä©a vÃ o Ã´ nÃ y. BÃ¬nh thÆ°á»ng, Ã´ nÃ y lÃ  "
+ "cÃ¹ng má»™t Ã´ vá»›i Ã´ sá»Ÿ há»¯u trÃ¬nh khÃ¡ch cá»§a mÃ¡y tráº¡m nÃ y."
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid "Upgrading will move files to new locations; continue?"
+ msgstr ""
+ "NÃ¢ng cáº¥p sáº½ di chuyá»ƒn táº­p tin sang vá»‹ trÃ­ má»›i: báº¡n cÃ³ muá»‘n tiáº¿p tá»¥c khÃ´ng?"
+ 
+ #. Type: boolean
+ #. Description
+ #: ../openafs-fileserver.templates:11
+ msgid ""
+ "Between Openafs 1.1 and Openafs 1.2, several files moved.  In particular, "
+ "files in /etc/openafs/server-local have been distributed to other "
+ "locations.  The BosConfig file is now located in /etc/openafs and the other "
+ "files are located in /var/lib/openafs.  If you continue with this upgrade, "
+ "these files will be moved.  You should use the bos restart command to reload "
+ "your servers.  Any configuration changes made before you do so will be lost."
+ msgstr ""
+ "Giá»¯a Openafs phiÃªn báº£n 1.1 vÃ  1.2, vÃ i táº­p tin Ä‘Ã£ Ä‘Æ°á»£c di chuyá»ƒn. Äáº·c biá»‡t, "
+ "nhá»¯ng táº­p tin trong Â« /etc/openafs/server-local Â» (trÃ¬nh phá»¥c vá»¥ Ä‘á»‹a phÆ°Æ¡ng) "
+ "Ä‘Ã£ Ä‘Æ°á»£c chia ra nhiá»u vá»‹ trÃ­ khÃ¡c. Táº­p tin Â« BosConfig Â» lÃºc nÃ y trong Â« /etc/"
+ "openafs Â», vÃ  nhá»¯ng táº­p tin khÃ¡c cÃ³ trong Â« /var/lib/openafs Â». Náº¿u báº¡n chá»n "
+ "tiáº¿p tá»¥c nÃ¢ng cáº¥p, cÃ¡c táº­p tin áº¥y sáº½ Ä‘Æ°á»£c di chuyá»ƒn nhÆ° tháº¿. Báº¡n hÃ£y sá»­ dá»¥ng "
+ "lá»‡nh Â« bos restart Â» (khá»Ÿi cháº¡y láº¡i) Ä‘á»ƒ khá»Ÿi cháº¡y láº¡i cÃ¡c trÃ¬nh phá»¥c vá»¥ cá»§a "
+ "báº¡n. Má»i thay Ä‘á»•i cáº¥u hÃ¬nh Ä‘Æ°á»£c táº¡o trÆ°á»›c khi báº¡n khá»Ÿi cháº¡y láº¡i thÃ¬ sáº½ bá»‹ "
+ "máº¥t."
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid "OpenAFS file server probably does not work!"
+ msgstr "Ráº¥t cÃ³ thá»ƒ lÃ  trÃ¬nh phá»¥c vá»¥ táº­p tin OpenAFS khÃ´ng hoáº¡t Ä‘á»™ng."
+ 
+ #. Type: note
+ #. Description
+ #: ../openafs-fileserver.templates:22
+ msgid ""
+ "You are running the OpenAFS file server package on an alpha.  This probably "
+ "doesn't work; the DES code is flaky on the alpha, along with the threaded "
+ "file server.  Likely, the fileserver will simply fail to start, but if it "
+ "does load, data corruption may result.  You have been warned."
+ msgstr ""
+ "Báº¡n cÃ³ cháº¡y gÃ³i tin trÃ¬nh phá»¥c vá»¥ táº­p tin OpenAFS trÃªn má»™t anfa. Ráº¥t cÃ³ thá»ƒ "
+ "lÃ  nÃ³ khÃ´ng hoáº¡t Ä‘á»™ng vÃ¬ mÃ£ DES bá»‹ lá»—i trÃªn anfa, cÅ©ng vá»›i trÃ¬nh phá»¥c vá»¥ táº­p "
+ "tin theo máº¡ch. Ráº¥t cÃ³ thá»ƒ lÃ  trÃ¬nh phá»¥c vá»¥ táº­p tin sáº½ khÃ´ng khá»Ÿi cháº¡y, nhÆ°ng "
+ "mÃ  náº¿u nÃ³ cÃ³ pháº£i khá»Ÿi cháº¡y thÃ¬ dá»¯ liá»‡u cÃ³ thá»ƒ bá»‹ há»ng. Báº¡n Ä‘Ã£ nháº­n má»™t cáº£nh "
+ "bÃ¡o rá»“i."
Index: openafs/src/packaging/MacOS/InstallationCheck
diff -c /dev/null openafs/src/packaging/MacOS/InstallationCheck:1.1.4.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/MacOS/InstallationCheck	Sat Oct  8 16:54:03 2005
***************
*** 0 ****
--- 1,10 ----
+ #!/bin/sh
+ majorvers=`uname -r | sed 's/\..*//'`
+ echo "InstallationCheck: os release is $majorvers"
+ if [ $majorvers -ne 8 ]; then
+ echo "InstallationCheck: not ok"
+    exit 112
+ fi
+ 
+ echo "InstallationCheck: ok"
+ exit 0
Index: openafs/src/packaging/MacOS/InstallationCheck.strings
diff -c /dev/null openafs/src/packaging/MacOS/InstallationCheck.strings:1.1.4.2
*** /dev/null	Fri Apr 14 09:27:31 2006
--- openafs/src/packaging/MacOS/InstallationCheck.strings	Sat Oct  8 16:54:03 2005
***************
*** 0 ****
--- 1 ----
+ "16" = "This OpenAFS release requires Tiger (10.4)"
Index: openafs/src/packaging/MacOS/Makefile
diff -c openafs/src/packaging/MacOS/Makefile:1.2 openafs/src/packaging/MacOS/Makefile:1.2.2.1
*** openafs/src/packaging/MacOS/Makefile:1.2	Fri Oct 24 02:26:13 2003
--- openafs/src/packaging/MacOS/Makefile	Thu Mar  9 01:41:53 2006
***************
*** 19,33 ****
  # 
  # @APPLE_LICENSE_HEADER_END@
  
! AFSINCLUDE = /Library/OpenAFS/Tools/include
! CFLAGS = -O -I$(AFSINCLUDE)
  LIBS = -framework Foundation
  ALL = afssettings
  
  all: $(ALL)
  
! afssettings : afssettings.m
  	cc $(CFLAGS) -o $@ $^ $(LIBS)
  
  clean:
! 	@rm -f *.o $(ALL)
--- 19,37 ----
  # 
  # @APPLE_LICENSE_HEADER_END@
  
! # We assume the either we are in src/packaging/MacOS (so ../.. should work
! # with #include <afs/sysctl.h>, or we are in a directory where configure
! # was run, so the afs/sysctl.h should be in the include subdirectory
! AFSINCLUDE = -I../.. -Iinclude
! CFLAGS = -Os $(AFSINCLUDE) $(ARCHFLAGS)
  LIBS = -framework Foundation
  ALL = afssettings
+ DIR = $(shell dirname $(MAKEFILE_LIST))
  
  all: $(ALL)
  
! afssettings : $(DIR)/afssettings.m
  	cc $(CFLAGS) -o $@ $^ $(LIBS)
  
  clean:
! 	@rm -f $(ALL)
Index: openafs/src/packaging/MacOS/OpenAFS.Info.plist
diff -c openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.15.2.1 openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.17
*** openafs/src/packaging/MacOS/OpenAFS.Info.plist:1.2.2.15.2.1	Thu Oct 20 17:13:09 2005
--- openafs/src/packaging/MacOS/OpenAFS.Info.plist	Mon Apr 10 16:29:43 2006
***************
*** 3,15 ****
  <plist version="1.0">
  <dict>
  	<key>CFBundleGetInfoString</key>
! 	<string>OpenAFS 1.4.0</string>
  	<key>CFBundleIdentifier</key>
  	<string>org.openafs.OpenAFS.pkg</string>
  	<key>CFBundleName</key>
  	<string>OpenAFS</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.0</string>
  	<key>IFMajorVersion</key>
  	<integer>1</integer>
  	<key>IFMinorVersion</key>
--- 3,15 ----
  <plist version="1.0">
  <dict>
  	<key>CFBundleGetInfoString</key>
! 	<string>OpenAFS 1.4.1</string>
  	<key>CFBundleIdentifier</key>
  	<string>org.openafs.OpenAFS.pkg</string>
  	<key>CFBundleName</key>
  	<string>OpenAFS</string>
  	<key>CFBundleShortVersionString</key>
! 	<string>1.4.1</string>
  	<key>IFMajorVersion</key>
  	<integer>1</integer>
  	<key>IFMinorVersion</key>
Index: openafs/src/packaging/MacOS/OpenAFS.info
diff -c openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.20.2.3 openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.31
*** openafs/src/packaging/MacOS/OpenAFS.info:1.1.4.20.2.3	Thu Oct 20 17:13:09 2005
--- openafs/src/packaging/MacOS/OpenAFS.info	Mon Apr 10 16:29:43 2006
***************
*** 1,5 ****
  Title OpenAFS
! Version 1.4.0
  Description The OpenAFS distributed filesystem. This package installs an almost-ready-to-run client for OpenAFS. see http://www.openafs.org for more information.
  DefaultLocation /
  Diskname (null)
--- 1,5 ----
  Title OpenAFS
! Version 1.4.1
  Description The OpenAFS distributed filesystem. This package installs an almost-ready-to-run client for OpenAFS. see http://www.openafs.org for more information.
  DefaultLocation /
  Diskname (null)
Index: openafs/src/packaging/MacOS/OpenAFS.post_install
diff -c openafs/src/packaging/MacOS/OpenAFS.post_install:1.3.2.1 openafs/src/packaging/MacOS/OpenAFS.post_install:1.3.2.3
*** openafs/src/packaging/MacOS/OpenAFS.post_install:1.3.2.1	Sun Apr  3 15:14:36 2005
--- openafs/src/packaging/MacOS/OpenAFS.post_install	Thu Mar 23 11:08:34 2006
***************
*** 47,53 ****
  fi
  
  # upgrading between 2 post-1.2.7 releases (or the testing case)
! if [ -f CellServDB.master.last ]; then
    if cmp -s CellServDB.master.last CellServDB.master ; then
      echo No CellServDB updates
      done=1
--- 47,53 ----
  fi
  
  # upgrading between 2 post-1.2.7 releases (or the testing case)
! if [ -f CellServDB.master.last -a  -f CellServDB ]; then
    if cmp -s CellServDB.master.last CellServDB.master ; then
      echo No CellServDB updates
      done=1
***************
*** 73,79 ****
      # this is a new install, or an upgrade from pre-1.2.7
      echo "Installing new CellServDB"
      cp CellServDB.master CellServDB.master.last
!     cp CellServDB.master CellServDB
    fi
  fi
  
--- 73,81 ----
      # this is a new install, or an upgrade from pre-1.2.7
      echo "Installing new CellServDB"
      cp CellServDB.master CellServDB.master.last
!     if [ ! -e CellServDB ]; then
! 	cp CellServDB.master CellServDB
!     fi
    fi
  fi
  
Index: openafs/src/packaging/MacOS/OpenAFS.pre_upgrade
diff -c openafs/src/packaging/MacOS/OpenAFS.pre_upgrade:1.1 openafs/src/packaging/MacOS/OpenAFS.pre_upgrade:1.1.4.1
*** openafs/src/packaging/MacOS/OpenAFS.pre_upgrade:1.1	Mon Aug 26 16:24:11 2002
--- openafs/src/packaging/MacOS/OpenAFS.pre_upgrade	Thu Mar 23 11:08:34 2006
***************
*** 22,24 ****
--- 22,26 ----
      rm -f config/afsd.options
    fi
  fi
+ 
+ /Library/StartupItems/OpenAFS/OpenAFS stop
Index: openafs/src/packaging/MacOS/ReadMe.rtf
diff -c openafs/src/packaging/MacOS/ReadMe.rtf:1.2.2.1 openafs/src/packaging/MacOS/ReadMe.rtf:1.2.2.4
*** openafs/src/packaging/MacOS/ReadMe.rtf:1.2.2.1	Sun Apr  3 15:14:36 2005
--- openafs/src/packaging/MacOS/ReadMe.rtf	Mon Apr 10 16:29:43 2006
***************
*** 1,13 ****
! {\rtf1\mac\ansicpg10000\cocoartf102
  {\fonttbl\f0\fswiss\fcharset77 Helvetica;}
  {\colortbl;\red255\green255\blue255;}
  \margl1440\margr1440\vieww9000\viewh9000\viewkind0
  \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
  
! \f0\fs20 \cf0 This release of OpenAFS is known to be compatible with MacOS 10.3 through 10.3.8.\
  \
  Select a client cell name by editing /var/db/openafs/etc/ThisCell\
  \
  The included afssettings program is distributed under the Apple Public Source License, version 2.0. See http://www.opensource.apple.com/apsl/2.0.txt or the included file 2.0.txt.\
  \
! Reboot when all of this is done.}
\ No newline at end of file
--- 1,13 ----
! {\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf100
  {\fonttbl\f0\fswiss\fcharset77 Helvetica;}
  {\colortbl;\red255\green255\blue255;}
  \margl1440\margr1440\vieww9000\viewh9000\viewkind0
  \pard\tx1440\tx2880\tx4320\tx5760\tx7200\ql\qnatural
  
! \f0\fs20 \cf0 This release of OpenAFS is targeted at MacOS 10.4.x. 
  \
  Select a client cell name by editing /var/db/openafs/etc/ThisCell\
  \
  The included afssettings program is distributed under the Apple Public Source License, version 2.0. See http://www.opensource.apple.com/apsl/2.0.txt or the included file 2.0.txt.\
  \
! Reboot when all of this is done.}
Index: openafs/src/packaging/MacOS/afssettings.m
diff -c openafs/src/packaging/MacOS/afssettings.m:1.2 openafs/src/packaging/MacOS/afssettings.m:1.2.2.1
*** openafs/src/packaging/MacOS/afssettings.m:1.2	Fri Oct 24 02:26:13 2003
--- openafs/src/packaging/MacOS/afssettings.m	Thu Mar  9 01:41:53 2006
***************
*** 1,5 ****
  /*
!  * Copyright (c) 2003 Apple Computer, Inc. All rights reserved.
   *
   * @APPLE_LICENSE_HEADER_START@
   * 
--- 1,5 ----
  /*
!  * Copyright (c) 2003, 2006 Apple Computer, Inc. All rights reserved.
   *
   * @APPLE_LICENSE_HEADER_START@
   * 
***************
*** 52,57 ****
--- 52,59 ----
      {@"Darwin14", AFS_SC_DARWIN_14, TypeNode, NULL},
      {@"Darwin60", AFS_SC_DARWIN_60, TypeNode, NULL},
      {@"Darwin70", AFS_SC_DARWIN_70, TypeNode, NULL},
+     {@"Darwin80", AFS_SC_DARWIN_80, TypeNode, NULL},
+     {@"Darwin90", AFS_SC_DARWIN_90, TypeNode, NULL},
      {NULL, 0, 0, NULL}
  };
  Setting s_first[] = {
***************
*** 79,90 ****
      int i;
  
      len = sizeof(max);
!     if(sysctl(oidmax, 3, &max, &len, NULL, NULL) < 0)
  	err(1, "sysctl VFS_MAXTYPENUM");
      for(i = max; --i >= 0; ) {
  	oidvfs[3] = i;
  	len = sizeof(conf);
! 	if(sysctl(oidvfs, 4, &conf, &len, NULL, NULL) < 0)
  	    continue;
  	if(strcmp("afs", conf.vfc_name) == 0) {
  	    s_top.selector = conf.vfc_typenum;
--- 81,92 ----
      int i;
  
      len = sizeof(max);
!     if(sysctl(oidmax, 3, &max, &len, NULL, 0) < 0)
  	err(1, "sysctl VFS_MAXTYPENUM");
      for(i = max; --i >= 0; ) {
  	oidvfs[3] = i;
  	len = sizeof(conf);
! 	if(sysctl(oidvfs, 4, &conf, &len, NULL, 0) < 0)
  	    continue;
  	if(strcmp("afs", conf.vfc_name) == 0) {
  	    s_top.selector = conf.vfc_typenum;
Index: openafs/src/packaging/MacOS/buildpkg.sh
diff -c openafs/src/packaging/MacOS/buildpkg.sh:1.4.2.1 openafs/src/packaging/MacOS/buildpkg.sh:1.4.2.9
*** openafs/src/packaging/MacOS/buildpkg.sh:1.4.2.1	Sun Apr  3 15:14:36 2005
--- openafs/src/packaging/MacOS/buildpkg.sh	Thu Mar 23 11:08:34 2006
***************
*** 1,13 ****
  #!/bin/sh
! # Portions Copyright (c) 2003 Apple Computer, Inc.  All rights reserved.
  
  if [ -z "$1" ]; then
!    echo Usage: buildpkg binary-dir
!   exit 1
! fi
! BINDEST=$1
! RESSRC=`pwd`
  majorvers=`uname -r | sed 's/\..*//'`
  if [ $majorvers -ge 7 ]; then
      SEP=:
      package=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
--- 1,33 ----
  #!/bin/sh
! # Portions Copyright (c) 2003, 2006 Apple Computer, Inc.  All rights reserved.
  
  if [ -z "$1" ]; then
!     echo Usage: buildpkg binary-dir
!     echo '  or'
!     echo 'Usage: buildpkg [-firstpass] binary-dir'
!     echo '            (customize pkgroot)'
!     echo '       buildpkg [-secondpass]'
!     exit 1
! fi
! 
! firstpass=yes
! secondpass=yes
! if [ "$1" = "-firstpass" ]; then
!     secondpass=no
!     shift
! elif [ "$1" = "-secondpass" ]; then
!     firstpass=no
!     shift
! fi
! 
! BINDEST=`cd $1 && pwd`
! CURDIR=`pwd`
! RESSRC=`dirname $0`
! RESSRC=`cd $RESSRC && pwd`
  majorvers=`uname -r | sed 's/\..*//'`
+ 
+ PKGROOT=$CURDIR/pkgroot
+ PKGRES=$CURDIR/pkgres
  if [ $majorvers -ge 7 ]; then
      SEP=:
      package=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
***************
*** 31,167 ****
      fi
  fi
  
! if [ -x /usr/bin/curl ]; then
!     /usr/bin/curl -f -O http://www.central.org/dl/cellservdb/CellServDB
! fi
! 
! if [ ! -f CellServDB ]; then
!    echo "A CellServDB file must be placed in the working directory"
!    die=1
! fi
! FILES="ReadMe.rtf License.rtf CellServDB.list OpenAFS.info OpenAFS.post_install OpenAFS.pre_upgrade csrvdbmerge.pl 2.0.txt"
! for f in $FILES; do
!    if [ ! -f $f ]; then
!      echo "file missing: " $f
!      die=1
!    fi
! done
! if [ "$die" ]; then
!   echo "Correct above errors; then retry"
!   exit 1
! fi
! if [ ! -f $BINDEST/bin/translate_et ]; then
!   die=1
! fi
! if [ ! -f $BINDEST/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs ]; then
!   die=1
! fi
! if [ "$die" ]; then
!    echo $BINDEST " is not a valid binary dir. it should be the result of"
!    echo "make dest"
!    exit 1
! fi
  
! PKGROOT=$RESSRC/pkgroot
! PKGRES=$RESSRC/pkgres
! rm -rf pkgroot pkgres
! mkdir -p $PKGROOT $PKGRES
! 
! mkdir $PKGROOT/Library
! chown -R root${SEP}admin $PKGROOT
! chmod -R 775 $PKGROOT
! mkdir $PKGROOT/Library/OpenAFS $PKGROOT/Library/OpenAFS/Tools
! cd $BINDEST
! pax -rw * $PKGROOT/Library/OpenAFS/Tools
! cd $RESSRC
! mkdir $PKGROOT/Library/StartupItems 
! mkdir $PKGROOT/Library/StartupItems/OpenAFS
! cp $BINDEST/root.client/usr/vice/etc/afs.rc  $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS
! chmod a+x $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS
! cp $BINDEST/root.client/usr/vice/etc/StartupParameters.plist  $PKGROOT/Library/StartupItems/OpenAFS/StartupParameters.plist
! chown -R root${SEP}admin $PKGROOT/Library
! chmod -R o-w $PKGROOT/Library
! chmod -R g+w $PKGROOT/Library
! chown -R root${SEP}wheel $PKGROOT/Library/OpenAFS/Tools
! chmod -R og-w $PKGROOT/Library/OpenAFS/Tools
! 
! mkdir $PKGROOT/private $PKGROOT/private/var $PKGROOT/private/var/db
! mkdir $PKGROOT/private/var/db/openafs $PKGROOT/private/var/db/openafs/cache
! mkdir $PKGROOT/private/var/db/openafs/etc $PKGROOT/private/var/db/openafs/etc/config
! cp $RESSRC/CellServDB $PKGROOT/private/var/db/openafs/etc/CellServDB.master
! echo openafs.org > $PKGROOT/private/var/db/openafs/etc/ThisCell.sample
! if [ $majorvers -ge 7 ]; then
!     echo /afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
!     make AFSINCLUDE=$BINDEST/include
!     cp afssettings $PKGROOT/private/var/db/openafs/etc/config
!     cp settings.plist $PKGROOT/private/var/db/openafs/etc/config/settings.plist.orig
!     make clean
! else
!     echo /Network/afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
! fi
! echo '-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
  
! cp -RP $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext $PKGROOT/private/var/db/openafs/etc
  
! chown -R root${SEP}wheel $PKGROOT/private
! chmod -R og-w $PKGROOT/private
! chmod  og-rx $PKGROOT/private/var/db/openafs/cache
  
! mkdir $PKGROOT/usr $PKGROOT/usr/bin $PKGROOT/usr/sbin
  
! BINLIST="fs klog klog.krb pagsh pagsh.krb pts sys tokens tokens.krb unlog unlog.krb"
  
! # Should these be linked into /usr too?
! OTHER_BINLIST="bos cmdebug rxgen translate_et udebug xstat_cm_test xstat_fs_test"
! OTHER_ETCLIST="vos rxdebug"
  
! for f in $BINLIST; do
!    ln -s ../../Library/OpenAFS/Tools/bin/$f $PKGROOT/usr/bin/$f
! done
! ln -s ../../Library/OpenAFS/Tools/bin/kpasswd $PKGROOT/usr/bin/kpasswd.afs
  
! ln -s ../../Library/OpenAFS/Tools/root.client/usr/vice/etc/afsd $PKGROOT/usr/sbin/afsd
  
! chown -R root${SEP}wheel $PKGROOT/usr
! chmod -R og-w $PKGROOT/usr
  
! if [ $majorvers -ge 7 ]; then
!     cp OpenAFS.post_install $PKGRES/postinstall
!     cp OpenAFS.pre_upgrade $PKGRES/preupgrade
!     cp OpenAFS.post_install $PKGRES/postupgrade
!     chmod a+x $PKGRES/postinstall $PKGRES/postupgrade $PKGRES/preupgrade
  else
!     cp OpenAFS.post_install OpenAFS.pre_upgrade $PKGRES
!     cp OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade
!     chmod a+x $PKGRES/OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade $PKGRES/OpenAFS.pre_upgrade
  fi
- cp License.rtf ReadMe.rtf $PKGRES
- cp csrvdbmerge.pl $PKGRES
- chmod a+x $PKGRES/csrvdbmerge.pl
- cp CellServDB.list $PKGRES
- chown -R root${SEP}wheel $PKGRES
- rm -rf OpenAFS.pkg
- if [ $majorvers -ge 7 ]; then
-     echo $package -build -p $RESSRC/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
- 	-i OpenAFS.Info.plist -d OpenAFS.Description.plist
-     $package -build -p $RESSRC/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
- 	-i OpenAFS.Info.plist -d OpenAFS.Description.plist
- else
-     echo $package $PKGROOT OpenAFS.info -r $PKGRES
-     $package $PKGROOT OpenAFS.info -r $PKGRES
-     #old versions of package didn't handle this properly
-     if [ ! -r OpenAFS.pkg/Contents ]; then
- 	    mkdir OpenAFS.pkg/Contents OpenAFS.pkg/Contents/Resources
- 	    mv OpenAFS.pkg/OpenAFS.* OpenAFS.pkg/Contents/Resources
- 	    mv OpenAFS.pkg/*.rtf OpenAFS.pkg/Contents/Resources
- 	    mv OpenAFS.pkg/csrvdbmerge.pl OpenAFS.pkg/Contents/Resources
- 	    mv OpenAFS.pkg/CellServDB* OpenAFS.pkg/Contents/Resources
-     fi
- fi
- 
- rm -rf pkgroot pkgres
- # Unfortunately, sudo sets $USER to root, so I can't chown the 
- #.pkg dir back to myself
- #chown -R $USER OpenAFS.pkg
--- 51,210 ----
      fi
  fi
  
! if [ $firstpass = yes ]; then
!     if [ -x /usr/bin/curl ]; then
! #    /usr/bin/curl -f -O http://www.central.org/dl/cellservdb/CellServDB
! 	/usr/bin/curl -f -O http://dl.central.org/dl/cellservdb/CellServDB
!     fi
  
!     if [ ! -f CellServDB ]; then
!        echo "A CellServDB file must be placed in the working directory"
!        die=1
!     fi
!     FILES="ReadMe.rtf License.rtf CellServDB.list OpenAFS.info OpenAFS.post_install OpenAFS.pre_upgrade csrvdbmerge.pl 2.0.txt"
!     for f in $FILES; do
!        if [ ! -f $RESSRC/$f ]; then
! 	 echo "file missing: " $RESSRC/$f
! 	 die=1
!        fi
!     done
!     if [ "$die" ]; then
!       echo "Correct above errors; then retry"
!       exit 1
!     fi
!     if [ ! -f $BINDEST/bin/translate_et ]; then
!       die=1
!     fi
!     if [ ! -f $BINDEST/root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs ]; then
!       die=1
!     fi
!     if [ "$die" ]; then
!        echo $BINDEST " is not a valid binary dir. it should be the result of"
!        echo "make dest"
!        exit 1
!     fi
  
!     rm -rf $PKGROOT
!     mkdir $PKGROOT
  
!     mkdir -p $PKGROOT/Library
!     chown root${SEP}admin $PKGROOT
!     chmod 775 $PKGROOT $PKGROOT/Library
!     mkdir -p $PKGROOT/Library/OpenAFS/Tools
!     (cd $BINDEST && pax -rw * $PKGROOT/Library/OpenAFS/Tools)
!     cd $RESSRC
!     mkdir -p $PKGROOT/Library/StartupItems/OpenAFS
!     cp $BINDEST/root.client/usr/vice/etc/afs.rc  $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS
!     chmod a+x $PKGROOT/Library/StartupItems/OpenAFS/OpenAFS
!     cp $BINDEST/root.client/usr/vice/etc/StartupParameters.plist  $PKGROOT/Library/StartupItems/OpenAFS/StartupParameters.plist
!     chown -R root${SEP}admin $PKGROOT/Library
!     chmod -R o-w $PKGROOT/Library
!     chmod -R g+w $PKGROOT/Library
!     chown -R root${SEP}wheel $PKGROOT/Library/StartupItems
!     chmod -R og-w $PKGROOT/Library/StartupItems
!     chown -R root${SEP}wheel $PKGROOT/Library/OpenAFS/Tools
!     chmod -R og-w $PKGROOT/Library/OpenAFS/Tools
! 
!     mkdir -p $PKGROOT/private/var/db/openafs/cache
!     mkdir -p $PKGROOT/private/var/db/openafs/etc/config
!     cp $CURDIR/CellServDB $PKGROOT/private/var/db/openafs/etc/CellServDB.master
!     echo openafs.org > $PKGROOT/private/var/db/openafs/etc/ThisCell.sample
!     if [ $majorvers -ge 7 ]; then
! 	echo /afs:/var/db/openafs/cache:30000 > $PKGROOT/private/var/db/openafs/etc/cacheinfo.sample
! 	(cd $CURDIR && \
! 	cp afssettings $PKGROOT/private/var/db/openafs/etc/config )
! 	cp settings.plist $PKGROOT/private/var/db/openafs/etc/config/settings.plist.orig
!     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
  
!     cp -RP $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.kext $PKGROOT/private/var/db/openafs/etc
!     cp -RP $PKGROOT/Library/OpenAFS/Tools/root.client/usr/vice/etc/C $PKGROOT/private/var/db/openafs/etc
  
!     chown -R root${SEP}wheel $PKGROOT/private
!     chmod -R og-w $PKGROOT/private
!     chmod  og-rx $PKGROOT/private/var/db/openafs/cache
  
!     mkdir -p $PKGROOT/usr/bin $PKGROOT/usr/sbin
  
!     BINLIST="fs klog klog.krb pagsh pagsh.krb pts sys tokens tokens.krb unlog unlog.krb aklog"
  
! # Should these be linked into /usr too?
!     OTHER_BINLIST="bos cmdebug rxgen translate_et udebug xstat_cm_test xstat_fs_test"
!     OTHER_ETCLIST="vos rxdebug"
  
!     for f in $BINLIST; do
!        ln -s ../../Library/OpenAFS/Tools/bin/$f $PKGROOT/usr/bin/$f
!     done
!     ln -s ../../Library/OpenAFS/Tools/bin/kpasswd $PKGROOT/usr/bin/kpasswd.afs
! 
!     ln -s ../../Library/OpenAFS/Tools/root.client/usr/vice/etc/afsd $PKGROOT/usr/sbin/afsd
! 
!     mkdir -p $PKGROOT/Library/Kerberos\ Plug-Ins
!     ln -s ../../Library/OpenAFS/Tools/root.client/Library/Kerberos\ Plug-Ins/aklog.loginLogout $PKGROOT/Library/Kerberos\ Plug-Ins/
! 
!     chown -R root${SEP}wheel $PKGROOT/usr
!     chmod -R og-w $PKGROOT/usr
! fi
! 
! if [ $secondpass = yes ]; then
!     rm -rf $PKGRES
!     mkdir $PKGRES
! 
!     cd $RESSRC
!     if [ $majorvers -ge 7 ]; then
! 	cp OpenAFS.post_install $PKGRES/postinstall
! 	cp OpenAFS.pre_upgrade $PKGRES/preupgrade
! 	cp OpenAFS.post_install $PKGRES/postupgrade
! 	if [ $majorvers -ge 8 ]; then
! 	    cp InstallationCheck $PKGRES
! 	    mkdir -p $PKGRES/English.lproj
! 	    cp InstallationCheck $PKGRES/English.lproj
! 	    chmod a+x $PKGRES/InstallationCheck
! 	fi
! 	chmod a+x $PKGRES/postinstall $PKGRES/postupgrade $PKGRES/preupgrade
!     else
! 	cp OpenAFS.post_install OpenAFS.pre_upgrade $PKGRES
! 	cp OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade
! 	chmod a+x $PKGRES/OpenAFS.post_install $PKGRES/OpenAFS.post_upgrade $PKGRES/OpenAFS.pre_upgrade
!     fi
!     cp License.rtf ReadMe.rtf $PKGRES
!     cp csrvdbmerge.pl $PKGRES
!     chmod a+x $PKGRES/csrvdbmerge.pl
!     cp CellServDB.list $PKGRES
!     chown -R root${SEP}wheel $PKGRES
!     rm -rf $CURDIR/OpenAFS.pkg
!     if [ $majorvers -ge 7 ]; then
! 	echo $package -build -p $CURDIR/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
! 	    -i OpenAFS.Info.plist -d OpenAFS.Description.plist
! 	$package -build -p $CURDIR/OpenAFS.pkg -f $PKGROOT -r $PKGRES \
! 	    -i OpenAFS.Info.plist -d OpenAFS.Description.plist
!     else
! 	echo $package $PKGROOT $RESSRC/OpenAFS.info -r $PKGRES
! 	(cd $CURDIR && $package $PKGROOT $RESSRC/OpenAFS.info -r $PKGRES)
! 	#old versions of package didn't handle this properly
! 	if [ ! -r $CURDIR/OpenAFS.pkg/Contents ]; then
! 		mkdir -p $CURDIR/OpenAFS.pkg/Contents/Resources
! 		mv $CURDIR/OpenAFS.pkg/OpenAFS.* $CURDIR/OpenAFS.pkg/Contents/Resources
! 		mv $CURDIR/OpenAFS.pkg/*.rtf $CURDIR/OpenAFS.pkg/Contents/Resources
! 		mv $CURDIR/OpenAFS.pkg/csrvdbmerge.pl $CURDIR/OpenAFS.pkg/Contents/Resources
! 		mv $CURDIR/OpenAFS.pkg/CellServDB* $CURDIR/OpenAFS.pkg/Contents/Resources
! 	fi
!     fi
  
!     rm -rf $PKGROOT $PKGRES
!     mkdir $CURDIR/dmg
!     mv $CURDIR/OpenAFS.pkg $CURDIR/dmg
!     rm -rf $CURDIR/OpenAFS.dmg
!     hdiutil create -srcfolder $CURDIR/dmg -volname OpenAFS -anyowners $CURDIR/OpenAFS.dmg
!     rm -rf $CURDIR/dmg
!     # Unfortunately, sudo sets $USER to root, so I can't chown the 
!     #.pkg dir back to myself
!     #chown -R $USER $CURDIR/OpenAFS.pkg
  else
!     echo "First pass completed.  Customize pkgroot and then run:"
!     echo "    $0 -secondpass"
  fi
Index: openafs/src/packaging/MacOS/universal.sh
diff -c /dev/null openafs/src/packaging/MacOS/universal.sh:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:32 2006
--- openafs/src/packaging/MacOS/universal.sh	Thu Mar 23 11:08:34 2006
***************
*** 0 ****
--- 1,23 ----
+ #!/bin/sh
+ 
+ if [ -z "$1" ]; then
+     echo Usage: universal topdir
+     exit 1
+ fi
+ 
+ BINDEST=`cd $1 && pwd`
+ CURDIR=`pwd`
+ majorvers=`uname -r | sed 's/\..*//'`
+ 
+ DIRLIST="root.server/usr/afs/bin bin etc lib root.client/usr/vice/etc/afsd root.client/usr/vice/etc/afs.kext/Contents/MacOS/afs"
+ mkdir $CURDIR/u_darwin_80
+ 
+ (cd $BINDEST/ppc_darwin_80; tar cf - .)|(cd $CURDIR/u_darwin_80; tar xf -)
+ (cd $BINDEST/x86_darwin_80; tar cf - .)|(cd $CURDIR/u_darwin_80; tar xf -)
+ 
+ for d in $DIRLIST; do
+     for f in `cd $CURDIR/u_darwin_80/dest && find $d -type f -print`; do
+ 	/bin/rm -f $CURDIR/u_darwin_80/dest/$f
+ 	lipo $BINDEST/ppc_darwin_80/dest/$f $BINDEST/x86_darwin_80/dest/$f -create -output $CURDIR/u_darwin_80/dest/$f
+     done
+ done
Index: openafs/src/procmgmt/pmgtprivate.h
diff -c openafs/src/procmgmt/pmgtprivate.h:1.3 openafs/src/procmgmt/pmgtprivate.h:1.3.2.1
*** openafs/src/procmgmt/pmgtprivate.h:1.3	Sun Mar  9 20:59:42 2003
--- openafs/src/procmgmt/pmgtprivate.h	Tue Dec 27 11:18:53 2005
***************
*** 30,35 ****
--- 30,36 ----
  
  extern int pmgt_SignalRaiseLocalByName(const char *signo, int *libSigno);
  extern int pmgt_RedirectNativeSignals(void);
+ extern int pmgt_RestoreNativeSignals(void);
  
  #else
  /* Private process management definitions and declarations for Unix */
Index: openafs/src/procmgmt/procmgmt_nt.c
diff -c openafs/src/procmgmt/procmgmt_nt.c:1.5 openafs/src/procmgmt/procmgmt_nt.c:1.5.2.1
*** openafs/src/procmgmt/procmgmt_nt.c:1.5	Tue Jul 15 19:15:58 2003
--- openafs/src/procmgmt/procmgmt_nt.c	Tue Dec 27 11:18:53 2005
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/procmgmt/procmgmt_nt.c,v 1.5 2003/07/15 23:15:58 shadow Exp $");
  
  #include <afs/stds.h>
  
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/procmgmt/procmgmt_nt.c,v 1.5.2.1 2005/12/27 16:18:53 jaltman Exp $");
  
  #include <afs/stds.h>
  
***************
*** 1363,1369 ****
  	DWORD reason,		/* reason function is being called */
  	LPVOID reserved)
  {				/* reserved for future use */
!     if (reason == DLL_PROCESS_ATTACH) {
  	/* library is being attached to a process */
  	if (PmgtLibraryInitialize()) {
  	    /* failed to initialize library */
--- 1363,1370 ----
  	DWORD reason,		/* reason function is being called */
  	LPVOID reserved)
  {				/* reserved for future use */
!     switch (reason) {
!     case DLL_PROCESS_ATTACH:
  	/* library is being attached to a process */
  	if (PmgtLibraryInitialize()) {
  	    /* failed to initialize library */
***************
*** 1372,1378 ****
  
  	/* disable thread attach/detach notifications */
  	(void)DisableThreadLibraryCalls(dllInstHandle);
      }
- 
-     return TRUE;
  }
--- 1373,1383 ----
  
  	/* disable thread attach/detach notifications */
  	(void)DisableThreadLibraryCalls(dllInstHandle);
+ 	return TRUE;
+     case DLL_PROCESS_DETACH:
+ 	pmgt_RestoreNativeSignals();
+     	return TRUE;
+     default:
+ 	return FALSE;
      }
  }
Index: openafs/src/procmgmt/redirect_nt.c
diff -c openafs/src/procmgmt/redirect_nt.c:1.5 openafs/src/procmgmt/redirect_nt.c:1.5.2.1
*** openafs/src/procmgmt/redirect_nt.c:1.5	Tue Jul 15 19:15:59 2003
--- openafs/src/procmgmt/redirect_nt.c	Tue Dec 27 11:18:53 2005
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/procmgmt/redirect_nt.c,v 1.5 2003/07/15 23:15:59 shadow Exp $");
  
  
  #include <stddef.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/procmgmt/redirect_nt.c,v 1.5.2.1 2005/12/27 16:18:53 jaltman Exp $");
  
  
  #include <stddef.h>
***************
*** 110,112 ****
--- 110,132 ----
  	return 0;
      }
  }
+ 
+ /*
+  * pmgt_RedirectNativeSignals() -- initialize native signal redirection.
+  */
+ int
+ pmgt_RestoreNativeSignals(void)
+ {
+     if (signal(SIGINT, SIG_DFL) == SIG_ERR
+ 	|| signal(SIGILL, SIG_DFL) == SIG_ERR
+ 	|| signal(SIGFPE, SIG_DFL) == SIG_ERR
+ 	|| signal(SIGSEGV, SIG_DFL) == SIG_ERR
+ 	|| signal(SIGTERM, SIG_DFL) == SIG_ERR
+ 	|| signal(SIGABRT, SIG_DFL) == SIG_ERR) {
+ 	errno = EINVAL;
+ 	return -1;
+     } else {
+ 	return 0;
+     }
+ }
+ 
Index: openafs/src/procmgmt/test/Makefile.in
diff -c openafs/src/procmgmt/test/Makefile.in:1.3 openafs/src/procmgmt/test/Makefile.in:1.3.8.1
*** openafs/src/procmgmt/test/Makefile.in:1.3	Thu Nov  1 00:00:35 2001
--- openafs/src/procmgmt/test/Makefile.in	Thu Mar  9 01:41:53 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS = $(DBUG) -I${SRCDIR}/include ${XCFLAGS}
  
  ########################################################################
  # build tests
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS = $(DBUG) -I${SRCDIR}/include ${XCFLAGS} ${ARCHFLAGS}
  
  ########################################################################
  # build tests
Index: openafs/src/ptserver/ptserver.c
diff -c openafs/src/ptserver/ptserver.c:1.21.2.2 openafs/src/ptserver/ptserver.c:1.21.2.4
*** openafs/src/ptserver/ptserver.c:1.21.2.2	Mon Jul 11 15:08:49 2005
--- openafs/src/ptserver/ptserver.c	Tue Feb 21 23:09:30 2006
***************
*** 112,118 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.21.2.2 2005/07/11 19:08:49 shadow Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
--- 112,118 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ptserver.c,v 1.21.2.4 2006/02/22 04:09:30 jaltman Exp $");
  
  #include <afs/stds.h>
  #ifdef	AFS_AIX32_ENV
***************
*** 166,171 ****
--- 166,172 ----
  char *pr_realmName;
  
  int restricted = 0;
+ int rxMaxMTU = -1;
  
  static struct afsconf_cell info;
  
***************
*** 243,248 ****
--- 244,250 ----
      sigaction(SIGABRT, &nsa, NULL);
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
+     osi_audit_init();
      osi_audit(PTS_StartEvent, 0, AUD_END);
  
      /* Initialize dirpaths */
***************
*** 348,353 ****
--- 350,369 ----
  	    } else
  		printf("Warning: auditlog %s not writable, ignored.\n", fileName);
  	}
+ 	else if (!strncmp(arg, "-rxmaxmtu", alen)) {
+ 	    if ((a + 1) >= argc) {
+ 		fprintf(stderr, "missing argument for -rxmaxmtu\n");
+ 		PT_EXIT(1);
+ 	    }
+ 	    rxMaxMTU = atoi(argv[++a]);
+ 	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) ||
+ 		 (rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
+ 		printf("rxMaxMTU %d% invalid; must be between %d-%d\n",
+ 			rxMaxMTU, RX_MIN_PACKET_SIZE,
+ 			RX_MAX_PACKET_DATA_SIZE);
+ 		PT_EXIT(1);
+ 	    }
+ 	} 
  	else if (*arg == '-') {
  	    /* hack in help flag support */
  
***************
*** 358,364 ****
  		   "[-syslog[=FACILITY]] "
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-groupdepth <depth>] "
! 		   "[-restricted] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
  		   "[-help]\n");
--- 374,380 ----
  		   "[-syslog[=FACILITY]] "
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-groupdepth <depth>] "
! 		   "[-restricted] [-rxmaxmtu <bytes>]"
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
  		   "[-help]\n");
***************
*** 367,373 ****
  		   "[-auditlog <log path>] "
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] "
  		   "[-groupdepth <depth>] " "[-help]\n");
  #endif
  #else
--- 383,389 ----
  		   "[-auditlog <log path>] "
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] [-rxmaxmtu <bytes>]"
  		   "[-groupdepth <depth>] " "[-help]\n");
  #endif
  #else
***************
*** 378,390 ****
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] "
  		   "[-help]\n");
  #else /* AFS_NT40_ENV */
  	    printf("Usage: ptserver [-database <db path>] "
  		   "[-auditlog <log path>] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] "
  		   "[-p <number of processes>] [-rebuild] " "[-help]\n");
  #endif
  #endif
--- 394,406 ----
  		   "[-p <number of processes>] [-rebuild] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] [-rxmaxmtu <bytes>]"
  		   "[-help]\n");
  #else /* AFS_NT40_ENV */
  	    printf("Usage: ptserver [-database <db path>] "
  		   "[-auditlog <log path>] "
  		   "[-default_access default_user_access default_group_access] "
! 		   "[-restricted] [-rxmaxmtu <bytes>]"
  		   "[-p <number of processes>] [-rebuild] " "[-help]\n");
  #endif
  #endif
***************
*** 498,503 ****
--- 514,523 ----
      /* Disable jumbograms */
      rx_SetNoJumbo();
  
+     if (rxMaxMTU != -1) {
+ 	rx_SetMaxMTU(rxMaxMTU);
+     }
+ 
      tservice =
  	rx_NewService(0, PRSRV, "Protection Server", sc, 3,
  		      PR_ExecuteRequest);
Index: openafs/src/ptserver/ubik.c
diff -c openafs/src/ptserver/ubik.c:1.7 openafs/src/ptserver/ubik.c:1.7.2.1
*** openafs/src/ptserver/ubik.c:1.7	Mon Dec  8 00:50:39 2003
--- openafs/src/ptserver/ubik.c	Thu Mar  9 01:41:54 2006
***************
*** 1,10 ****
! /* $Id: ubik.c,v 1.7 2003/12/08 05:50:39 shadow Exp $ */
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ubik.c,v 1.7 2003/12/08 05:50:39 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
--- 1,10 ----
! /* $Id: ubik.c,v 1.7.2.1 2006/03/09 06:41:54 shadow Exp $ */
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ptserver/ubik.c,v 1.7.2.1 2006/03/09 06:41:54 shadow Exp $");
  
  #include <sys/types.h>
  #include <netinet/in.h>
***************
*** 46,52 ****
  	thdr.version.epoch = htonl(2);
  	thdr.version.counter = htonl(0);
  	thdr.magic = htonl(UBIK_MAGIC);
! 	thdr.size = htonl(HDRSIZE);
  	lseek(dbase_fd, 0, 0);
  	write(dbase_fd, &thdr, sizeof(thdr));
  	fsync(dbase_fd);
--- 46,52 ----
  	thdr.version.epoch = htonl(2);
  	thdr.version.counter = htonl(0);
  	thdr.magic = htonl(UBIK_MAGIC);
! 	thdr.size = htons(HDRSIZE);
  	lseek(dbase_fd, 0, 0);
  	write(dbase_fd, &thdr, sizeof(thdr));
  	fsync(dbase_fd);
Index: openafs/src/rx/Makefile.in
diff -c openafs/src/rx/Makefile.in:1.15 openafs/src/rx/Makefile.in:1.15.2.1
*** openafs/src/rx/Makefile.in:1.15	Sat Jan 11 02:34:49 2003
--- openafs/src/rx/Makefile.in	Thu Mar  9 01:41:55 2006
***************
*** 8,14 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} -DRXDEBUG
  
  #
  # Generic xdr objects (or, at least, xdr stuff that's not newly defined for rx).
--- 8,14 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS} -DRXDEBUG
  
  #
  # Generic xdr objects (or, at least, xdr stuff that's not newly defined for rx).
Index: openafs/src/rx/rx.c
diff -c openafs/src/rx/rx.c:1.58.2.28.2.1 openafs/src/rx/rx.c:1.58.2.30
*** openafs/src/rx/rx.c:1.58.2.28.2.1	Sat Oct  8 00:01:00 2005
--- openafs/src/rx/rx.c	Tue Nov 29 02:01:50 2005
***************
*** 17,23 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.28.2.1 2005/10/08 04:01:00 jaltman Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
--- 17,23 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx.c,v 1.58.2.30 2005/11/29 07:01:50 jaltman Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
***************
*** 2851,2861 ****
  	np = rxi_ReceiveAckPacket(call, np, 1);
  	break;
      case RX_PACKET_TYPE_ABORT:
! 	/* An abort packet: reset the connection, passing the error up to
! 	 * the user */
  	/* What if error is zero? */
  	rxi_CallError(call, ntohl(*(afs_int32 *) rx_DataOf(np)));
! 	break;
      case RX_PACKET_TYPE_BUSY:
  	/* XXXX */
  	break;
--- 2851,2865 ----
  	np = rxi_ReceiveAckPacket(call, np, 1);
  	break;
      case RX_PACKET_TYPE_ABORT:
! 	/* An abort packet: reset the call, passing the error up to the user. */
  	/* What if error is zero? */
+ 	/* What if the error is -1? the application will treat it as a timeout. */
  	rxi_CallError(call, ntohl(*(afs_int32 *) rx_DataOf(np)));
! 	MUTEX_EXIT(&call->lock);
! 	MUTEX_ENTER(&conn->conn_data_lock);
! 	conn->refCount--;
! 	MUTEX_EXIT(&conn->conn_data_lock);
! 	return np;		/* xmitting; drop packet */
      case RX_PACKET_TYPE_BUSY:
  	/* XXXX */
  	break;
***************
*** 2877,2883 ****
--- 2881,2890 ----
  	    rxi_SetAcksInTransmitQueue(call);
  	    break;
  #else /* RX_ENABLE_LOCKS */
+ 	    MUTEX_EXIT(&call->lock);
+ 	    MUTEX_ENTER(&conn->conn_data_lock);
  	    conn->refCount--;
+ 	    MUTEX_EXIT(&conn->conn_data_lock);
  	    return np;		/* xmitting; drop packet */
  #endif /* RX_ENABLE_LOCKS */
  	}
Index: openafs/src/rx/rx_clock.h
diff -c openafs/src/rx/rx_clock.h:1.13.2.1 openafs/src/rx/rx_clock.h:1.13.2.3
*** openafs/src/rx/rx_clock.h:1.13.2.1	Wed Apr 13 22:10:53 2005
--- openafs/src/rx/rx_clock.h	Mon Feb 27 15:57:39 2006
***************
*** 14,20 ****
  #define _CLOCK_
  
  #ifdef	KERNEL
! #if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV)
  #include "h/systm.h"
  #include "h/time.h"
  #endif /* System V */
--- 14,20 ----
  #define _CLOCK_
  
  #ifdef	KERNEL
! #if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
  #include "h/systm.h"
  #include "h/time.h"
  #endif /* System V */
***************
*** 99,105 ****
         (cv)->usec = (afs_int32)tv.tv_usec;             \
      END
  #else /* defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) */
! #define clock_GetTime(cv) osi_GetTime((struct timeval *)cv)
  #endif /* defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) */
  #endif
  #define clock_Sec() osi_Time()
--- 99,105 ----
         (cv)->usec = (afs_int32)tv.tv_usec;             \
      END
  #else /* defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) */
! #define clock_GetTime(cv) osi_GetTime((osi_timeval_t *)(cv))
  #endif /* defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL) */
  #endif
  #define clock_Sec() osi_Time()
Index: openafs/src/rx/rx_clock_nt.c
diff -c openafs/src/rx/rx_clock_nt.c:1.9.2.2 openafs/src/rx/rx_clock_nt.c:1.9.2.3
*** openafs/src/rx/rx_clock_nt.c:1.9.2.2	Thu Sep 15 22:28:50 2005
--- openafs/src/rx/rx_clock_nt.c	Sun Mar  5 22:05:02 2006
***************
*** 14,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_clock_nt.c,v 1.9.2.2 2005/09/16 02:28:50 jaltman Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <stdio.h>
--- 14,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_clock_nt.c,v 1.9.2.3 2006/03/06 03:05:02 jaltman Exp $");
  
  #ifdef AFS_NT40_ENV
  #include <stdio.h>
***************
*** 50,59 ****
  	OutputDebugString("No High Performance clock, exiting.\n");
  	exit(1);
      }
- 
      clockInitialized = 1;
!     (void)QueryPerformanceCounter(&rxi_clock0);
! 
      clock_UpdateTime();
  }
  
--- 50,57 ----
  	OutputDebugString("No High Performance clock, exiting.\n");
  	exit(1);
      }
      clockInitialized = 1;
!     
      clock_UpdateTime();
  }
  
Index: openafs/src/rx/rx_kcommon.c
diff -c openafs/src/rx/rx_kcommon.c:1.44.2.7 openafs/src/rx/rx_kcommon.c:1.44.2.11
*** openafs/src/rx/rx_kcommon.c:1.44.2.7	Fri Sep 16 14:15:09 2005
--- openafs/src/rx/rx_kcommon.c	Wed Mar  8 00:05:51 2006
***************
*** 15,21 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_kcommon.c,v 1.44.2.7 2005/09/16 18:15:09 jaltman Exp $");
  
  #include "rx/rx_kcommon.h"
  
--- 15,21 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_kcommon.c,v 1.44.2.11 2006/03/08 05:05:51 jaltman Exp $");
  
  #include "rx/rx_kcommon.h"
  
***************
*** 26,33 ****
  #include "afsint.h"
  
  #ifndef RXK_LISTENER_ENV
! int (*rxk_PacketArrivalProc) (register struct rx_packet * ahandle, register struct sockaddr_in * afrom, char *arock, afs_int32 asize);	/* set to packet allocation procedure */
! int (*rxk_GetPacketProc) (char **ahandle, int asize);
  #endif
  
  osi_socket *rxk_NewSocketHost(afs_uint32 ahost, short aport);
--- 26,33 ----
  #include "afsint.h"
  
  #ifndef RXK_LISTENER_ENV
! int (*rxk_PacketArrivalProc) (struct rx_packet * ahandle, struct sockaddr_in * afrom, struct socket *arock, afs_int32 asize);	/* set to packet allocation procedure */
! int (*rxk_GetPacketProc) (struct rx_packet **ahandle, int asize);
  #endif
  
  osi_socket *rxk_NewSocketHost(afs_uint32 ahost, short aport);
***************
*** 45,50 ****
--- 45,55 ----
  static int numMyNetAddrs = 0;
  #endif
  
+ #if defined(AFS_DARWIN80_ENV)
+ #define sobind sock_bind
+ #define soclose sock_close
+ #endif
+ 
  /* add a port to the monitored list, port # is in network order */
  static int
  rxk_AddPort(u_short aport, char *arock)
***************
*** 126,134 ****
      if (!msg)
  	msg = "Unknown AFS panic";
  
!     dpf((msg, a1, a2, a3));
  #ifdef AFS_LINUX24_ENV
!     BUG();
  #else
      panic(msg);
  #endif
--- 131,139 ----
      if (!msg)
  	msg = "Unknown AFS panic";
  
!     printf(msg, a1, a2, a3);
  #ifdef AFS_LINUX24_ENV
!     * ((char *) 0) = 0; 
  #else
      panic(msg);
  #endif
***************
*** 284,292 ****
  #ifndef RXK_LISTENER_ENV
  /* asize includes the Rx header */
  static int
! MyPacketProc(char **ahandle, int asize)
  {
!     register struct rx_packet *tp;
  
      /* If this is larger than we expected, increase rx_maxReceiveDataSize */
      /* If we can't scrounge enough cbufs, then we have to drop the packet,
--- 289,297 ----
  #ifndef RXK_LISTENER_ENV
  /* asize includes the Rx header */
  static int
! MyPacketProc(struct rx_packet **ahandle, int asize)
  {
!     struct rx_packet *tp;
  
      /* If this is larger than we expected, increase rx_maxReceiveDataSize */
      /* If we can't scrounge enough cbufs, then we have to drop the packet,
***************
*** 323,342 ****
      if (!tp)
  	return -1;
      /* otherwise we have a packet, set appropriate values */
!     *ahandle = (char *)tp;
      return 0;
  }
  
  static int
! MyArrivalProc(register struct rx_packet *ahandle,
! 	      register struct sockaddr_in *afrom, char *arock,
  	      afs_int32 asize)
  {
      /* handle basic rx packet */
      ahandle->length = asize - RX_HEADER_SIZE;
      rxi_DecodePacketHeader(ahandle);
      ahandle =
! 	rxi_ReceivePacket(ahandle, (struct socket *)arock,
  			  afrom->sin_addr.s_addr, afrom->sin_port, NULL,
  			  NULL);
  
--- 328,348 ----
      if (!tp)
  	return -1;
      /* otherwise we have a packet, set appropriate values */
!     *ahandle = tp;
      return 0;
  }
  
  static int
! MyArrivalProc(struct rx_packet *ahandle,
! 	      struct sockaddr_in *afrom,
! 	      struct socket *arock,
  	      afs_int32 asize)
  {
      /* handle basic rx packet */
      ahandle->length = asize - RX_HEADER_SIZE;
      rxi_DecodePacketHeader(ahandle);
      ahandle =
! 	rxi_ReceivePacket(ahandle, arock,
  			  afrom->sin_addr.s_addr, afrom->sin_port, NULL,
  			  NULL);
  
***************
*** 392,398 ****
--- 398,408 ----
  	pp->ifMTU = RX_REMOTE_PACKET_SIZE;
      }
  #else /* AFS_USERSPACE_IP_ADDR */
+ #ifdef AFS_DARWIN80_ENV
+     ifnet_t ifn;
+ #else
      struct ifnet *ifn;
+ #endif
  
  #if !defined(AFS_SGI62_ENV)
      if (numMyNetAddrs == 0)
***************
*** 405,411 ****
  	/* pp->timeout.usec = 0; */
  	pp->ifMTU = MIN(RX_MAX_PACKET_SIZE, rx_MyMaxSendSize);
  #ifdef IFF_POINTOPOINT
! 	if (ifn->if_flags & IFF_POINTOPOINT) {
  	    /* wish we knew the bit rate and the chunk size, sigh. */
  	    pp->timeout.sec = 4;
  	    pp->ifMTU = RX_PP_PACKET_SIZE;
--- 415,421 ----
  	/* pp->timeout.usec = 0; */
  	pp->ifMTU = MIN(RX_MAX_PACKET_SIZE, rx_MyMaxSendSize);
  #ifdef IFF_POINTOPOINT
! 	if (ifnet_flags(ifn) & IFF_POINTOPOINT) {
  	    /* wish we knew the bit rate and the chunk size, sigh. */
  	    pp->timeout.sec = 4;
  	    pp->ifMTU = RX_PP_PACKET_SIZE;
***************
*** 413,420 ****
  #endif /* IFF_POINTOPOINT */
  	/* Diminish the packet size to one based on the MTU given by
  	 * the interface. */
! 	if (ifn->if_mtu > (RX_IPUDP_SIZE + RX_HEADER_SIZE)) {
! 	    rxmtu = ifn->if_mtu - RX_IPUDP_SIZE;
  	    if (rxmtu < pp->ifMTU)
  		pp->ifMTU = rxmtu;
  	}
--- 423,430 ----
  #endif /* IFF_POINTOPOINT */
  	/* Diminish the packet size to one based on the MTU given by
  	 * the interface. */
! 	if (ifnet_mtu(ifn) > (RX_IPUDP_SIZE + RX_HEADER_SIZE)) {
! 	    rxmtu = ifnet_mtu(ifn) - RX_IPUDP_SIZE;
  	    if (rxmtu < pp->ifMTU)
  		pp->ifMTU = rxmtu;
  	}
***************
*** 615,630 ****
      int i = 0;
      int different = 0;
  
-     register struct ifnet *ifn;
      register int rxmtu, maxmtu;
      afs_uint32 addrs[ADDRSPERSITE];
      int mtus[ADDRSPERSITE];
-     struct ifaddr *ifad;	/* ifnet points to a if_addrlist of ifaddrs */
      afs_uint32 ifinaddr;
  
      memset(addrs, 0, sizeof(addrs));
      memset(mtus, 0, sizeof(mtus));
  
  #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
      TAILQ_FOREACH(ifn, &ifnet, if_link) {
  	if (i >= ADDRSPERSITE)
--- 625,677 ----
      int i = 0;
      int different = 0;
  
      register int rxmtu, maxmtu;
      afs_uint32 addrs[ADDRSPERSITE];
      int mtus[ADDRSPERSITE];
      afs_uint32 ifinaddr;
+ #if defined(AFS_DARWIN80_ENV)
+     errno_t t;
+     int cnt=0;
+     ifaddr_t *ifads, ifad;
+     register ifnet_t ifn;
+     struct sockaddr sout;
+     struct sockaddr_in *sin;
+ #else
+     struct ifaddr *ifad;	/* ifnet points to a if_addrlist of ifaddrs */
+     register struct ifnet *ifn;
+ #endif
  
      memset(addrs, 0, sizeof(addrs));
      memset(mtus, 0, sizeof(mtus));
  
+ #if defined(AFS_DARWIN80_ENV)
+     t = ifnet_get_address_list_family(NULL, &ifads, AF_INET);
+     if (t == 0) {
+ 	rxmtu = ifnet_mtu(ifn) - RX_IPUDP_SIZE;
+ 	while((ifads[cnt] != NULL) && cnt < ADDRSPERSITE) {
+ 	    t = ifaddr_address(ifads[cnt], &sout, sizeof(sout));
+ 	    sin = (struct sockaddr_in *)&sout;
+ 	    ifinaddr = ntohl(sin->sin_addr.s_addr);
+ 	    if (myNetAddrs[i] != ifinaddr) {
+ 		different++;
+ 	    }
+ 	    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);
+ 	    }
+ 	    cnt++;
+ 	}
+ 	ifnet_free_address_list(ifads);
+     }
+ #else
  #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
      TAILQ_FOREACH(ifn, &ifnet, if_link) {
  	if (i >= ADDRSPERSITE)
***************
*** 670,675 ****
--- 717,723 ----
  	    }
  	}
      }
+ #endif
  
      rx_maxJumboRecvSize =
  	RX_HEADER_SIZE + rxi_nDgramPackets * RX_JUMBOBUFFERSIZE +
***************
*** 688,706 ****
  
  #if defined(AFS_DARWIN60_ENV) || defined(AFS_XBSD_ENV)
  /* Returns ifnet which best matches address */
  struct ifnet *
  rxi_FindIfnet(afs_uint32 addr, afs_uint32 * maskp)
  {
!     struct sockaddr_in s;
      struct ifaddr *ifad;
  
      s.sin_family = AF_INET;
      s.sin_addr.s_addr = addr;
      ifad = ifa_ifwithnet((struct sockaddr *)&s);
  
      if (ifad && maskp)
  	*maskp = ((struct sockaddr_in *)ifad->ifa_netmask)->sin_addr.s_addr;
      return (ifad ? ifad->ifa_ifp : NULL);
  }
  
  #else /* DARWIN60 || XBSD */
--- 736,774 ----
  
  #if defined(AFS_DARWIN60_ENV) || defined(AFS_XBSD_ENV)
  /* Returns ifnet which best matches address */
+ #ifdef AFS_DARWIN80_ENV
+ ifnet_t
+ #else
  struct ifnet *
+ #endif
  rxi_FindIfnet(afs_uint32 addr, afs_uint32 * maskp)
  {
!     struct sockaddr_in s, sr;
! #ifdef AFS_DARWIN80_ENV
!     ifaddr_t ifad;
! #else
      struct ifaddr *ifad;
+ #endif
  
      s.sin_family = AF_INET;
      s.sin_addr.s_addr = addr;
+ #ifdef AFS_DARWIN80_ENV
+     ifad = ifaddr_withnet((struct sockaddr *)&s);
+ #else
      ifad = ifa_ifwithnet((struct sockaddr *)&s);
+ #endif
  
+ #ifdef AFS_DARWIN80_ENV
+     if (ifad && maskp) {
+ 	ifaddr_netmask(ifad, (struct sockaddr *)&sr, sizeof(sr));
+ 	*maskp = sr.sin_addr.s_addr;
+     }
+     return (ifad ? ifaddr_ifnet(ifad) : NULL);
+ #else
      if (ifad && maskp)
  	*maskp = ((struct sockaddr_in *)ifad->ifa_netmask)->sin_addr.s_addr;
      return (ifad ? ifad->ifa_ifp : NULL);
+ #endif
  }
  
  #else /* DARWIN60 || XBSD */
***************
*** 765,771 ****
--- 833,843 ----
  rxk_NewSocketHost(afs_uint32 ahost, short aport)
  {
      register afs_int32 code;
+ #ifdef AFS_DARWIN80_ENV
+     socket_t newSocket;
+ #else
      struct socket *newSocket;
+ #endif
  #if (!defined(AFS_HPUX1122_ENV) && !defined(AFS_FBSD50_ENV))
      struct mbuf *nam;
  #endif
***************
*** 814,819 ****
--- 886,893 ----
  		    afs_osi_credp, curthread);
  #elif defined(AFS_FBSD40_ENV)
      code = socreate(AF_INET, &newSocket, SOCK_DGRAM, IPPROTO_UDP, curproc);
+ #elif defined(AFS_DARWIN80_ENV)
+     code = sock_socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, NULL, NULL, &newSocket);
  #else
      code = socreate(AF_INET, &newSocket, SOCK_DGRAM, 0);
  #endif /* AFS_HPUX102_ENV */
***************
*** 849,860 ****
--- 923,952 ----
  
      freeb(bindnam);
  #else /* AFS_HPUX110_ENV */
+ #if defined(AFS_DARWIN80_ENV)
+     { 
+        int buflen = 50000;
+        int i,code2;
+        for (i=0;i<2;i++) {
+            code = sock_setsockopt(newSocket, SOL_SOCKET, SO_SNDBUF,
+                                   &buflen, sizeof(buflen));
+            code2 = sock_setsockopt(newSocket, SOL_SOCKET, SO_RCVBUF,
+                                   &buflen, sizeof(buflen));
+            if (!code && !code2)
+                break;
+            if (i == 2)
+ 	      osi_Panic("osi_NewSocket: last attempt to reserve 32K failed!\n");
+            buflen = 32766;
+        }
+     }
+ #else
      code = soreserve(newSocket, 50000, 50000);
      if (code) {
  	code = soreserve(newSocket, 32766, 32766);
  	if (code)
  	    osi_Panic("osi_NewSocket: last attempt to reserve 32K failed!\n");
      }
+ #endif
  #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
  #if defined(AFS_FBSD50_ENV)
      code = sobind(newSocket, (struct sockaddr *)&myaddr, curthread);
***************
*** 1133,1145 ****
  #ifdef AFS_XBSD_ENV
      rxk_ListenerPid = curproc->p_pid;
  #endif /* AFS_FBSD_ENV */
! #if defined(AFS_DARWIN_ENV)
      rxk_ListenerPid = current_proc()->p_pid;
  #endif
  #if defined(RX_ENABLE_LOCKS) && !defined(AFS_SUN5_ENV)
      AFS_GUNLOCK();
  #endif /* RX_ENABLE_LOCKS && !AFS_SUN5_ENV */
- 
      while (afs_termState != AFSOP_STOP_RXK_LISTENER) {
  	if (rxp) {
  	    rxi_RestoreDataBufs(rxp);
--- 1225,1238 ----
  #ifdef AFS_XBSD_ENV
      rxk_ListenerPid = curproc->p_pid;
  #endif /* AFS_FBSD_ENV */
! #ifdef AFS_DARWIN80_ENV
!     rxk_ListenerPid = proc_selfpid();
! #elif defined(AFS_DARWIN_ENV)
      rxk_ListenerPid = current_proc()->p_pid;
  #endif
  #if defined(RX_ENABLE_LOCKS) && !defined(AFS_SUN5_ENV)
      AFS_GUNLOCK();
  #endif /* RX_ENABLE_LOCKS && !AFS_SUN5_ENV */
      while (afs_termState != AFSOP_STOP_RXK_LISTENER) {
  	if (rxp) {
  	    rxi_RestoreDataBufs(rxp);
Index: openafs/src/rx/rx_kernel.h
diff -c openafs/src/rx/rx_kernel.h:1.13 openafs/src/rx/rx_kernel.h:1.13.2.1
*** openafs/src/rx/rx_kernel.h:1.13	Tue Jul 15 19:16:09 2003
--- openafs/src/rx/rx_kernel.h	Wed Oct  5 01:58:42 2005
***************
*** 41,46 ****
--- 41,53 ----
  #define	osi_YieldIfPossible()
  #define	osi_WakeupAndYieldIfPossible(x)	    rx_Wakeup(x)
  
+ #ifndef AFS_DARWIN80_ENV
+ #define ifnet_mtu(x) (x)->if_mtu
+ #define AFS_IFNET_T struct ifnet *
+ #else
+ #define AFS_IFNET_T ifnet_t
+ #endif
+ 
  #include "afs/longc_procs.h"
  
  #endif /* __RX_KERNEL_INCL_ */
Index: openafs/src/rx/rx_packet.c
diff -c openafs/src/rx/rx_packet.c:1.35.2.17 openafs/src/rx/rx_packet.c:1.35.2.24
*** openafs/src/rx/rx_packet.c:1.35.2.17	Thu Sep 15 22:28:50 2005
--- openafs/src/rx/rx_packet.c	Thu Jan 26 15:58:47 2006
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.35.2.17 2005/09/16 02:28:50 jaltman Exp $");
  
  #ifdef KERNEL
  #if defined(UKERNEL)
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_packet.c,v 1.35.2.24 2006/01/26 20:58:47 shadow Exp $");
  
  #ifdef KERNEL
  #if defined(UKERNEL)
***************
*** 71,76 ****
--- 71,77 ----
  #include <sys/socket.h>
  #include <netinet/in.h>
  #endif /* AFS_NT40_ENV */
+ #include "rx_user.h"
  #include "rx_xmit_nt.h"
  #include <stdlib.h>
  #else
***************
*** 114,119 ****
--- 115,123 ----
  				afs_int32 ahost, short aport,
  				afs_int32 istack);
  
+ static int rxi_FreeDataBufsToQueue(struct rx_packet *p, int first, 
+ 				   struct rx_queue * q);
+ 
  /* some rules about packets:
   * 1.  When a packet is allocated, the final iov_buf contains room for
   * a security trailer, but iov_len masks that fact.  If the security
***************
*** 381,394 ****
      register struct rx_packet *c, *nc;
      SPLVAR;
  
      if (!num_pkts) {
! 	queue_Count(q, c, nc, rx_packet, num_pkts);
! 	if (!num_pkts)
! 	    return 0;
      }
  
!     RX_TS_INFO_GET(rx_ts_info);
!     RX_TS_FPQ_CHECKIN2(rx_ts_info, num_pkts, q);
  
      if (rx_ts_info->_FPQ.len > rx_TSFPQLocalMax) {
          NETPRI;
--- 385,406 ----
      register struct rx_packet *c, *nc;
      SPLVAR;
  
+     osi_Assert(num_pkts >= 0);
+     RX_TS_INFO_GET(rx_ts_info);
+ 
      if (!num_pkts) {
! 	for (queue_Scan(q, c, nc, rx_packet), num_pkts++) {
! 	    rxi_FreeDataBufsTSFPQ(c, 1, 0);
! 	}
!     } else {
! 	for (queue_Scan(q, c, nc, rx_packet)) {
! 	    rxi_FreeDataBufsTSFPQ(c, 1, 0);
! 	}
      }
  
!     if (num_pkts) {
! 	RX_TS_FPQ_CHECKIN2(rx_ts_info, num_pkts, q);
!     }
  
      if (rx_ts_info->_FPQ.len > rx_TSFPQLocalMax) {
          NETPRI;
***************
*** 410,435 ****
  int
  rxi_FreePackets(int num_pkts, struct rx_queue *q)
  {
      register struct rx_packet *p, *np;
      SPLVAR;
  
      if (!num_pkts) {
          for (queue_Scan(q, p, np, rx_packet), num_pkts++) {
              RX_FPQ_MARK_FREE(p);
  	}
  	if (!num_pkts)
  	    return 0;
      } else {
          for (queue_Scan(q, p, np, rx_packet)) {
              RX_FPQ_MARK_FREE(p);
  	}
      }
  
      NETPRI;
      MUTEX_ENTER(&rx_freePktQ_lock);
  
      queue_SpliceAppend(&rx_freePacketQueue, q);
!     rx_nFreePackets += num_pkts;
  
      /* Wakeup anyone waiting for packets */
      rxi_PacketsUnWait();
--- 422,464 ----
  int
  rxi_FreePackets(int num_pkts, struct rx_queue *q)
  {
+     struct rx_queue cbs;
      register struct rx_packet *p, *np;
+     int qlen = 0;
      SPLVAR;
  
+     osi_Assert(num_pkts >= 0);
+     queue_Init(&cbs);
+ 
      if (!num_pkts) {
          for (queue_Scan(q, p, np, rx_packet), num_pkts++) {
+ 	    if (p->niovecs > 2) {
+ 		qlen += rxi_FreeDataBufsToQueue(p, 2, &cbs);
+ 	    }
              RX_FPQ_MARK_FREE(p);
  	}
  	if (!num_pkts)
  	    return 0;
      } else {
          for (queue_Scan(q, p, np, rx_packet)) {
+ 	    if (p->niovecs > 2) {
+ 		qlen += rxi_FreeDataBufsToQueue(p, 2, &cbs);
+ 	    }
              RX_FPQ_MARK_FREE(p);
  	}
      }
  
+     if (qlen) {
+ 	queue_SpliceAppend(q, &cbs);
+ 	qlen += num_pkts;
+     } else
+ 	qlen = num_pkts;
+ 
      NETPRI;
      MUTEX_ENTER(&rx_freePktQ_lock);
  
      queue_SpliceAppend(&rx_freePacketQueue, q);
!     rx_nFreePackets += qlen;
  
      /* Wakeup anyone waiting for packets */
      rxi_PacketsUnWait();
***************
*** 777,782 ****
--- 806,835 ----
  }
  #endif /* RX_ENABLE_TSFPQ */
  
+ /* free continuation buffers off a packet into a queue of buffers */
+ static int
+ rxi_FreeDataBufsToQueue(struct rx_packet *p, int first, struct rx_queue * q)
+ {
+     struct iovec *iov;
+     struct rx_packet * cb;
+     int count = 0;
+ 
+     if (first < 2)
+ 	first = 2;
+     for (; first < p->niovecs; first++, count++) {
+ 	iov = &p->wirevec[first];
+ 	if (!iov->iov_base)
+ 	    osi_Panic("rxi_PacketIOVToQueue: unexpected NULL iov");
+ 	cb = RX_CBUF_TO_PACKET(iov->iov_base, p);
+ 	RX_FPQ_MARK_FREE(cb);
+ 	queue_Append(q, cb);
+     }
+     p->length = 0;
+     p->niovecs = 0;
+ 
+     return count;
+ }
+ 
  int
  rxi_FreeDataBufsNoLock(struct rx_packet *p, int first)
  {
***************
*** 1262,1268 ****
  }
  
  #ifndef KERNEL
! 
  /* count the number of used FDs */
  static int
  CountFDs(register int amax)
--- 1315,1324 ----
  }
  
  #ifndef KERNEL
! #ifdef AFS_NT40_ENV	 
! /* Windows does not use file descriptors. */
! #define CountFDs(amax) 0
! #else
  /* count the number of used FDs */
  static int
  CountFDs(register int amax)
***************
*** 1279,1285 ****
      }
      return count;
  }
! 
  #else /* KERNEL */
  
  #define CountFDs(amax) amax
--- 1335,1341 ----
      }
      return count;
  }
! #endif /* AFS_NT40_ENV */
  #else /* KERNEL */
  
  #define CountFDs(amax) amax
***************
*** 1294,1300 ****
   * the data length of the packet is stored in the packet structure.
   * The header is decoded. */
  int
! rxi_ReadPacket(int socket, register struct rx_packet *p, afs_uint32 * host,
  	       u_short * port)
  {
      struct sockaddr_in from;
--- 1350,1356 ----
   * the data length of the packet is stored in the packet structure.
   * The header is decoded. */
  int
! rxi_ReadPacket(osi_socket socket, register struct rx_packet *p, afs_uint32 * host,
  	       u_short * port)
  {
      struct sockaddr_in from;
***************
*** 1551,1557 ****
  #define m_cpytoc(a, b, c, d)  cpytoc(a, b, c, d)
  #define m_cpytoiovec(a, b, c, d, e) cpytoiovec(a, b, c, d, e)
  #else
! #if !defined(AFS_LINUX20_ENV)
  static int
  m_cpytoiovec(struct mbuf *m, int off, int len, struct iovec iovs[], int niovs)
  {
--- 1607,1613 ----
  #define m_cpytoc(a, b, c, d)  cpytoc(a, b, c, d)
  #define m_cpytoiovec(a, b, c, d, e) cpytoiovec(a, b, c, d, e)
  #else
! #if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN80_ENV)
  static int
  m_cpytoiovec(struct mbuf *m, int off, int len, struct iovec iovs[], int niovs)
  {
***************
*** 1607,1613 ****
  #endif /* LINUX */
  #endif /* AFS_SUN5_ENV */
  
! #if !defined(AFS_LINUX20_ENV)
  int
  rx_mb_to_packet(amb, free, hdr_len, data_len, phandle)
  #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX110_ENV)
--- 1663,1669 ----
  #endif /* LINUX */
  #endif /* AFS_SUN5_ENV */
  
! #if !defined(AFS_LINUX20_ENV) && !defined(AFS_DARWIN80_ENV)
  int
  rx_mb_to_packet(amb, free, hdr_len, data_len, phandle)
  #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX110_ENV)
***************
*** 2328,2333 ****
--- 2384,2398 ----
  		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
***************
*** 2548,2554 ****
  	queue_Init(&q);
  
  	/* Free any extra elements in the wirevec */
! 	for (j = MAX(2, i), nb = j - p->niovecs; j < p->niovecs; j++) {
  	    queue_Append(&q,RX_CBUF_TO_PACKET(p->wirevec[j].iov_base, p));
  	}
  	if (nb)
--- 2613,2619 ----
  	queue_Init(&q);
  
  	/* Free any extra elements in the wirevec */
! 	for (j = MAX(2, i), nb = p->niovecs - j; j < p->niovecs; j++) {
  	    queue_Append(&q,RX_CBUF_TO_PACKET(p->wirevec[j].iov_base, p));
  	}
  	if (nb)
Index: openafs/src/rx/rx_prototypes.h
diff -c openafs/src/rx/rx_prototypes.h:1.14.2.10 openafs/src/rx/rx_prototypes.h:1.14.2.14
*** openafs/src/rx/rx_prototypes.h:1.14.2.10	Sun May 29 23:41:45 2005
--- openafs/src/rx/rx_prototypes.h	Thu Jan 26 16:03:11 2006
***************
*** 238,247 ****
  /* old style till varargs */
  #if 0
  void
!   rxi_DebugPrint(char *format, int a1, int a2, int a3, int a4, int a5, int a6,
! 		 int a7, int a8, int a9, int a10, int a11, int a12, int a13,
! 		 int a14, int a15);
  #else
  void rxi_DebugPrint();
  #endif
  
--- 238,250 ----
  /* old style till varargs */
  #if 0
  void
! rxi_DebugPrint(char *format, int a1, int a2, int a3, int a4, int a5, int a6,
!                int a7, int a8, int a9, int a10, int a11, int a12, int a13,
! 	       int a14, int a15);
! void
! rxi_DebugInit(void);
  #else
+ void rxi_DebugInit();
  void rxi_DebugPrint();
  #endif
  
***************
*** 309,318 ****
  
  
  /* rx_kcommon.c */
! extern int (*rxk_PacketArrivalProc) (register struct rx_packet * ahandle,
! 				     register struct sockaddr_in * afrom,
! 				     char *arock, afs_int32 asize);
! extern int (*rxk_GetPacketProc) (char **ahandle, int asize);
  extern afs_int32 afs_termState;
  extern int rxk_initDone;
  
--- 312,323 ----
  
  
  /* rx_kcommon.c */
! struct socket;
! extern int (*rxk_PacketArrivalProc) (struct rx_packet * ahandle,
! 				     struct sockaddr_in * afrom,
! 				     struct socket *arock,
! 				     afs_int32 asize);
! extern int (*rxk_GetPacketProc) (struct rx_packet **ahandle, int asize);
  extern afs_int32 afs_termState;
  extern int rxk_initDone;
  
***************
*** 348,353 ****
--- 353,362 ----
  extern void rxk_Listener(void);
  #ifndef UKERNEL
  extern void afs_rxevent_daemon(void);
+ #endif
+ #if defined(AFS_DARWIN80_ENV) && defined(KERNEL)
+ extern ifnet_t rxi_FindIfnet(afs_uint32 addr, afs_uint32 * maskp);
+ #else
  extern struct ifnet *rxi_FindIfnet(afs_uint32 addr, afs_uint32 * maskp);
  #endif
  extern void osi_StopListener(void);
***************
*** 401,407 ****
  extern void rxi_StartListener(void);
  extern void rx_ServerProc(void);
  extern int rxi_Listen(osi_socket sock);
! extern int rxi_Recvmsg(int socket, struct msghdr *msg_p, int flags);
  extern int rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags);
  
  
--- 410,416 ----
  extern void rxi_StartListener(void);
  extern void rx_ServerProc(void);
  extern int rxi_Listen(osi_socket sock);
! extern int rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags);
  extern int rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags);
  
  
***************
*** 456,462 ****
  extern int rxi_FreePackets(int num_pkts, struct rx_queue *q);
  extern struct rx_packet *rxi_AllocSendPacket(register struct rx_call *call,
  					     int want);
! extern int rxi_ReadPacket(int socket, register struct rx_packet *p,
  			  afs_uint32 * host, u_short * port);
  extern struct rx_packet *rxi_SplitJumboPacket(register struct rx_packet *p,
  					      afs_int32 host, short port,
--- 465,471 ----
  extern int rxi_FreePackets(int num_pkts, struct rx_queue *q);
  extern struct rx_packet *rxi_AllocSendPacket(register struct rx_call *call,
  					     int want);
! extern int rxi_ReadPacket(osi_socket socket, register struct rx_packet *p,
  			  afs_uint32 * host, u_short * port);
  extern struct rx_packet *rxi_SplitJumboPacket(register struct rx_packet *p,
  					      afs_int32 host, short port,
***************
*** 506,512 ****
  extern void rx_ServerProc(void);
  extern void rxi_StartListener(void);
  extern int rxi_Listen(osi_socket sock);
! extern int rxi_Recvmsg(int socket, struct msghdr *msg_p, int flags);
  extern int rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags);
  
  
--- 515,521 ----
  extern void rx_ServerProc(void);
  extern void rxi_StartListener(void);
  extern int rxi_Listen(osi_socket sock);
! extern int rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags);
  extern int rxi_Sendmsg(osi_socket socket, struct msghdr *msg_p, int flags);
  
  
Index: openafs/src/rx/rx_rdwr.c
diff -c openafs/src/rx/rx_rdwr.c:1.21.2.5 openafs/src/rx/rx_rdwr.c:1.21.2.7
*** openafs/src/rx/rx_rdwr.c:1.21.2.5	Sun May 29 23:41:45 2005
--- openafs/src/rx/rx_rdwr.c	Mon Feb 27 19:19:20 2006
***************
*** 15,21 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.21.2.5 2005/05/30 03:41:45 jaltman Exp $");
  
  #ifdef KERNEL
  #ifndef UKERNEL
--- 15,21 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_rdwr.c,v 1.21.2.7 2006/02/28 00:19:20 shadow Exp $");
  
  #ifdef KERNEL
  #ifndef UKERNEL
***************
*** 28,33 ****
--- 28,36 ----
  #include "h/types.h"
  #include "h/time.h"
  #include "h/stat.h"
+ #if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV) 
+ #include "h/systm.h"
+ #endif
  #ifdef	AFS_OSF_ENV
  #include <net/net_globals.h>
  #endif /* AFS_OSF_ENV */
Index: openafs/src/rx/rx_xmit_nt.c
diff -c openafs/src/rx/rx_xmit_nt.c:1.7.2.2 openafs/src/rx/rx_xmit_nt.c:1.7.2.3
*** openafs/src/rx/rx_xmit_nt.c:1.7.2.2	Thu Sep 15 22:28:50 2005
--- openafs/src/rx/rx_xmit_nt.c	Thu Feb 16 16:49:34 2006
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_xmit_nt.c,v 1.7.2.2 2005/09/16 02:28:50 jaltman Exp $");
  
  #if defined(AFS_NT40_ENV) || defined(AFS_DJGPP_ENV)
  
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/rx_xmit_nt.c,v 1.7.2.3 2006/02/16 21:49:34 jaltman Exp $");
  
  #if defined(AFS_NT40_ENV) || defined(AFS_DJGPP_ENV)
  
***************
*** 81,87 ****
  #ifdef AFS_NT40_ENV
  	if (code == SOCKET_ERROR)
  	    code = WSAGetLastError();
! 	if (code == WSAEWOULDBLOCK)
  	    errno = WSAEWOULDBLOCK;
  	else
  	    errno = EIO;
--- 81,87 ----
  #ifdef AFS_NT40_ENV
  	if (code == SOCKET_ERROR)
  	    code = WSAGetLastError();
! 	if (code == WSAEWOULDBLOCK || code == WSAECONNRESET)
  	    errno = WSAEWOULDBLOCK;
  	else
  	    errno = EIO;
***************
*** 137,142 ****
--- 137,143 ----
  	    errno = 0;
  	    break;
  	case WSAEWOULDBLOCK:
+ 	case WSAECONNRESET:
  	    errno = WSAEWOULDBLOCK;
  	    break;
  	case WSAEHOSTUNREACH:
Index: openafs/src/rx/xdr.c
diff -c openafs/src/rx/xdr.c:1.9.2.1 openafs/src/rx/xdr.c:1.9.2.2
*** openafs/src/rx/xdr.c:1.9.2.1	Tue Dec  7 01:10:06 2004
--- openafs/src/rx/xdr.c	Wed Oct  5 01:58:42 2005
***************
*** 35,41 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr.c,v 1.9.2.1 2004/12/07 06:10:06 shadow Exp $");
  
  /*
   * xdr.c, Generic XDR routines implementation.
--- 35,41 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr.c,v 1.9.2.2 2005/10/05 05:58:42 shadow Exp $");
  
  /*
   * xdr.c, Generic XDR routines implementation.
***************
*** 58,63 ****
--- 58,64 ----
  #include <stdio.h>
  #endif
  #include "xdr.h"
+ #include "rx.h"
  
  /*
   * constants specific to the xdr "protocol"
Index: openafs/src/rx/xdr.h
diff -c openafs/src/rx/xdr.h:1.12 openafs/src/rx/xdr.h:1.12.2.1
*** openafs/src/rx/xdr.h:1.12	Mon Jun 21 17:56:37 2004
--- openafs/src/rx/xdr.h	Thu Mar  9 01:41:55 2006
***************
*** 63,69 ****
  #define mem_free(ptr, bsize)	free(ptr)
  #endif
  
! #if defined(AFS_AMD64_LINUX24_ENV) || (defined(KERNEL) && !defined(UKERNEL))
  #define xdr_void afs_xdr_void
  #define xdr_int afs_xdr_int
  #define xdr_u_int afs_xdr_u_int
--- 63,69 ----
  #define mem_free(ptr, bsize)	free(ptr)
  #endif
  
! #if defined(AFS_AMD64_LINUX24_ENV) || defined(AFS_DARWIN_ENV) || (defined(KERNEL) && !defined(UKERNEL))
  #define xdr_void afs_xdr_void
  #define xdr_int afs_xdr_int
  #define xdr_u_int afs_xdr_u_int
***************
*** 88,93 ****
--- 88,94 ----
  #define xdr_vector afs_xdr_vector
  #define xdr_int64 afs_xdr_int64
  #define xdr_uint64 afs_xdr_uint64
+ #define xdr_pointer afs_xdr_pointer
  #endif
  
  #ifdef	KERNEL
Index: openafs/src/rx/xdr_array.c
diff -c openafs/src/rx/xdr_array.c:1.9.2.1 openafs/src/rx/xdr_array.c:1.9.2.2
*** openafs/src/rx/xdr_array.c:1.9.2.1	Tue Dec  7 01:10:06 2004
--- openafs/src/rx/xdr_array.c	Thu Dec 15 10:16:45 2005
***************
*** 28,36 ****
   */
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_array.c,v 1.9.2.1 2004/12/07 06:10:06 shadow Exp $");
  
  #ifndef	NeXT
  
--- 28,37 ----
   */
  #include <afsconfig.h>
  #include <afs/param.h>
+ #include "rx.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_array.c,v 1.9.2.2 2005/12/15 15:16:45 jaltman Exp $");
  
  #ifndef	NeXT
  
Index: openafs/src/rx/xdr_prototypes.h
diff -c openafs/src/rx/xdr_prototypes.h:1.4 openafs/src/rx/xdr_prototypes.h:1.4.2.1
*** openafs/src/rx/xdr_prototypes.h:1.4	Tue Jul 15 19:16:12 2003
--- openafs/src/rx/xdr_prototypes.h	Wed Oct  5 01:58:42 2005
***************
*** 10,22 ****
  #ifndef	_XDR_PROTOTYPES_H
  #define _XDR_PROTOTYPES_H
  
! /* I don't like this, but some of these defs depend on rx.h */
! #if defined(KERNEL) && defined(UKERNEL)
! #include "afs/sysincludes.h"
! #include "rx/rx.h"
! #else
! #include "rx/rx.h"
! #endif
  
  /* xdr_afsuuid.c */
  extern int xdr_afsUUID(XDR * xdrs, afsUUID * objp);
--- 10,16 ----
  #ifndef	_XDR_PROTOTYPES_H
  #define _XDR_PROTOTYPES_H
  
! struct rx_call;
  
  /* xdr_afsuuid.c */
  extern int xdr_afsUUID(XDR * xdrs, afsUUID * objp);
Index: openafs/src/rx/xdr_refernce.c
diff -c openafs/src/rx/xdr_refernce.c:1.6 openafs/src/rx/xdr_refernce.c:1.6.2.1
*** openafs/src/rx/xdr_refernce.c:1.6	Tue Jul 15 19:16:13 2003
--- openafs/src/rx/xdr_refernce.c	Thu Dec 15 00:57:12 2005
***************
*** 28,36 ****
   */
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_refernce.c,v 1.6 2003/07/15 23:16:13 shadow Exp $");
  
  #ifndef	NeXT
  
--- 28,37 ----
   */
  #include <afsconfig.h>
  #include <afs/param.h>
+ #include "rx.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/xdr_refernce.c,v 1.6.2.1 2005/12/15 05:57:12 jaltman Exp $");
  
  #ifndef	NeXT
  
Index: openafs/src/rx/AIX/rx_kmutex.h
diff -c openafs/src/rx/AIX/rx_kmutex.h:1.6.2.1 openafs/src/rx/AIX/rx_kmutex.h:1.6.2.2
*** openafs/src/rx/AIX/rx_kmutex.h:1.6.2.1	Wed Apr 13 22:31:45 2005
--- openafs/src/rx/AIX/rx_kmutex.h	Sat Oct 15 10:24:31 2005
***************
*** 45,51 ****
  #define CV_BROADCAST(_cv)	e_wakeup(_cv)
  typedef simple_lock_data afs_kmutex_t;
  typedef tid_t afs_kcondvar_t;
- #define	osi_rxWakeup(cv)	e_wakeup(cv)
  
  
  #define	LOCK_INIT(a, b)		lock_alloc((void*)(a), LOCK_ALLOC_PIN, 1, 1), \
--- 45,50 ----
Index: openafs/src/rx/AIX/rx_knet.c
diff -c openafs/src/rx/AIX/rx_knet.c:1.11.2.1 openafs/src/rx/AIX/rx_knet.c:1.11.2.2
*** openafs/src/rx/AIX/rx_knet.c:1.11.2.1	Wed Aug 25 03:16:16 2004
--- openafs/src/rx/AIX/rx_knet.c	Sat Oct 15 10:24:31 2005
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/AIX/rx_knet.c,v 1.11.2.1 2004/08/25 07:16:16 shadow Exp $");
  
  #ifdef AFS_AIX41_ENV
  #include "rx/rx_kcommon.h"
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/AIX/rx_knet.c,v 1.11.2.2 2005/10/15 14:24:31 shadow Exp $");
  
  #ifdef AFS_AIX41_ENV
  #include "rx/rx_kcommon.h"
***************
*** 19,33 ****
  static struct protosw parent_proto;	/* udp proto switch */
  
  static void
! rxk_input(am, hlen)
!      register struct mbuf *am;
  {
!     register unsigned short *tsp;
      int hdr;
      struct udphdr *tu;
!     register struct ip *ti;
      struct udpiphdr *tvu;
!     register int i;
      char *phandle;
      long code;
      struct sockaddr_in taddr;
--- 19,32 ----
  static struct protosw parent_proto;	/* udp proto switch */
  
  static void
! rxk_input(struct mbuf *am, int hlen)
  {
!     unsigned short *tsp;
      int hdr;
      struct udphdr *tu;
!     struct ip *ti;
      struct udpiphdr *tvu;
!     int i;
      char *phandle;
      long code;
      struct sockaddr_in taddr;
***************
*** 80,87 ****
  static struct arpcom rxk_bogosity;
  
  /* rxk_kpork -	send pkt over to netwerk kporc for processing */
! rxk_kpork(m)
!      register struct mbuf *m;
  {
      find_input_type(0xdead, m, &rxk_bogosity, 0);
  }
--- 79,85 ----
  static struct arpcom rxk_bogosity;
  
  /* rxk_kpork -	send pkt over to netwerk kporc for processing */
! rxk_kpork(struct mbuf *m)
  {
      find_input_type(0xdead, m, &rxk_bogosity, 0);
  }
***************
*** 108,115 ****
  ip_stripoptions(struct mbuf *m, STRIP_ARG2_TYPE mopt)
  {
      struct ip *ip = mtod(m, struct ip *);
!     register int i;
!     register caddr_t opts;
      int olen;
  
      olen = (ip->ip_hl << 2) - sizeof(struct ip);
--- 106,113 ----
  ip_stripoptions(struct mbuf *m, STRIP_ARG2_TYPE mopt)
  {
      struct ip *ip = mtod(m, struct ip *);
!     int i;
!     caddr_t opts;
      int olen;
  
      olen = (ip->ip_hl << 2) - sizeof(struct ip);
***************
*** 123,138 ****
  }
  
  /* rxk_RX_input -	RX pkt input process */
! rxk_RX_input(am)
!      register struct mbuf *am;
  {
!     register unsigned short *tsp;
      int hdr;
      struct udphdr *tu;
!     register struct ip *ti;
      struct udpiphdr *tvu;
!     register int i;
!     char *phandle;
      long code;
      struct sockaddr_in taddr;
      int tlen;
--- 121,135 ----
  }
  
  /* rxk_RX_input -	RX pkt input process */
! rxk_RX_input(struct mbuf *am)
  {
!     unsigned short *tsp;
      int hdr;
      struct udphdr *tu;
!     struct ip *ti;
      struct udpiphdr *tvu;
!     int i;
!     struct rx_packet *phandle;
      long code;
      struct sockaddr_in taddr;
      int tlen;
***************
*** 245,251 ****
  static
  rxk_isr()
  {
!     register struct mbuf *m;
      IFQ_LOCK_DECL();		/* silly macro has trailing ';'.  Sigh. */
      while (1) {
  	IF_DEQUEUE(&rxk_q, m);
--- 242,248 ----
  static
  rxk_isr()
  {
!     struct mbuf *m;
      IFQ_LOCK_DECL();		/* silly macro has trailing ';'.  Sigh. */
      while (1) {
  	IF_DEQUEUE(&rxk_q, m);
***************
*** 263,269 ****
  static void
  rxk_fasttimo(void)
  {
!     int (*tproc) ();
      struct clock temp;
  
      /* do rx fasttimo processing here */
--- 260,266 ----
  static void
  rxk_fasttimo(void)
  {
!     void (*tproc) (void);
      struct clock temp;
  
      /* do rx fasttimo processing here */
***************
*** 276,282 ****
  void
  rxk_init(void)
  {
!     register struct protosw *pr;
      extern struct protosw *pffindproto();
  
      if (!rxk_initDone && (pr = pffindproto(AF_INET, IPPROTO_UDP, SOCK_DGRAM))) {
--- 273,279 ----
  void
  rxk_init(void)
  {
!     struct protosw *pr;
      extern struct protosw *pffindproto();
  
      if (!rxk_initDone && (pr = pffindproto(AF_INET, IPPROTO_UDP, SOCK_DGRAM))) {
***************
*** 307,314 ****
  void
  shutdown_rxkernel(void)
  {
!     register struct protosw *pr;
!     register int i;
      extern struct protosw *pffindproto();
  
      if (rxk_initDone && (pr = pffindproto(AF_INET, IPPROTO_UDP, SOCK_DGRAM))) {
--- 304,311 ----
  void
  shutdown_rxkernel(void)
  {
!     struct protosw *pr;
!     int i;
      extern struct protosw *pffindproto();
  
      if (rxk_initDone && (pr = pffindproto(AF_INET, IPPROTO_UDP, SOCK_DGRAM))) {
***************
*** 347,356 ****
  osi_NetSend(osi_socket asocket, struct sockaddr_in *addr, struct iovec *dvec,
  	    int nvec, afs_int32 asize, int istack)
  {
!     register struct mbuf *tm, *um;
!     register afs_int32 code;
      struct mbuf *top = 0;
!     register struct mbuf *m, **mp;
      int len, mlen;
      char *tdata;
      caddr_t tpa;
--- 344,353 ----
  osi_NetSend(osi_socket asocket, struct sockaddr_in *addr, struct iovec *dvec,
  	    int nvec, afs_int32 asize, int istack)
  {
!     struct mbuf *tm, *um;
!     afs_int32 code;
      struct mbuf *top = 0;
!     struct mbuf *m, **mp;
      int len, mlen;
      char *tdata;
      caddr_t tpa;
Index: openafs/src/rx/DARWIN/rx_kmutex.c
diff -c openafs/src/rx/DARWIN/rx_kmutex.c:1.3 openafs/src/rx/DARWIN/rx_kmutex.c:1.3.2.1
*** openafs/src/rx/DARWIN/rx_kmutex.c:1.3	Tue Jul 15 19:16:14 2003
--- openafs/src/rx/DARWIN/rx_kmutex.c	Wed Oct  5 01:58:43 2005
***************
*** 17,24 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/DARWIN/rx_kmutex.c,v 1.3 2003/07/15 23:16:14 shadow Exp $");
  
  /*
   * Currently everything is implemented in rx_kmutex.h
   */
--- 17,52 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/DARWIN/rx_kmutex.c,v 1.3.2.1 2005/10/05 05:58:43 shadow Exp $");
  
+ #ifndef AFS_DARWIN80_ENV
  /*
   * Currently everything is implemented in rx_kmutex.h
   */
+ #else
+ #include <afs/sysincludes.h>    /* Standard vendor system headers */
+ #include <afsincludes.h>        /* Afs-based standard headers */
+ #include <afs/afs_stats.h>      /* statistics */
+ #include <sys/malloc.h>
+ #include <sys/namei.h>
+ #include <sys/ubc.h>
+ #if defined(AFS_DARWIN70_ENV)
+ #include <vfs/vfs_support.h>
+ #endif /* defined(AFS_DARWIN70_ENV) */
+ 
+ lck_grp_t * openafs_lck_grp;
+ static lck_grp_attr_t * openafs_lck_grp_attr;
+ void rx_kmutex_setup(void) {
+     openafs_lck_grp_attr= lck_grp_attr_alloc_init();
+     lck_grp_attr_setstat(openafs_lck_grp_attr);
+     
+     openafs_lck_grp = lck_grp_alloc_init("openafs",  openafs_lck_grp_attr);
+     lck_grp_attr_free(openafs_lck_grp_attr);
+     
+ }
+  
+ void rx_kmutex_finish(void) {
+     lck_grp_free(openafs_lck_grp);
+ }
+ 
+ #endif
Index: openafs/src/rx/DARWIN/rx_kmutex.h
diff -c openafs/src/rx/DARWIN/rx_kmutex.h:1.4 openafs/src/rx/DARWIN/rx_kmutex.h:1.4.2.2
*** openafs/src/rx/DARWIN/rx_kmutex.h:1.4	Tue Jul 15 19:16:14 2003
--- openafs/src/rx/DARWIN/rx_kmutex.h	Fri Dec 23 19:10:02 2005
***************
*** 16,22 ****
--- 16,26 ----
  #ifndef _RX_KMUTEX_H_
  #define _RX_KMUTEX_H_
  
+ #ifdef AFS_DARWIN80_ENV
+ #include <kern/locks.h>
+ #else
  #include <sys/lock.h>
+ #endif
  #include <kern/thread.h>
  #include <sys/vm.h>
  
***************
*** 32,61 ****
   * 
   * XXX in darwin, both mach and bsd facilities are available. Should really
   * stick to one or the other (but mach locks don't have a _try.....)
   */
  #define CV_INIT(cv,a,b,c)
  #define CV_DESTROY(cv)
  #ifdef AFS_DARWIN14_ENV
! #define CV_WAIT(cv, lck)    { \
  	                        int isGlockOwner = ISAFS_GLOCK(); \
  	                        if (isGlockOwner) AFS_GUNLOCK();  \
  	                        MUTEX_EXIT(lck);        \
  	                        sleep(cv, PVFS);                \
  	                        if (isGlockOwner) AFS_GLOCK();  \
  	                        MUTEX_ENTER(lck); \
! 	                    }
  
! #define CV_TIMEDWAIT(cv,lck,t)  { \
  	                        int isGlockOwner = ISAFS_GLOCK(); \
  	                        if (isGlockOwner) AFS_GUNLOCK();  \
  	                        MUTEX_EXIT(lck);        \
  	                        tsleep(cv,PVFS, "afs_CV_TIMEDWAIT",t);  \
  	                        if (isGlockOwner) AFS_GLOCK();  \
  	                        MUTEX_ENTER(lck);       \
!                             }
! 
! #define CV_SIGNAL(cv)           wakeup_one(cv)
! #define CV_BROADCAST(cv)        wakeup(cv)
  #else
  #define CV_WAIT(cv, lck)    { \
  	                        int isGlockOwner = ISAFS_GLOCK(); \
--- 36,101 ----
   * 
   * XXX in darwin, both mach and bsd facilities are available. Should really
   * stick to one or the other (but mach locks don't have a _try.....)
+  *
+  * in darwin 8.0, the bsd lock facility is no longer available, and only one
+  * sleep variant is available. Still no lock_try, but we can work around that.
+  * We can't pass the mutex into msleep, even if we didn't need the two mutex 
+  * hack for lock_try emulation, since msleep won't fixup the owner variable
+  * and we'll panic.
   */
  #define CV_INIT(cv,a,b,c)
  #define CV_DESTROY(cv)
  #ifdef AFS_DARWIN14_ENV
! #ifdef AFS_DARWIN80_ENV
! #define CV_WAIT(cv, lck)    do { \
! 	                        int isGlockOwner = ISAFS_GLOCK(); \
! 	                        if (isGlockOwner) AFS_GUNLOCK();  \
! 				osi_Assert((lck)->owner == current_thread()); \
! 				(lck)->owner = (thread_t)0; \
! 				lck_mtx_lock((lck)->meta); \
! 				(lck)->waiters--; \
! 				lck_mtx_unlock((lck)->meta); \
!                                 msleep(cv, (lck)->lock, PDROP|PVFS, "afs_CV_WAIT", NULL); \
! 	                        if (isGlockOwner) AFS_GLOCK();  \
! 	                        MUTEX_ENTER(lck); \
! 	                    } while(0)
! 
! #define CV_TIMEDWAIT(cv,lck,t)  do { \
! 	                        struct timespec ts; \
! 	                        int isGlockOwner = ISAFS_GLOCK(); \
! 	                        ts.ts_sec = t; \
! 	                        ts.ts_nsec = 0; \
! 	                        if (isGlockOwner) AFS_GUNLOCK();  \
! 				osi_Assert((lck)->owner == current_thread()); \
! 				(lck)->owner = (thread_t)0; \
! 				lck_mtx_lock((lck)->meta); \
! 				(lck)->waiters--; \
! 				lck_mtx_unlock((lck)->meta); \
!                                 msleep(cv, (lck)->lock, PDROP|PVFS, "afs_CV_TIMEDWAIT", &ts); \
! 	                        if (isGlockOwner) AFS_GLOCK();  \
! 	                        MUTEX_ENTER(lck);       \
!                             } while(0)
! #else
! #define CV_WAIT(cv, lck)    do { \
  	                        int isGlockOwner = ISAFS_GLOCK(); \
  	                        if (isGlockOwner) AFS_GUNLOCK();  \
  	                        MUTEX_EXIT(lck);        \
  	                        sleep(cv, PVFS);                \
  	                        if (isGlockOwner) AFS_GLOCK();  \
  	                        MUTEX_ENTER(lck); \
! 	                    } while(0)
  
! #define CV_TIMEDWAIT(cv,lck,t)  do { \
  	                        int isGlockOwner = ISAFS_GLOCK(); \
  	                        if (isGlockOwner) AFS_GUNLOCK();  \
  	                        MUTEX_EXIT(lck);        \
  	                        tsleep(cv,PVFS, "afs_CV_TIMEDWAIT",t);  \
  	                        if (isGlockOwner) AFS_GLOCK();  \
  	                        MUTEX_ENTER(lck);       \
!                             } while(0)
! #endif
! #define CV_SIGNAL(cv)           wakeup_one((void *)(cv))
! #define CV_BROADCAST(cv)        wakeup((void *)(cv))
  #else
  #define CV_WAIT(cv, lck)    { \
  	                        int isGlockOwner = ISAFS_GLOCK(); \
***************
*** 82,94 ****
  #define CV_BROADCAST(cv)        thread_wakeup((event_t)(cv))
  #endif
  
  typedef struct {
!     struct lock__bsd__ lock;
      thread_t owner;
  } afs_kmutex_t;
  typedef int afs_kcondvar_t;
  
! #define osi_rxWakeup(cv)        thread_wakeup((event_t)(cv))
  
  #define LOCK_INIT(a,b) \
      do { \
--- 122,207 ----
  #define CV_BROADCAST(cv)        thread_wakeup((event_t)(cv))
  #endif
  
+ #ifdef AFS_DARWIN80_ENV
  typedef struct {
!     lck_mtx_t *meta;
!     int waiters; /* also includes anyone holding the lock */
!     lck_mtx_t *lock;
      thread_t owner;
  } afs_kmutex_t;
  typedef int afs_kcondvar_t;
  
! extern lck_grp_t * openafs_lck_grp;
! 
! #define MUTEX_SETUP() rx_kmutex_setup()
! #define MUTEX_FINISH() rx_kmutex_finish()
! #define LOCKINIT(a) \
!     do { \
!         lck_attr_t *openafs_lck_attr = lck_attr_alloc_init(); \
!         (a) = lck_mtx_alloc_init(openafs_lck_grp, openafs_lck_attr); \
!         lck_attr_free(openafs_lck_attr); \
!     } while(0)
! #define MUTEX_INIT(a,b,c,d) \
!     do { \
!         lck_attr_t *openafs_lck_attr = lck_attr_alloc_init(); \
!         (a)->meta = lck_mtx_alloc_init(openafs_lck_grp, openafs_lck_attr); \
!         (a)->lock = lck_mtx_alloc_init(openafs_lck_grp, openafs_lck_attr); \
!         lck_attr_free(openafs_lck_attr); \
! 	(a)->waiters = 0; \
! 	(a)->owner = (thread_t)0; \
!     } while(0)
! #define MUTEX_DESTROY(a) \
!     do { \
!         lck_mtx_destroy((a)->lock, openafs_lck_grp); \
!         lck_mtx_destroy((a)->meta, openafs_lck_grp); \
! 	(a)->owner = (thread_t)-1; \
!     } while(0)
! #define MUTEX_ENTER(a) \
!     do { \
! 	lck_mtx_lock((a)->meta); \
! 	(a)->waiters++; \
! 	lck_mtx_unlock((a)->meta); \
! 	lck_mtx_lock((a)->lock); \
! 	osi_Assert((a)->owner == (thread_t)0); \
! 	(a)->owner = current_thread(); \
!     } while(0)
! 
! /* acquire main lock before releasing meta lock, so we don't race */
! #define MUTEX_TRYENTER(a) ({ \
!     int _ret; \
!     lck_mtx_lock((a)->meta); \
!     if ((a)->waiters) { \
!        lck_mtx_unlock((a)->meta); \
!        _ret = 0; \
!     } else { \
!        (a)->waiters++; \
!        lck_mtx_lock((a)->lock); \
!        lck_mtx_unlock((a)->meta); \
!        osi_Assert((a)->owner == (thread_t)0); \
!        (a)->owner = current_thread(); \
!        _ret = 1; \
!     } \
!     _ret; \
! })
! 
! #define MUTEX_EXIT(a) \
!     do { \
! 	osi_Assert((a)->owner == current_thread()); \
! 	(a)->owner = (thread_t)0; \
! 	lck_mtx_unlock((a)->lock); \
! 	lck_mtx_lock((a)->meta); \
! 	(a)->waiters--; \
! 	lck_mtx_unlock((a)->meta); \
!     } while(0)
! 
! #undef MUTEX_ISMINE
! #define MUTEX_ISMINE(a) (((afs_kmutex_t *)(a))->owner == current_thread())
! #else
! typedef struct {
!     struct lock__bsd__ lock;
!     thread_t owner;
! } afs_kmutex_t;
! typedef int afs_kcondvar_t;
  
  #define LOCK_INIT(a,b) \
      do { \
***************
*** 112,119 ****
      } while(0);
  #define MUTEX_TRYENTER(a) \
      ( lockmgr(&(a)->lock, LK_EXCLUSIVE|LK_NOWAIT, 0, current_proc()) ? 0 : ((a)->owner = current_thread(), 1) )
- #define xMUTEX_TRYENTER(a) \
-     ( osi_Assert((a)->owner == (thread_t)0), (a)->owner = current_thread(), 1)
  #define MUTEX_EXIT(a) \
      do { \
  	osi_Assert((a)->owner == current_thread()); \
--- 225,230 ----
***************
*** 123,128 ****
--- 234,240 ----
  
  #undef MUTEX_ISMINE
  #define MUTEX_ISMINE(a) (((afs_kmutex_t *)(a))->owner == current_thread())
+ #endif
  
  #undef osirx_AssertMine
  extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg);
Index: openafs/src/rx/DARWIN/rx_knet.c
diff -c openafs/src/rx/DARWIN/rx_knet.c:1.10 openafs/src/rx/DARWIN/rx_knet.c:1.10.2.2
*** openafs/src/rx/DARWIN/rx_knet.c:1.10	Tue Jul 15 19:16:14 2003
--- openafs/src/rx/DARWIN/rx_knet.c	Tue Jan 17 12:09:48 2006
***************
*** 11,30 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/DARWIN/rx_knet.c,v 1.10 2003/07/15 23:16:14 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  
  int
  osi_NetReceive(osi_socket so, struct sockaddr_in *addr, struct iovec *dvec,
  	       int nvecs, int *alength)
  {
      struct socket *asocket = (struct socket *)so;
      struct uio u;
      int i;
      struct iovec iov[RX_MAXIOVECS];
      struct sockaddr *sa = NULL;
      int code;
  
      int haveGlock = ISAFS_GLOCK();
      /*AFS_STATCNT(osi_NetReceive); */
--- 11,43 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/DARWIN/rx_knet.c,v 1.10.2.2 2006/01/17 17:09:48 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  
+ #ifdef AFS_DARWIN80_ENV
+ #define soclose sock_close
+ #endif
+  
  int
  osi_NetReceive(osi_socket so, struct sockaddr_in *addr, struct iovec *dvec,
  	       int nvecs, int *alength)
  {
+ #ifdef AFS_DARWIN80_ENV
+     socket_t asocket = (socket_t)so;
+     struct msghdr msg;
+     struct sockaddr_storage ss;
+     int rlen;
+     mbuf_t m;
+ #else
      struct socket *asocket = (struct socket *)so;
      struct uio u;
+ #endif
      int i;
      struct iovec iov[RX_MAXIOVECS];
      struct sockaddr *sa = NULL;
      int code;
+     size_t resid;
  
      int haveGlock = ISAFS_GLOCK();
      /*AFS_STATCNT(osi_NetReceive); */
***************
*** 34,39 ****
--- 47,105 ----
  
      for (i = 0; i < nvecs; i++)
  	iov[i] = dvec[i];
+     if (haveGlock)
+ 	AFS_GUNLOCK();
+ #if defined(KERNEL_FUNNEL)
+     thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
+ #endif
+ #ifdef AFS_DARWIN80_ENV
+ #if 1
+     resid = *alength;
+     memset(&msg, 0, sizeof(struct msghdr));
+     msg.msg_name = &ss;
+     msg.msg_namelen = sizeof(struct sockaddr_storage);
+     sa =(struct sockaddr *) &ss;
+     code = sock_receivembuf(asocket, &msg, &m, 0, alength);
+     if (!code) {
+         size_t offset=0,sz;
+         resid = *alength;
+         for (i=0;i<nvecs && resid;i++) {
+             sz=MIN(resid, iov[i].iov_len);
+             code = mbuf_copydata(m, offset, sz, iov[i].iov_base);
+             if (code)
+                 break;
+             resid-=sz;
+             offset+=sz;
+         }
+     }
+     mbuf_freem(m);
+ #else
+     resid = *alength;
+     printf("Want to read %d bytes...", resid);
+     for (i=0; i < nvecs && resid; i++) {
+        if (resid < iov[i].iov_len)
+           iov[0].iov_len = resid;
+        resid -= iov[i].iov_len;
+     }
+     printf("Using %d/%d iovs\n", i, nvecs);
+     nvecs = i;
+     rlen = 0;
+     memset(&msg, 0, sizeof(struct msghdr));
+     msg.msg_name = &ss;
+     msg.msg_namelen = sizeof(struct sockaddr_storage);
+     msg.msg_iov = &iov[0];
+     msg.msg_iovlen = nvecs;
+     sa =(struct sockaddr_in *) &ss;
+     code = sock_receive(asocket, &msg, 0, &rlen);
+     resid = *alength;
+     if (resid != rlen)
+     printf("recieved %d bytes\n", rlen);
+     if (resid > rlen)
+        resid -= rlen;
+     else
+        resid = 0;
+ #endif
+ #else
  
      u.uio_iov = &iov[0];
      u.uio_iovcnt = nvecs;
***************
*** 42,55 ****
      u.uio_segflg = UIO_SYSSPACE;
      u.uio_rw = UIO_READ;
      u.uio_procp = NULL;
- 
-     if (haveGlock)
- 	AFS_GUNLOCK();
- #if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL)
-     thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
- #endif
      code = soreceive(asocket, &sa, &u, NULL, NULL, NULL);
! #if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL)
      thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
  #endif
      if (haveGlock)
--- 108,118 ----
      u.uio_segflg = UIO_SYSSPACE;
      u.uio_rw = UIO_READ;
      u.uio_procp = NULL;
      code = soreceive(asocket, &sa, &u, NULL, NULL, NULL);
!     resid = u.uio_resid;
! #endif
! 
! #if defined(KERNEL_FUNNEL)
      thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
  #endif
      if (haveGlock)
***************
*** 57,63 ****
  
      if (code)
  	return code;
!     *alength -= u.uio_resid;
      if (sa) {
  	if (sa->sa_family == AF_INET) {
  	    if (addr)
--- 120,126 ----
  
      if (code)
  	return code;
!     *alength -= resid;
      if (sa) {
  	if (sa->sa_family == AF_INET) {
  	    if (addr)
***************
*** 75,100 ****
  {
      struct proc *p;
  
! #if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL)
      thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
  #endif
      soclose(rx_socket);
! #if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL)
      thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
  #endif
      p = pfind(rxk_ListenerPid);
      if (p)
  	psignal(p, SIGUSR1);
  }
  
  int
! osi_NetSend(osi_socket asocket, struct sockaddr_in *addr, struct iovec *dvec,
  	    int nvecs, afs_int32 alength, int istack)
  {
      register afs_int32 code;
      int i;
      struct iovec iov[RX_MAXIOVECS];
-     struct uio u;
      int haveGlock = ISAFS_GLOCK();
  
      AFS_STATCNT(osi_NetSend);
--- 138,172 ----
  {
      struct proc *p;
  
! #if defined(KERNEL_FUNNEL)
      thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
  #endif
      soclose(rx_socket);
! #if defined(KERNEL_FUNNEL)
      thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
  #endif
+ #ifndef AFS_DARWIN80_ENV
      p = pfind(rxk_ListenerPid);
      if (p)
  	psignal(p, SIGUSR1);
+ #endif
  }
  
  int
! osi_NetSend(osi_socket so, struct sockaddr_in *addr, struct iovec *dvec,
  	    int nvecs, afs_int32 alength, int istack)
  {
+ #ifdef AFS_DARWIN80_ENV
+     socket_t asocket = (socket_t)so;
+     struct msghdr msg;
+     size_t slen;
+ #else
+     struct socket *asocket = (struct socket *)so;
+     struct uio u;
+ #endif
      register afs_int32 code;
      int i;
      struct iovec iov[RX_MAXIOVECS];
      int haveGlock = ISAFS_GLOCK();
  
      AFS_STATCNT(osi_NetSend);
***************
*** 104,109 ****
--- 176,196 ----
      for (i = 0; i < nvecs; i++)
  	iov[i] = dvec[i];
  
+     addr->sin_len = sizeof(struct sockaddr_in);
+ 
+     if (haveGlock)
+ 	AFS_GUNLOCK();
+ #if defined(KERNEL_FUNNEL)
+     thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
+ #endif
+ #ifdef AFS_DARWIN80_ENV
+     memset(&msg, 0, sizeof(struct msghdr));
+     msg.msg_name = addr;
+     msg.msg_namelen = ((struct sockaddr *)addr)->sa_len;
+     msg.msg_iov = &iov[0];
+     msg.msg_iovlen = nvecs;
+     code = sock_send(asocket, &msg, 0, &slen);
+ #else
      u.uio_iov = &iov[0];
      u.uio_iovcnt = nvecs;
      u.uio_offset = 0;
***************
*** 111,126 ****
      u.uio_segflg = UIO_SYSSPACE;
      u.uio_rw = UIO_WRITE;
      u.uio_procp = NULL;
- 
-     addr->sin_len = sizeof(struct sockaddr_in);
- 
-     if (haveGlock)
- 	AFS_GUNLOCK();
- #if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL)
-     thread_funnel_switch(KERNEL_FUNNEL, NETWORK_FUNNEL);
- #endif
      code = sosend(asocket, (struct sockaddr *)addr, &u, NULL, NULL, 0);
! #if defined(AFS_DARWIN_ENV) && defined(KERNEL_FUNNEL)
      thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
  #endif
      if (haveGlock)
--- 198,207 ----
      u.uio_segflg = UIO_SYSSPACE;
      u.uio_rw = UIO_WRITE;
      u.uio_procp = NULL;
      code = sosend(asocket, (struct sockaddr *)addr, &u, NULL, NULL, 0);
! #endif
! 
! #if defined(KERNEL_FUNNEL)
      thread_funnel_switch(NETWORK_FUNNEL, KERNEL_FUNNEL);
  #endif
      if (haveGlock)
Index: openafs/src/rx/LINUX/rx_kmutex.c
diff -c openafs/src/rx/LINUX/rx_kmutex.c:1.7.2.3 openafs/src/rx/LINUX/rx_kmutex.c:1.7.2.6
*** openafs/src/rx/LINUX/rx_kmutex.c:1.7.2.3	Wed Sep 14 01:12:46 2005
--- openafs/src/rx/LINUX/rx_kmutex.c	Thu Mar  9 16:41:55 2006
***************
*** 17,23 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_kmutex.c,v 1.7.2.3 2005/09/14 05:12:46 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.6 2006/03/09 21:41:55 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  #include "rx_kmutex.h"
***************
*** 26,32 ****
  void
  afs_mutex_init(afs_kmutex_t * l)
  {
! #if defined(AFS_LINUX24_ENV)
      init_MUTEX(&l->sem);
  #else
      l->sem = MUTEX;
--- 26,34 ----
  void
  afs_mutex_init(afs_kmutex_t * l)
  {
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
!     mutex_init(&l->mutex);
! #elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
      init_MUTEX(&l->sem);
  #else
      l->sem = MUTEX;
***************
*** 37,43 ****
--- 39,49 ----
  void
  afs_mutex_enter(afs_kmutex_t * l)
  {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     mutex_lock(&l->mutex);
+ #else
      down(&l->sem);
+ #endif
      if (l->owner)
  	osi_Panic("mutex_enter: 0x%x held by %d", l, l->owner);
      l->owner = current->pid;
***************
*** 46,52 ****
--- 52,62 ----
  int
  afs_mutex_tryenter(afs_kmutex_t * l)
  {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     if (mutex_trylock(&l->mutex) == 0)
+ #else
      if (down_trylock(&l->sem))
+ #endif
  	return 0;
      l->owner = current->pid;
      return 1;
***************
*** 58,64 ****
--- 68,78 ----
      if (l->owner != current->pid)
  	osi_Panic("mutex_exit: 0x%x held by %d", l, l->owner);
      l->owner = 0;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     mutex_unlock(&l->mutex);
+ #else
      up(&l->sem);
+ #endif
  }
  
  /* CV_WAIT and CV_TIMEDWAIT sleep until the specified event occurs, or, in the
***************
*** 99,105 ****
  
      while(seq == cv->seq) {
  	schedule();
! 	/* should we refrigerate? */
      }
  
      remove_wait_queue(&cv->waitq, &wait);
--- 113,135 ----
  
      while(seq == cv->seq) {
  	schedule();
! #ifdef AFS_LINUX26_ENV
! #ifdef CONFIG_PM
! 	if (
! #ifdef PF_FREEZE
! 	    current->flags & PF_FREEZE
! #else
! 	    !current->todo
! #endif
! 	    )
! #ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE
! 	    refrigerator(PF_FREEZE);
! #else
! 	    refrigerator();
! #endif
! 	    set_current_state(TASK_INTERRUPTIBLE);
! #endif
! #endif
      }
  
      remove_wait_queue(&cv->waitq, &wait);
Index: openafs/src/rx/LINUX/rx_kmutex.h
diff -c openafs/src/rx/LINUX/rx_kmutex.h:1.11.2.4.2.1 openafs/src/rx/LINUX/rx_kmutex.h:1.11.2.6
*** openafs/src/rx/LINUX/rx_kmutex.h:1.11.2.4.2.1	Fri Oct  7 13:25:06 2005
--- openafs/src/rx/LINUX/rx_kmutex.h	Thu Mar  9 16:41:55 2006
***************
*** 31,41 ****
  struct coda_inode_info {
  };
  #endif
! #include "linux/wait.h"
! #include "linux/sched.h"
  
  typedef struct afs_kmutex {
      struct semaphore sem;
      int owner;
  } afs_kmutex_t;
  
--- 31,51 ----
  struct coda_inode_info {
  };
  #endif
! #include <linux/version.h>
! #include <linux/wait.h>
! #include <linux/sched.h>
! #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
! #include <linux/mutex.h>
! #else
! #include <asm/semaphore.h>
! #endif
  
  typedef struct afs_kmutex {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+     struct mutex mutex;
+ #else
      struct semaphore sem;
+ #endif
      int owner;
  } afs_kmutex_t;
  
Index: openafs/src/rx/LINUX/rx_knet.c
diff -c openafs/src/rx/LINUX/rx_knet.c:1.23.2.7 openafs/src/rx/LINUX/rx_knet.c:1.23.2.9
*** openafs/src/rx/LINUX/rx_knet.c:1.23.2.7	Tue Jul 26 13:42:25 2005
--- openafs/src/rx/LINUX/rx_knet.c	Thu Mar  2 01:41:23 2006
***************
*** 16,22 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/LINUX/rx_knet.c,v 1.23.2.7 2005/07/26 17:42:25 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.9 2006/03/02 06:41:23 shadow Exp $");
  
  #include <linux/version.h>
  #ifdef AFS_LINUX22_ENV
***************
*** 164,169 ****
--- 164,187 ----
      TO_KERNEL_SPACE();
  
      if (code < 0) {
+ #ifdef AFS_LINUX26_ENV
+ #ifdef CONFIG_PM
+ 	if (
+ #ifdef PF_FREEZE
+ 	    current->flags & PF_FREEZE
+ #else
+ 	    !current->todo
+ #endif
+ 	    )
+ #ifdef LINUX_REFRIGERATOR_TAKES_PF_FREEZE
+ 	    refrigerator(PF_FREEZE);
+ #else
+ 	    refrigerator();
+ #endif
+ 	    set_current_state(TASK_INTERRUPTIBLE);
+ #endif
+ #endif
+ 
  	/* Clear the error before using the socket again.
  	 * Oh joy, Linux has hidden header files as well. It appears we can
  	 * simply call again and have it clear itself via sock_error().
Index: openafs/src/rx/SUNOS/rx_knet.c
diff -c openafs/src/rx/SUNOS/rx_knet.c:1.1 openafs/src/rx/SUNOS/rx_knet.c:1.1.8.1
*** openafs/src/rx/SUNOS/rx_knet.c:1.1	Wed Aug 21 15:23:18 2002
--- openafs/src/rx/SUNOS/rx_knet.c	Wed Mar 22 15:14:35 2006
***************
*** 1 ****
! #error kernel code not supported on SunOS 4 
--- 1 ----
! #error kernel code not supported on SunOS 4 
Index: openafs/src/rx/UKERNEL/rx_kcommon.h
diff -c openafs/src/rx/UKERNEL/rx_kcommon.h:1.4 openafs/src/rx/UKERNEL/rx_kcommon.h:1.4.2.1
*** openafs/src/rx/UKERNEL/rx_kcommon.h:1.4	Tue Oct 15 23:59:02 2002
--- openafs/src/rx/UKERNEL/rx_kcommon.h	Wed Oct  5 01:58:45 2005
***************
*** 36,39 ****
--- 36,41 ----
  extern rxk_ports_t rxk_ports;
  extern rxk_portRocks_t rxk_portRocks;
  
+ #define ifnet_flags(x) (x?(x)->if_flags:0)
+ 
  #endif /* _RX_KCOMMON_H_ */
Index: openafs/src/rx/UKERNEL/rx_knet.c
diff -c openafs/src/rx/UKERNEL/rx_knet.c:1.10.2.1 openafs/src/rx/UKERNEL/rx_knet.c:1.10.2.3
*** openafs/src/rx/UKERNEL/rx_knet.c:1.10.2.1	Fri Apr 15 14:37:20 2005
--- openafs/src/rx/UKERNEL/rx_knet.c	Thu Jan 26 15:55:38 2006
***************
*** 11,17 ****
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/UKERNEL/rx_knet.c,v 1.10.2.1 2005/04/15 18:37:20 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  
--- 11,17 ----
  #include "afs/param.h"
  
  RCSID
!     ("$Header: /cvs/openafs/src/rx/UKERNEL/rx_knet.c,v 1.10.2.3 2006/01/26 20:55:38 shadow Exp $");
  
  #include "rx/rx_kcommon.h"
  
***************
*** 76,82 ****
      while (1) {
  	tp = rxi_AllocPacket(RX_PACKET_CLASS_RECEIVE);
  	usr_assert(tp != NULL);
! 	rc = rxi_ReadPacket(usockp->sock, tp, &host, &port);
  	if (rc != 0) {
  	    tp = rxi_ReceivePacket(tp, usockp, host, port, tnop, newcallp);
  	    if (newcallp && *newcallp) {
--- 76,82 ----
      while (1) {
  	tp = rxi_AllocPacket(RX_PACKET_CLASS_RECEIVE);
  	usr_assert(tp != NULL);
! 	rc = rxi_ReadPacket(usockp, tp, &host, &port);
  	if (rc != 0) {
  	    tp = rxi_ReceivePacket(tp, usockp, host, port, tnop, newcallp);
  	    if (newcallp && *newcallp) {
***************
*** 331,341 ****
   *
   */
  int
! rxi_Recvmsg(int socket, struct msghdr *msg_p, int flags)
  {
      int ret;
      do {
! 	ret = recvmsg(socket, msg_p, flags);
      } while (ret == -1 && errno == EAGAIN);
      return ret;
  }
--- 331,341 ----
   *
   */
  int
! rxi_Recvmsg(osi_socket socket, struct msghdr *msg_p, int flags)
  {
      int ret;
      do {
! 	ret = recvmsg(socket->sock, msg_p, flags);
      } while (ret == -1 && errno == EAGAIN);
      return ret;
  }
Index: openafs/src/rx/bulk.example/Makefile.in
diff -c openafs/src/rx/bulk.example/Makefile.in:1.4 openafs/src/rx/bulk.example/Makefile.in:1.4.2.1
*** openafs/src/rx/bulk.example/Makefile.in:1.4	Wed May 14 10:30:51 2003
--- openafs/src/rx/bulk.example/Makefile.in	Thu Mar  9 01:41:56 2006
***************
*** 13,19 ****
  LIBRX=@TOP_OBJDIR@/lib/librx.a
  DESTDIR=@srcdir@
  LIBS=${LIBRX} ${TOP_OBJDIR}/lib/liblwp.a ${TOP_OBJDIR}/lib/libafsutil.a
! CFLAGS=-g ${COMMON_INCL} -DDEBUG ${XCFLAGS}
  
  all: bulk_client bulk_server
  
--- 13,19 ----
  LIBRX=@TOP_OBJDIR@/lib/librx.a
  DESTDIR=@srcdir@
  LIBS=${LIBRX} ${TOP_OBJDIR}/lib/liblwp.a ${TOP_OBJDIR}/lib/libafsutil.a
! CFLAGS=-g ${COMMON_INCL} -DDEBUG ${XCFLAGS} ${ARCHFLAGS}
  
  all: bulk_client bulk_server
  
Index: openafs/src/rx/bulktest/Makefile.in
diff -c openafs/src/rx/bulktest/Makefile.in:1.4 openafs/src/rx/bulktest/Makefile.in:1.4.2.1
*** openafs/src/rx/bulktest/Makefile.in:1.4	Tue Jul  1 15:23:55 2003
--- openafs/src/rx/bulktest/Makefile.in	Thu Mar  9 01:41:56 2006
***************
*** 14,20 ****
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS}
  
  all: bulk_client bulk_server
  
--- 14,20 ----
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} ${ARCHFLAGS}
  
  all: bulk_client bulk_server
  
Index: openafs/src/rx/multi.example/Makefile.in
diff -c openafs/src/rx/multi.example/Makefile.in:1.4 openafs/src/rx/multi.example/Makefile.in:1.4.2.1
*** openafs/src/rx/multi.example/Makefile.in:1.4	Tue Jul  1 15:23:57 2003
--- openafs/src/rx/multi.example/Makefile.in	Thu Mar  9 01:41:58 2006
***************
*** 14,20 ****
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS}
  
  all: sample_client sample_server
  
--- 14,20 ----
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I.. -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} ${ARCHFLAGS}
  
  all: sample_client sample_server
  
Index: openafs/src/rx/simple.example/Makefile.in
diff -c openafs/src/rx/simple.example/Makefile.in:1.4 openafs/src/rx/simple.example/Makefile.in:1.4.2.1
*** openafs/src/rx/simple.example/Makefile.in:1.4	Tue Jul  1 15:23:58 2003
--- openafs/src/rx/simple.example/Makefile.in	Thu Mar  9 01:41:58 2006
***************
*** 14,20 ****
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS}
  
  all: sample_client sample_server
  
--- 14,20 ----
  DESTDIR=/usr/andy/
  INSTALL=${SRCDIR}/bin/install
  LIBS=${LIBRX} ${SRCDIR}/lib/liblwp.a
! CFLAGS=${DBG} -I. -I${SRCDIR}/include -DDEBUG ${XCFLAGS} ${ARCHFLAGS}
  
  all: sample_client sample_server
  
Index: openafs/src/rx/test/Makefile.in
diff -c openafs/src/rx/test/Makefile.in:1.6 openafs/src/rx/test/Makefile.in:1.6.8.1
*** openafs/src/rx/test/Makefile.in:1.6	Thu Nov  1 00:00:48 2001
--- openafs/src/rx/test/Makefile.in	Thu Mar  9 01:41:59 2006
***************
*** 15,21 ****
  LIBS= ${TOP_LIBDIR}/libcmd.a  ../librx.a ${TOP_LIBDIR}/liblwp.a \
  	 ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/libsys.a ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} -DRXDEBUG ${LDIRS} ${XCFLAGS}
  
  RXTESTOBJS = testclient.o testserver.o kstest.o kctest.o
  
--- 15,21 ----
  LIBS= ${TOP_LIBDIR}/libcmd.a  ../librx.a ${TOP_LIBDIR}/liblwp.a \
  	 ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/libsys.a ${XLIBS}
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} -DRXDEBUG ${LDIRS} ${XCFLAGS} ${ARCHFLAGS}
  
  RXTESTOBJS = testclient.o testserver.o kstest.o kctest.o
  
Index: openafs/src/rxdebug/Makefile.in
diff -c openafs/src/rxdebug/Makefile.in:1.4 openafs/src/rxdebug/Makefile.in:1.4.2.1
*** openafs/src/rxdebug/Makefile.in:1.4	Sat Jan 11 02:34:50 2003
--- openafs/src/rxdebug/Makefile.in	Thu Mar  9 01:42:00 2006
***************
*** 8,14 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} -DRXDEBUG
  
  LIBS=${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libcmd.a \
  	       ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libafsutil.a
--- 8,14 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS} -DRXDEBUG
  
  LIBS=${TOP_LIBDIR}/librx.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/libcmd.a \
  	       ${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libafsutil.a
Index: openafs/src/rxgen/rpc_hout.c
diff -c openafs/src/rxgen/rpc_hout.c:1.7.10.2 openafs/src/rxgen/rpc_hout.c:1.7.2.2
*** openafs/src/rxgen/rpc_hout.c:1.7.10.2	Sat Oct 15 17:53:58 2005
--- openafs/src/rxgen/rpc_hout.c	Sat Oct 15 17:52:31 2005
***************
*** 36,42 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_hout.c,v 1.7.10.2 2005/10/15 21:53:58 jaltman Exp $");
  
  #include <stdio.h>
  #include <string.h>
--- 36,42 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_hout.c,v 1.7.2.2 2005/10/15 21:52:31 jaltman Exp $");
  
  #include <stdio.h>
  #include <string.h>
Index: openafs/src/rxgen/rpc_parse.c
diff -c openafs/src/rxgen/rpc_parse.c:1.18.10.1 openafs/src/rxgen/rpc_parse.c:1.18.2.1
*** openafs/src/rxgen/rpc_parse.c:1.18.10.1	Fri Oct 14 21:21:21 2005
--- openafs/src/rxgen/rpc_parse.c	Fri Oct 14 21:20:03 2005
***************
*** 36,42 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_parse.c,v 1.18.10.1 2005/10/15 01:21:21 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
--- 36,42 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxgen/rpc_parse.c,v 1.18.2.1 2005/10/15 01:20:03 shadow Exp $");
  
  #include <stdlib.h>
  #include <stdio.h>
Index: openafs/src/rxkad/rxkad_client.c
diff -c openafs/src/rxkad/rxkad_client.c:1.18.2.2 openafs/src/rxkad/rxkad_client.c:1.18.2.4
*** openafs/src/rxkad/rxkad_client.c:1.18.2.2	Mon May 30 00:57:37 2005
--- openafs/src/rxkad/rxkad_client.c	Mon Feb 27 19:19:20 2006
***************
*** 19,31 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_client.c,v 1.18.2.2 2005/05/30 04:57:37 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/stds.h"
  #ifndef UKERNEL
  #include "h/types.h"
  #include "h/time.h"
  #ifdef AFS_LINUX20_ENV
  #include "h/socket.h"
  #endif
--- 19,34 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_client.c,v 1.18.2.4 2006/02/28 00:19:20 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/stds.h"
  #ifndef UKERNEL
  #include "h/types.h"
  #include "h/time.h"
+ #if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV) 
+ #include "h/systm.h"
+ #endif
  #ifdef AFS_LINUX20_ENV
  #include "h/socket.h"
  #endif
Index: openafs/src/rxkad/rxkad_common.c
diff -c openafs/src/rxkad/rxkad_common.c:1.20.2.7 openafs/src/rxkad/rxkad_common.c:1.20.2.9
*** openafs/src/rxkad/rxkad_common.c:1.20.2.7	Tue May 31 17:12:59 2005
--- openafs/src/rxkad/rxkad_common.c	Mon Feb 27 19:19:20 2006
***************
*** 23,35 ****
  #define INCLUDE_RXKAD_PRIVATE_DECLS
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_common.c,v 1.20.2.7 2005/05/31 21:12:59 shadow Exp $");
  
  #ifdef KERNEL
  #ifndef UKERNEL
  #include "afs/stds.h"
  #include "afs/afs_osi.h"
! #ifdef	AFS_AIX_ENV
  #include "h/systm.h"
  #endif
  #if defined(AFS_DARWIN60_ENV) || defined(AFS_OBSD_ENV)
--- 23,35 ----
  #define INCLUDE_RXKAD_PRIVATE_DECLS
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_common.c,v 1.20.2.9 2006/02/28 00:19:20 shadow Exp $");
  
  #ifdef KERNEL
  #ifndef UKERNEL
  #include "afs/stds.h"
  #include "afs/afs_osi.h"
! #if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV) 
  #include "h/systm.h"
  #endif
  #if defined(AFS_DARWIN60_ENV) || defined(AFS_OBSD_ENV)
Index: openafs/src/rxkad/rxkad_server.c
diff -c openafs/src/rxkad/rxkad_server.c:1.14.2.2 openafs/src/rxkad/rxkad_server.c:1.14.2.6
*** openafs/src/rxkad/rxkad_server.c:1.14.2.2	Mon May 30 00:57:38 2005
--- openafs/src/rxkad/rxkad_server.c	Fri Apr 14 09:13:49 2006
***************
*** 15,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.14.2.2 2005/05/30 04:57:38 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
  #include <time.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
--- 15,27 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.14.2.6 2006/04/14 13:13:49 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
+ #if (defined(AFS_AIX_ENV) && defined(KERNEL) && !defined(UKERNEL)) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV) 
+ #include <sys/systm.h>
+ #endif
  #include <time.h>
  #ifdef AFS_NT40_ENV
  #include <winsock2.h>
***************
*** 325,332 ****
       * If the alternate decoder is not present, or returns -1, then
       * assume the ticket is of the default style.
       */
!     if (code == -1 && (kvno == RXKAD_TKT_TYPE_KERBEROS_V5)
! 	|| (kvno == RXKAD_TKT_TYPE_KERBEROS_V5_ENCPART_ONLY)) {
  	code =
  	    tkt_DecodeTicket5(tix, tlen, tsp->get_key, tsp->get_key_rock,
  			      kvno, client.name, client.instance, client.cell,
--- 328,335 ----
       * If the alternate decoder is not present, or returns -1, then
       * assume the ticket is of the default style.
       */
!     if (code == -1 && ((kvno == RXKAD_TKT_TYPE_KERBEROS_V5)
! 	|| (kvno == RXKAD_TKT_TYPE_KERBEROS_V5_ENCPART_ONLY))) {
  	code =
  	    tkt_DecodeTicket5(tix, tlen, tsp->get_key, tsp->get_key_rock,
  			      kvno, client.name, client.instance, client.cell,
Index: openafs/src/rxkad/ticket5.c
diff -c openafs/src/rxkad/ticket5.c:1.8.2.1 openafs/src/rxkad/ticket5.c:1.8.2.2
*** openafs/src/rxkad/ticket5.c:1.8.2.1	Wed Aug 25 03:09:42 2004
--- openafs/src/rxkad/ticket5.c	Wed Feb 22 00:08:58 2006
***************
*** 62,68 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket5.c,v 1.8.2.1 2004/08/25 07:09:42 shadow Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
--- 62,68 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/ticket5.c,v 1.8.2.2 2006/02/22 05:08:58 jaltman Exp $");
  
  #if defined(UKERNEL)
  #include "../afs/sysincludes.h"
***************
*** 242,252 ****
  	v5_serv_kvno = *t5.enc_part.kvno;
      }
  
- 
-     code = (*get_key) (get_key_rock, v5_serv_kvno, &serv_key);
-     if (code)
- 	goto unknown_key;
- 
      /* Check that the key type really fit into 8 bytes */
      switch (t5.enc_part.etype) {
      case ETYPE_DES_CBC_CRC:
--- 242,247 ----
***************
*** 262,267 ****
--- 257,266 ----
  	|| t5.enc_part.cipher.length % 8 != 0)
  	goto bad_ticket;
  
+     code = (*get_key) (get_key_rock, v5_serv_kvno, &serv_key);
+     if (code)
+ 	goto unknown_key;
+ 
      /* Decrypt data here, save in plain, assume it will shrink */
      code =
  	krb5_des_decrypt(&serv_key, t5.enc_part.etype,
Index: openafs/src/rxkad/domestic/crypt_conn.c
diff -c openafs/src/rxkad/domestic/crypt_conn.c:1.11.2.2 openafs/src/rxkad/domestic/crypt_conn.c:1.11.2.4
*** openafs/src/rxkad/domestic/crypt_conn.c:1.11.2.2	Mon May 30 00:57:38 2005
--- openafs/src/rxkad/domestic/crypt_conn.c	Mon Feb 27 19:19:21 2006
***************
*** 19,30 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/domestic/crypt_conn.c,v 1.11.2.2 2005/05/30 04:57:38 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/stds.h"
  #ifndef UKERNEL
  #include "h/types.h"
  #include "rx/rx.h"
  #include "netinet/in.h"
  #else /* !UKERNEL */
--- 19,33 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/domestic/crypt_conn.c,v 1.11.2.4 2006/02/28 00:19:21 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/stds.h"
  #ifndef UKERNEL
  #include "h/types.h"
+ #if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV)
+ #include "h/systm.h"
+ #endif
  #include "rx/rx.h"
  #include "netinet/in.h"
  #else /* !UKERNEL */
Index: openafs/src/rxkad/domestic/fcrypt.c
diff -c openafs/src/rxkad/domestic/fcrypt.c:1.11.2.4 openafs/src/rxkad/domestic/fcrypt.c:1.11.2.6
*** openafs/src/rxkad/domestic/fcrypt.c:1.11.2.4	Thu Jun  2 01:21:58 2005
--- openafs/src/rxkad/domestic/fcrypt.c	Mon Feb 27 19:19:21 2006
***************
*** 20,31 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/domestic/fcrypt.c,v 1.11.2.4 2005/06/02 05:21:58 shadow Exp $");
  
  #define DEBUG 0
  #ifdef KERNEL
  #ifndef UKERNEL
  #include "afs/stds.h"
  #include "h/types.h"
  #if !defined(AFS_LINUX20_ENV) && !defined(AFS_OBSD_ENV)
  #include "netinet/in.h"
--- 20,34 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/rxkad/domestic/fcrypt.c,v 1.11.2.6 2006/02/28 00:19:21 shadow Exp $");
  
  #define DEBUG 0
  #ifdef KERNEL
  #ifndef UKERNEL
  #include "afs/stds.h"
+ #if defined(AFS_AIX_ENV) || defined(AFS_AUX_ENV) || defined(AFS_SUN5_ENV) 
+ #include "h/systm.h"
+ #endif
  #include "h/types.h"
  #if !defined(AFS_LINUX20_ENV) && !defined(AFS_OBSD_ENV)
  #include "netinet/in.h"
Index: openafs/src/rxkad/test/Makefile.in
diff -c openafs/src/rxkad/test/Makefile.in:1.8 openafs/src/rxkad/test/Makefile.in:1.8.2.1
*** openafs/src/rxkad/test/Makefile.in:1.8	Sun Oct 27 20:18:40 2002
--- openafs/src/rxkad/test/Makefile.in	Thu Mar  9 01:42:01 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  HEADERS = ../rxkad.h stress.h stress_internal.h stress_errs.h
  
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS=-g -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  HEADERS = ../rxkad.h stress.h stress_internal.h stress_errs.h
  
Index: openafs/src/scout/scout.c
diff -c openafs/src/scout/scout.c:1.9 openafs/src/scout/scout.c:1.9.2.1
*** openafs/src/scout/scout.c:1.9	Tue Jul 15 19:16:48 2003
--- openafs/src/scout/scout.c	Thu Mar  9 01:42:04 2006
***************
*** 15,21 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/scout/scout.c,v 1.9 2003/07/15 23:16:48 shadow Exp $");
  
  #undef	IN
  #ifdef	AFS_AIX32_ENV
--- 15,21 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/scout/scout.c,v 1.9.2.1 2006/03/09 06:42:04 shadow Exp $");
  
  #undef	IN
  #ifdef	AFS_AIX32_ENV
***************
*** 1765,1771 ****
--- 1765,1775 ----
  	    return (-1);
  	}
  	memcpy(&(curr_skt->sin_addr.s_addr), he->h_addr, 4);
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	curr_skt->sin_family = AF_INET;		/*Internet family */
+ #else
  	curr_skt->sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	curr_skt->sin_port = htons(7000);	/*FileServer port */
  
  	/*
Index: openafs/src/sgistuff/Makefile.in
diff -c openafs/src/sgistuff/Makefile.in:1.7.8.1 openafs/src/sgistuff/Makefile.in:1.7.8.2
*** openafs/src/sgistuff/Makefile.in:1.7.8.1	Tue Aug 16 14:00:44 2005
--- openafs/src/sgistuff/Makefile.in	Thu Mar  9 01:42:05 2006
***************
*** 15,22 ****
  # Note that if afskauthlib.so gets installed on a client
  # machine then that will be used ..
  #
! CFLAGS=${OPTIMIZE} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
! LDFLAGS = ${OPTIMIZE} ${XLDFLAGS}
  LIBDIR=${TOP_LIBDIR}/
  AFSLIBS=${TOP_LIBDIR}/libkauth.a ${TOP_LIBDIR}/libprot.a ${LIBDIR}/libubik.a \
  	  ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libsys.a \
--- 15,22 ----
  # Note that if afskauthlib.so gets installed on a client
  # machine then that will be used ..
  #
! CFLAGS=${OPTIMIZE} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
! LDFLAGS = ${OPTIMIZE} ${XLDFLAGS} ${ARCHFLAGS}
  LIBDIR=${TOP_LIBDIR}/
  AFSLIBS=${TOP_LIBDIR}/libkauth.a ${TOP_LIBDIR}/libprot.a ${LIBDIR}/libubik.a \
  	  ${TOP_LIBDIR}/libauth.a ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libsys.a \
Index: openafs/src/shlibafsauthent/Makefile.in
diff -c openafs/src/shlibafsauthent/Makefile.in:1.9.2.3 openafs/src/shlibafsauthent/Makefile.in:1.9.2.6
*** openafs/src/shlibafsauthent/Makefile.in:1.9.2.3	Mon Aug  8 11:39:23 2005
--- openafs/src/shlibafsauthent/Makefile.in	Sat Dec 10 13:45:39 2005
***************
*** 75,81 ****
  	rmtsys.xdr.o \
  	rmtsys.cs.o \
  	afssyscalls.o \
! 	rmtsysnet.o
  
  PTSERVEROBJS = \
  	ptclient.o \
--- 75,83 ----
  	rmtsys.xdr.o \
  	rmtsys.cs.o \
  	afssyscalls.o \
! 	rmtsysnet.o \
! 	glue.o \
! 	setpag.o
  
  PTSERVEROBJS = \
  	ptclient.o \
***************
*** 99,118 ****
  
  ${DEST}/lib/${LIBAFSAUTHENT}: ${LIBAFSAUTHENT}
  	${INSTALL} ${LIBAFSAUTHENT} ${DEST}/lib/${LIBAFSAUTHENT}
- 
- ${DEST}/lib/libafsauthent.${SHLIB_SUFFIX}: ${DEST}/lib/${LIBAFSAUTHENT}
  	-ln -f -s ${LIBAFSAUTHENT} ${DEST}/lib/libafsauthent.${SHLIB_SUFFIX}
  
! all: ${TOP_LIBDIR}/${LIBAFSAUTHENT} ${TOP_LIBDIR}/libafsauthent.${SHLIB_SUFFIX}
  
! install: ${DESTDIR}${libdir}/${LIBAFSAUTHENT} ${DESTDIR}${libdir}/libafsauthent.${SHLIB_SUFFIX}
  
  ${LIBAFSAUTHENT}: ${LIBOBJS}
  	case ${SYS_NAME} in \
  	rs_aix4*) \
  		${SHLIB_LINKER} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -bE:afsauthent.exp -lafsrpc ${MT_LIBS};; \
  	sun*_5*) \
! 		${SHLIB_LINKER} -h ${LIBAFSAUTHENT} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \
  	*) \
  		${SHLIB_LINKER} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \
  	esac
--- 101,121 ----
  
  ${DEST}/lib/${LIBAFSAUTHENT}: ${LIBAFSAUTHENT}
  	${INSTALL} ${LIBAFSAUTHENT} ${DEST}/lib/${LIBAFSAUTHENT}
  	-ln -f -s ${LIBAFSAUTHENT} ${DEST}/lib/libafsauthent.${SHLIB_SUFFIX}
+ 	-ln -f -s ${LIBAFSAUTHENT} ${DEST}/lib/libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR}
  
! all: ${TOP_LIBDIR}/${LIBAFSAUTHENT}
  
! install: ${DESTDIR}${libdir}/${LIBAFSAUTHENT}
  
  ${LIBAFSAUTHENT}: ${LIBOBJS}
  	case ${SYS_NAME} in \
  	rs_aix4*) \
  		${SHLIB_LINKER} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -bE:afsauthent.exp -lafsrpc ${MT_LIBS};; \
  	sun*_5*) \
! 		${SHLIB_LINKER} -h libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \
! 	*_linux*) \
! 		${SHLIB_LINKER} -Wl,-h,libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR} -Wl,--version-script=${srcdir}/mapfile -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \
  	*) \
  		${SHLIB_LINKER} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \
  	esac
***************
*** 259,279 ****
  rmtsysnet.o: ${SYS}/rmtsysnet.c
  	${CCRULE}
  
  clean:
  	$(RM) -f *.o *.a libafsauthent*
  
  ${DESTDIR}${libdir}/${LIBAFSAUTHENT}: ${LIBAFSAUTHENT}
  	${INSTALL} ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/${LIBAFSAUTHENT}
- 
- ${DESTDIR}${libdir}/libafsauthent.${SHLIB_SUFFIX}: ${DESTDIR}${libdir}/${LIBAFSAUTHENT}
  	-ln -f -s ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/libafsauthent.${SHLIB_SUFFIX}
  
  ${TOP_LIBDIR}/${LIBAFSAUTHENT}: ${LIBAFSAUTHENT}
  	${INSTALL} ${LIBAFSAUTHENT} ${TOP_LIBDIR}/${LIBAFSAUTHENT}
- 
- ${TOP_LIBDIR}/libafsauthent.${SHLIB_SUFFIX}: ${TOP_LIBDIR}/${LIBAFSAUTHENT}
  	-ln -f -s ${LIBAFSAUTHENT} ${TOP_LIBDIR}/libafsauthent.${SHLIB_SUFFIX}
  
! dest: ${DEST}/lib/${LIBAFSAUTHENT} ${DEST}/lib/libafsauthent.${SHLIB_SUFFIX}
! 
! 
--- 262,284 ----
  rmtsysnet.o: ${SYS}/rmtsysnet.c
  	${CCRULE}
  
+ glue.o: ${SYS}/glue.c
+ 	${CCRULE}
+ 
+ setpag.o: ${SYS}/setpag.c
+ 	${CCRULE}
+ 
  clean:
  	$(RM) -f *.o *.a libafsauthent*
  
  ${DESTDIR}${libdir}/${LIBAFSAUTHENT}: ${LIBAFSAUTHENT}
  	${INSTALL} ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/${LIBAFSAUTHENT}
  	-ln -f -s ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/libafsauthent.${SHLIB_SUFFIX}
+ 	-ln -f -s ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/libafsauthent.${SHLIB_SUFFIX}.${LIBFASAUTHENTMAJOR}
  
  ${TOP_LIBDIR}/${LIBAFSAUTHENT}: ${LIBAFSAUTHENT}
  	${INSTALL} ${LIBAFSAUTHENT} ${TOP_LIBDIR}/${LIBAFSAUTHENT}
  	-ln -f -s ${LIBAFSAUTHENT} ${TOP_LIBDIR}/libafsauthent.${SHLIB_SUFFIX}
+ 	-ln -f -s ${LIBAFSAUTHENT} ${TOP_LIBDIR}/libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR}
  
! dest: ${DEST}/lib/${LIBAFSAUTHENT}
Index: openafs/src/shlibafsrpc/Makefile.in
diff -c openafs/src/shlibafsrpc/Makefile.in:1.15.2.5 openafs/src/shlibafsrpc/Makefile.in:1.15.2.7
*** openafs/src/shlibafsrpc/Makefile.in:1.15.2.5	Fri Sep  2 19:38:54 2005
--- openafs/src/shlibafsrpc/Makefile.in	Sat Dec 10 13:45:40 2005
***************
*** 132,153 ****
  
  LIBAFSRPC = libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}.${LIBAFSRPCMINOR}
  
! all: ${TOP_LIBDIR}/${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}
  
! install: ${DESTDIR}${libdir}/${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}
  
  ${DEST}/lib/${LIBAFSRPC}: ${LIBAFSRPC}
  	${INSTALL} ${LIBAFSRPC} ${DEST}/lib/${LIBAFSRPC}
- 
- ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}: ${DEST}/lib/${LIBAFSRPC}
  	-ln -f -s ${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}
  
  ${LIBAFSRPC}: ${LIBOBJS}
  	case ${SYS_NAME} in \
  	rs_aix4* | rs_aix5*) \
  		${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} -bE:${srcdir}/afsrpc.exp ${MT_LIBS};; \
  	sun*_5*) \
! 		${SHLIB_LINKER} -h ${LIBAFSRPC} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
  	*) \
  		${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
  	esac
--- 132,154 ----
  
  LIBAFSRPC = libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}.${LIBAFSRPCMINOR}
  
! all: ${TOP_LIBDIR}/${LIBAFSRPC}
  
! install: ${DESTDIR}${libdir}/${LIBAFSRPC}
  
  ${DEST}/lib/${LIBAFSRPC}: ${LIBAFSRPC}
  	${INSTALL} ${LIBAFSRPC} ${DEST}/lib/${LIBAFSRPC}
  	-ln -f -s ${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}
+ 	-ln -f -s ${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}
  
  ${LIBAFSRPC}: ${LIBOBJS}
  	case ${SYS_NAME} in \
  	rs_aix4* | rs_aix5*) \
  		${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} -bE:${srcdir}/afsrpc.exp ${MT_LIBS};; \
  	sun*_5*) \
! 		${SHLIB_LINKER} -h libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
! 	*_linux*) \
! 		${SHLIB_LINKER} -Wl,-h,libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} -Wl,--version-script=${srcdir}/mapfile -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
  	*) \
  		${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
  	esac
***************
*** 279,285 ****
  #
  #   $ what /opt/langtools/bin/pxdb32
  #   /opt/langtools/bin/pxdb32:
! #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.15.2.5 $
  #
  # The problem occurs when -g and -O are both used when compiling des.c.
  # The simplest way to work around the problem is to leave out either -g or -O.
--- 280,286 ----
  #
  #   $ what /opt/langtools/bin/pxdb32
  #   /opt/langtools/bin/pxdb32:
! #           HP92453-02 A.10.0A HP-UX SYMBOLIC DEBUGGER (PXDB) $Revision: 1.15.2.7 $
  #
  # The problem occurs when -g and -O are both used when compiling des.c.
  # The simplest way to work around the problem is to leave out either -g or -O.
***************
*** 410,424 ****
  
  ${DESTDIR}${libdir}/${LIBAFSRPC}: ${LIBAFSRPC}
  	${INSTALL} ${LIBAFSRPC} ${DESTDIR}${libdir}/${LIBAFSRPC}
- 
- ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}: ${DESTDIR}${libdir}/${LIBAFSRPC}
  	-ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}
  
  ${TOP_LIBDIR}/${LIBAFSRPC}: ${LIBAFSRPC}
  	${INSTALL} ${LIBAFSRPC} ${TOP_LIBDIR}/${LIBAFSRPC}
- 
- ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}: ${TOP_LIBDIR}/${LIBAFSRPC}
  	-ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}
  
! dest: ${DEST}/lib/${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}
  
--- 411,423 ----
  
  ${DESTDIR}${libdir}/${LIBAFSRPC}: ${LIBAFSRPC}
  	${INSTALL} ${LIBAFSRPC} ${DESTDIR}${libdir}/${LIBAFSRPC}
  	-ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}
+ 	-ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}
  
  ${TOP_LIBDIR}/${LIBAFSRPC}: ${LIBAFSRPC}
  	${INSTALL} ${LIBAFSRPC} ${TOP_LIBDIR}/${LIBAFSRPC}
  	-ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}
+ 	-ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}
  
! dest: ${DEST}/lib/${LIBAFSRPC}
  
Index: openafs/src/sia/Makefile.in
diff -c openafs/src/sia/Makefile.in:1.7 openafs/src/sia/Makefile.in:1.7.2.1
*** openafs/src/sia/Makefile.in:1.7	Sat Jan 11 02:34:55 2003
--- openafs/src/sia/Makefile.in	Thu Mar  9 01:42:06 2006
***************
*** 23,29 ****
  clean:
  	$(RM) -f test-reauth libafssiad.so libafssiad.krb.so *.s *.o *.b core *~ *.com *.ld AFS_component_version_number.c
  
! CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  ${DEST}/lib/afs/libafssiad.so: libafssiad.so
  	${INSTALL} $? $@
--- 23,29 ----
  clean:
  	$(RM) -f test-reauth libafssiad.so libafssiad.krb.so *.s *.o *.b core *~ *.com *.ld AFS_component_version_number.c
  
! CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  ${DEST}/lib/afs/libafssiad.so: libafssiad.so
  	${INSTALL} $? $@
Index: openafs/src/sys/.cvsignore
diff -c openafs/src/sys/.cvsignore:1.2 openafs/src/sys/.cvsignore:1.2.2.1
*** openafs/src/sys/.cvsignore:1.2	Mon Jun 21 15:48:03 2004
--- openafs/src/sys/.cvsignore	Sat Oct 15 11:21:19 2005
***************
*** 1,7 ****
--- 1,9 ----
  AFS_component_version_number.c
  Makefile
+ libafssetpag.*
  pagsh
  pagsh.krb
+ picobj
  rmtsys.cs.c
  rmtsys.h
  rmtsys.ss.c
Index: openafs/src/sys/Makefile.in
diff -c openafs/src/sys/Makefile.in:1.27.2.4 openafs/src/sys/Makefile.in:1.27.2.11
*** openafs/src/sys/Makefile.in:1.27.2.4	Sun Feb 20 20:12:10 2005
--- openafs/src/sys/Makefile.in	Fri Mar 17 19:44:53 2006
***************
*** 10,42 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}  ${XCFLAGS}
! SFLAGS=-P -I${TOP_INCDIR}
  LIBS=libsys.a ${TOP_LIBDIR}/librx.a libsys.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a ${XLIBS}
  
! OBJECTS= afssyscalls.o syscall.o
  RMTOBJS=rmtsysnet.o rmtsysc.o rmtsys.cs.o rmtsys.xdr.o rmtsys.ss.o rmtsyss.o 
  
  all: \
! 	rmtsysd \
! 	pagsh \
! 	pagsh.krb \
! 	${TOP_INCDIR}/afs/afssyscalls.h \
! 	${TOP_INCDIR}/afs/afs.exp \
! 	${TOP_INCDIR}/afs/xfsattrs.h \
! 	${TOP_LIBDIR}/afs.exp \
! 	${TOP_LIBDIR}/libsys.a \
! 	${KERNELDIR}/afs \
! 	${KERNELDIR}/afs/xfsattrs.h \
! 	${UKERNELDIR}/afs \
! 	${UKERNELDIR}/afs/afsl.exp
  
  libsys.a: ${OBJECTS} ${RMTOBJS} afsl.exp AFS_component_version_number.o
  	-$(RM) -f $@
  	$(AR) crv $@ ${OBJECTS} ${RMTOBJS} \
  		AFS_component_version_number.o ${LIBSYS_AIX_EXP}
  	$(RANLIB) $@
! 	case "${SYS_NAME}" in                   	\
  		rs_aix*) 			        \
  			$(AR) crv $@ afsl.exp;;         \
  	esac
--- 10,43 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}  ${XCFLAGS} ${ARCHFLAGS}
! SFLAGS=-I${TOP_INCDIR}
  LIBS=libsys.a ${TOP_LIBDIR}/librx.a libsys.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a ${XLIBS}
  
! OBJECTS= afssyscalls.o setpag.o glue.o syscall.o
! SHLIBOBJS = picobj/setpag.o picobj/glue.o syscall.o
  RMTOBJS=rmtsysnet.o rmtsysc.o rmtsys.cs.o rmtsys.xdr.o rmtsys.ss.o rmtsyss.o 
  
  all: \
!     rmtsysd \
!     pagsh \
!     pagsh.krb \
!     ${TOP_INCDIR}/afs/afssyscalls.h \
!     ${TOP_INCDIR}/afs/afs.exp \
!     ${TOP_INCDIR}/afs/xfsattrs.h \
!     ${TOP_LIBDIR}/afs.exp \
!     ${TOP_LIBDIR}/libsys.a \
!     ${KERNELDIR}/afs \
!     ${KERNELDIR}/afs/xfsattrs.h \
!     ${UKERNELDIR}/afs \
!     ${UKERNELDIR}/afs/afsl.exp
  
  libsys.a: ${OBJECTS} ${RMTOBJS} afsl.exp AFS_component_version_number.o
  	-$(RM) -f $@
  	$(AR) crv $@ ${OBJECTS} ${RMTOBJS} \
  		AFS_component_version_number.o ${LIBSYS_AIX_EXP}
  	$(RANLIB) $@
! 	@set -x; case "${SYS_NAME}" in                   	\
  		rs_aix*) 			        \
  			$(AR) crv $@ afsl.exp;;         \
  	esac
***************
*** 44,52 ****
  tests:	pagsh pagsh.krb fixit iinc idec icreate iopen istat rmtsysd
  
  syscall.o: syscall.s
! 	case "$(SYS_NAME)" in \
  	 sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5? | sun4x_5?? | sunx86_5? | sunx86_5?? ) \
! 		/usr/ccs/lib/cpp  ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
  		as -o syscall.o syscall.ss;		\
  		$(RM) syscall.ss;;				\
  	 sgi_* |*_darwin* ) \
--- 45,53 ----
  tests:	pagsh pagsh.krb fixit iinc idec icreate iopen istat rmtsysd
  
  syscall.o: syscall.s
! 	@set -x; case "$(SYS_NAME)" in \
  	 sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53  | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5? | sun4x_5?? | sunx86_5? | sunx86_5?? ) \
! 		/usr/ccs/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
  		as -o syscall.o syscall.ss;		\
  		$(RM) syscall.ss;;				\
  	 sgi_* |*_darwin* ) \
***************
*** 57,66 ****
  		$(RM) -f syscall.ss syscall.i;; \
  	 hp_ux11? ) \
  		touch syscall.o;; \
! 	amd64_fbsd*|i386_*bsd*|*nbsd*) \
! 		touch syscall.o;; \
  	 *) \
! 		/lib/cpp  ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
  		as -o syscall.o syscall.ss;		\
  		$(RM) syscall.ss;;				\
  	esac
--- 58,69 ----
  		$(RM) -f syscall.ss syscall.i;; \
  	 hp_ux11? ) \
  		touch syscall.o;; \
! 	 amd64_fbsd*|i386_*bsd*|*nbsd*) \
! 		${CCOBJ} -E ${SFLAGS} syscall.s > syscall.S ; \
! 		${AS} syscall.S -o syscall.o ;  \
! 		$(RM) -f syscall.S ;;\
  	 *) \
! 		/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
  		as -o syscall.o syscall.ss;		\
  		$(RM) syscall.ss;;				\
  	esac
***************
*** 68,73 ****
--- 71,96 ----
  afssyscalls.o: afssyscalls.c afssyscalls.h
  	${CCOBJ} ${CFLAGS} -c ${srcdir}/afssyscalls.c
  
+ glue.o: glue.c afssyscalls.h
+ 	${CCOBJ} ${CFLAGS} -c ${srcdir}/glue.c
+ 
+ setpag.o: setpag.c afssyscalls.h
+ 	${CCOBJ} ${CFLAGS} -c ${srcdir}/setpag.c
+ 
+ picobj: afssyscalls.h
+ 	mkdir -p picobj
+ 	cp ${srcdir}/afssyscalls.h picobj/afssyscalls.h
+ 
+ picobj/glue.o: picobj glue.c afssyscalls.h
+ 	rm -f picobj/glue.c
+ 	cp ${srcdir}/glue.c picobj/glue.c
+ 	cd picobj && ${CCOBJ} ${CFLAGS} ${SHLIB_CFLAGS} -c glue.c
+ 
+ picobj/setpag.o: picobj setpag.c afssyscalls.h
+ 	rm -f picobj/setpag.c
+ 	cp ${srcdir}/setpag.c picobj/setpag.c
+ 	cd picobj && ${CCOBJ} ${CFLAGS} ${SHLIB_CFLAGS} -c setpag.c
+ 
  rmtsysnet.o rmtsysc.o rmtsyss.o rmtsysd.o: rmtsys.h
  rmtsysd: AFS_component_version_number.o afs.exp afsl.exp
  
***************
*** 124,136 ****
  
  
  xfsinode: xfsinode.c  AFS_component_version_number.c
! 	case "${SYS_NAME}" in \
  		sgi_62 | sgi_64 ) \
  		$(CC) -o xfsinode ${CFLAGS} ${srcdir}/xfsinode.c ${LIBS}
  	esac
  
  afs.exp: ${srcdir}/afs4.exp ${srcdir}/afs5.exp
! 	case ${SYS_NAME} in \
  		rs_aix5* ) \
  			cp -p ${srcdir}/afs5.exp afs.exp ;; \
  		rs_aix* ) \
--- 147,159 ----
  
  
  xfsinode: xfsinode.c  AFS_component_version_number.c
! 	@set -x; case "${SYS_NAME}" in \
  		sgi_62 | sgi_64 ) \
  		$(CC) -o xfsinode ${CFLAGS} ${srcdir}/xfsinode.c ${LIBS}
  	esac
  
  afs.exp: ${srcdir}/afs4.exp ${srcdir}/afs5.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix5* ) \
  			cp -p ${srcdir}/afs5.exp afs.exp ;; \
  		rs_aix* ) \
***************
*** 140,146 ****
  	esac
  
  afsl.exp: ${srcdir}/afsl4.exp ${srcdir}/afsl5.exp
! 	case ${SYS_NAME} in \
  		rs_aix5* ) \
  			cp -p ${srcdir}/afsl5.exp afsl.exp ;; \
  		rs_aix* ) \
--- 163,169 ----
  	esac
  
  afsl.exp: ${srcdir}/afsl4.exp ${srcdir}/afsl5.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix5* ) \
  			cp -p ${srcdir}/afsl5.exp afsl.exp ;; \
  		rs_aix* ) \
***************
*** 157,169 ****
  	${INSTALL} $? $@
  
  ${TOP_INCDIR}/afs/afs.exp: afs.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
  
  ${TOP_LIBDIR}/afs.exp: afs.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
--- 180,192 ----
  	${INSTALL} $? $@
  
  ${TOP_INCDIR}/afs/afs.exp: afs.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
  
  ${TOP_LIBDIR}/afs.exp: afs.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
***************
*** 178,184 ****
  	mkdir -p $@
  
  ${UKERNELDIR}/afs/afsl.exp: afsl.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
--- 201,207 ----
  	mkdir -p $@
  
  ${UKERNELDIR}/afs/afsl.exp: afsl.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
***************
*** 197,209 ****
  	${UKERNELDIR}/afs/afsl.exp
  
  install: \
! 	${DESTDIR}${libdir}/afs/libsys.a \
! 	${DESTDIR}${sbindir}/rmtsysd \
! 	${DESTDIR}${includedir}/afs/afssyscalls.h \
! 	${DESTDIR}${bindir}/pagsh \
! 	${DESTDIR}${bindir}/pagsh.krb \
! 	${DESTDIR}${includedir}/afs/afs.exp \
! 	${DESTDIR}${includedir}/afs/xfsattrs.h
  
  ${DESTDIR}${libdir}/afs/libsys.a: libsys.a
  	${INSTALL} $? $@
--- 220,232 ----
  	${UKERNELDIR}/afs/afsl.exp
  
  install: \
!     ${DESTDIR}${libdir}/afs/libsys.a \
!     ${DESTDIR}${sbindir}/rmtsysd \
!     ${DESTDIR}${includedir}/afs/afssyscalls.h \
!     ${DESTDIR}${bindir}/pagsh \
!     ${DESTDIR}${bindir}/pagsh.krb \
!     ${DESTDIR}${includedir}/afs/afs.exp \
!     ${DESTDIR}${includedir}/afs/xfsattrs.h
  
  ${DESTDIR}${libdir}/afs/libsys.a: libsys.a
  	${INSTALL} $? $@
***************
*** 221,227 ****
  	${INSTALL} -s $? $@
  
  ${DESTDIR}${includedir}/afs/afs.exp: afs.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
--- 244,250 ----
  	${INSTALL} -s $? $@
  
  ${DESTDIR}${includedir}/afs/afs.exp: afs.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
***************
*** 230,248 ****
  	${INSTALL} $? $@
  
  dest: \
! 	${DEST}/lib/afs/libsys.a \
! 	${DEST}/etc/rmtsysd \
! 	${DEST}/bin/pagsh \
! 	${DEST}/bin/pagsh.krb \
! 	${DEST}/include/afs/afssyscalls.h \
! 	${DEST}/include/afs/afs.exp \
! 	${DEST}/include/afs/xfsattrs.h
  
  ${DEST}/lib/afs/libsys.a: libsys.a
  	${INSTALL} $? $@
  
  ${DEST}/include/afs/afs.exp: afs.exp
! 	case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
--- 253,271 ----
  	${INSTALL} $? $@
  
  dest: \
!     ${DEST}/lib/afs/libsys.a \
!     ${DEST}/etc/rmtsysd \
!     ${DEST}/bin/pagsh \
!     ${DEST}/bin/pagsh.krb \
!     ${DEST}/include/afs/afssyscalls.h \
!     ${DEST}/include/afs/afs.exp \
!     ${DEST}/include/afs/xfsattrs.h
  
  ${DEST}/lib/afs/libsys.a: libsys.a
  	${INSTALL} $? $@
  
  ${DEST}/include/afs/afs.exp: afs.exp
! 	@set -x; case ${SYS_NAME} in \
  		rs_aix* ) \
  			${INSTALL} $? $@ ;; \
  	esac
***************
*** 271,274 ****
  	$(RM) -f *.o libsys.a xfsinode iinc idec icreate iopen istat core \
  	rmtsysc rmtsyss *.o rmtsys.ss.c rmtsys.cs.c rmtsys.xdr.c rmtsys.h \
  	rmtsysd AFS_component_version_number.c pagsh pagsh.krb \
! 	afs.exp afsl.exp
--- 294,298 ----
  	$(RM) -f *.o libsys.a xfsinode iinc idec icreate iopen istat core \
  	rmtsysc rmtsyss *.o rmtsys.ss.c rmtsys.cs.c rmtsys.xdr.c rmtsys.h \
  	rmtsysd AFS_component_version_number.c pagsh pagsh.krb \
! 	afs.exp afsl.exp 
! 	$(RM) -rf picobj
Index: openafs/src/sys/afs5.exp
diff -c openafs/src/sys/afs5.exp:1.1 openafs/src/sys/afs5.exp:1.1.2.1
*** openafs/src/sys/afs5.exp:1.1	Tue Jul  1 14:37:33 2003
--- openafs/src/sys/afs5.exp	Sat Oct 15 10:24:33 2005
***************
*** 3,9 ****
  * $Locker:  $
  *
  *
! * Exports for the AFS kernel extension for AIX 3.1
  *
  icreate		syscall
  syscall		syscall
--- 3,9 ----
  * $Locker:  $
  *
  *
! * Exports for the AFS kernel extension for AIX 5
  *
  icreate		syscall
  syscall		syscall
***************
*** 54,60 ****
  * afs_marinerPort
  afs_mariner
  cacheInfoModTime
- freeVCList
  afs_freeDCList
  afs_freeDCCount
  afs_freeDSList
--- 54,59 ----
Index: openafs/src/sys/afssetpag.exp
diff -c /dev/null openafs/src/sys/afssetpag.exp:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:33 2006
--- openafs/src/sys/afssetpag.exp	Sat Oct 15 11:21:19 2005
***************
*** 0 ****
--- 1 ----
+ lsetpag
Index: openafs/src/sys/afssyscalls.c
diff -c openafs/src/sys/afssyscalls.c:1.10 openafs/src/sys/afssyscalls.c:1.10.2.3
*** openafs/src/sys/afssyscalls.c:1.10	Thu Jul  8 01:35:26 2004
--- openafs/src/sys/afssyscalls.c	Mon Feb 20 23:47:10 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/afssyscalls.c,v 1.10 2004/07/08 05:35:26 shadow Exp $");
  
  #include <signal.h>
  #include <sys/errno.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/afssyscalls.c,v 1.10.2.3 2006/02/21 04:47:10 shadow Exp $");
  
  #include <signal.h>
  #include <sys/errno.h>
***************
*** 59,65 ****
  #pragma weak xiinc = iinc
  #pragma weak xidec = idec
  #pragma weak xiopen = iopen
- #pragma weak xlsetpag = lsetpag
  #pragma weak xlpioctl = lpioctl
  #ifdef notdef
  #pragma weak xiread = iread
--- 59,64 ----
***************
*** 206,217 ****
  #endif /* notdef */
  
  int
- lsetpag(void)
- {
-     return (syscall(AFS_SETPAG));
- }
- 
- int
  lpioctl(char *path, int cmd, char *cmarg, int follow)
  {
      return (syscall(AFS_PIOCTL, path, cmd, cmarg, follow));
--- 205,210 ----
***************
*** 314,326 ****
  
  #endif /* AFS_NAMEI_ENV */
  
! #ifdef AFS_LINUX20_ENV
! int proc_afs_syscall(long syscall, long param1, long param2, long param3, 
! 		     long param4, int *rval) {
!   struct afsprocdata syscall_data;
!   int fd = open(PROC_SYSCALL_FNAME, O_RDWR);
!   if(fd < 0)
!       fd = open(PROC_SYSCALL_ARLA_FNAME, O_RDWR);
    if(fd < 0)
      return -1;
  
--- 307,318 ----
  
  #endif /* AFS_NAMEI_ENV */
  
! #if defined(AFS_DARWIN80_ENV)
! int ioctl_afs_syscall(long syscall, long param1, long param2, long param3, 
! 		     long param4, long param5, long param6, int *rval) {
!   struct afssysargs syscall_data;
!   int code;
!   int fd = open(SYSCALL_DEV_FNAME, O_RDWR);
    if(fd < 0)
      return -1;
  
***************
*** 329,370 ****
    syscall_data.param2 = param2;
    syscall_data.param3 = param3;
    syscall_data.param4 = param4;
  
!   *rval = ioctl(fd, VIOC_SYSCALL, &syscall_data);
  
    close(fd);
! 
    return 0;
  }
  #endif
  
  int
- lsetpag(void)
- {
-     int errcode, rval;
- 
- #ifdef AFS_LINUX20_ENV
-     rval = proc_afs_syscall(AFSCALL_SETPAG,0,0,0,0,&errcode);
-     
-     if(rval)
-       errcode = syscall(AFS_SYSCALL, AFSCALL_SETPAG);
- #else
-     errcode = syscall(AFS_SYSCALL, AFSCALL_SETPAG);
- #endif
-     
-     return (errcode);
- }
- 
- int
  lpioctl(char *path, int cmd, char *cmarg, int follow)
  {
      int errcode, rval;
  
! #ifdef AFS_LINUX20_ENV
!     rval = proc_afs_syscall(AFSCALL_PIOCTL, (long)path, cmd, (long)cmarg, follow, &errcode);
  
      if(rval)
!     errcode = syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, cmd, cmarg, follow);
  #else
      errcode = syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, cmd, cmarg, follow);
  #endif
--- 321,356 ----
    syscall_data.param2 = param2;
    syscall_data.param3 = param3;
    syscall_data.param4 = param4;
+   syscall_data.param5 = param5;
+   syscall_data.param6 = param6;
  
!   code = ioctl(fd, VIOC_SYSCALL, &syscall_data);
  
    close(fd);
!   if (code)
!      return code;
!   *rval=syscall_data.retval;
    return 0;
  }
  #endif
  
  int
  lpioctl(char *path, int cmd, char *cmarg, int follow)
  {
      int errcode, rval;
  
! #if defined(AFS_LINUX20_ENV)
!     rval = proc_afs_syscall(AFSCALL_PIOCTL, (long)path, cmd, (long)cmarg, 
! 			    follow, &errcode);
  
      if(rval)
! 	errcode = syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, cmd, cmarg, 
! 			  follow);
! #elif defined(AFS_DARWIN80_ENV)
!     rval = ioctl_afs_syscall(AFSCALL_PIOCTL, (long)path, cmd, (long)cmarg,
! 			     follow, 0, 0, &errcode);
!     if (rval)
! 	errcode = rval;
  #else
      errcode = syscall(AFS_SYSCALL, AFSCALL_PIOCTL, path, cmd, cmarg, follow);
  #endif
Index: openafs/src/sys/afssyscalls.h
diff -c openafs/src/sys/afssyscalls.h:1.8.2.1 openafs/src/sys/afssyscalls.h:1.8.2.3
*** openafs/src/sys/afssyscalls.h:1.8.2.1	Mon Aug 15 13:36:16 2005
--- openafs/src/sys/afssyscalls.h	Tue Apr 11 15:41:33 2006
***************
*** 26,32 ****
--- 26,37 ----
  #ifdef AFS_SGI62_ENV
  typedef uint64_t Inode;
  #else
+ #include <sys/types.h>
+ #if AFS_64BIT_ENV
+ typedef afs_uint64 Inode;
+ #else
  error Need 64 bit Inode defined.
+ #endif
  #endif				/* AFS_SGI62_ENV */
  #else /* AFS_64BIT_IOPS_ENV */
  typedef unsigned int Inode;
***************
*** 39,44 ****
--- 44,55 ----
  #define AFS_DEBUG_IOPS_LOG(F)
  #endif
  
+ /* Glue layer. */
+ #ifdef AFS_LINUX20_ENV
+ int proc_afs_syscall(long syscall, long param1, long param2, long param3, 
+ 		     long param4, int *rval);
+ #endif
+ 
  /* Declarations for inode system calls. */
  #ifdef AFS_SGI_XFS_IOPS_ENV
  extern uint64_t icreatename64(int dev, char *partname, int p0, int p1, int p2,
Index: openafs/src/sys/glue.c
diff -c /dev/null openafs/src/sys/glue.c:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:33 2006
--- openafs/src/sys/glue.c	Sat Oct 15 11:21:19 2005
***************
*** 0 ****
--- 1,55 ----
+ /*
+  * 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
+  *
+  * This file contains any necessary C glue to allow programs to communicate
+  * with the AFS kernel module.  The necessary lower-level glue is defined in
+  * syscall.s.
+  */
+ 
+ #include <afsconfig.h>
+ #include <afs/param.h>
+ 
+ RCSID
+     ("$Header: /cvs/openafs/src/sys/glue.c,v 1.1.2.2 2005/10/15 15:21:19 shadow Exp $");
+ 
+ #include <afs/afs_args.h>
+ #include <sys/file.h>
+ #include <sys/ioctl.h>
+ #if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)
+ #include <unistd.h>
+ #else
+ #include <stdio.h>
+ #endif
+ #ifdef AFS_SUN5_ENV
+ #include <fcntl.h>
+ #endif
+ #include "afssyscalls.h"
+ 
+ #ifdef AFS_LINUX20_ENV
+ int proc_afs_syscall(long syscall, long param1, long param2, long param3, 
+ 		     long param4, int *rval) {
+   struct afsprocdata syscall_data;
+   int fd = open(PROC_SYSCALL_FNAME, O_RDWR);
+   if(fd < 0)
+       fd = open(PROC_SYSCALL_ARLA_FNAME, O_RDWR);
+   if(fd < 0)
+     return -1;
+ 
+   syscall_data.syscall = syscall;
+   syscall_data.param1 = param1;
+   syscall_data.param2 = param2;
+   syscall_data.param3 = param3;
+   syscall_data.param4 = param4;
+ 
+   *rval = ioctl(fd, VIOC_SYSCALL, &syscall_data);
+ 
+   close(fd);
+ 
+   return 0;
+ }
+ #endif
Index: openafs/src/sys/mapfile
diff -c /dev/null openafs/src/sys/mapfile:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:33 2006
--- openafs/src/sys/mapfile	Mon Oct 17 15:12:06 2005
***************
*** 0 ****
--- 1,10 ----
+ # Export map for libafssetpag, used on Linux and Solaris to restrict
+ # exports from the shared libraries to just the public ABI.  Add symbol
+ # versioning while we're at it, just in case.
+ 
+ AFSSETPAG_1.0 {
+     global:
+         lsetpag;
+     local:
+         *;
+ };
Index: openafs/src/sys/pioctl_nt.c
diff -c openafs/src/sys/pioctl_nt.c:1.18.2.11 openafs/src/sys/pioctl_nt.c:1.18.2.12
*** openafs/src/sys/pioctl_nt.c:1.18.2.11	Fri Sep  2 13:28:36 2005
--- openafs/src/sys/pioctl_nt.c	Sat Oct 15 17:48:28 2005
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/sys/pioctl_nt.c,v 1.18.2.11 2005/09/02 17:28:36 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.12 2005/10/15 21:48:28 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <windows.h>
***************
*** 91,97 ****
      case CM_ERROR_TOOMANYBUFS:
  	return EFBIG;		/* hack */
      default:
! 	return ENOTTY;
      }
  }
  
--- 91,100 ----
      case CM_ERROR_TOOMANYBUFS:
  	return EFBIG;		/* hack */
      default:
! 	if (cm_code > 0 && cm_code < EILSEQ)
! 	    return cm_code;
! 	else
! 	    return ENOTTY;
      }
  }
  
Index: openafs/src/sys/rmtsys.xg
diff -c openafs/src/sys/rmtsys.xg:1.2 openafs/src/sys/rmtsys.xg:1.2.20.1
*** openafs/src/sys/rmtsys.xg:1.2	Sat Nov  4 05:05:50 2000
--- openafs/src/sys/rmtsys.xg	Sat Feb 25 01:45:29 2006
***************
*** 10,16 ****
  package RMTSYS_
  statindex 10
  prefix	S
! #define MAXPATHLEN 80
  
  %#include <rx/rx.h>
  %#include <rx/rx_null.h>
--- 10,16 ----
  package RMTSYS_
  statindex 10
  prefix	S
! #define MAXPATHLEN 4096
  
  %#include <rx/rx.h>
  %#include <rx/rx_null.h>
***************
*** 29,35 ****
  	afs_int32	group1;
  };
  
! const MAXBUFFERLEN = 2048;	/* limited due to kernel buffer restrictions */
  typedef opaque rmtbulk<MAXBUFFERLEN>;
  
  SetPag(	IN	clientcred *cred,
--- 29,35 ----
  	afs_int32	group1;
  };
  
! const MAXBUFFERLEN = 16384;	/* limited due to kernel buffer restrictions */
  typedef opaque rmtbulk<MAXBUFFERLEN>;
  
  SetPag(	IN	clientcred *cred,
Index: openafs/src/sys/setpag.c
diff -c /dev/null openafs/src/sys/setpag.c:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:33 2006
--- openafs/src/sys/setpag.c	Sat Oct 15 11:21:19 2005
***************
*** 0 ****
--- 1,66 ----
+ /*
+  * 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
+  *
+  * This file contains the lsetpag system call.  (setpag is handled by the
+  * rmtsys layer and turned into either setpag or a remote call as is
+  * appropriate.)  It is kept separate to allow for the creation of a simple
+  * shared library containing only setpag.
+  */
+ 
+ #include <afsconfig.h>
+ #include <afs/param.h>
+ 
+ RCSID
+     ("$Header: /cvs/openafs/src/sys/setpag.c,v 1.1.2.2 2005/10/15 15:21:19 shadow Exp $");
+ 
+ #include <afs/afs_args.h>
+ #if defined(AFS_SUN_ENV) && !defined(AFS_SUN5_ENV)
+ #include <unistd.h>
+ #else
+ #include <stdio.h>
+ #endif
+ #include "afssyscalls.h"
+ 
+ #ifdef AFS_AIX32_ENV
+ /*
+  * in VRMIX, system calls look just like function calls, so we don't
+  * need to do anything!
+  */
+ 
+ #else
+ #if defined(AFS_SGI_ENV)
+ 
+ #pragma weak xlsetpag = lsetpag
+ 
+ int
+ lsetpag(void)
+ {
+     return (syscall(AFS_SETPAG));
+ }
+ 
+ #else /* AFS_SGI_ENV */
+ 
+ int
+ lsetpag(void)
+ {
+     int errcode, rval;
+ 
+ #ifdef AFS_LINUX20_ENV
+     rval = proc_afs_syscall(AFSCALL_SETPAG,0,0,0,0,&errcode);
+     
+     if(rval)
+       errcode = syscall(AFS_SYSCALL, AFSCALL_SETPAG);
+ #else
+     errcode = syscall(AFS_SYSCALL, AFSCALL_SETPAG);
+ #endif
+     
+     return (errcode);
+ }
+ 
+ #endif /* !AFS_SGI_ENV */
+ #endif /* !AFS_AIX32_ENV */
Index: openafs/src/tbutc/Makefile.in
diff -c openafs/src/tbutc/Makefile.in:1.13.2.1 openafs/src/tbutc/Makefile.in:1.13.2.2
*** openafs/src/tbutc/Makefile.in:1.13.2.1	Sun Apr 24 16:05:22 2005
--- openafs/src/tbutc/Makefile.in	Mon Oct 24 15:06:37 2005
***************
*** 24,30 ****
  BUCOORDOBJS=ubik_db_if.o ../bucoord/volstub.o ../bucoord/dlq.o \
  	    status.o ../bucoord/bucoord_errs.o
  
! VOLSEROBJS=vsprocs.o
  VOLSERLIBS=${TOP_LIBDIR}/libvosadmin.a ${TOP_LIBDIR}/libafsadminutil.a
  
  LWPOBJS     =lock.o
--- 24,30 ----
  BUCOORDOBJS=ubik_db_if.o ../bucoord/volstub.o ../bucoord/dlq.o \
  	    status.o ../bucoord/bucoord_errs.o
  
! VOLSEROBJS=vsprocs.o vsutils.o
  VOLSERLIBS=${TOP_LIBDIR}/libvosadmin.a ${TOP_LIBDIR}/libafsadminutil.a
  
  LWPOBJS     =lock.o
***************
*** 109,114 ****
--- 109,117 ----
  status.o: ${BUCOORD}/status.c
  	${CC} ${CFLAGS} -c ${BUCOORD}/status.c
  
+ vsutils.o: ${VOLSER}/vsutils.c
+ 	${CC} ${CFLAGS} -c ${VOLSER}/vsutils.c
+ 
  vsprocs.o: ${VOLSER}/vsprocs.c
  	${CC} ${CFLAGS} -c ${VOLSER}/vsprocs.c
  
Index: openafs/src/tests/Makefile.in
diff -c openafs/src/tests/Makefile.in:1.12 openafs/src/tests/Makefile.in:1.12.2.1
*** openafs/src/tests/Makefile.in:1.12	Sat Jan 11 02:34:57 2003
--- openafs/src/tests/Makefile.in	Thu Mar  9 01:42:08 2006
***************
*** 3,10 ****
  
  SHELL		= /bin/sh
  
! CFLAGS		= ${DBG} ${OPTMZ} -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
! LDFLAGS=${XLDFLAGS}
  
  INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}/afs -I${TOP_INCDIR}
  INCLIBS=-L${SRCDIR}/lib/afs -L${TOP_LIBDIR}
--- 3,10 ----
  
  SHELL		= /bin/sh
  
! CFLAGS		= ${DBG} ${OPTMZ} -I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
! LDFLAGS=${XLDFLAGS} ${ARCHFLAGS}
  
  INCDIRS=-I${TOP_OBJDIR}/src/config -I${TOP_INCDIR}/afs -I${TOP_INCDIR}
  INCLIBS=-L${SRCDIR}/lib/afs -L${TOP_LIBDIR}
Index: openafs/src/tsm41/Makefile.in
diff -c openafs/src/tsm41/Makefile.in:1.7 openafs/src/tsm41/Makefile.in:1.7.6.1
*** openafs/src/tsm41/Makefile.in:1.7	Tue May 21 01:35:49 2002
--- openafs/src/tsm41/Makefile.in	Thu Mar  9 01:42:10 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS=${OPTIMIZE} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  AFSLIBS =  ${TOP_LIBDIR}/libkauth.a ${TOP_LIBDIR}/libprot.a \
  	   ${TOP_LIBDIR}/libubik.a ${TOP_LIBDIR}/libauth.a \
  	   ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libsys.a \
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS=${OPTIMIZE} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  AFSLIBS =  ${TOP_LIBDIR}/libkauth.a ${TOP_LIBDIR}/libprot.a \
  	   ${TOP_LIBDIR}/libubik.a ${TOP_LIBDIR}/libauth.a \
  	   ${TOP_LIBDIR}/librxkad.a ${TOP_LIBDIR}/libsys.a \
Index: openafs/src/tviced/Makefile.in
diff -c openafs/src/tviced/Makefile.in:1.10.2.1 openafs/src/tviced/Makefile.in:1.10.2.2
*** openafs/src/tviced/Makefile.in:1.10.2.1	Mon Aug  8 11:39:24 2005
--- openafs/src/tviced/Makefile.in	Thu Mar  9 16:46:09 2006
***************
*** 145,152 ****
  devname.o: ${VOL}/devname.c
  	${CCRULE}
  
! # only for darwin
! fstab.o: ${VOL}/fstab.c
  	${CCRULE}
  
  common.o: ${VOL}/common.c
--- 145,152 ----
  devname.o: ${VOL}/devname.c
  	${CCRULE}
  
! # only for darwin?
! fstab.o: ${UTIL}/fstab.c
  	${CCRULE}
  
  common.o: ${VOL}/common.c
Index: openafs/src/ubik/phys.c
diff -c openafs/src/ubik/phys.c:1.8 openafs/src/ubik/phys.c:1.8.2.1
*** openafs/src/ubik/phys.c:1.8	Tue Jul 15 19:17:05 2003
--- openafs/src/ubik/phys.c	Thu Mar  9 01:42:12 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/phys.c,v 1.8 2003/07/15 23:17:05 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/ubik/phys.c,v 1.8.2.1 2006/03/09 06:42:12 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 276,282 ****
      thdr.version.epoch = htonl(aversion->epoch);
      thdr.version.counter = htonl(aversion->counter);
      thdr.magic = htonl(UBIK_MAGIC);
!     thdr.size = htonl(HDRSIZE);
      code = write(fd, &thdr, sizeof(thdr));
      fsync(fd);			/* preserve over crash */
      uphys_close(fd);
--- 276,282 ----
      thdr.version.epoch = htonl(aversion->epoch);
      thdr.version.counter = htonl(aversion->counter);
      thdr.magic = htonl(UBIK_MAGIC);
!     thdr.size = htons(HDRSIZE);
      code = write(fd, &thdr, sizeof(thdr));
      fsync(fd);			/* preserve over crash */
      uphys_close(fd);
Index: openafs/src/usd/Makefile.in
diff -c openafs/src/usd/Makefile.in:1.6 openafs/src/usd/Makefile.in:1.6.8.1
*** openafs/src/usd/Makefile.in:1.6	Thu Nov  1 00:01:09 2001
--- openafs/src/usd/Makefile.in	Thu Mar  9 01:42:14 2006
***************
*** 10,16 ****
  
  
  
! CFLAGS=-I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS}
  
  all: ${TOP_LIBDIR}/libusd.a ${TOP_INCDIR}/afs/usd.h
  
--- 10,16 ----
  
  
  
! CFLAGS=-I. -I${srcdir} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS}
  
  all: ${TOP_LIBDIR}/libusd.a ${TOP_INCDIR}/afs/usd.h
  
Index: openafs/src/usd/test/Makefile.in
diff -c openafs/src/usd/test/Makefile.in:1.5 openafs/src/usd/test/Makefile.in:1.5.2.1
*** openafs/src/usd/test/Makefile.in:1.5	Tue Oct 15 23:59:17 2002
--- openafs/src/usd/test/Makefile.in	Thu Mar  9 01:42:15 2006
***************
*** 10,16 ****
  
  
  INCDIRS= -I${DESTDIR}/include  -I..
! CFLAGS = $(DBUG) -I${SRCDIR}/include ${INCDIRS} ${XCFLAGS}
  LIBUSD=DEST/lib/afs/libusd.a
  
  #####################################################################
--- 10,16 ----
  
  
  INCDIRS= -I${DESTDIR}/include  -I..
! CFLAGS = $(DBUG) -I${SRCDIR}/include ${INCDIRS} ${XCFLAGS} ${ARCHFLAGS}
  LIBUSD=DEST/lib/afs/libusd.a
  
  #####################################################################
Index: openafs/src/uss/Makefile.in
diff -c openafs/src/uss/Makefile.in:1.7 openafs/src/uss/Makefile.in:1.7.2.1
*** openafs/src/uss/Makefile.in:1.7	Thu Jun 19 12:55:10 2003
--- openafs/src/uss/Makefile.in	Thu Mar  9 01:42:16 2006
***************
*** 13,19 ****
  all: uss
  
  CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config \
! 	-I${TOP_INCDIR} -I. ${XCFLAGS}
  
  #
  # Build targets
--- 13,19 ----
  all: uss
  
  CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config \
! 	-I${TOP_INCDIR} -I. ${XCFLAGS} ${ARCHFLAGS}
  
  #
  # Build targets
Index: openafs/src/util/Makefile.am
diff -c openafs/src/util/Makefile.am:1.1 openafs/src/util/Makefile.am:1.1.16.1
*** openafs/src/util/Makefile.am:1.1	Tue Jun  5 16:17:53 2001
--- openafs/src/util/Makefile.am	Thu Mar  9 01:42:17 2006
***************
*** 1,4 ****
! # $Id: Makefile.am,v 1.1 2001/06/05 20:17:53 shadow Exp $
  
  include $(top_srcdir)/Makefile.am.common
  
--- 1,4 ----
! # $Id: Makefile.am,v 1.1.16.1 2006/03/09 06:42:17 shadow Exp $
  
  include $(top_srcdir)/Makefile.am.common
  
***************
*** 27,31 ****
  	flipbase64.c	\
  	afs_atomlist.c	\
  	afs_lhash.c	\
! 	snprintf.c
  
--- 27,32 ----
  	flipbase64.c	\
  	afs_atomlist.c	\
  	afs_lhash.c	\
! 	snprintf.c	\
! 	fstab.c
  
Index: openafs/src/util/Makefile.in
diff -c openafs/src/util/Makefile.in:1.24.2.4 openafs/src/util/Makefile.in:1.24.2.5
*** openafs/src/util/Makefile.in:1.24.2.4	Tue Jun 21 16:20:00 2005
--- openafs/src/util/Makefile.in	Thu Mar  9 01:42:17 2006
***************
*** 12,18 ****
  
  objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
  	 hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
! 	 dirpath.o fileutil.o netutils.o flipbase64.o \
  	 afs_atomlist.o afs_lhash.o snprintf.o strlcat.o strlcpy.o \
  	 daemon.o rxkstats.o ${REGEX_OBJ}
  
--- 12,18 ----
  
  objects = assert.o base64.o casestrcpy.o ktime.o volparse.o hostparse.o \
  	 hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
! 	 dirpath.o fileutil.o netutils.o flipbase64.o fstab.o \
  	 afs_atomlist.o afs_lhash.o snprintf.o strlcat.o strlcpy.o \
  	 daemon.o rxkstats.o ${REGEX_OBJ}
  
***************
*** 80,85 ****
--- 80,88 ----
  snprintf.o: ${srcdir}/snprintf.c ${includes}
  	${CCOBJ} ${CFLAGS} -c ${srcdir}/snprintf.c
  
+ fstab.o: ${srcdir}/fstab.c ${includes}
+ 	${CCOBJ} ${CFLAGS} -c ${srcdir}/fstab.c
+ 
  base64.o: ${srcdir}/base64.c ${includes}
  	${CCOBJ} ${CFLAGS} -c ${srcdir}/base64.c
  
***************
*** 389,392 ****
  	    assert.c base64.c casestrcpy.c ktime.c volparse.c hostparse.c \
  	    hputil.c kreltime.c isathing.c get_krbrlm.c uuid.c serverLog.c \
  	    dirpath.c fileutil.c netutils.c flipbase64.c \
! 	    afs_atomlist.c afs_lhash.c snprintf.c
--- 392,395 ----
  	    assert.c base64.c casestrcpy.c ktime.c volparse.c hostparse.c \
  	    hputil.c kreltime.c isathing.c get_krbrlm.c uuid.c serverLog.c \
  	    dirpath.c fileutil.c netutils.c flipbase64.c \
! 	    afs_atomlist.c afs_lhash.c snprintf.c fstab.c
Index: openafs/src/util/afsutil.h
diff -c openafs/src/util/afsutil.h:1.17.2.2 openafs/src/util/afsutil.h:1.17.2.3
*** openafs/src/util/afsutil.h:1.17.2.2	Mon Jul 11 15:08:49 2005
--- openafs/src/util/afsutil.h	Wed Mar 15 13:35:56 2006
***************
*** 30,35 ****
--- 30,36 ----
  extern int serverLogSyslog;
  extern int serverLogSyslogFacility;
  extern char *serverLogSyslogTag;
+ #include <arpa/inet.h> /* for inet_ntoa() */
  #endif
  extern void vFSLog(const char *format, va_list args);
  extern void SetLogThreadNumProgram(int (*func) () );
Index: openafs/src/util/fstab.c
diff -c /dev/null openafs/src/util/fstab.c:1.1.2.2
*** /dev/null	Fri Apr 14 09:27:33 2006
--- openafs/src/util/fstab.c	Thu Mar  9 01:42:17 2006
***************
*** 0 ****
--- 1,181 ----
+ /*
+  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
+  *
+  * @APPLE_LICENSE_HEADER_START@
+  * 
+  * This file contains Original Code and/or Modifications of Original Code
+  * as defined in and that are subject to the Apple Public Source License
+  * Version 2.0 (the 'License'). You may not use this file except in
+  * compliance with the License. Please obtain a copy of the License at
+  * http://www.opensource.apple.com/apsl/ and read it before using this
+  * file.
+  * 
+  * The Original Code and all software distributed under the License are
+  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+  * Please see the License for the specific language governing rights and
+  * limitations under the License.
+  * 
+  * @APPLE_LICENSE_HEADER_END@
+  */
+ /*
+  * Copyright (c) 1980, 1988, 1993
+  *	The Regents of the University of California.  All rights reserved.
+  *
+  * Redistribution and use in source and binary forms, with or without
+  * modification, are permitted provided that the following conditions
+  * are met:
+  * 1. Redistributions of source code must retain the above copyright
+  *    notice, this list of conditions and the following disclaimer.
+  * 2. Redistributions in binary form must reproduce the above copyright
+  *    notice, this list of conditions and the following disclaimer in the
+  *    documentation and/or other materials provided with the distribution.
+  * 3. All advertising materials mentioning features or use of this software
+  *    must display the following acknowledgement:
+  *	This product includes software developed by the University of
+  *	California, Berkeley and its contributors.
+  * 4. Neither the name of the University nor the names of its contributors
+  *    may be used to endorse or promote products derived from this software
+  *    without specific prior written permission.
+  *
+  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  * SUCH DAMAGE.
+  */
+ 
+ #include <afs/param.h>
+ 
+ #if defined(AFS_DARWIN_ENV)
+ /*-----------------------------------------------------------------------
+  * This version of fstab.c is intended to be used on Darwin systems to
+  * replace getfsent() and family.  It has been modified so that rather
+  * than read /etc/fstab, it calls getfsstat() to get the real list of
+  * mounted volumes.
+  *-----------------------------------------------------------------------*/
+ 
+ #include <errno.h>
+ #include <fstab.h>
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <sys/param.h>
+ #include <sys/ucred.h>
+ #include <sys/mount.h>
+ 
+ #define	STDERR_FILENO	2
+ 
+ static struct fstab _fs_fstab;
+ static struct statfs *_fs_buf;
+ static struct statfs *_fs_ptr;
+ static int _fs_count;
+ 
+ static error __P((int));
+ static fstabscan __P((void));
+ 
+ static
+ fstabscan()
+ {
+     if (_fs_count <= 0)
+ 	return (0);
+     _fs_fstab.fs_spec = _fs_ptr->f_mntfromname;
+     _fs_fstab.fs_file = _fs_ptr->f_mntonname;
+     _fs_fstab.fs_vfstype = _fs_ptr->f_fstypename;
+     _fs_fstab.fs_mntops = _fs_ptr->f_fstypename;	// no mount options given
+     _fs_fstab.fs_type = (_fs_ptr->f_flags & MNT_RDONLY) ? FSTAB_RO : FSTAB_RW;
+     _fs_fstab.fs_freq = 0;
+     _fs_fstab.fs_passno = 0;
+ 
+     _fs_ptr++;
+     _fs_count--;
+     return (1);
+ }
+ 
+ struct fstab *
+ getfsent()
+ {
+     if (!_fs_buf && !setfsent() || !fstabscan())
+ 	return ((struct fstab *)NULL);
+     return (&_fs_fstab);
+ }
+ 
+ struct fstab *
+ getfsspec(name)
+      register const char *name;
+ {
+     if (setfsent())
+ 	while (fstabscan())
+ 	    if (!strcmp(_fs_fstab.fs_spec, name))
+ 		return (&_fs_fstab);
+     return ((struct fstab *)NULL);
+ }
+ 
+ struct fstab *
+ getfsfile(name)
+      register const char *name;
+ {
+     if (setfsent())
+ 	while (fstabscan())
+ 	    if (!strcmp(_fs_fstab.fs_file, name))
+ 		return (&_fs_fstab);
+     return ((struct fstab *)NULL);
+ }
+ 
+ setfsent()
+ {
+     long bufsize;
+ 
+     if (_fs_buf) {
+ 	free(_fs_buf);
+ 	_fs_buf = NULL;
+     }
+     if ((_fs_count = getfsstat(NULL, 0, MNT_WAIT)) < 0) {
+ 	error(errno);
+ 	return (0);
+     }
+     bufsize = (long)_fs_count *sizeof(struct statfs);
+     if ((_fs_buf = malloc(bufsize)) == NULL) {
+ 	error(errno);
+ 	return (0);
+     }
+     if (getfsstat(_fs_buf, bufsize, MNT_WAIT) < 0) {
+ 	error(errno);
+ 	return (0);
+     }
+     _fs_ptr = _fs_buf;
+     return (1);
+ }
+ 
+ void
+ endfsent()
+ {
+     if (_fs_buf) {
+ 	free(_fs_buf);
+ 	_fs_buf = NULL;
+     }
+     _fs_count = 0;
+ }
+ 
+ static
+ error(err)
+      int err;
+ {
+     char *p;
+ 
+     (void)write(STDERR_FILENO, "fstab: ", 7);
+     (void)write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1);
+     (void)write(STDERR_FILENO, ": ", 1);
+     p = strerror(err);
+     (void)write(STDERR_FILENO, p, strlen(p));
+     (void)write(STDERR_FILENO, "\n", 1);
+ }
+ #endif /* defined(AFS_DARWIN_ENV) */
Index: openafs/src/util/kreltime.c
diff -c openafs/src/util/kreltime.c:1.8 openafs/src/util/kreltime.c:1.8.2.1
*** openafs/src/util/kreltime.c:1.8	Tue Jul 15 19:17:16 2003
--- openafs/src/util/kreltime.c	Mon Mar 20 08:28:38 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/kreltime.c,v 1.8 2003/07/15 23:17:16 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/kreltime.c,v 1.8.2.1 2006/03/20 13:28:38 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 115,122 ****
  ktimeDate_FromInt32(afs_int32 timeSecs, struct ktime_date *ktimePtr)
  {
      struct tm *timePtr;
  
!     timePtr = localtime((time_t *) & timeSecs);
  
      /* copy the relevant fields */
      ktimePtr->sec = timePtr->tm_sec;
--- 115,123 ----
  ktimeDate_FromInt32(afs_int32 timeSecs, struct ktime_date *ktimePtr)
  {
      struct tm *timePtr;
+     time_t     tt = timeSecs;
  
!     timePtr = localtime(&tt);
  
      /* copy the relevant fields */
      ktimePtr->sec = timePtr->tm_sec;
Index: openafs/src/util/softsig.c
diff -c openafs/src/util/softsig.c:1.8.2.1 openafs/src/util/softsig.c:1.8.2.2
*** openafs/src/util/softsig.c:1.8.2.1	Thu Jun  2 00:41:30 2005
--- openafs/src/util/softsig.c	Thu Feb 23 07:33:39 2006
***************
*** 36,42 ****
  static struct {
      void (*handler) (int);
      int pending;
! #if !defined(AFS_DARWIN60_ENV) || !defined(AFS_NBSD_ENV)
      int fatal;
  #endif /* !defined(AFS_DARWIN60_ENV) || !defined(AFS_NBSD_ENV) */
      int inited;
--- 36,42 ----
  static struct {
      void (*handler) (int);
      int pending;
! #if !defined(AFS_DARWIN60_ENV) || defined(AFS_NBSD30_ENV) || !defined(AFS_NBSD_ENV)
      int fatal;
  #endif /* !defined(AFS_DARWIN60_ENV) || !defined(AFS_NBSD_ENV) */
      int inited;
***************
*** 53,59 ****
      pthread_sigmask(SIG_BLOCK, &ss, &os);
      pthread_sigmask(SIG_SETMASK, &os, NULL);
      sigaddset(&ss, SIGUSR1);
! #if defined(AFS_DARWIN60_ENV) || defined(AFS_NBSD_ENV)
      pthread_sigmask (SIG_BLOCK, &ss, NULL);
      sigdelset (&os, SIGUSR1);
  #else /* !defined(AFS_DARWIN60_ENV) && !defined(AFS_NBSD_ENV) */
--- 53,59 ----
      pthread_sigmask(SIG_BLOCK, &ss, &os);
      pthread_sigmask(SIG_SETMASK, &os, NULL);
      sigaddset(&ss, SIGUSR1);
! #if defined(AFS_DARWIN60_ENV) || (defined(AFS_NBSD_ENV) && !defined(AFS_NBSD30_ENV))
      pthread_sigmask (SIG_BLOCK, &ss, NULL);
      sigdelset (&os, SIGUSR1);
  #else /* !defined(AFS_DARWIN60_ENV) && !defined(AFS_NBSD_ENV) */
***************
*** 74,80 ****
  	for (i = 0; i < NSIG; i++) {
  	    if (softsig_sigs[i].handler && !softsig_sigs[i].inited) {
  		sigaddset(&ss, i);
! #if defined(AFS_DARWIN60_ENV) || defined(AFS_NBSD_ENV)
  		pthread_sigmask (SIG_BLOCK, &ss, NULL);
  		sigdelset (&os, i);
  #endif /* defined(AFS_DARWIN60_ENV) || defined(AFS_NBSD_ENV) */
--- 74,80 ----
  	for (i = 0; i < NSIG; i++) {
  	    if (softsig_sigs[i].handler && !softsig_sigs[i].inited) {
  		sigaddset(&ss, i);
! #if defined(AFS_DARWIN60_ENV) || (defined(AFS_NBSD_ENV) && !defined(AFS_NBSD30_ENV))
  		pthread_sigmask (SIG_BLOCK, &ss, NULL);
  		sigdelset (&os, i);
  #endif /* defined(AFS_DARWIN60_ENV) || defined(AFS_NBSD_ENV) */
***************
*** 87,93 ****
  	    }
  	}
  	if (i == NSIG) {
! #if defined(AFS_DARWIN60_ENV) || defined(AFS_NBSD_ENV)
  	    sigsuspend (&os);
  #else /* !defined(AFS_DARWIN60_ENV) && !defined(AFS_NBSD_ENV) */
  	    sigwait(&ss, &sigw);
--- 87,93 ----
  	    }
  	}
  	if (i == NSIG) {
! #if defined(AFS_DARWIN60_ENV) || (defined(AFS_NBSD_ENV) && !defined(AFS_NBSD30_ENV))
  	    sigsuspend (&os);
  #else /* !defined(AFS_DARWIN60_ENV) && !defined(AFS_NBSD_ENV) */
  	    sigwait(&ss, &sigw);
Index: openafs/src/util/uuid.c
diff -c openafs/src/util/uuid.c:1.16 openafs/src/util/uuid.c:1.16.2.1
*** openafs/src/util/uuid.c:1.16	Tue Jul 15 19:17:16 2003
--- openafs/src/util/uuid.c	Fri Dec 23 20:09:55 2005
***************
*** 50,56 ****
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/uuid.c,v 1.16 2003/07/15 23:17:16 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
--- 50,56 ----
  #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/util/uuid.c,v 1.16.2.1 2005/12/24 01:09:55 shadow Exp $");
  
  #ifdef KERNEL
  #include "afs/sysincludes.h"
***************
*** 418,424 ****
  void
  uuid__get_os_time(uuid_time_t * os_time)
  {
!     struct timeval tp;
  
      osi_GetTime(&tp);
      os_time->hi = tp.tv_sec;
--- 418,424 ----
  void
  uuid__get_os_time(uuid_time_t * os_time)
  {
!     osi_timeval_t tp;
  
      osi_GetTime(&tp);
      os_time->hi = tp.tv_sec;
Index: openafs/src/util/test/Makefile.in
diff -c openafs/src/util/test/Makefile.in:1.4 openafs/src/util/test/Makefile.in:1.4.2.1
*** openafs/src/util/test/Makefile.in:1.4	Tue Jul  1 15:24:05 2003
--- openafs/src/util/test/Makefile.in	Thu Mar  9 01:42:19 2006
***************
*** 9,15 ****
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS = -I. -I.. -I${SRCDIR}/include ${XCFLAGS} ${DBG}
  
  tests: test_ktime ktest dirpath_test
  
--- 9,15 ----
  include @TOP_OBJDIR@/src/config/Makefile.config
  
  
! CFLAGS = -I. -I.. -I${SRCDIR}/include ${XCFLAGS} ${ARCHFLAGS} ${DBG}
  
  tests: test_ktime ktest dirpath_test
  
Index: openafs/src/venus/Makefile.in
diff -c openafs/src/venus/Makefile.in:1.30.2.2 openafs/src/venus/Makefile.in:1.30.2.3
*** openafs/src/venus/Makefile.in:1.30.2.2	Mon Apr  4 03:36:32 2005
--- openafs/src/venus/Makefile.in	Thu Mar  9 01:42:21 2006
***************
*** 159,165 ****
  					-o kdump.$$IP kdump.$$IP.o \
  					${TOP_LIBDIR}/libcmd64.a -lelf \
  				;; \
! 			*) 	${CC} ${XCFLAGS} \
  					$$CPU_KDEFS \
  					-o kdump.$$IP kdump.$$IP.o \
  					${TOP_LIBDIR}/libcmd.a -lelf \
--- 159,165 ----
  					-o kdump.$$IP kdump.$$IP.o \
  					${TOP_LIBDIR}/libcmd64.a -lelf \
  				;; \
! 			*) 	${CC} ${XCFLAGS} ${ARCHFLAGS} \
  					$$CPU_KDEFS \
  					-o kdump.$$IP kdump.$$IP.o \
  					${TOP_LIBDIR}/libcmd.a -lelf \
***************
*** 213,219 ****
  						${KERN_DBG} ${KERN_OPTMZ} -I${TOP_INCDIR} \
  						-I${TOP_OBJDIR}/src/config \
  						$$CPU_KDEFS \
! 						${XCFLAGS} -DAFS_32BIT_KERNEL_ENV \
  						-c ${srcdir}/kdump.c -o kdump.$$IP.o \
  					;; \
  				esac || exit $$?; \
--- 213,219 ----
  						${KERN_DBG} ${KERN_OPTMZ} -I${TOP_INCDIR} \
  						-I${TOP_OBJDIR}/src/config \
  						$$CPU_KDEFS \
! 						${XCFLAGS} ${ARCHFLAGS} -DAFS_32BIT_KERNEL_ENV \
  						-c ${srcdir}/kdump.c -o kdump.$$IP.o \
  					;; \
  				esac || exit $$?; \
***************
*** 223,229 ****
  			touch kdump.o ;; \
  		*) \
  			${CC} ${KERN_DBG} ${KERN_OPTMZ} -I${TOP_SRCDIR} -I${TOP_INCDIR}/afs \
! 			-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src -I${TOP_INCDIR} ${XCFLAGS} \
  			-o kdump.o -c ${srcdir}/kdump.c ;; \
  	esac ;
  
--- 223,229 ----
  			touch kdump.o ;; \
  		*) \
  			${CC} ${KERN_DBG} ${KERN_OPTMZ} -I${TOP_SRCDIR} -I${TOP_INCDIR}/afs \
! 			-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src -I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS} \
  			-o kdump.o -c ${srcdir}/kdump.c ;; \
  	esac ;
  
***************
*** 243,249 ****
  		-I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
  		-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
  		-I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
! 		-I${TOP_INCDIR} ${XCFLAGS} -o kdump-linux-${LINUX_VERSION}.o \
  		-c ${srcdir}/kdump.c
  
  kdump-linux-@LINUX_VERSION@: kdump-linux-@LINUX_VERSION@.o
--- 243,249 ----
  		-I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
  		-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
  		-I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
! 		-I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS} -o kdump-linux-${LINUX_VERSION}.o \
  		-c ${srcdir}/kdump.c
  
  kdump-linux-@LINUX_VERSION@: kdump-linux-@LINUX_VERSION@.o
***************
*** 257,263 ****
  		-I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
  		-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
  		-I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
! 		-I${TOP_INCDIR} ${XCFLAGS} -mno-fp-regs -ffixed-8 \
  		-o kdump-alpha_linux-${LINUX_VERSION}.o -c ${srcdir}/kdump.c ;; \
  
  kdump-alpha_linux-@LINUX_VERSION@: kdump-alpha_linux-@LINUX_VERSION@.o
--- 257,263 ----
  		-I${TOP_OBJDIR}/src/afs/${MKAFS_OSTYPE} \
  		-I${TOP_OBJDIR}/src/config -I${TOP_OBJDIR}/src/libafs/afs \
  		-I${TOP_SRCDIR} -I${TOP_SRCDIR}/afs/${MKAFS_OSTYPE} \
! 		-I${TOP_INCDIR} ${XCFLAGS} ${ARCHFLAGS} -mno-fp-regs -ffixed-8 \
  		-o kdump-alpha_linux-${LINUX_VERSION}.o -c ${srcdir}/kdump.c ;; \
  
  kdump-alpha_linux-@LINUX_VERSION@: kdump-alpha_linux-@LINUX_VERSION@.o
Index: openafs/src/venus/cmdebug.c
diff -c openafs/src/venus/cmdebug.c:1.15 openafs/src/venus/cmdebug.c:1.15.2.4
*** openafs/src/venus/cmdebug.c:1.15	Tue Jul 15 19:17:20 2003
--- openafs/src/venus/cmdebug.c	Thu Mar 23 11:45:53 2006
***************
*** 11,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.15 2003/07/15 23:17:20 shadow Exp $");
  
  
  #include <sys/types.h>
  #include <netinet/in.h>
  #include <sys/socket.h>
  #include <netdb.h>
  #include <stdio.h>
  #ifdef HAVE_STRING_H
  #include <string.h>
--- 11,30 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/cmdebug.c,v 1.15.2.4 2006/03/23 16:45:53 shadow Exp $");
  
  
  #include <sys/types.h>
+ #ifdef AFS_NT40_ENV
+ #include <winsock2.h>
+ #include <rpc.h>
+ #else
+ #ifdef HAVE_NETINET_IN_H
  #include <netinet/in.h>
+ #endif
  #include <sys/socket.h>
  #include <netdb.h>
+ #endif
  #include <stdio.h>
  #ifdef HAVE_STRING_H
  #include <string.h>
***************
*** 37,45 ****
  
  extern struct hostent *hostutil_GetHostByName();
  
! static
! PrintCacheConfig(aconn)
!      struct rx_connection *aconn;
  {
      struct cacheConfig c;
      afs_uint32 srv_ver, conflen;
--- 44,51 ----
  
  extern struct hostent *hostutil_GetHostByName();
  
! static int
! PrintCacheConfig(struct rx_connection *aconn)
  {
      struct cacheConfig c;
      afs_uint32 srv_ver, conflen;
***************
*** 80,99 ****
      }
  }
  
! static
! PrintInterfaces(aconn)
!      struct rx_connection *aconn;
  {
      struct interfaceAddr addr;
      int i, code;
  
!     code = RXAFSCB_WhoAreYou(aconn, &addr);
      if (code) {
  	printf("cmdebug: error checking interfaces: %s\n",
  	       error_message(code));
  	return 0;
      }
  
      printf("Host interfaces:\n");
      for (i = 0; i < addr.numberOfInterfaces; i++) {
  	printf("%s", afs_inet_ntoa(htonl(addr.addr_in[i])));
--- 86,129 ----
      }
  }
  
! #ifndef CAPABILITY_BITS
! #define CAPABILITY_ERRORTRANS (1<<0)
! #define CAPABILITY_BITS 1
! #endif
! 
! static int
! PrintInterfaces(struct rx_connection *aconn)
  {
+     Capabilities caps;
      struct interfaceAddr addr;
+ #ifdef AFS_NT40_ENV
+     char * p;
+ #else
+     char uuidstr[128];
+ #endif
      int i, code;
  
!     caps.Capabilities_val = NULL;
!     caps.Capabilities_len = 0;
! 
!     code = RXAFSCB_TellMeAboutYourself(aconn, &addr, &caps);
!     if (code == RXGEN_OPCODE)
!         code = RXAFSCB_WhoAreYou(aconn, &addr);
      if (code) {
  	printf("cmdebug: error checking interfaces: %s\n",
  	       error_message(code));
  	return 0;
      }
  
+ #ifdef AFS_NT40_ENV
+     UuidToString((UUID *)&addr.uuid, &p);
+     printf("UUID: %s\n",p);
+     RpcStringFree(&p);
+ #else
+     afsUUID_to_string(&addr.uuid, uuidstr, sizeof(uuidstr));
+     printf("UUID: %s\n",uuidstr);
+ #endif
+ 
      printf("Host interfaces:\n");
      for (i = 0; i < addr.numberOfInterfaces; i++) {
  	printf("%s", afs_inet_ntoa(htonl(addr.addr_in[i])));
***************
*** 104,115 ****
  	printf("\n");
      }
  
      return 0;
  }
  
! static
! IsLocked(alock)
!      register struct AFSDBLockDesc *alock;
  {
      if (alock->waitStates || alock->exclLocked || alock->numWaiting
  	|| alock->readersReading)
--- 134,157 ----
  	printf("\n");
      }
  
+     if (caps.Capabilities_val) {
+         printf("Capabilities:\n");
+         if (caps.Capabilities_val[0] & CAPABILITY_ERRORTRANS) {
+             printf("Error Translation\n");  
+         }
+         printf("\n");
+     }
+ 
+     if (caps.Capabilities_val)
+ 	free(caps.Capabilities_val);
+     caps.Capabilities_val = NULL;
+     caps.Capabilities_len = 0;
+ 
      return 0;
  }
  
! static int
! IsLocked(register struct AFSDBLockDesc *alock)
  {
      if (alock->waitStates || alock->exclLocked || alock->numWaiting
  	|| alock->readersReading)
***************
*** 117,125 ****
      return 0;
  }
  
! static
! PrintLock(alock)
!      register struct AFSDBLockDesc *alock;
  {
      printf("(");
      if (alock->waitStates) {
--- 159,166 ----
      return 0;
  }
  
! static int
! PrintLock(register struct AFSDBLockDesc *alock)
  {
      printf("(");
      if (alock->waitStates) {
***************
*** 147,156 ****
      return 0;
  }
  
! static
! PrintLocks(aconn, aint32)
!      int aint32;
!      register struct rx_connection *aconn;
  {
      register int i;
      struct AFSDBLock lock;
--- 188,195 ----
      return 0;
  }
  
! static int
! PrintLocks(register struct rx_connection *aconn, int aint32)
  {
      register int i;
      struct AFSDBLock lock;
***************
*** 246,252 ****
  	    continue;
  	}
  
! 	if (!aint32 && !IsLocked(&centry.lock))
  	    continue;
  
  	/* otherwise print this entry */
--- 285,293 ----
  	    continue;
  	}
  
! 	if (aint32 == 0 && !IsLocked(&centry.lock) ||
!             aint32 == 2 && centry.refCount == 0 ||
!             aint32 == 4 && centry.callback == 0)
  	    continue;
  
  	/* otherwise print this entry */
***************
*** 265,271 ****
  	    PrintLock(&centry.lock);
  	    printf("\n");
  	}
! 	printf("    %d bytes\tDV %d refcnt %d\n", centry.Length,
  	       centry.DataVersion, centry.refCount);
  	printf("    callback %08x\texpires %u\n", centry.callback,
  	       centry.cbExpires);
--- 306,312 ----
  	    PrintLock(&centry.lock);
  	    printf("\n");
  	}
! 	printf("    %12d bytes  DV %12d  refcnt %5d\n", centry.Length,
  	       centry.DataVersion, centry.refCount);
  	printf("    callback %08x\texpires %u\n", centry.callback,
  	       centry.cbExpires);
***************
*** 279,284 ****
--- 320,333 ----
  	    printf("mount point");
  	else if (centry.mvstat == 2)
  	    printf("volume root");
+ 	else if (centry.mvstat == 3)	/* windows */
+ 	    printf("directory");
+ 	else if (centry.mvstat == 4)	/* windows */
+ 	    printf("symlink");
+ 	else if (centry.mvstat == 5)	/* windows */
+ 	    printf("microsoft dfs link");
+ 	else if (centry.mvstat == 6)	/* windows */
+ 	    printf("invalid link");
  	else
  	    printf("bogus mvstat %d", centry.mvstat);
  	printf("\n    states (0x%x)", centry.states);
***************
*** 328,334 ****
  	    continue;
  	}
  
! 	if (!aint32 && !IsLocked(&centry.lock))
  	    continue;
  
  	/* otherwise print this entry */
--- 377,385 ----
  	    continue;
  	}
  
! 	if (aint32 == 0 && !IsLocked(&centry.lock) ||
!             aint32 == 2 && centry.refCount == 0 ||
!             aint32 == 4 && centry.callback == 0)
  	    continue;
  
  	/* otherwise print this entry */
***************
*** 348,357 ****
  	    printf("\n");
  	}
  #ifdef AFS_64BIT_ENV
! 	printf("    %lld bytes\tDV %d refcnt %d\n", centry.Length,
  	       centry.DataVersion, centry.refCount);
  #else
! 	printf("    %d bytes\tDV %d refcnt %d\n", centry.Length,
  	       centry.DataVersion, centry.refCount);
  #endif
  	printf("    callback %08x\texpires %u\n", centry.callback,
--- 399,413 ----
  	    printf("\n");
  	}
  #ifdef AFS_64BIT_ENV
! #ifdef AFS_NT40_ENV
! 	printf("    %12I64d bytes  DV %12d  refcnt %5d\n", centry.Length,
  	       centry.DataVersion, centry.refCount);
  #else
! 	printf("    %12llu bytes  DV %12d  refcnt %5d\n", centry.Length,
! 	       centry.DataVersion, centry.refCount);
! #endif
! #else
! 	printf("    %12d bytes  DV %12d  refcnt %5d\n", centry.Length,
  	       centry.DataVersion, centry.refCount);
  #endif
  	printf("    callback %08x\texpires %u\n", centry.callback,
***************
*** 366,372 ****
  	    printf("mount point");
  	else if (centry.mvstat == 2)
  	    printf("volume root");
! 	else
  	    printf("bogus mvstat %d", centry.mvstat);
  	printf("\n    states (0x%x)", centry.states);
  	if (centry.states & 1)
--- 422,436 ----
  	    printf("mount point");
  	else if (centry.mvstat == 2)
  	    printf("volume root");
! 	else if (centry.mvstat == 3)
! 	    printf("directory");
! 	else if (centry.mvstat == 4)
! 	    printf("symlink");
! 	else if (centry.mvstat == 5)
! 	    printf("microsoft dfs link");
! 	else if (centry.mvstat == 6)
! 	    printf("invalid link");
!         else
  	    printf("bogus mvstat %d", centry.mvstat);
  	printf("\n    states (0x%x)", centry.states);
  	if (centry.states & 1)
***************
*** 401,409 ****
  	return PrintCacheEntries32(aconn, aint32);
  }
  
! static
! CommandProc(as)
!      struct cmd_syndesc *as;
  {
      struct rx_connection *conn;
      register char *hostName;
--- 465,472 ----
  	return PrintCacheEntries32(aconn, aint32);
  }
  
! int
! CommandProc(struct cmd_syndesc *as, char *arock)
  {
      struct rx_connection *conn;
      register char *hostName;
***************
*** 431,460 ****
  	       hostName);
  	exit(1);
      }
!     if (as->parms[3].items) {
  	/* -addrs */
  	PrintInterfaces(conn);
  	return 0;
      }
!     if (as->parms[4].items) {
  	/* -cache */
  	PrintCacheConfig(conn);
  	return 0;
      }
      if (as->parms[2].items)
  	int32p = 1;
      else
  	int32p = 0;
!     PrintLocks(conn, int32p);
!     PrintCacheEntries(conn, int32p);
      return 0;
  }
  
  #include "AFS_component_version_number.c"
  
! main(argc, argv)
!      int argc;
!      char **argv;
  {
      register struct cmd_syndesc *ts;
  
--- 494,534 ----
  	       hostName);
  	exit(1);
      }
!     if (as->parms[5].items) {
  	/* -addrs */
  	PrintInterfaces(conn);
  	return 0;
      }
!     if (as->parms[6].items) {
  	/* -cache */
  	PrintCacheConfig(conn);
  	return 0;
      }
      if (as->parms[2].items)
+         /* -long */
  	int32p = 1;
+     else if (as->parms[3].items)
+         /* -refcounts */
+         int32p = 2;
+     else if (as->parms[4].items)
+         /* -callbacks */
+         int32p = 4;
      else
  	int32p = 0;
! 
!     if (int32p == 0 || int32p == 1)
!         PrintLocks(conn, int32p);
!     if (int32p >= 0 || int32p <= 4)
!         PrintCacheEntries(conn, int32p);
      return 0;
  }
  
+ #ifndef AFS_NT40_ENV
  #include "AFS_component_version_number.c"
+ #endif
  
! int
! main(int argc, char **argv)
  {
      register struct cmd_syndesc *ts;
  
***************
*** 472,483 ****
--- 546,569 ----
      nsa.sa_flags = SA_FULLDUMP;
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
+ 
+ #ifdef AFS_NT40_ENV
+     if (afs_winsockInit() < 0) {
+         printf("%s: Couldn't initialize winsock. Exiting...\n", argv[0]);
+         return 1;
+     }
+ #endif
+ 
      rx_Init(0);
  
      ts = cmd_CreateSyntax(NULL, CommandProc, 0, "probe unik server");
      cmd_AddParm(ts, "-servers", CMD_SINGLE, CMD_REQUIRED, "server machine");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "IP port");
      cmd_AddParm(ts, "-long", CMD_FLAG, CMD_OPTIONAL, "print all info");
+     cmd_AddParm(ts, "-refcounts", CMD_FLAG, CMD_OPTIONAL, 
+                  "print only cache entries with positive reference counts");
+     cmd_AddParm(ts, "-callbacks", CMD_FLAG, CMD_OPTIONAL, 
+                  "print only cache entries with callbacks");
      cmd_AddParm(ts, "-addrs", CMD_FLAG, CMD_OPTIONAL,
  		"print only host interfaces");
      cmd_AddParm(ts, "-cache", CMD_FLAG, CMD_OPTIONAL,
Index: openafs/src/venus/fs.c
diff -c openafs/src/venus/fs.c:1.24.2.3 openafs/src/venus/fs.c:1.24.2.4
*** openafs/src/venus/fs.c:1.24.2.3	Mon Jul 11 15:03:42 2005
--- openafs/src/venus/fs.c	Mon Jan 23 16:07:42 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/fs.c,v 1.24.2.3 2005/07/11 19:03:42 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.4 2006/01/23 21:07:42 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();
  
  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();
  
  extern char *hostutil_GetNameByINet();
  extern struct hostent *hostutil_GetHostByName();
***************
*** 3437,3442 ****
--- 3437,3447 ----
      ts = cmd_CreateSyntax("setcbaddr", CallBackRxConnCmd, 0, "configure callback connection address");
      cmd_AddParm(ts, "-addr", CMD_SINGLE, CMD_OPTIONAL, "host name or address");
  
+     /* try to find volume location information */
+     ts = cmd_CreateSyntax("getfid", GetFidCmd, 0,
+ 			  "get fid for file(s)");
+     cmd_AddParm(ts, "-path", CMD_LIST, CMD_OPTIONAL, "dir/file path");
+ 
      code = cmd_Dispatch(argc, argv);
      if (rxInitDone)
  	rx_Finalize();
***************
*** 3794,3796 ****
--- 3799,3823 ----
      return 0;
  }
  
+ static int
+ GetFidCmd(struct cmd_syndesc *as, char *arock)
+ {
+     struct ViceIoctl blob;
+     struct cmd_item *ti;
+     for (ti = as->parms[0].items; ti; ti = ti->next) {
+       struct VenusFid vfid;
+       
+       blob.out_size = sizeof(struct VenusFid);
+       blob.out = (char *) &vfid;
+       blob.in_size = 0;
+       
+       if (0 == pioctl(ti->data, VIOCGETFID, &blob, 1)) {
+ 	printf("File %s (%u.%u.%u) contained in volume %u\n",
+ 	       ti->data, vfid.Fid.Volume, vfid.Fid.Vnode, vfid.Fid.Unique,
+ 	       vfid.Fid.Volume);
+       }
+     }
+ 
+     return 0;
+ }
+ 
Index: openafs/src/venus/fstrace.c
diff -c openafs/src/venus/fstrace.c:1.16.2.4 openafs/src/venus/fstrace.c:1.16.2.5
*** openafs/src/venus/fstrace.c:1.16.2.4	Mon Jul 11 15:29:40 2005
--- openafs/src/venus/fstrace.c	Wed Oct  5 01:58:48 2005
***************
*** 14,20 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/fstrace.c,v 1.16.2.4 2005/07/11 19:29:40 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
--- 14,20 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/venus/fstrace.c,v 1.16.2.5 2005/10/05 05:58:48 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 2156,2161 ****
--- 2156,2165 ----
      __asm__ __volatile__("mov	%o0, %i0; ret; restore");
  #endif
  #else
+ #ifdef AFS_DARWIN80_ENV
+     code = ioctl_afs_syscall(call, parm0, parm1, parm2, parm3, parm4, parm5, &rval);
+     if (!code) code = rval;
+ #else
  #if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
      code = syscall(AFS_SYSCALL, call, parm0, parm1, parm2, parm3, parm4);
  #else
***************
*** 2165,2170 ****
--- 2169,2175 ----
      code = syscall(AFSCALL_ICL, parm0, parm1, parm2, parm3, parm4);
  #endif
  #endif
+ #endif
  #endif /* AFS_LINUX20_ENV */
      return code;
  }
Index: openafs/src/venus/test/Makefile.in
diff -c openafs/src/venus/test/Makefile.in:1.7 openafs/src/venus/test/Makefile.in:1.7.8.1
*** openafs/src/venus/test/Makefile.in:1.7	Thu Nov  1 00:01:17 2001
--- openafs/src/venus/test/Makefile.in	Thu Mar  9 01:42:22 2006
***************
*** 13,19 ****
  LDIRS= -L${TOP_LIBDIR} -L..
  LIBS= -lsys -lubik -lvldb -lauth -lrxkad -ldes -lcom_err -lcmd -lrx -llwp -lafsutil
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${XCFLAGS}
  
  all test:  fulltest owntest idtest getinitparams
  
--- 13,19 ----
  LDIRS= -L${TOP_LIBDIR} -L..
  LIBS= -lsys -lubik -lvldb -lauth -lrxkad -ldes -lcom_err -lcmd -lrx -llwp -lafsutil
  
! CFLAGS = ${OPTIMIZE} ${INCDIRS} ${XCFLAGS} ${ARCHFLAGS}
  
  all test:  fulltest owntest idtest getinitparams
  
Index: openafs/src/vfsck/Makefile.in
diff -c openafs/src/vfsck/Makefile.in:1.10 openafs/src/vfsck/Makefile.in:1.10.2.1
*** openafs/src/vfsck/Makefile.in:1.10	Sat Jan 11 02:35:00 2003
--- openafs/src/vfsck/Makefile.in	Thu Mar  9 01:42:25 2006
***************
*** 19,25 ****
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${VFSCK_CFLAGS}
  
  SRCS= dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \
  	pass4.c pass5.c setup.c utilities.c ufs_subr.c \
--- 19,25 ----
  srcdir=@srcdir@
  include @TOP_OBJDIR@/src/config/Makefile.config
  
! CFLAGS=${COMMON_CFLAGS} ${XCFLAGS} ${ARCHFLAGS} ${VFSCK_CFLAGS}
  
  SRCS= dir.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \
  	pass4.c pass5.c setup.c utilities.c ufs_subr.c \
Index: openafs/src/viced/Makefile.in
diff -c openafs/src/viced/Makefile.in:1.12 openafs/src/viced/Makefile.in:1.12.2.1
*** openafs/src/viced/Makefile.in:1.12	Fri Oct 24 02:26:17 2003
--- openafs/src/viced/Makefile.in	Thu Mar  9 01:42:26 2006
***************
*** 14,22 ****
  
  CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I. -I${TOP_INCDIR} \
  	-I${TOP_INCDIR}/afs -I${TOP_OBJDIR} -I${TOP_OBJDIR}/fsint\
! 	 ${XCFLAGS} -DRXDEBUG -DNINTERFACE
  
! LDFLAGS = ${DBUG} ${XLDFLAGS}
  
  LIBS=${TOP_LIBDIR}/libacl.a	\
  	${TOP_LIBDIR}/libvldb.a	\
--- 14,22 ----
  
  CFLAGS=${DBG} ${OPTMZ} -I${TOP_OBJDIR}/src/config -I. -I${TOP_INCDIR} \
  	-I${TOP_INCDIR}/afs -I${TOP_OBJDIR} -I${TOP_OBJDIR}/fsint\
! 	 ${XCFLAGS} ${ARCHFLAGS} -DRXDEBUG -DNINTERFACE
  
! LDFLAGS = ${DBUG} ${XLDFLAGS} ${ARCHFLAGS}
  
  LIBS=${TOP_LIBDIR}/libacl.a	\
  	${TOP_LIBDIR}/libvldb.a	\
Index: openafs/src/viced/afsfileprocs.c
diff -c openafs/src/viced/afsfileprocs.c:1.81.2.11 openafs/src/viced/afsfileprocs.c:1.81.2.25
*** openafs/src/viced/afsfileprocs.c:1.81.2.11	Sat Aug 13 22:11:38 2005
--- openafs/src/viced/afsfileprocs.c	Fri Apr  7 01:36:59 2006
***************
*** 29,35 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/afsfileprocs.c,v 1.81.2.11 2005/08/14 02:11:38 jaltman 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.25 2006/04/07 05:36:59 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 299,311 ****
   */
  static int
  CallPreamble(register struct rx_call *acall, int activecall,
! 	     struct rx_connection **tconn)
  {
      struct host *thost;
      struct client *tclient;
      int retry_flag = 1;
      int code = 0;
!     char hoststr[16];
      if (!tconn) {
  	ViceLog(0, ("CallPreamble: unexpected null tconn!\n"));
  	return -1;
--- 299,311 ----
   */
  static int
  CallPreamble(register struct rx_call *acall, int activecall,
! 	     struct rx_connection **tconn, struct host **ahostp)
  {
      struct host *thost;
      struct client *tclient;
      int retry_flag = 1;
      int code = 0;
!     char hoststr[16], hoststr2[16];
      if (!tconn) {
  	ViceLog(0, ("CallPreamble: unexpected null tconn!\n"));
  	return -1;
***************
*** 315,323 ****
--- 315,325 ----
      H_LOCK;
    retry:
      tclient = h_FindClient_r(*tconn);
+     thost = tclient->host;
      if (tclient->prfail == 1) {	/* couldn't get the CPS */
  	if (!retry_flag) {
  	    h_ReleaseClient_r(tclient);
+ 	    h_Release_r(thost);
  	    ViceLog(0, ("CallPreamble: Couldn't get CPS. Fail\n"));
  	    H_UNLOCK;
  	    return -1001;
***************
*** 332,337 ****
--- 334,340 ----
  	H_LOCK;
  	if (code) {
  	    h_ReleaseClient_r(tclient);
+ 	    h_Release_r(thost);
  	    H_UNLOCK;
  	    ViceLog(0, ("CallPreamble: couldn't reconnect to ptserver\n"));
  	    return -1001;
***************
*** 339,364 ****
  
  	tclient->prfail = 2;	/* Means re-eval client's cps */
  	h_ReleaseClient_r(tclient);
  	goto retry;
      }
  
-     thost = tclient->host;
      tclient->LastCall = thost->LastCall = FT_ApproxTime();
!     if (activecall)		/* For all but "GetTime" calls */
  	thost->ActiveCall = thost->LastCall;
  
      h_Lock_r(thost);
      if (thost->hostFlags & HOSTDELETED) {
  	ViceLog(3,
! 		("Discarded a packet for deleted host %s\n",
! 		 afs_inet_ntoa_r(thost->host, hoststr)));
  	code = VBUSY;		/* raced, so retry */
      } else if ((thost->hostFlags & VENUSDOWN)
  	       || (thost->hostFlags & HFE_LATER)) {
  	if (BreakDelayedCallBacks_r(thost)) {
  	    ViceLog(0,
! 		    ("BreakDelayedCallbacks FAILED for host %s which IS UP.  Possible network or routing failure.\n",
! 		     afs_inet_ntoa_r(thost->host, hoststr)));
  	    if (MultiProbeAlternateAddress_r(thost)) {
  		ViceLog(0,
  			("MultiProbe failed to find new address for host %s:%d\n",
--- 342,368 ----
  
  	tclient->prfail = 2;	/* Means re-eval client's cps */
  	h_ReleaseClient_r(tclient);
+ 	h_Release_r(thost);
  	goto retry;
      }
  
      tclient->LastCall = thost->LastCall = FT_ApproxTime();
!     if (activecall)		/* For all but "GetTime", "GetStats", and "GetCaps" calls */
  	thost->ActiveCall = thost->LastCall;
  
      h_Lock_r(thost);
      if (thost->hostFlags & HOSTDELETED) {
  	ViceLog(3,
! 		("Discarded a packet for deleted host %s:%d\n",
! 		 afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port)));
  	code = VBUSY;		/* raced, so retry */
      } else if ((thost->hostFlags & VENUSDOWN)
  	       || (thost->hostFlags & HFE_LATER)) {
  	if (BreakDelayedCallBacks_r(thost)) {
  	    ViceLog(0,
! 		    ("BreakDelayedCallbacks FAILED for host %s:%d which IS UP.  Connection from %s:%d.  Possible network or routing failure.\n",
! 		     afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port), afs_inet_ntoa_r(rxr_HostOf(*tconn), hoststr2), 
! 		     ntohs(rxr_PortOf(*tconn))));
  	    if (MultiProbeAlternateAddress_r(thost)) {
  		ViceLog(0,
  			("MultiProbe failed to find new address for host %s:%d\n",
***************
*** 372,379 ****
  			 ntohs(thost->port)));
  		if (BreakDelayedCallBacks_r(thost)) {
  		    ViceLog(0,
! 			    ("BreakDelayedCallbacks FAILED AGAIN for host %s which IS UP.  Possible network or routing failure.\n",
! 			     afs_inet_ntoa_r(thost->host, hoststr)));
  		    code = -1;
  		}
  	    }
--- 376,384 ----
  			 ntohs(thost->port)));
  		if (BreakDelayedCallBacks_r(thost)) {
  		    ViceLog(0,
! 			    ("BreakDelayedCallbacks FAILED AGAIN for host %s:%d which IS UP.  Connection from %s:%d.  Possible network or routing failure.\n",
! 			      afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port), afs_inet_ntoa_r(rxr_HostOf(*tconn), hoststr2), 
! 			      ntohs(rxr_PortOf(*tconn))));
  		    code = -1;
  		}
  	    }
***************
*** 385,401 ****
      h_ReleaseClient_r(tclient);
      h_Unlock_r(thost);
      H_UNLOCK;
      return code;
  
  }				/*CallPreamble */
  
  
  static afs_int32
! CallPostamble(register struct rx_connection *aconn, afs_int32 ret)
  {
      struct host *thost;
      struct client *tclient;
      int translate = 0;
  
      H_LOCK;
      tclient = h_FindClient_r(aconn);
--- 390,409 ----
      h_ReleaseClient_r(tclient);
      h_Unlock_r(thost);
      H_UNLOCK;
+     *ahostp = thost;
      return code;
  
  }				/*CallPreamble */
  
  
  static afs_int32
! CallPostamble(register struct rx_connection *aconn, afs_int32 ret,
! 	      struct host *ahost)
  {
      struct host *thost;
      struct client *tclient;
      int translate = 0;
+     int held;
  
      H_LOCK;
      tclient = h_FindClient_r(aconn);
***************
*** 403,409 ****
      if (thost->hostFlags & HERRORTRANS)
  	translate = 1;
      h_ReleaseClient_r(tclient);
!     h_Release_r(thost);
      H_UNLOCK;
      return (translate ? sys_error_to_et(ret) : ret);
  }				/*CallPostamble */
--- 411,428 ----
      if (thost->hostFlags & HERRORTRANS)
  	translate = 1;
      h_ReleaseClient_r(tclient);
!     held = h_Held_r(thost);
!     if (held)
! 	h_Release_r(thost);
!     if (ahost != thost) {
! 	char hoststr[16], hoststr2[16];	
! 	ViceLog(0, ("CallPostamble: ahost %s:%d (%x) != thost %s:%d (%x)\n",
! 		afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port),
! 		ahost, 
! 		afs_inet_ntoa_r(thost->host, hoststr2), ntohs(thost->port),
! 		thost));
! 	h_Release_r(ahost);
!     }
      H_UNLOCK;
      return (translate ? sys_error_to_et(ret) : ret);
  }				/*CallPostamble */
***************
*** 573,578 ****
--- 592,624 ----
  
  }				/*SetAccessList */
  
+ /* Must not be called with H_LOCK held */
+ static void
+ client_CheckRights(struct client *client, struct acl_accessList *ACL, 
+ 		   afs_int32 *rights)
+ {
+     *rights = 0;
+     ObtainReadLock(&client->lock);
+     if (client->CPS.prlist_len > 0 && !client->deleted &&
+ 	client->host &&	!(client->host->hostFlags & HOSTDELETED))
+ 	acl_CheckRights(ACL, &client->CPS, rights);
+     ReleaseReadLock(&client->lock);
+ }
+ 
+ /* Must not be called with H_LOCK held */
+ static afs_int32
+ client_HasAsMember(struct client *client, afs_int32 id)
+ {
+     afs_int32 code = 0;
+ 
+     ObtainReadLock(&client->lock);
+     if (client->CPS.prlist_len > 0 && !client->deleted && 
+ 	client->host &&	!(client->host->hostFlags & HOSTDELETED))
+ 	code = acl_IsAMember(id, &client->CPS);
+     ReleaseReadLock(&client->lock);
+     return code;
+ }
+ 
  /*
   * Compare the directory's ACL with the user's access rights in the client
   * connection and return the user's and everybody else's access permissions
***************
*** 589,603 ****
  #endif
  
      if (acl_CheckRights(ACL, &SystemAnyUserCPS, anyrights) != 0) {
- 
  	ViceLog(0, ("CheckRights failed\n"));
  	*anyrights = 0;
      }
      *rights = 0;
  
!     ObtainWriteLock(&client->lock);
!     acl_CheckRights(ACL, &client->CPS, rights);
!     ReleaseWriteLock(&client->lock);
  
      /* wait if somebody else is already doing the getCPS call */
      H_LOCK;
--- 635,646 ----
  #endif
  
      if (acl_CheckRights(ACL, &SystemAnyUserCPS, anyrights) != 0) {
  	ViceLog(0, ("CheckRights failed\n"));
  	*anyrights = 0;
      }
      *rights = 0;
  
!     client_CheckRights(client, ACL, rights);
  
      /* wait if somebody else is already doing the getCPS call */
      H_LOCK;
***************
*** 620,627 ****
  	acl_CheckRights(ACL, &client->host->hcps, &hrights);
      H_UNLOCK;
      /* Allow system:admin the rights given with the -implicit option */
!     if (acl_IsAMember(SystemId, &client->CPS))
  	*rights |= implicitAdminRights;
      *rights |= hrights;
      *anyrights |= hrights;
  
--- 663,671 ----
  	acl_CheckRights(ACL, &client->host->hcps, &hrights);
      H_UNLOCK;
      /* Allow system:admin the rights given with the -implicit option */
!     if (client_HasAsMember(client, SystemId))
  	*rights |= implicitAdminRights;
+ 
      *rights |= hrights;
      *anyrights |= hrights;
  
***************
*** 636,642 ****
  static afs_int32
  VanillaUser(struct client *client)
  {
!     if (acl_IsAMember(SystemId, &client->CPS))
  	return (0);		/* not a system administrator, then you're "vanilla" */
      return (1);
  
--- 680,686 ----
  static afs_int32
  VanillaUser(struct client *client)
  {
!     if (client_HasAsMember(client, SystemId))
  	return (0);		/* not a system administrator, then you're "vanilla" */
      return (1);
  
***************
*** 675,685 ****
  	return (errorCode);
      if (chkforDir == MustBeDIR)
  	assert((*parent) == 0);
!     if ((errorCode = GetClient(tcon, client)) != 0)
! 	return (errorCode);
!     if (!(*client))
! 	return (EINVAL);
!     assert(GetRights(*client, aCL, rights, anyrights) == 0);
      /* ok, if this is not a dir, set the PRSFS_ADMINISTER bit iff we're the owner */
      if ((*targetptr)->disk.type != vDirectory) {
  	/* anyuser can't be owner, so only have to worry about rights, not anyrights */
--- 719,731 ----
  	return (errorCode);
      if (chkforDir == MustBeDIR)
  	assert((*parent) == 0);
!     if (!(*client)) {
! 	if ((errorCode = GetClient(tcon, client)) != 0)
! 	    return (errorCode);
! 	if (!(*client))
! 	    return (EINVAL);
!     }
!     GetRights(*client, aCL, rights, anyrights);
      /* ok, if this is not a dir, set the PRSFS_ADMINISTER bit iff we're the owner */
      if ((*targetptr)->disk.type != vDirectory) {
  	/* anyuser can't be owner, so only have to worry about rights, not anyrights */
***************
*** 704,710 ****
   */
  static void
  PutVolumePackage(Vnode * parentwhentargetnotdir, Vnode * targetptr,
! 		 Vnode * parentptr, Volume * volptr)
  {
      int fileCode = 0;		/* Error code returned by the volume package */
  
--- 750,756 ----
   */
  static void
  PutVolumePackage(Vnode * parentwhentargetnotdir, Vnode * targetptr,
! 		 Vnode * parentptr, Volume * volptr, struct client **client)
  {
      int fileCode = 0;		/* Error code returned by the volume package */
  
***************
*** 723,728 ****
--- 769,777 ----
      if (volptr) {
  	VPutVolume(volptr);
      }
+     if (*client) {
+ 	PutClient(client);
+     }
  }				/*PutVolumePackage */
  
  static int
***************
*** 737,743 ****
  	 * We don't have to check for host's cps since only regular
  	 * viceid are volume owners.
  	 */
! 	return (acl_IsAMember(owner, &client->CPS));
      }
  
  }				/*VolumeOwner */
--- 786,792 ----
  	 * We don't have to check for host's cps since only regular
  	 * viceid are volume owners.
  	 */
! 	return (client_HasAsMember(client, owner));
      }
  
  }				/*VolumeOwner */
***************
*** 791,797 ****
  		&& targetptr->disk.type == vFile)
  #ifdef USE_GROUP_PERMS
  		if (!OWNSp(client, targetptr)
! 		    && !acl_IsAMember(targetptr->disk.owner, &client->CPS)) {
  		    errorCode =
  			(((GROUPREAD | GROUPEXEC) & targetptr->disk.modeBits)
  			 ? 0 : EACCES);
--- 840,846 ----
  		&& targetptr->disk.type == vFile)
  #ifdef USE_GROUP_PERMS
  		if (!OWNSp(client, targetptr)
! 		    && !client_HasAsMember(client, targetptr->disk.owner)) {
  		    errorCode =
  			(((GROUPREAD | GROUPEXEC) & targetptr->disk.modeBits)
  			 ? 0 : EACCES);
***************
*** 895,902 ****
  			if ((targetptr->disk.type == vFile)
  			    && VanillaUser(client)) {
  			    if (!OWNSp(client, targetptr)
! 				&& !acl_IsAMember(targetptr->disk.owner,
! 						  &client->CPS)) {
  				errorCode =
  				    ((GROUPWRITE & targetptr->disk.modeBits)
  				     ? 0 : EACCES);
--- 944,950 ----
  			if ((targetptr->disk.type == vFile)
  			    && VanillaUser(client)) {
  			    if (!OWNSp(client, targetptr)
! 				&& !client_HasAsMember(client, targetptr->disk.owner)) {
  				errorCode =
  				    ((GROUPWRITE & targetptr->disk.modeBits)
  				     ? 0 : EACCES);
***************
*** 2078,2085 ****
      int errorCode = 0;		/* return code to caller */
      int fileCode = 0;		/* return code from vol package */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client;	/* pointer to the client data */
      struct rx_connection *tcon;	/* the connection we're part of */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 2126,2134 ----
      int errorCode = 0;		/* return code to caller */
      int fileCode = 0;		/* return code from vol package */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client = 0;	/* pointer to the client data */
      struct rx_connection *tcon;	/* the connection we're part of */
+     struct host *thost;
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 2112,2127 ****
      FS_LOCK;
      AFSCallStats.FetchData++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_FetchData;
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(5,
! 	    ("SRXAFS_FetchData, Fid = %u.%u.%u, Host %s, Id %d\n",
  	     Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     t_client->ViceId));
      /*
       * Get volume/vnode for the fetched file; caller's access rights to
       * it are also returned
--- 2161,2176 ----
      FS_LOCK;
      AFSCallStats.FetchData++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_FetchData;
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(5,
! 	    ("SRXAFS_FetchData, Fid = %u.%u.%u, Host %s:%d, Id %d\n",
  	     Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      /*
       * Get volume/vnode for the fetched file; caller's access rights to
       * it are also returned
***************
*** 2266,2274 ****
    Bad_FetchData:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
      ViceLog(2, ("SRXAFS_FetchData returns %d\n", errorCode));
!     errorCode = CallPostamble(tcon, errorCode);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
--- 2315,2323 ----
    Bad_FetchData:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
      ViceLog(2, ("SRXAFS_FetchData returns %d\n", errorCode));
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
***************
*** 2341,2349 ****
      Vnode *parentwhentargetnotdir = 0;	/* parent vnode if targetptr is a file */
      int errorCode = 0;		/* return error code to caller */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client;	/* pointer to the client data */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct rx_connection *tcon = rx_ConnectionOf(acall);
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
  #if FS_STATS_DETAILED
--- 2390,2399 ----
      Vnode *parentwhentargetnotdir = 0;	/* parent vnode if targetptr is a file */
      int errorCode = 0;		/* return error code to caller */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client = 0;	/* pointer to the client data */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct rx_connection *tcon = rx_ConnectionOf(acall);
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
  #if FS_STATS_DETAILED
***************
*** 2368,2383 ****
      FS_LOCK;
      AFSCallStats.FetchACL++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_FetchACL;
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(5,
! 	    ("SAFS_FetchACL, Fid = %u.%u.%u, Host %s, Id %d\n", Fid->Volume,
  	     Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     t_client->ViceId));
  
      AccessList->AFSOpaque_len = 0;
      AccessList->AFSOpaque_val = malloc(AFSOPAQUEMAX);
--- 2418,2433 ----
      FS_LOCK;
      AFSCallStats.FetchACL++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_FetchACL;
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(5,
! 	    ("SAFS_FetchACL, Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume,
  	     Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     ntohs(rxr_PortOf(tcon)), t_client->ViceId));
  
      AccessList->AFSOpaque_len = 0;
      AccessList->AFSOpaque_val = malloc(AFSOPAQUEMAX);
***************
*** 2415,2425 ****
    Bad_FetchACL:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
      ViceLog(2,
  	    ("SAFS_FetchACL returns %d (ACL=%s)\n", errorCode,
  	     AccessList->AFSOpaque_val));
!     errorCode = CallPostamble(tcon, errorCode);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
--- 2465,2475 ----
    Bad_FetchACL:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
      ViceLog(2,
  	    ("SAFS_FetchACL returns %d (ACL=%s)\n", errorCode,
  	     AccessList->AFSOpaque_val));
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
***************
*** 2461,2467 ****
      Vnode *parentwhentargetnotdir = 0;	/* parent vnode if targetptr is a file */
      int errorCode = 0;		/* return code to caller */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client;	/* pointer to the client data */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 2511,2517 ----
      Vnode *parentwhentargetnotdir = 0;	/* parent vnode if targetptr is a file */
      int errorCode = 0;		/* return code to caller */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client = 0;	/* pointer to the client data */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 2469,2479 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_FetchStatus,  Fid = %u.%u.%u, Host %s, Id %d\n",
  	     Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     t_client->ViceId));
      FS_LOCK;
      AFSCallStats.FetchStatus++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 2519,2529 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_FetchStatus,  Fid = %u.%u.%u, Host %s:%d, Id %d\n",
  	     Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.FetchStatus++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 2518,2524 ****
    Bad_FetchStatus:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
      ViceLog(2, ("SAFS_FetchStatus returns %d\n", errorCode));
      return errorCode;
  
--- 2568,2574 ----
    Bad_FetchStatus:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
      ViceLog(2, ("SAFS_FetchStatus returns %d\n", errorCode));
      return errorCode;
  
***************
*** 2536,2545 ****
      Vnode *parentwhentargetnotdir = 0;	/* parent vnode if targetptr is a file */
      int errorCode = 0;		/* return code to caller */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client;	/* pointer to the client data */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      register struct AFSFid *tfid;	/* file id we're dealing with now */
      struct rx_connection *tcon = rx_ConnectionOf(acall);
      struct client *t_client = NULL;     /* tmp pointer to the client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
--- 2586,2596 ----
      Vnode *parentwhentargetnotdir = 0;	/* parent vnode if targetptr is a file */
      int errorCode = 0;		/* return code to caller */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client = 0;	/* pointer to the client data */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      register struct AFSFid *tfid;	/* file id we're dealing with now */
      struct rx_connection *tcon = rx_ConnectionOf(acall);
+     struct host *thost;
      struct client *t_client = NULL;     /* tmp pointer to the client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 2583,2589 ****
      }
      CallBacks->AFSCBs_len = nfiles;
  
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_BulkStatus;
  
      tfid = Fids->AFSCBFids_val;
--- 2634,2640 ----
      }
      CallBacks->AFSCBs_len = nfiles;
  
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_BulkStatus;
  
      tfid = Fids->AFSCBFids_val;
***************
*** 2630,2646 ****
  
  	/* put back the file ID and volume */
  	(void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			       volptr);
  	parentwhentargetnotdir = (Vnode *) 0;
  	targetptr = (Vnode *) 0;
  	volptr = (Volume *) 0;
      }
  
    Bad_BulkStatus:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
!     errorCode = CallPostamble(tcon, errorCode);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 2681,2698 ----
  
  	/* put back the file ID and volume */
  	(void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			       volptr, &client);
  	parentwhentargetnotdir = (Vnode *) 0;
  	targetptr = (Vnode *) 0;
  	volptr = (Volume *) 0;
+ 	client = (struct client *)0;
      }
  
    Bad_BulkStatus:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 2683,2692 ****
      Vnode *parentwhentargetnotdir = 0;	/* parent vnode if targetptr is a file */
      int errorCode = 0;		/* return code to caller */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client;	/* pointer to the client data */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      register struct AFSFid *tfid;	/* file id we're dealing with now */
      struct rx_connection *tcon;
      struct client *t_client = NULL;	/* tmp ptr to client data */
      AFSFetchStatus *tstatus;
  #if FS_STATS_DETAILED
--- 2735,2745 ----
      Vnode *parentwhentargetnotdir = 0;	/* parent vnode if targetptr is a file */
      int errorCode = 0;		/* return code to caller */
      Volume *volptr = 0;		/* pointer to the volume */
!     struct client *client = 0;	/* pointer to the client data */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      register struct AFSFid *tfid;	/* file id we're dealing with now */
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
      AFSFetchStatus *tstatus;
  #if FS_STATS_DETAILED
***************
*** 2731,2737 ****
      }
      CallBacks->AFSCBs_len = nfiles;
  
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon))) {
  	goto Bad_InlineBulkStatus;
      }
  
--- 2784,2790 ----
      }
      CallBacks->AFSCBs_len = nfiles;
  
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost))) {
  	goto Bad_InlineBulkStatus;
      }
  
***************
*** 2747,2756 ****
  			      &rights, &anyrights))) {
  	    tstatus = &OutStats->AFSBulkStats_val[i];
  	    tstatus->errorCode = errorCode;
! 	    PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0, volptr);
  	    parentwhentargetnotdir = (Vnode *) 0;
  	    targetptr = (Vnode *) 0;
  	    volptr = (Volume *) 0;
  	    continue;
  	}
  
--- 2800,2811 ----
  			      &rights, &anyrights))) {
  	    tstatus = &OutStats->AFSBulkStats_val[i];
  	    tstatus->errorCode = errorCode;
! 	    PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0, 
! 			     volptr, &client);
  	    parentwhentargetnotdir = (Vnode *) 0;
  	    targetptr = (Vnode *) 0;
  	    volptr = (Volume *) 0;
+ 	    client = (struct client *)0;
  	    continue;
  	}
  
***************
*** 2766,2775 ****
  		tstatus = &OutStats->AFSBulkStats_val[i];
  		tstatus->errorCode = errorCode;
  		(void)PutVolumePackage(parentwhentargetnotdir, targetptr,
! 				       (Vnode *) 0, volptr);
  		parentwhentargetnotdir = (Vnode *) 0;
  		targetptr = (Vnode *) 0;
  		volptr = (Volume *) 0;
  		continue;
  	    }
  	}
--- 2821,2831 ----
  		tstatus = &OutStats->AFSBulkStats_val[i];
  		tstatus->errorCode = errorCode;
  		(void)PutVolumePackage(parentwhentargetnotdir, targetptr,
! 				       (Vnode *) 0, volptr, &client);
  		parentwhentargetnotdir = (Vnode *) 0;
  		targetptr = (Vnode *) 0;
  		volptr = (Volume *) 0;
+ 		client = (struct client *)0;
  		continue;
  	    }
  	}
***************
*** 2793,2809 ****
  
  	/* put back the file ID and volume */
  	(void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			       volptr);
  	parentwhentargetnotdir = (Vnode *) 0;
  	targetptr = (Vnode *) 0;
  	volptr = (Volume *) 0;
      }
  
    Bad_InlineBulkStatus:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
!     errorCode = CallPostamble(tcon, errorCode);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 2849,2866 ----
  
  	/* put back the file ID and volume */
  	(void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			       volptr, &client);
  	parentwhentargetnotdir = (Vnode *) 0;
  	targetptr = (Vnode *) 0;
  	volptr = (Volume *) 0;
+ 	client = (struct client *)0;
      }
  
    Bad_InlineBulkStatus:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 2842,2847 ****
--- 2899,2905 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 2859,2871 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_FetchStatus;
  
      code = SAFSS_FetchStatus(acall, Fid, OutStatus, CallBack, Sync);
  
    Bad_FetchStatus:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 2917,2929 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_FetchStatus;
  
      code = SAFSS_FetchStatus(acall, Fid, OutStatus, CallBack, Sync);
  
    Bad_FetchStatus:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 2907,2917 ****
      int errorCode = 0;		/* return code for caller */
      int fileCode = 0;		/* return code from vol package */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
      struct rx_connection *tcon;
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
      struct fs_stats_xferData *xferP;	/* Ptr to this op's byte size struct */
--- 2965,2976 ----
      int errorCode = 0;		/* return code for caller */
      int fileCode = 0;		/* return code from vol package */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
      struct rx_connection *tcon;
+     struct host *thost;
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
      struct fs_stats_xferData *xferP;	/* Ptr to this op's byte size struct */
***************
*** 2940,2955 ****
      FS_LOCK;
      AFSCallStats.StoreData++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_StoreData;
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(5,
! 	    ("StoreData: Fid = %u.%u.%u, Host %s, Id %d\n", Fid->Volume,
  	     Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     t_client->ViceId));
  
      /*
       * Get associated volume/vnode for the stored file; caller's rights
--- 2999,3014 ----
      FS_LOCK;
      AFSCallStats.StoreData++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_StoreData;
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(5,
! 	    ("StoreData: Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume,
  	     Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     ntohs(rxr_PortOf(tcon)), t_client->ViceId));
  
      /*
       * Get associated volume/vnode for the stored file; caller's rights
***************
*** 3086,3095 ****
    Bad_StoreData:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
      ViceLog(2, ("SAFS_StoreData	returns	%d\n", errorCode));
  
!     errorCode = CallPostamble(tcon, errorCode);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
--- 3145,3154 ----
    Bad_StoreData:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
      ViceLog(2, ("SAFS_StoreData	returns	%d\n", errorCode));
  
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
***************
*** 3168,3176 ****
      int errorCode = 0;		/* return code for caller */
      struct AFSStoreStatus InStatus;	/* Input status for fid */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct rx_connection *tcon;
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
  #if FS_STATS_DETAILED
--- 3227,3236 ----
      int errorCode = 0;		/* return code for caller */
      struct AFSStoreStatus InStatus;	/* Input status for fid */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
  #if FS_STATS_DETAILED
***************
*** 3188,3203 ****
      FS_UNLOCK;
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_StoreACL;
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_StoreACL, Fid = %u.%u.%u, ACL=%s, Host %s, Id %d\n",
  	     Fid->Volume, Fid->Vnode, Fid->Unique, AccessList->AFSOpaque_val,
! 	     inet_ntoa(logHostAddr), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.StoreACL++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 3248,3263 ----
      FS_UNLOCK;
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_StoreACL;
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_StoreACL, Fid = %u.%u.%u, ACL=%s, Host %s:%d, Id %d\n",
  	     Fid->Volume, Fid->Vnode, Fid->Unique, AccessList->AFSOpaque_val,
! 	     inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.StoreACL++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 3243,3251 ****
  
    Bad_StoreACL:
      /* Update and store volume/vnode and parent vnodes back */
!     PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0, volptr);
      ViceLog(2, ("SAFS_StoreACL returns %d\n", errorCode));
!     errorCode = CallPostamble(tcon, errorCode);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
--- 3303,3312 ----
  
    Bad_StoreACL:
      /* Update and store volume/vnode and parent vnodes back */
!     PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0, 
! 		     volptr, &client);
      ViceLog(2, ("SAFS_StoreACL returns %d\n", errorCode));
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
***************
*** 3286,3292 ****
      Vnode *parentwhentargetnotdir = 0;	/* parent of Fid to get ACL */
      int errorCode = 0;		/* return code for caller */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 3347,3353 ----
      Vnode *parentwhentargetnotdir = 0;	/* parent of Fid to get ACL */
      int errorCode = 0;		/* return code for caller */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client = NULL;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 3294,3304 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_StoreStatus,  Fid	= %u.%u.%u, Host %s, Id %d\n",
  	     Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     t_client->ViceId));
      FS_LOCK;
      AFSCallStats.StoreStatus++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 3355,3365 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_StoreStatus,  Fid	= %u.%u.%u, Host %s:%d, Id %d\n",
  	     Fid->Volume, Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.StoreStatus++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 3349,3355 ****
  
    Bad_StoreStatus:
      /* Update and store volume/vnode and parent vnodes back */
!     PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0, volptr);
      ViceLog(2, ("SAFS_StoreStatus returns %d\n", errorCode));
      return errorCode;
  
--- 3410,3417 ----
  
    Bad_StoreStatus:
      /* Update and store volume/vnode and parent vnodes back */
!     PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0, 
! 		     volptr, &client);
      ViceLog(2, ("SAFS_StoreStatus returns %d\n", errorCode));
      return errorCode;
  
***************
*** 3364,3369 ****
--- 3426,3432 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 3381,3393 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_StoreStatus;
  
      code = SAFSS_StoreStatus(acall, Fid, InStatus, OutStatus, Sync);
  
    Bad_StoreStatus:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 3444,3456 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_StoreStatus;
  
      code = SAFSS_StoreStatus(acall, Fid, InStatus, OutStatus, Sync);
  
    Bad_StoreStatus:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 3432,3438 ****
      AFSFid fileFid;		/* area for Fid from the directory */
      int errorCode = 0;		/* error code */
      DirHandle dir;		/* Handle for dir package I/O */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 3495,3501 ----
      AFSFid fileFid;		/* area for Fid from the directory */
      int errorCode = 0;		/* error code */
      DirHandle dir;		/* Handle for dir package I/O */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 3441,3451 ****
      FidZero(&dir);
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_RemoveFile %s,  Did = %u.%u.%u, Host %s, Id %d\n", Name,
  	     DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.RemoveFile++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 3504,3514 ----
      FidZero(&dir);
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_RemoveFile %s,  Did = %u.%u.%u, Host %s:%d, Id %d\n", Name,
  	     DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.RemoveFile++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 3510,3516 ****
  
    Bad_RemoveFile:
      /* Update and store volume/vnode and parent vnodes back */
!     PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr, volptr);
      FidZap(&dir);
      ViceLog(2, ("SAFS_RemoveFile returns %d\n", errorCode));
      return errorCode;
--- 3573,3580 ----
  
    Bad_RemoveFile:
      /* Update and store volume/vnode and parent vnodes back */
!     PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr, 
! 		     volptr, &client);
      FidZap(&dir);
      ViceLog(2, ("SAFS_RemoveFile returns %d\n", errorCode));
      return errorCode;
***************
*** 3525,3530 ****
--- 3589,3595 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 3542,3554 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_RemoveFile;
  
      code = SAFSS_RemoveFile(acall, DirFid, Name, OutDirStatus, Sync);
  
    Bad_RemoveFile:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 3607,3619 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_RemoveFile;
  
      code = SAFSS_RemoveFile(acall, DirFid, Name, OutDirStatus, Sync);
  
    Bad_RemoveFile:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 3595,3601 ****
      Volume *volptr = 0;		/* pointer to the volume header */
      int errorCode = 0;		/* error code */
      DirHandle dir;		/* Handle for dir package I/O */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 3660,3666 ----
      Volume *volptr = 0;		/* pointer to the volume header */
      int errorCode = 0;		/* error code */
      DirHandle dir;		/* Handle for dir package I/O */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 3605,3615 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_CreateFile %s,  Did = %u.%u.%u, Host %s, Id %d\n", Name,
  	     DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.CreateFile++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 3670,3680 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_CreateFile %s,  Did = %u.%u.%u, Host %s:%d, Id %d\n", Name,
  	     DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.CreateFile++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 3674,3680 ****
    Bad_CreateFile:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr);
      FidZap(&dir);
      ViceLog(2, ("SAFS_CreateFile returns %d\n", errorCode));
      return errorCode;
--- 3739,3745 ----
    Bad_CreateFile:
      /* Update and store volume/vnode and parent vnodes back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr, &client);
      FidZap(&dir);
      ViceLog(2, ("SAFS_CreateFile returns %d\n", errorCode));
      return errorCode;
***************
*** 3691,3696 ****
--- 3756,3762 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 3708,3714 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_CreateFile;
  
      code =
--- 3774,3782 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     memset(OutFid, 0, sizeof(struct AFSFid));
! 
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_CreateFile;
  
      code =
***************
*** 3716,3722 ****
  			 OutDirStatus, CallBack, Sync);
  
    Bad_CreateFile:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 3784,3790 ----
  			 OutDirStatus, CallBack, Sync);
  
    Bad_CreateFile:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 3740,3746 ****
  
      osi_auditU(acall, CreateFileEvent, code, 
                 AUD_ID, t_client ? t_client->ViceId : 0,
!                AUD_FID, DirFid, AUD_STR, Name, AUD_END);
      return code;
  
  }				/*SRXAFS_CreateFile */
--- 3808,3814 ----
  
      osi_auditU(acall, CreateFileEvent, code, 
                 AUD_ID, t_client ? t_client->ViceId : 0,
!                AUD_FID, DirFid, AUD_STR, Name, AUD_FID, OutFid, AUD_END);
      return code;
  
  }				/*SRXAFS_CreateFile */
***************
*** 3772,3778 ****
      DirHandle filedir;		/* Handle for dir package I/O */
      DirHandle newfiledir;	/* Handle for dir package I/O */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      afs_int32 newrights;	/* rights for this user */
      afs_int32 newanyrights;	/* rights for any user */
--- 3840,3846 ----
      DirHandle filedir;		/* Handle for dir package I/O */
      DirHandle newfiledir;	/* Handle for dir package I/O */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      afs_int32 newrights;	/* rights for this user */
      afs_int32 newanyrights;	/* rights for any user */
***************
*** 3789,3800 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_Rename %s	to %s,	Fid = %u.%u.%u to %u.%u.%u, Host %s, Id %d\n",
  	     OldName, NewName, OldDirFid->Volume, OldDirFid->Vnode,
  	     OldDirFid->Unique, NewDirFid->Volume, NewDirFid->Vnode,
! 	     NewDirFid->Unique, inet_ntoa(logHostAddr), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.Rename++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 3857,3868 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_Rename %s	to %s,	Fid = %u.%u.%u to %u.%u.%u, Host %s:%d, Id %d\n",
  	     OldName, NewName, OldDirFid->Volume, OldDirFid->Vnode,
  	     OldDirFid->Unique, NewDirFid->Volume, NewDirFid->Vnode,
! 	     NewDirFid->Unique, inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.Rename++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 4157,4166 ****
  	VPutVnode(&fileCode, newfileptr);
  	assert(fileCode == 0);
      }
!     (void)PutVolumePackage(fileptr,
! 			   (newvptr
! 			    && newvptr != oldvptr ? newvptr : 0), oldvptr,
! 			   volptr);
      FidZap(&olddir);
      FidZap(&newdir);
      FidZap(&filedir);
--- 4225,4232 ----
  	VPutVnode(&fileCode, newfileptr);
  	assert(fileCode == 0);
      }
!     (void)PutVolumePackage(fileptr, (newvptr && newvptr != oldvptr ? 
! 				     newvptr : 0), oldvptr, volptr, &client);
      FidZap(&olddir);
      FidZap(&newdir);
      FidZap(&filedir);
***************
*** 4180,4185 ****
--- 4246,4252 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 4197,4203 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_Rename;
  
      code =
--- 4264,4270 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_Rename;
  
      code =
***************
*** 4205,4211 ****
  		     OutOldDirStatus, OutNewDirStatus, Sync);
  
    Bad_Rename:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 4272,4278 ----
  		     OutOldDirStatus, OutNewDirStatus, Sync);
  
    Bad_Rename:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 4253,4259 ****
      int len, code = 0;
      DirHandle dir;		/* Handle for dir package I/O */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 4320,4326 ----
      int len, code = 0;
      DirHandle dir;		/* Handle for dir package I/O */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 4264,4274 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_Symlink %s to %s,  Did = %u.%u.%u, Host %s, Id %d\n", Name,
  	     LinkContents, DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.Symlink++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 4331,4341 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_Symlink %s to %s,  Did = %u.%u.%u, Host %s:%d, Id %d\n", Name,
  	     LinkContents, DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.Symlink++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 4362,4368 ****
    Bad_SymLink:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr);
      FidZap(&dir);
      ViceLog(2, ("SAFS_Symlink returns %d\n", errorCode));
      return ( errorCode ? errorCode : code );
--- 4429,4435 ----
    Bad_SymLink:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr, &client);
      FidZap(&dir);
      ViceLog(2, ("SAFS_Symlink returns %d\n", errorCode));
      return ( errorCode ? errorCode : code );
***************
*** 4386,4391 ****
--- 4453,4459 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 4403,4409 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_Symlink;
  
      code =
--- 4471,4477 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_Symlink;
  
      code =
***************
*** 4411,4417 ****
  		      OutFidStatus, OutDirStatus, Sync);
  
    Bad_Symlink:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 4479,4485 ----
  		      OutFidStatus, OutDirStatus, Sync);
  
    Bad_Symlink:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 4457,4463 ****
      Volume *volptr = 0;		/* pointer to the volume header */
      int errorCode = 0;		/* error code */
      DirHandle dir;		/* Handle for dir package I/O */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 4525,4531 ----
      Volume *volptr = 0;		/* pointer to the volume header */
      int errorCode = 0;		/* error code */
      DirHandle dir;		/* Handle for dir package I/O */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 4467,4478 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_Link %s,	Did = %u.%u.%u,	Fid = %u.%u.%u, Host %s, Id %d\n",
  	     Name, DirFid->Volume, DirFid->Vnode, DirFid->Unique,
  	     ExistingFid->Volume, ExistingFid->Vnode, ExistingFid->Unique,
! 	     inet_ntoa(logHostAddr), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.Link++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 4535,4546 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_Link %s,	Did = %u.%u.%u,	Fid = %u.%u.%u, Host %s:%d, Id %d\n",
  	     Name, DirFid->Volume, DirFid->Vnode, DirFid->Unique,
  	     ExistingFid->Volume, ExistingFid->Vnode, ExistingFid->Unique,
! 	     inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.Link++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 4571,4577 ****
    Bad_Link:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr);
      FidZap(&dir);
      ViceLog(2, ("SAFS_Link returns %d\n", errorCode));
      return errorCode;
--- 4639,4645 ----
    Bad_Link:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr, &client);
      FidZap(&dir);
      ViceLog(2, ("SAFS_Link returns %d\n", errorCode));
      return errorCode;
***************
*** 4586,4591 ****
--- 4654,4660 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 4603,4609 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_Link;
  
      code =
--- 4672,4678 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_Link;
  
      code =
***************
*** 4611,4617 ****
  		   OutDirStatus, Sync);
  
    Bad_Link:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 4680,4686 ----
  		   OutDirStatus, Sync);
  
    Bad_Link:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 4662,4668 ****
      int newACLSize;		/* Size of access list */
      DirHandle dir;		/* Handle for dir package I/O */
      DirHandle parentdir;	/* Handle for dir package I/O */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 4731,4737 ----
      int newACLSize;		/* Size of access list */
      DirHandle dir;		/* Handle for dir package I/O */
      DirHandle parentdir;	/* Handle for dir package I/O */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 4673,4683 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_MakeDir %s,  Did = %u.%u.%u, Host %s, Id %d\n", Name,
  	     DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.MakeDir++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 4742,4752 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_MakeDir %s,  Did = %u.%u.%u, Host %s:%d, Id %d\n", Name,
  	     DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.MakeDir++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 4768,4774 ****
    Bad_MakeDir:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr);
      FidZap(&dir);
      FidZap(&parentdir);
      ViceLog(2, ("SAFS_MakeDir returns %d\n", errorCode));
--- 4837,4843 ----
    Bad_MakeDir:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr, &client);
      FidZap(&dir);
      FidZap(&parentdir);
      ViceLog(2, ("SAFS_MakeDir returns %d\n", errorCode));
***************
*** 4786,4791 ****
--- 4855,4861 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 4802,4808 ****
      FS_UNLOCK;
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_MakeDir;
  
      code =
--- 4872,4878 ----
      FS_UNLOCK;
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_MakeDir;
  
      code =
***************
*** 4810,4816 ****
  		      OutDirStatus, CallBack, Sync);
  
    Bad_MakeDir:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 4880,4886 ----
  		      OutDirStatus, CallBack, Sync);
  
    Bad_MakeDir:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 4856,4862 ****
      int errorCode = 0;		/* error code */
      DirHandle dir;		/* Handle for dir package I/O */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      Vnode debugvnode1, debugvnode2;
      struct client *t_client;	/* tmp ptr to client data */
--- 4926,4932 ----
      int errorCode = 0;		/* error code */
      DirHandle dir;		/* Handle for dir package I/O */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      Vnode debugvnode1, debugvnode2;
      struct client *t_client;	/* tmp ptr to client data */
***************
*** 4867,4877 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_RemoveDir	%s,  Did = %u.%u.%u, Host %s, Id %d\n", Name,
  	     DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.RemoveDir++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 4937,4947 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_RemoveDir	%s,  Did = %u.%u.%u, Host %s:%d, Id %d\n", Name,
  	     DirFid->Volume, DirFid->Vnode, DirFid->Unique,
! 	     inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.RemoveDir++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 4933,4939 ****
    Bad_RemoveDir:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr);
      FidZap(&dir);
      ViceLog(2, ("SAFS_RemoveDir	returns	%d\n", errorCode));
      return errorCode;
--- 5003,5009 ----
    Bad_RemoveDir:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, parentptr,
! 			   volptr, &client);
      FidZap(&dir);
      ViceLog(2, ("SAFS_RemoveDir	returns	%d\n", errorCode));
      return errorCode;
***************
*** 4948,4953 ****
--- 5018,5024 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 4965,4977 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_RemoveDir;
  
      code = SAFSS_RemoveDir(acall, DirFid, Name, OutDirStatus, Sync);
  
    Bad_RemoveDir:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 5036,5048 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_RemoveDir;
  
      code = SAFSS_RemoveDir(acall, DirFid, Name, OutDirStatus, Sync);
  
    Bad_RemoveDir:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 5013,5019 ****
      Vnode *parentwhentargetnotdir = 0;	/* parent for use in SetAccessList */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 5084,5090 ----
      Vnode *parentwhentargetnotdir = 0;	/* parent for use in SetAccessList */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 5026,5036 ****
      }
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_SetLock type = %s Fid = %u.%u.%u, Host %s, Id %d\n",
  	     locktype[(int)type], Fid->Volume, Fid->Vnode, Fid->Unique,
! 	     inet_ntoa(logHostAddr), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.SetLock++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 5097,5107 ----
      }
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_SetLock type = %s Fid = %u.%u.%u, Host %s:%d, Id %d\n",
  	     locktype[(int)type], Fid->Volume, Fid->Vnode, Fid->Unique,
! 	     inet_ntoa(logHostAddr), ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.SetLock++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 5054,5060 ****
    Bad_SetLock:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
  
      if ((errorCode == VREADONLY) && (type == LockRead))
  	errorCode = 0;		/* allow read locks on RO volumes without saving state */
--- 5125,5131 ----
    Bad_SetLock:
      /* Write the all modified vnodes (parent, new files) and volume back */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
  
      if ((errorCode == VREADONLY) && (type == LockRead))
  	errorCode = 0;		/* allow read locks on RO volumes without saving state */
***************
*** 5079,5084 ****
--- 5150,5156 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 5096,5108 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_SetLock;
  
      code = SAFSS_SetLock(acall, Fid, type, Sync);
  
    Bad_SetLock:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 5168,5180 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_SetLock;
  
      code = SAFSS_SetLock(acall, Fid, type, Sync);
  
    Bad_SetLock:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 5143,5149 ****
      Vnode *parentwhentargetnotdir = 0;	/* parent for use in SetAccessList */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 5215,5221 ----
      Vnode *parentwhentargetnotdir = 0;	/* parent for use in SetAccessList */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 5151,5161 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_ExtendLock Fid = %u.%u.%u, Host %s, Id %d\n", Fid->Volume,
  	     Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     t_client->ViceId));
      FS_LOCK;
      AFSCallStats.ExtendLock++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 5223,5233 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_ExtendLock Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume,
  	     Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.ExtendLock++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 5179,5185 ****
    Bad_ExtendLock:
      /* Put back file's vnode and volume */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
  
      if ((errorCode == VREADONLY))	/* presumably, we already granted this lock */
  	errorCode = 0;		/* under our generous policy re RO vols */
--- 5251,5257 ----
    Bad_ExtendLock:
      /* Put back file's vnode and volume */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
  
      if ((errorCode == VREADONLY))	/* presumably, we already granted this lock */
  	errorCode = 0;		/* under our generous policy re RO vols */
***************
*** 5204,5209 ****
--- 5276,5282 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 5221,5233 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_ExtendLock;
  
      code = SAFSS_ExtendLock(acall, Fid, Sync);
  
    Bad_ExtendLock:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 5294,5306 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_ExtendLock;
  
      code = SAFSS_ExtendLock(acall, Fid, Sync);
  
    Bad_ExtendLock:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 5269,5275 ****
      Vnode *parentwhentargetnotdir = 0;	/* parent for use in SetAccessList */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
--- 5342,5348 ----
      Vnode *parentwhentargetnotdir = 0;	/* parent for use in SetAccessList */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client structure */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      struct client *t_client;	/* tmp ptr to client data */
      struct in_addr logHostAddr;	/* host ip holder for inet_ntoa */
***************
*** 5277,5287 ****
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rx_HostOf(rx_PeerOf(tcon));
      ViceLog(1,
! 	    ("SAFS_ReleaseLock Fid = %u.%u.%u, Host %s, Id %d\n", Fid->Volume,
  	     Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     t_client->ViceId));
      FS_LOCK;
      AFSCallStats.ReleaseLock++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
--- 5350,5360 ----
  
      /* Get ptr to client data for user Id for logging */
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     logHostAddr.s_addr = rxr_HostOf(tcon);
      ViceLog(1,
! 	    ("SAFS_ReleaseLock Fid = %u.%u.%u, Host %s:%d, Id %d\n", Fid->Volume,
  	     Fid->Vnode, Fid->Unique, inet_ntoa(logHostAddr),
! 	     ntohs(rxr_PortOf(tcon)), t_client->ViceId));
      FS_LOCK;
      AFSCallStats.ReleaseLock++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
***************
*** 5314,5320 ****
    Bad_ReleaseLock:
      /* Put back file's vnode and volume */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
  
      if ((errorCode == VREADONLY))	/* presumably, we already granted this lock */
  	errorCode = 0;		/* under our generous policy re RO vols */
--- 5387,5393 ----
    Bad_ReleaseLock:
      /* Put back file's vnode and volume */
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
  
      if ((errorCode == VREADONLY))	/* presumably, we already granted this lock */
  	errorCode = 0;		/* under our generous policy re RO vols */
***************
*** 5339,5344 ****
--- 5412,5418 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 5356,5368 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_ReleaseLock;
  
      code = SAFSS_ReleaseLock(acall, Fid, Sync);
  
    Bad_ReleaseLock:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 5430,5442 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_ReleaseLock;
  
      code = SAFSS_ReleaseLock(acall, Fid, Sync);
  
    Bad_ReleaseLock:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 5473,5478 ****
--- 5547,5553 ----
  {
      afs_int32 code;
      struct rx_connection *tcon = rx_ConnectionOf(acall);
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 5490,5496 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, NOTACTIVECALL, &tcon)))
  	goto Bad_GetStatistics;
  
      ViceLog(1, ("SAFS_GetStatistics Received\n"));
--- 5565,5571 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, NOTACTIVECALL, &tcon, &thost)))
  	goto Bad_GetStatistics;
  
      ViceLog(1, ("SAFS_GetStatistics Received\n"));
***************
*** 5503,5509 ****
      SetSystemStats((struct AFSStatistics *)Statistics);
  
    Bad_GetStatistics:
!     code = CallPostamble(tcon, code);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 5578,5584 ----
      SetSystemStats((struct AFSStatistics *)Statistics);
  
    Bad_GetStatistics:
!     code = CallPostamble(tcon, code, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 5875,5880 ****
--- 5950,5985 ----
  #endif
  	break;
  
+     case AFS_XSTATSCOLL_CBSTATS:
+ 	afs_perfstats.numPerfCalls++;
+ 
+ 	dataBytes = sizeof(struct cbcounters);
+ 	dataBuffP = (afs_int32 *) malloc(dataBytes);
+ 	{
+ 	    extern struct cbcounters cbstuff;
+ 	    dataBuffP[0]=cbstuff.DeleteFiles;
+ 	    dataBuffP[1]=cbstuff.DeleteCallBacks;
+ 	    dataBuffP[2]=cbstuff.BreakCallBacks;
+ 	    dataBuffP[3]=cbstuff.AddCallBacks;
+ 	    dataBuffP[4]=cbstuff.GotSomeSpaces;
+ 	    dataBuffP[5]=cbstuff.DeleteAllCallBacks;
+ 	    dataBuffP[6]=cbstuff.nFEs;
+ 	    dataBuffP[7]=cbstuff.nCBs;
+ 	    dataBuffP[8]=cbstuff.nblks;
+ 	    dataBuffP[9]=cbstuff.CBsTimedOut;
+ 	    dataBuffP[10]=cbstuff.nbreakers;
+ 	    dataBuffP[11]=cbstuff.GSS1;
+ 	    dataBuffP[12]=cbstuff.GSS2;
+ 	    dataBuffP[13]=cbstuff.GSS3;
+ 	    dataBuffP[14]=cbstuff.GSS4;
+ 	    dataBuffP[15]=cbstuff.GSS5;
+ 	}
+ 
+ 	a_dataP->AFS_CollData_len = dataBytes >> 2;
+ 	a_dataP->AFS_CollData_val = dataBuffP;
+ 	break;
+ 
+ 
      default:
  	/*
  	 * Illegal collection number.
***************
*** 5913,5920 ****
  {
      afs_int32 errorCode = 0;
      register int i;
!     struct client *client;
      struct rx_connection *tcon;
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
      struct timeval opStartTime, opStopTime;	/* Start/stop times for RPC op */
--- 6018,6026 ----
  {
      afs_int32 errorCode = 0;
      register int i;
!     struct client *client = 0;
      struct rx_connection *tcon;
+     struct host *thost;
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
      struct timeval opStartTime, opStopTime;	/* Start/stop times for RPC op */
***************
*** 5940,5946 ****
      FS_LOCK;
      AFSCallStats.GiveUpCallBacks++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_GiveUpCallBacks;
  
      if (!FidArray && !CallBackArray) {
--- 6046,6052 ----
      FS_LOCK;
      AFSCallStats.GiveUpCallBacks++, AFSCallStats.TotalCalls++;
      FS_UNLOCK;
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_GiveUpCallBacks;
  
      if (!FidArray && !CallBackArray) {
***************
*** 5948,5955 ****
  		("SAFS_GiveUpAllCallBacks: host=%x\n",
  		 (tcon->peer ? tcon->peer->host : 0)));
  	errorCode = GetClient(tcon, &client);
! 	if (!errorCode)
  	    DeleteAllCallBacks_r(client->host, 1);
      } else {
  	if (FidArray->AFSCBFids_len < CallBackArray->AFSCBs_len) {
  	    ViceLog(0,
--- 6054,6063 ----
  		("SAFS_GiveUpAllCallBacks: host=%x\n",
  		 (tcon->peer ? tcon->peer->host : 0)));
  	errorCode = GetClient(tcon, &client);
! 	if (!errorCode) {
  	    DeleteAllCallBacks_r(client->host, 1);
+ 	    PutClient(&client);
+ 	}
      } else {
  	if (FidArray->AFSCBFids_len < CallBackArray->AFSCBs_len) {
  	    ViceLog(0,
***************
*** 5966,5976 ****
  		register struct AFSFid *fid = &(FidArray->AFSCBFids_val[i]);
  		DeleteCallBack(client->host, fid);
  	    }
  	}
      }
  
    Bad_GiveUpCallBacks:
!     errorCode = CallPostamble(tcon, errorCode);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
--- 6074,6085 ----
  		register struct AFSFid *fid = &(FidArray->AFSCBFids_val[i]);
  		DeleteCallBack(client->host, fid);
  	    }
+ 	    PutClient(&client);
  	}
      }
  
    Bad_GiveUpCallBacks:
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
***************
*** 6037,6051 ****
--- 6146,6175 ----
  afs_int32
  SRXAFS_GetCapabilities(struct rx_call * acall, Capabilities * capabilities)
  {
+     afs_int32 code;
+     struct rx_connection *tcon;
+     struct host *thost;
      afs_int32 *dataBuffP;
      afs_int32 dataBytes;
  
+     FS_LOCK;
+     AFSCallStats.GetCapabilities++, AFSCallStats.TotalCalls++;
+     afs_FullPerfStats.overall.fs_nGetCaps++;
+     FS_UNLOCK;
+     ViceLog(2, ("SAFS_GetCapabilties\n"));
+ 
+     if ((code = CallPreamble(acall, NOTACTIVECALL, &tcon, &thost)))
+ 	goto Bad_GetCaps;
+ 
      dataBytes = 1 * sizeof(afs_int32);
      dataBuffP = (afs_int32 *) malloc(dataBytes);
      dataBuffP[0] = CAPABILITY_ERRORTRANS;
      capabilities->Capabilities_len = dataBytes / sizeof(afs_int32);
      capabilities->Capabilities_val = dataBuffP;
  
+   Bad_GetCaps:
+     code = CallPostamble(tcon, code, thost);
+ 
      return 0;
  }
  
***************
*** 6058,6064 ****
      afs_int32 nids, naddrs;
      afs_int32 *vd, *addr;
      int errorCode = 0;		/* return code to caller */
!     struct client *client;
      struct rx_connection *tcon = rx_ConnectionOf(acall);
  
      ViceLog(1, ("SRXAFS_FlushCPS\n"));
--- 6182,6188 ----
      afs_int32 nids, naddrs;
      afs_int32 *vd, *addr;
      int errorCode = 0;		/* return code to caller */
!     struct client *client = 0;
      struct rx_connection *tcon = rx_ConnectionOf(acall);
  
      ViceLog(1, ("SRXAFS_FlushCPS\n"));
***************
*** 6076,6082 ****
      for (i = 0; i < nids; i++, vd++) {
  	if (!*vd)
  	    continue;
! 	client = h_ID2Client(*vd);	/* returns client write locked, or NULL */
  	if (!client)
  	    continue;
  
--- 6200,6206 ----
      for (i = 0; i < nids; i++, vd++) {
  	if (!*vd)
  	    continue;
! 	client = h_ID2Client(*vd);	/* returns write locked and refCounted, or NULL */
  	if (!client)
  	    continue;
  
***************
*** 6092,6097 ****
--- 6216,6222 ----
  	    client->CPS.prlist_len = 0;
  	}
  	ReleaseWriteLock(&client->lock);
+ 	PutClient(&client);
      }
  
      addr = addrs->IPAddrs_val;
***************
*** 6234,6239 ****
--- 6359,6365 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
      struct timeval opStartTime, opStopTime;	/* Start/stop times for RPC op */
***************
*** 6249,6255 ****
      FS_UNLOCK;
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_GetVolumeInfo;
  
      FS_LOCK;
--- 6375,6381 ----
      FS_UNLOCK;
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_GetVolumeInfo;
  
      FS_LOCK;
***************
*** 6263,6269 ****
      avolinfo->Type4 = 0xabcd9999;	/* tell us to try new vldb */
  
    Bad_GetVolumeInfo:
!     code = CallPostamble(tcon, code);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
--- 6389,6395 ----
      avolinfo->Type4 = 0xabcd9999;	/* tell us to try new vldb */
  
    Bad_GetVolumeInfo:
!     code = CallPostamble(tcon, code, thost);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
***************
*** 6297,6306 ****
      Vnode *parentwhentargetnotdir = 0;	/* vnode of parent */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client entry */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      AFSFid dummyFid;
      struct rx_connection *tcon;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
--- 6423,6433 ----
      Vnode *parentwhentargetnotdir = 0;	/* vnode of parent */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client entry */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      AFSFid dummyFid;
      struct rx_connection *tcon;
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 6320,6326 ****
  #endif /* FS_STATS_DETAILED */
  
      ViceLog(1, ("SAFS_GetVolumeStatus for volume %u\n", avolid));
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_GetVolumeStatus;
  
      FS_LOCK;
--- 6447,6453 ----
  #endif /* FS_STATS_DETAILED */
  
      ViceLog(1, ("SAFS_GetVolumeStatus for volume %u\n", avolid));
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_GetVolumeStatus;
  
      FS_LOCK;
***************
*** 6347,6353 ****
  
    Bad_GetVolumeStatus:
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr);
      ViceLog(2, ("SAFS_GetVolumeStatus returns %d\n", errorCode));
      /* next is to guarantee out strings exist for stub */
      if (*Name == 0) {
--- 6474,6480 ----
  
    Bad_GetVolumeStatus:
      (void)PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0,
! 			   volptr, &client);
      ViceLog(2, ("SAFS_GetVolumeStatus returns %d\n", errorCode));
      /* next is to guarantee out strings exist for stub */
      if (*Name == 0) {
***************
*** 6362,6368 ****
  	*OfflineMsg = (char *)malloc(1);
  	**OfflineMsg = 0;
      }
!     errorCode = CallPostamble(tcon, errorCode);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 6489,6495 ----
  	*OfflineMsg = (char *)malloc(1);
  	**OfflineMsg = 0;
      }
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 6401,6410 ****
      Vnode *parentwhentargetnotdir = 0;	/* vnode of parent */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client;	/* pointer to client entry */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      AFSFid dummyFid;
      struct rx_connection *tcon = rx_ConnectionOf(acall);
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
--- 6528,6538 ----
      Vnode *parentwhentargetnotdir = 0;	/* vnode of parent */
      int errorCode = 0;		/* error code */
      Volume *volptr = 0;		/* pointer to the volume header */
!     struct client *client = 0;	/* pointer to client entry */
      afs_int32 rights, anyrights;	/* rights for this and any user */
      AFSFid dummyFid;
      struct rx_connection *tcon = rx_ConnectionOf(acall);
+     struct host *thost;
      struct client *t_client = NULL;	/* tmp ptr to client data */
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 6424,6430 ****
  #endif /* FS_STATS_DETAILED */
  
      ViceLog(1, ("SAFS_SetVolumeStatus for volume %u\n", avolid));
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_SetVolumeStatus;
  
      FS_LOCK;
--- 6552,6558 ----
  #endif /* FS_STATS_DETAILED */
  
      ViceLog(1, ("SAFS_SetVolumeStatus for volume %u\n", avolid));
!     if ((errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_SetVolumeStatus;
  
      FS_LOCK;
***************
*** 6456,6464 ****
  	RXUpdate_VolumeStatus(volptr, StoreVolStatus, Name, OfflineMsg, Motd);
  
    Bad_SetVolumeStatus:
!     PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0, volptr);
      ViceLog(2, ("SAFS_SetVolumeStatus returns %d\n", errorCode));
!     errorCode = CallPostamble(tcon, errorCode);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
--- 6584,6593 ----
  	RXUpdate_VolumeStatus(volptr, StoreVolStatus, Name, OfflineMsg, Motd);
  
    Bad_SetVolumeStatus:
!     PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0, 
! 		     volptr, &client);
      ViceLog(2, ("SAFS_SetVolumeStatus returns %d\n", errorCode));
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
      t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
  
***************
*** 6496,6501 ****
--- 6625,6631 ----
      int len;
      char *temp;
      struct rx_connection *tcon;
+     struct host *thost;
  #endif
      int errorCode = 0;
  #if FS_STATS_DETAILED
***************
*** 6520,6526 ****
      return FSERR_EOPNOTSUPP;
  
  #ifdef	notdef
!     if (errorCode = CallPreamble(acall, ACTIVECALL, &tcon))
  	goto Bad_GetRootVolume;
      FS_LOCK;
      AFSCallStats.GetRootVolume++, AFSCallStats.TotalCalls++;
--- 6650,6656 ----
      return FSERR_EOPNOTSUPP;
  
  #ifdef	notdef
!     if (errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &thost))
  	goto Bad_GetRootVolume;
      FS_LOCK;
      AFSCallStats.GetRootVolume++, AFSCallStats.TotalCalls++;
***************
*** 6549,6555 ****
      *VolumeName = temp;		/* freed by rx server-side stub */
  
    Bad_GetRootVolume:
!     errorCode = CallPostamble(tcon, errorCode);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
--- 6679,6685 ----
      *VolumeName = temp;		/* freed by rx server-side stub */
  
    Bad_GetRootVolume:
!     errorCode = CallPostamble(tcon, errorCode, thost);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
***************
*** 6582,6587 ****
--- 6712,6718 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
      struct timeval opStartTime, opStopTime;	/* Start/stop times for RPC op */
***************
*** 6598,6610 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon)))
  	goto Bad_CheckToken;
  
      code = FSERR_ECONNREFUSED;
  
    Bad_CheckToken:
!     code = CallPostamble(tcon, code);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
--- 6729,6741 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, ACTIVECALL, &tcon, &thost)))
  	goto Bad_CheckToken;
  
      code = FSERR_ECONNREFUSED;
  
    Bad_CheckToken:
!     code = CallPostamble(tcon, code, thost);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
***************
*** 6634,6639 ****
--- 6765,6771 ----
  {
      afs_int32 code;
      struct rx_connection *tcon;
+     struct host *thost;
      struct timeval tpl;
  #if FS_STATS_DETAILED
      struct fs_stats_opTimingData *opP;	/* Ptr to this op's timing struct */
***************
*** 6651,6657 ****
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, NOTACTIVECALL, &tcon)))
  	goto Bad_GetTime;
  
      FS_LOCK;
--- 6783,6789 ----
      TM_GetTimeOfDay(&opStartTime, 0);
  #endif /* FS_STATS_DETAILED */
  
!     if ((code = CallPreamble(acall, NOTACTIVECALL, &tcon, &thost)))
  	goto Bad_GetTime;
  
      FS_LOCK;
***************
*** 6664,6670 ****
      ViceLog(2, ("SAFS_GetTime returns %u, %u\n", *Seconds, *USeconds));
  
    Bad_GetTime:
!     code = CallPostamble(tcon, code);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
--- 6796,6802 ----
      ViceLog(2, ("SAFS_GetTime returns %u, %u\n", *Seconds, *USeconds));
  
    Bad_GetTime:
!     code = CallPostamble(tcon, code, thost);
  
  #if FS_STATS_DETAILED
      TM_GetTimeOfDay(&opStopTime, 0);
***************
*** 6759,6772 ****
      TM_GetTimeOfDay(&StartTime, 0);
      ihP = targetptr->handle;
      fdP = IH_OPEN(ihP);
!     if (fdP == NULL)
  	return EIO;
      optSize = sendBufSize;
      tlen = FDH_SIZE(fdP);
      ViceLog(25,
  	    ("FetchData_RXStyle: file size %llu\n", (afs_uintmax_t) tlen));
      if (tlen < 0) {
  	FDH_CLOSE(fdP);
  	return EIO;
      }
      if (Pos > tlen) {
--- 6891,6907 ----
      TM_GetTimeOfDay(&StartTime, 0);
      ihP = targetptr->handle;
      fdP = IH_OPEN(ihP);
!     if (fdP == NULL) {
! 	VTakeOffline(volptr);
  	return EIO;
+     }
      optSize = sendBufSize;
      tlen = FDH_SIZE(fdP);
      ViceLog(25,
  	    ("FetchData_RXStyle: file size %llu\n", (afs_uintmax_t) tlen));
      if (tlen < 0) {
  	FDH_CLOSE(fdP);
+ 	VTakeOffline(volptr);
  	return EIO;
      }
      if (Pos > tlen) {
***************
*** 6804,6809 ****
--- 6939,6945 ----
  	if (errorCode != wlen) {
  	    FDH_CLOSE(fdP);
  	    FreeSendBuffer((struct afs_buffer *)tbuffer);
+ 	    VTakeOffline(volptr);
  	    return EIO;
  	}
  	errorCode = rx_Write(Call, tbuffer, wlen);
***************
*** 6811,6822 ****
--- 6947,6960 ----
  	errorCode = rx_WritevAlloc(Call, tiov, &tnio, RX_MAXIOVECS, wlen);
  	if (errorCode <= 0) {
  	    FDH_CLOSE(fdP);
+ 	    VTakeOffline(volptr);
  	    return EIO;
  	}
  	wlen = errorCode;
  	errorCode = FDH_READV(fdP, tiov, tnio);
  	if (errorCode != wlen) {
  	    FDH_CLOSE(fdP);
+ 	    VTakeOffline(volptr);
  	    return EIO;
  	}
  	errorCode = rx_Writev(Call, tiov, tnio, wlen);
***************
*** 6967,6978 ****
  
      if (Pos == -1 || VN_GET_INO(targetptr) == 0) {
  	/* the inode should have been created in Alloc_NewVnode */
! 	logHostAddr.s_addr = rx_HostOf(rx_PeerOf(rx_ConnectionOf(Call)));
  	ViceLog(0,
! 		("StoreData_RXStyle : Inode non-existent Fid = %u.%u.%u, inode = %llu, Pos %llu Host %s\n",
  		 Fid->Volume, Fid->Vnode, Fid->Unique,
  		 (afs_uintmax_t) VN_GET_INO(targetptr), (afs_uintmax_t) Pos,
! 		 inet_ntoa(logHostAddr)));
  	return ENOENT;		/* is this proper error code? */
      } else {
  	/*
--- 7105,7116 ----
  
      if (Pos == -1 || VN_GET_INO(targetptr) == 0) {
  	/* the inode should have been created in Alloc_NewVnode */
! 	logHostAddr.s_addr = rxr_HostOf(rx_ConnectionOf(Call));
  	ViceLog(0,
! 		("StoreData_RXStyle : Inode non-existent Fid = %u.%u.%u, inode = %llu, Pos %llu Host %s:%d\n",
  		 Fid->Volume, Fid->Vnode, Fid->Unique,
  		 (afs_uintmax_t) VN_GET_INO(targetptr), (afs_uintmax_t) Pos,
! 		 inet_ntoa(logHostAddr), ntohs(rxr_PortOf(rx_ConnectionOf(Call)))));
  	return ENOENT;		/* is this proper error code? */
      } else {
  	/*
***************
*** 6988,6993 ****
--- 7126,7132 ----
  	    return ENOENT;
  	if (GetLinkCountAndSize(volptr, fdP, &linkCount, &DataLength) < 0) {
  	    FDH_CLOSE(fdP);
+ 	    VTakeOffline(volptr);
  	    return EIO;
  	}
  
***************
*** 7314,7331 ****
      sys2et[EMEDIUMTYPE] = UAEMEDIUMTYPE;
  }
  
  afs_int32
  SRXAFS_CallBackRxConnAddr (struct rx_call * acall, afs_int32 *addr)
  {
      Error errorCode = 0;
      struct host *thost;
      struct client *tclient;
      static struct rx_securityClass *sc = 0;
      int i,j;
      struct rx_connection *tcon;
      struct rx_connection *conn;
      
!     if (errorCode = CallPreamble(acall, ACTIVECALL, &tcon))
  	    goto Bad_CallBackRxConnAddr1;
      
  #ifndef __EXPERIMENTAL_CALLBACK_CONN_MOVING
--- 7453,7484 ----
      sys2et[EMEDIUMTYPE] = UAEMEDIUMTYPE;
  }
  
+ /* NOTE:  2006-03-01
+  *  SRXAFS_CallBackRxConnAddr should be re-written as follows:
+  *  - pass back the connection, client, and host from CallPreamble
+  *  - keep a ref on the client, which we don't now
+  *  - keep a hold on the host, which we already do
+  *  - pass the connection, client, and host down into SAFSS_*, and use
+  *    them instead of independently discovering them via rx_ConnectionOf
+  *    (safe) and rx_GetSpecific (not so safe)
+  *  The idea being that we decide what client and host we're going to use
+  *  when CallPreamble is called, and stay consistent throughout the call.
+  *  This change is too invasive for 1.4.1 but should be made in 1.5.x.
+  */
+ 
  afs_int32
  SRXAFS_CallBackRxConnAddr (struct rx_call * acall, afs_int32 *addr)
  {
      Error errorCode = 0;
      struct host *thost;
      struct client *tclient;
+     struct host *tcallhost;
      static struct rx_securityClass *sc = 0;
      int i,j;
      struct rx_connection *tcon;
      struct rx_connection *conn;
      
!     if (errorCode = CallPreamble(acall, ACTIVECALL, &tcon, &tcallhost))
  	    goto Bad_CallBackRxConnAddr1;
      
  #ifndef __EXPERIMENTAL_CALLBACK_CONN_MOVING
***************
*** 7374,7390 ****
  	thost->host           = addr;
  	rx_SetConnDeadTime(thost->callback_rxcon, 50);
  	rx_SetConnHardDeadTime(thost->callback_rxcon, AFS_HARDDEADTIME);
  	H_UNLOCK;
! 	errorCode = CallPostamble(tcon, errorCode);
  	return errorCode;
      } else {
  	rx_DestroyConnection(conn);
      }	    
    Bad_CallBackRxConnAddr:
      H_UNLOCK;
  #endif
  
!     errorCode = CallPostamble(tcon, errorCode);
   Bad_CallBackRxConnAddr1:
      return errorCode;          /* failure */
  }
--- 7527,7547 ----
  	thost->host           = addr;
  	rx_SetConnDeadTime(thost->callback_rxcon, 50);
  	rx_SetConnHardDeadTime(thost->callback_rxcon, AFS_HARDDEADTIME);
+ 	h_ReleaseClient_r(tclient);
+ 	/* The hold on thost will be released by CallPostamble */
  	H_UNLOCK;
! 	errorCode = CallPostamble(tcon, errorCode, tcallhost);
  	return errorCode;
      } else {
  	rx_DestroyConnection(conn);
      }	    
    Bad_CallBackRxConnAddr:
+     h_ReleaseClient_r(tclient);
+     /* The hold on thost will be released by CallPostamble */
      H_UNLOCK;
  #endif
  
!     errorCode = CallPostamble(tcon, errorCode, tcallhost);
   Bad_CallBackRxConnAddr1:
      return errorCode;          /* failure */
  }
***************
*** 7396,7401 ****
--- 7553,7560 ----
  	return 0;
      if (in < 0 || in > 511)
  	return in;
+     if (in >= VICE_SPECIAL_ERRORS && in <= VIO || in == VRESTRICTED)
+ 	return in;
      if (sys2et[in] != 0)
  	return sys2et[in];
      return in;
Index: openafs/src/viced/callback.c
diff -c openafs/src/viced/callback.c:1.55.2.10 openafs/src/viced/callback.c:1.55.2.14
*** openafs/src/viced/callback.c:1.55.2.10	Thu Jul 28 16:52:21 2005
--- openafs/src/viced/callback.c	Thu Feb  2 16:48:39 2006
***************
*** 83,89 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/callback.c,v 1.55.2.10 2005/07/28 20:52:21 shadow 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.14 2006/02/02 21:48:39 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>		/* for malloc() */
***************
*** 778,783 ****
--- 778,784 ----
      int i, j;
      struct rx_connection *conns[MAX_CB_HOSTS];
      static struct AFSCBs tc = { 0, 0 };
+     int multi_to_cba_map[MAX_CB_HOSTS];
  
      assert(ncbas <= MAX_CB_HOSTS);
  
***************
*** 788,793 ****
--- 789,795 ----
  	    continue;
  	}
  	rx_GetConnection(thishost->callback_rxcon);
+ 	multi_to_cba_map[j] = i;
  	conns[j++] = thishost->callback_rxcon;
  
  #ifdef	ADAPT_MTU
***************
*** 806,833 ****
  		struct host *hp;
  		char hoststr[16];
  
! 		idx = 0;
! 		/* If there's an error, we have to hunt for the right host. 
! 		 * The conns array _should_ correspond one-to-one to the cba
! 		 * array, except in some rare cases it might be missing one 
! 		 * or more elements.  So the optimistic case is almost 
! 		 * always right.  At worst, it's the starting point for the 
! 		 * hunt. */
! 		for (hp = 0, i = multi_i; i < j; i++) {
! 		    hp = cba[i].hp;	/* optimistic, but usually right */
! 		    if (!hp) {
! 			break;
! 		    }
! 		    if (conns[multi_i] == hp->callback_rxcon) {
! 			idx = cba[i].thead;
! 			break;
! 		    }
! 		}
  
! 		if (!hp) {
  		    ViceLog(0,
! 			    ("BCB: INTERNAL ERROR: hp=%x, cba=%x\n", hp,
! 			     cba));
  		} else {
  		    /* 
  		     ** try breaking callbacks on alternate interface addresses
--- 808,821 ----
  		struct host *hp;
  		char hoststr[16];
  
! 		i = multi_to_cba_map[multi_i];
! 		hp = cba[i].hp;
! 		idx = cba[i].thead;
  
! 		if (!hp || !idx) {
  		    ViceLog(0,
! 			    ("BCB: INTERNAL ERROR: hp=%x, cba=%x, thead=%u\n", 
! 			     hp, cba, idx));
  		} else {
  		    /* 
  		     ** try breaking callbacks on alternate interface addresses
***************
*** 835,841 ****
  		    if (MultiBreakCallBackAlternateAddress(hp, afidp)) {
  			if (ShowProblems) {
  			    ViceLog(7,
! 				    ("BCB: Failed on file %u.%u.%u, host %s:%d is down\n",
  				     afidp->AFSCBFids_val->Volume,
  				     afidp->AFSCBFids_val->Vnode,
  				     afidp->AFSCBFids_val->Unique,
--- 823,829 ----
  		    if (MultiBreakCallBackAlternateAddress(hp, afidp)) {
  			if (ShowProblems) {
  			    ViceLog(7,
! 				    ("BCB: Failed on file %u.%u.%u, Host %s:%d is down\n",
  				     afidp->AFSCBFids_val->Volume,
  				     afidp->AFSCBFids_val->Vnode,
  				     afidp->AFSCBFids_val->Unique,
***************
*** 1100,1106 ****
  
      cbstuff.nbreakers++;
      if (!(host->hostFlags & RESETDONE) && !(host->hostFlags & HOSTDELETED)) {
! 	host->hostFlags &= ~ALTADDR;	/* alterrnate addresses are invalid */
  	cb_conn = host->callback_rxcon;
  	rx_GetConnection(cb_conn);
  	if (host->interface) {
--- 1088,1094 ----
  
      cbstuff.nbreakers++;
      if (!(host->hostFlags & RESETDONE) && !(host->hostFlags & HOSTDELETED)) {
! 	host->hostFlags &= ~ALTADDR;	/* alternate addresses are invalid */
  	cb_conn = host->callback_rxcon;
  	rx_GetConnection(cb_conn);
  	if (host->interface) {
***************
*** 1118,1124 ****
  	if (code) {
  	    if (ShowProblems) {
  		ViceLog(0,
! 			("CB: Call back connect back failed (in break delayed) for %s:%d\n",
  			 afs_inet_ntoa_r(host->host, hoststr),
  			 ntohs(host->port)));
  	    }
--- 1106,1112 ----
  	if (code) {
  	    if (ShowProblems) {
  		ViceLog(0,
! 			("CB: Call back connect back failed (in break delayed) for Host %s:%d\n",
  			 afs_inet_ntoa_r(host->host, hoststr),
  			 ntohs(host->port)));
  	    }
***************
*** 1165,1171 ****
  		int i;
  		if (ShowProblems) {
  		    ViceLog(0,
! 			    ("CB: XCallBackBulk failed, host=%s:%d; callback list follows:\n",
  			     afs_inet_ntoa_r(host->host, hoststr),
  			     ntohs(host->port)));
  		}
--- 1153,1159 ----
  		int i;
  		if (ShowProblems) {
  		    ViceLog(0,
! 			    ("CB: XCallBackBulk failed, Host %s:%d; callback list follows:\n",
  			     afs_inet_ntoa_r(host->host, hoststr),
  			     ntohs(host->port)));
  		}
***************
*** 1220,1230 ****
  	    return 0;		/* Release hold */
  	}
  	ViceLog(8,
! 		("BVCB: volume call back for host %s:%d failed\n",
  		 afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
  	if (ShowProblems) {
  	    ViceLog(0,
! 		    ("CB: volume callback for host %s:%d failed\n",
  		     afs_inet_ntoa_r(host->host, hoststr),
  		     ntohs(host->port)));
  	}
--- 1208,1218 ----
  	    return 0;		/* Release hold */
  	}
  	ViceLog(8,
! 		("BVCB: volume call back for Host %s:%d failed\n",
  		 afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port)));
  	if (ShowProblems) {
  	    ViceLog(0,
! 		    ("CB: volume callback for Host %s:%d failed\n",
  		     afs_inet_ntoa_r(host->host, hoststr),
  		     ntohs(host->port)));
  	}
***************
*** 1587,1601 ****
      return held;
  }
  
  /* This could be upgraded to get more space each time */
! /* first pass: find the oldest host which isn't held by anyone */
! /* second pass: find the oldest host who isn't "me" */
  /* always called with hostp unlocked */
  extern struct host *hostList;
  static int
  GetSomeSpace_r(struct host *hostp, int locked)
  {
!     register struct host *hp, *hp1 = (struct host *)0, *hp2 = hostList;
      int i = 0;
  
      cbstuff.GotSomeSpaces++;
--- 1575,1643 ----
      return held;
  }
  
+ /* This version does not allow 'host' to be selected unless its ActiveCall 
+  * is newer than 'hostp' which is the host with the oldest ActiveCall from
+  * the last pass (if it is provided).  We filter out any hosts that are
+  * are held by other threads.
+  */
+ static int
+ lih0_r(register struct host *host, register int held,
+       register struct host *hostp)
+ {
+     if (host->cblist
+ 	&& (hostp && host != hostp) 
+ 	&& (!held && !h_OtherHolds_r(host))
+ 	&& (!lih_host || host->ActiveCall < lih_host->ActiveCall) 
+ 	&& (!hostp || host->ActiveCall > hostp->ActiveCall)) {
+ 	if (lih_host != NULL && lih_host_held) {
+ 	    h_Release_r(lih_host);
+ 	}
+ 	lih_host = host;
+ 	lih_host_held = !held;
+ 	held = 1;
+     }
+     return held;
+ }
+ 
+ /* This version does not allow 'host' to be selected unless its ActiveCall 
+  * is newer than 'hostp' which is the host with the oldest ActiveCall from
+  * the last pass (if it is provided).  In this second varient, we do not 
+  * prevent held hosts from being selected.
+  */
+ static int
+ lih1_r(register struct host *host, register int held,
+       register struct host *hostp)
+ {
+     if (host->cblist
+ 	&& (hostp && host != hostp) 
+ 	&& (!lih_host || host->ActiveCall < lih_host->ActiveCall) 
+ 	&& (!hostp || host->ActiveCall > hostp->ActiveCall)) {
+ 	if (lih_host != NULL && lih_host_held) {
+ 	    h_Release_r(lih_host);
+ 	}
+ 	lih_host = host;
+ 	lih_host_held = !held;
+ 	held = 1;
+     }
+     return held;
+ }
+ 
  /* This could be upgraded to get more space each time */
! /* first pass: sequentially find the oldest host which isn't held by
!                anyone for which we can clear callbacks;
! 	       skipping 'hostp' */
! /* second pass: sequentially find the oldest host regardless of 
!                whether or not the host is held; skipping 'hostp' */
! /* third pass: attempt to clear callbacks from 'hostp' */
  /* always called with hostp unlocked */
+ 
+ /* Note: hostlist is ordered most recently created host first and 
+  * its order has no relationship to the most recently used. */
  extern struct host *hostList;
  static int
  GetSomeSpace_r(struct host *hostp, int locked)
  {
!     register struct host *hp, *hp1, *hp2;
      int i = 0;
  
      cbstuff.GotSomeSpaces++;
***************
*** 1605,1633 ****
  	cbstuff.GSS3++;
  	return 0;
      }
      do {
  	lih_host = 0;
! 	h_Enumerate_r(lih_r, hp2, (char *)hp1);
  	hp = lih_host;
  	if (hp) {
  	    /* set in lih_r! private copy before giving up H_LOCK */
  	    int lih_host_held2=lih_host_held;   
  	    cbstuff.GSS4++;
! 	    if (!ClearHostCallbacks_r(hp, 0 /* not locked or held */ )) {
  		if (lih_host_held2)
  		    h_Release_r(hp);
  		return 0;
  	    }
  	    if (lih_host_held2)
  		h_Release_r(hp);
! 	    hp2 = hp->next;
! 	} else {
  	    hp2 = hostList;
! 	    hp1 = hostp;
! 	    cbstuff.GSS1++;
! 	    ViceLog(5,
! 		    ("GSS: Try harder for longest inactive host cnt= %d\n",
! 		     i));
  	    /*
  	     * Next time try getting callbacks from any host even if
  	     * it's deleted (that's actually great since we can freely
--- 1647,1674 ----
  	cbstuff.GSS3++;
  	return 0;
      }
+ 
+     i = 0;
+     hp1 = NULL;
+     hp2 = hostList;
      do {
  	lih_host = 0;
! 	h_Enumerate_r(i == 0 ? lih0_r : lih1_r, hp2, (char *)hp1);
  	hp = lih_host;
  	if (hp) {
  	    /* set in lih_r! private copy before giving up H_LOCK */
  	    int lih_host_held2=lih_host_held;   
  	    cbstuff.GSS4++;
! 	    if ((hp != hostp) && !ClearHostCallbacks_r(hp, 0 /* not locked or held */ )) {
  		if (lih_host_held2)
  		    h_Release_r(hp);
  		return 0;
  	    }
  	    if (lih_host_held2)
  		h_Release_r(hp);
! 	    hp1 = hp;
  	    hp2 = hostList;
! 	} else {
  	    /*
  	     * Next time try getting callbacks from any host even if
  	     * it's deleted (that's actually great since we can freely
***************
*** 1636,1648 ****
  	     * callback timeout arrives).
  	     */
  	    i++;
  	}
      } while (i < 2);
!     /*
!      * No choice to clear this host's callback state
!      */
!     /* third pass: we still haven't gotten any space, so we free what we had
!      * previously passed over. */
      cbstuff.GSS2++;
      if (!locked) {
  	h_Lock_r(hostp);
--- 1677,1692 ----
  	     * callback timeout arrives).
  	     */
  	    i++;
+ 	    hp1 = NULL;
+ 	    hp2 = hostList;
+ 	    cbstuff.GSS1++;
+ 	    ViceLog(5,
+ 		    ("GSS: Try harder for longest inactive host cnt= %d\n",
+ 		     i));
  	}
      } while (i < 2);
! 
!     /* Could not obtain space from other hosts, clear hostp's callback state */
      cbstuff.GSS2++;
      if (!locked) {
  	h_Lock_r(hostp);
***************
*** 1986,1992 ****
      int i, j;
      struct rx_connection **conns;
      struct rx_connection *connSuccess = 0;
!     afs_int32 *addr;
      static struct rx_securityClass *sc = 0;
      static struct AFSCBs tc = { 0, 0 };
      char hoststr[16];
--- 2030,2036 ----
      int i, j;
      struct rx_connection **conns;
      struct rx_connection *connSuccess = 0;
!     struct AddrPort *interfaces;
      static struct rx_securityClass *sc = 0;
      static struct AFSCBs tc = { 0, 0 };
      char hoststr[16];
***************
*** 2006,2014 ****
  	sc = rxnull_NewClientSecurityObject();
  
      i = host->interface->numberOfInterfaces;
!     addr = calloc(i, sizeof(afs_int32));
      conns = calloc(i, sizeof(struct rx_connection *));
!     if (!addr || !conns) {
  	ViceLog(0,
  		("Failed malloc in MultiBreakCallBackAlternateAddress_r\n"));
  	assert(0);
--- 2050,2058 ----
  	sc = rxnull_NewClientSecurityObject();
  
      i = host->interface->numberOfInterfaces;
!     interfaces = calloc(i, sizeof(struct AddrPort));
      conns = calloc(i, sizeof(struct rx_connection *));
!     if (!interfaces || !conns) {
  	ViceLog(0,
  		("Failed malloc in MultiBreakCallBackAlternateAddress_r\n"));
  	assert(0);
***************
*** 2017,2028 ****
      /* initialize alternate rx connections */
      for (i = 0, j = 0; i < host->interface->numberOfInterfaces; i++) {
  	/* this is the current primary address */
! 	if (host->host == host->interface->addr[i])
  	    continue;
  
! 	addr[j] = host->interface->addr[i];
  	conns[j] =
! 	    rx_NewConnection(host->interface->addr[i], host->port, 1, sc, 0);
  	rx_SetConnDeadTime(conns[j], 2);
  	rx_SetConnHardDeadTime(conns[j], AFS_HARDDEADTIME);
  	j++;
--- 2061,2074 ----
      /* initialize alternate rx connections */
      for (i = 0, j = 0; i < host->interface->numberOfInterfaces; i++) {
  	/* this is the current primary address */
! 	if (host->host == host->interface->interface[i].addr &&
! 	    host->port == host->interface->interface[i].port)
  	    continue;
  
! 	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++;
***************
*** 2041,2053 ****
  	    if (host->callback_rxcon)
  		rx_DestroyConnection(host->callback_rxcon);
  	    host->callback_rxcon = conns[multi_i];
! 	    host->host = addr[multi_i];
  	    connSuccess = conns[multi_i];
  	    rx_SetConnDeadTime(host->callback_rxcon, 50);
  	    rx_SetConnHardDeadTime(host->callback_rxcon, AFS_HARDDEADTIME);
  	    ViceLog(125,
  		    ("multibreakcall success with addr %s\n",
! 		     afs_inet_ntoa_r(addr[multi_i], hoststr)));
  	    H_UNLOCK;
  	    multi_Abort;
  	}
--- 2087,2100 ----
  	    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,
  		    ("multibreakcall success with addr %s\n",
! 		     afs_inet_ntoa_r(interfaces[multi_i].addr, hoststr)));
  	    H_UNLOCK;
  	    multi_Abort;
  	}
***************
*** 2059,2065 ****
  	if (conns[i] != connSuccess)
  	    rx_DestroyConnection(conns[i]);
  
!     free(addr);
      free(conns);
  
      if (connSuccess)
--- 2106,2112 ----
  	if (conns[i] != connSuccess)
  	    rx_DestroyConnection(conns[i]);
  
!     free(interfaces);
      free(conns);
  
      if (connSuccess)
***************
*** 2079,2085 ****
      int i, j;
      struct rx_connection **conns;
      struct rx_connection *connSuccess = 0;
!     afs_int32 *addr;
      static struct rx_securityClass *sc = 0;
      char hoststr[16];
  
--- 2126,2132 ----
      int i, j;
      struct rx_connection **conns;
      struct rx_connection *connSuccess = 0;
!     struct AddrPort *interfaces;
      static struct rx_securityClass *sc = 0;
      char hoststr[16];
  
***************
*** 2098,2106 ****
  	sc = rxnull_NewClientSecurityObject();
  
      i = host->interface->numberOfInterfaces;
!     addr = calloc(i, sizeof(afs_int32));
      conns = calloc(i, sizeof(struct rx_connection *));
!     if (!addr || !conns) {
  	ViceLog(0, ("Failed malloc in MultiProbeAlternateAddress_r\n"));
  	assert(0);
      }
--- 2145,2153 ----
  	sc = rxnull_NewClientSecurityObject();
  
      i = host->interface->numberOfInterfaces;
!     interfaces = calloc(i, sizeof(struct AddrPort));
      conns = calloc(i, sizeof(struct rx_connection *));
!     if (!interfaces || !conns) {
  	ViceLog(0, ("Failed malloc in MultiProbeAlternateAddress_r\n"));
  	assert(0);
      }
***************
*** 2108,2119 ****
      /* initialize alternate rx connections */
      for (i = 0, j = 0; i < host->interface->numberOfInterfaces; i++) {
  	/* this is the current primary address */
! 	if (host->host == host->interface->addr[i])
  	    continue;
  
! 	addr[j] = host->interface->addr[i];
  	conns[j] =
! 	    rx_NewConnection(host->interface->addr[i], host->port, 1, sc, 0);
  	rx_SetConnDeadTime(conns[j], 2);
  	rx_SetConnHardDeadTime(conns[j], AFS_HARDDEADTIME);
  	j++;
--- 2155,2168 ----
      /* initialize alternate rx connections */
      for (i = 0, j = 0; i < host->interface->numberOfInterfaces; i++) {
  	/* this is the current primary address */
! 	if (host->host == host->interface->interface[i].addr &&
! 	    host->port == host->interface->interface[i].port)
  	    continue;
  
! 	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++;
***************
*** 2132,2150 ****
  	    if (host->callback_rxcon)
  		rx_DestroyConnection(host->callback_rxcon);
  	    host->callback_rxcon = conns[multi_i];
! 	    host->host = addr[multi_i];
  	    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(addr[multi_i], hoststr)));
  	    H_UNLOCK;
  	    multi_Abort;
  	} else {
  	    ViceLog(125,
  		    ("multiprobe failure with addr %s\n",
! 		     afs_inet_ntoa_r(addr[multi_i], hoststr)));
              
              /* This is less than desirable but its the best we can do.
               * The AFS Cache Manager will return either 0 for a Uuid  
--- 2181,2200 ----
  	    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  
***************
*** 2159,2166 ****
                  /* remove the current alternate address from this host */
                  H_LOCK;
                  for (i = 0, j = 0; i < host->interface->numberOfInterfaces; i++) {
!                     if (addr[multi_i] != host->interface->addr[i]) {
!                         host->interface->addr[j] = host->interface->addr[i];
                          j++;
                      }
                  }
--- 2209,2217 ----
                  /* 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++;
                      }
                  }
***************
*** 2176,2182 ****
  	if (conns[i] != connSuccess)
  	    rx_DestroyConnection(conns[i]);
  
!     free(addr);
      free(conns);
  
      if (connSuccess)
--- 2227,2233 ----
  	if (conns[i] != connSuccess)
  	    rx_DestroyConnection(conns[i]);
  
!     free(interfaces);
      free(conns);
  
      if (connSuccess)
Index: openafs/src/viced/fs_stats.h
diff -c openafs/src/viced/fs_stats.h:1.3.2.1 openafs/src/viced/fs_stats.h:1.3.2.3
*** openafs/src/viced/fs_stats.h:1.3.2.1	Sun Jan 30 23:14:50 2005
--- openafs/src/viced/fs_stats.h	Fri Apr  7 01:36:59 2006
***************
*** 126,135 ****
      afs_int32 rx_nBusies;	/*Ttl VBUSYs sent to shed load */
      afs_int32 fs_nBusies;	/*Ttl VBUSYs sent during restart/vol clone */
  
      /*
       * Spares
       */
!     afs_int32 spare[29];
  };
  
  #if FS_STATS_DETAILED
--- 126,139 ----
      afs_int32 rx_nBusies;	/*Ttl VBUSYs sent to shed load */
      afs_int32 fs_nBusies;	/*Ttl VBUSYs sent during restart/vol clone */
  
+     /* 
+      * Can't count this as an RPC because it breaks the data structure
+      */
+     afs_int32 fs_nGetCaps;	/* Number of GetCapabilities calls */
      /*
       * Spares
       */
!     afs_int32 spare[28];
  };
  
  #if FS_STATS_DETAILED
Index: openafs/src/viced/host.c
diff -c openafs/src/viced/host.c:1.57.2.5 openafs/src/viced/host.c:1.57.2.29
*** openafs/src/viced/host.c:1.57.2.5	Thu Jul 28 16:52:21 2005
--- openafs/src/viced/host.c	Thu Mar 30 11:29:22 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/host.c,v 1.57.2.5 2005/07/28 20:52:21 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.29 2006/03/30 16:29:22 shadow Exp $");
  
  #include <stdio.h>
  #include <errno.h>
***************
*** 88,93 ****
--- 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.
***************
*** 108,123 ****
  #define	IN_CLASSB_SUBNET	0xffffff00
  #endif
  
- #define rxr_GetEpoch(aconn) (((struct rx_connection *)(aconn))->epoch)
- 
- #define rxr_CidOf(aconn) (((struct rx_connection *)(aconn))->cid)
- 
- #define rxr_PortOf(aconn) \
-     rx_PortOf(rx_PeerOf(((struct rx_connection *)(aconn))))
- 
- #define rxr_HostOf(aconn) \
-     rx_HostOf(rx_PeerOf((struct rx_connection *)(aconn)))
- 
  
  /* get a new block of CEs and chain it on CEFree */
  static void
--- 109,114 ----
***************
*** 207,212 ****
--- 198,208 ----
      register int i;
      static int index = 0;
  
+     if (HTBlocks == h_MAXHOSTTABLES) {
+ 	ViceLog(0, ("h_MAXHOSTTABLES reached\n"));
+ 	ShutDownAndCore(PANIC);
+     }
+ 
      block = (struct HTBlock *)malloc(sizeof(struct HTBlock));
      if (!block) {
  	ViceLog(0, ("Failed malloc in GetHTBlock\n"));
***************
*** 454,460 ****
      slept ? (host->cpsCall = FT_ApproxTime()) : (host->cpsCall = now);
  
      H_UNLOCK;
!     code = pr_GetHostCPS(htonl(host->host), &host->hcps);
      H_LOCK;
      if (code) {
  	/*
--- 450,456 ----
      slept ? (host->cpsCall = FT_ApproxTime()) : (host->cpsCall = now);
  
      H_UNLOCK;
!     code = pr_GetHostCPS(ntohl(host->host), &host->hcps);
      H_LOCK;
      if (code) {
  	/*
***************
*** 508,514 ****
  
  /* args in net byte order */
  void
! h_flushhostcps(register afs_uint32 hostaddr, register afs_uint32 hport)
  {
      register struct host *host;
      int held = 0;
--- 504,510 ----
  
  /* args in net byte order */
  void
! h_flushhostcps(register afs_uint32 hostaddr, register afs_uint16 hport)
  {
      register struct host *host;
      int held = 0;
***************
*** 535,563 ****
  h_Alloc_r(register struct rx_connection *r_con)
  {
      struct servent *serverentry;
-     register index = h_HashIndex(rxr_HostOf(r_con));
      register struct host *host;
      static struct rx_securityClass *sc = 0;
      afs_int32 now;
-     struct h_hashChain *h_hashChain;
  #if FS_STATS_DETAILED
      afs_uint32 newHostAddr_HBO;	/*New host IP addr, in host byte order */
  #endif /* FS_STATS_DETAILED */
  
      host = GetHT();
  
-     h_hashChain = (struct h_hashChain *)malloc(sizeof(struct h_hashChain));
-     if (!h_hashChain) {
- 	ViceLog(0, ("Failed malloc in h_Alloc_r\n"));
- 	assert(0);
-     }
-     h_hashChain->hostPtr = host;
-     h_hashChain->addr = rxr_HostOf(r_con);
-     h_hashChain->next = hostHashTable[index];
-     hostHashTable[index] = h_hashChain;
- 
      host->host = rxr_HostOf(r_con);
      host->port = rxr_PortOf(r_con);
      if (consolePort == 0) {	/* find the portal number for console */
  #if	defined(AFS_OSF_ENV)
  	serverentry = getservbyname("ropcons", "");
--- 531,550 ----
  h_Alloc_r(register struct rx_connection *r_con)
  {
      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 */
  #endif /* FS_STATS_DETAILED */
  
      host = GetHT();
  
      host->host = rxr_HostOf(r_con);
      host->port = rxr_PortOf(r_con);
+ 
+     hashInsert_r(host->host, host->port, host);
+ 
      if (consolePort == 0) {	/* find the portal number for console */
  #if	defined(AFS_OSF_ENV)
  	serverentry = getservbyname("ropcons", "");
***************
*** 613,632 ****
  /* Note: host should be released by caller if 0 == *heldp and non-null */
  /* hostaddr and hport are in network order */
  struct host *
! h_Lookup_r(afs_uint32 hostaddr, afs_uint32 hport, int *heldp)
  {
      register afs_int32 now;
      register struct host *host = 0;
      register struct h_hashChain *chain;
!     register index = h_HashIndex(hostaddr);
      extern int hostaclRefresh;
  
    restart:
      for (chain = hostHashTable[index]; chain; chain = chain->next) {
  	host = chain->hostPtr;
  	assert(host);
! 	if (!(host->hostFlags & HOSTDELETED) && chain->addr == hostaddr
! 	    && host->port == hport) {
  	    *heldp = h_Held_r(host);
  	    if (!*heldp)
  		h_Hold_r(host);
--- 600,619 ----
  /* Note: host should be released by caller if 0 == *heldp and non-null */
  /* hostaddr and hport are in network order */
  struct host *
! 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
! 	    && chain->port == hport) {
  	    *heldp = h_Held_r(host);
  	    if (!*heldp)
  		h_Hold_r(host);
***************
*** 717,739 ****
      /* ASSUMPTION: rxi_FreeConnection() does not yield */
      for (cp = &host->FirstClient; (client = *cp);) {
  	if ((host->hostFlags & HOSTDELETED) || client->deleted) {
  	    if (client->refCount) {
  		char hoststr[16];
  		ViceLog(0,
! 			("Warning: Host %s:%d client %x refcount %d while deleting.\n",
  			 afs_inet_ntoa_r(host->host, hoststr),
  			 ntohs(host->port), client, client->refCount));
! 	    }
! 	    if ((client->ViceId != ANONYMOUSID) && client->CPS.prlist_val) {
! 		free(client->CPS.prlist_val);
! 		client->CPS.prlist_val = NULL;
  	    }
  	    client->CPS.prlist_len = 0;
  	    if (client->tcon) {
  		rx_SetSpecific(client->tcon, rxcon_client_key, (void *)0);
  	    }
  	    CurrentConnections--;
  	    *cp = client->next;
  	    FreeCE(client);
  	} else
  	    cp = &client->next;
--- 704,741 ----
      /* ASSUMPTION: rxi_FreeConnection() does not yield */
      for (cp = &host->FirstClient; (client = *cp);) {
  	if ((host->hostFlags & HOSTDELETED) || client->deleted) {
+ 	    int code;
+ 	    ObtainWriteLockNoBlock(&client->lock, code);
+ 	    if (code < 0) {
+ 		char hoststr[16];
+ 		ViceLog(0,
+ 			("Warning: h_TossStuff_r failed: Host %s:%d client %x was locked.\n",
+ 			 afs_inet_ntoa_r(host->host, hoststr),
+ 			 ntohs(host->port), client));
+ 		return;
+ 	    }
+ 		 
  	    if (client->refCount) {
  		char hoststr[16];
  		ViceLog(0,
! 			("Warning: h_TossStuff_r failed: Host %s:%d client %x refcount %d.\n",
  			 afs_inet_ntoa_r(host->host, hoststr),
  			 ntohs(host->port), client, client->refCount));
! 		/* This is the same thing we do if the host is locked */
! 		ReleaseWriteLock(&client->lock);
! 		return;
  	    }
  	    client->CPS.prlist_len = 0;
+ 	    if ((client->ViceId != ANONYMOUSID) && client->CPS.prlist_val)
+ 		free(client->CPS.prlist_val);
+ 	    client->CPS.prlist_val = NULL;
  	    if (client->tcon) {
  		rx_SetSpecific(client->tcon, rxcon_client_key, (void *)0);
+ 		rx_PutConnection(client->tcon);
  	    }
  	    CurrentConnections--;
  	    *cp = client->next;
+ 	    ReleaseWriteLock(&client->lock);
  	    FreeCE(client);
  	} else
  	    cp = &client->next;
***************
*** 746,752 ****
  	register struct h_hashChain **hp, *th;
  	register struct rx_connection *rxconn;
  	afsUUID *uuidp;
! 	afs_uint32 hostAddr;
  	int i;
  
  	if (host->Console & 1)
--- 748,754 ----
  	register struct h_hashChain **hp, *th;
  	register struct rx_connection *rxconn;
  	afsUUID *uuidp;
! 	struct AddrPort hostAddrPort;
  	int i;
  
  	if (host->Console & 1)
***************
*** 760,767 ****
  	     * destroying the connection.
  	     */
  	    client = rx_GetSpecific(rxconn, rxcon_client_key);
! 	    if (client && client->tcon == rxconn)
  		client->tcon = NULL;
  	    rx_SetSpecific(rxconn, rxcon_client_key, (void *)0);
  	    rx_DestroyConnection(rxconn);
  	}
--- 762,771 ----
  	     * destroying the connection.
  	     */
  	    client = rx_GetSpecific(rxconn, rxcon_client_key);
! 	    if (client && client->tcon == rxconn) {
! 		rx_PutConnection(client->tcon);
  		client->tcon = NULL;
+ 	    }
  	    rx_SetSpecific(rxconn, rxcon_client_key, (void *)0);
  	    rx_DestroyConnection(rxconn);
  	}
***************
*** 800,807 ****
  	    /* delete all hash entries for alternate addresses */
  	    assert(host->interface->numberOfInterfaces > 0);
  	    for (i = 0; i < host->interface->numberOfInterfaces; i++) {
! 		hostAddr = host->interface->addr[i];
! 		for (hp = &hostHashTable[h_HashIndex(hostAddr)]; (th = *hp);
  		     hp = &th->next) {
  		    assert(th->hostPtr);
  		    if (th->hostPtr == host) {
--- 804,812 ----
  	    /* 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) {
***************
*** 829,836 ****
      client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
      if (client) {
  	H_LOCK;
! 	if (client->tcon == tcon)
  	    client->tcon = (struct rx_connection *)0;
  	H_UNLOCK;
      }
      return 0;
--- 834,843 ----
      client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
      if (client) {
  	H_LOCK;
! 	if (client->tcon == tcon) {
! 	    rx_PutConnection(client->tcon);
  	    client->tcon = (struct rx_connection *)0;
+ 	}
  	H_UNLOCK;
      }
      return 0;
***************
*** 895,912 ****
  void
  h_Enumerate_r(int (*proc) (), struct host *enumstart, char *param)
  {
!     register struct host *host;
!     register int held;
  
      if (hostCount == 0) {
  	return;
      }
!     for (host = enumstart; host; host = host->next) {
! 	if (!(held = h_Held_r(host)))
! 	    h_Hold_r(host);
  	held = (*proc) (host, held, param);
  	if (!held)
! 	    h_Release_r(host);	/* this might free up the host */
      }
  }				/*h_Enumerate_r */
  
--- 902,922 ----
  void
  h_Enumerate_r(int (*proc) (), struct host *enumstart, char *param)
  {
!     register struct host *host, *next;
!     register int held, nheld;
  
      if (hostCount == 0) {
  	return;
      }
!     if (enumstart && !(held = h_Held_r(enumstart)))
! 	h_Hold_r(enumstart); 
!     for (host = enumstart; host; host = next, held = nheld) {
! 	next = host->next;
! 	if (next && !(nheld = h_Held_r(next)))
! 	    h_Hold_r(next);
  	held = (*proc) (host, held, param);
  	if (!held)
! 	    h_Release_r(host); /* this might free up the host */
      }
  }				/*h_Enumerate_r */
  
***************
*** 932,937 ****
--- 942,1087 ----
      hostUuidHashTable[index] = chain;
  }
  
+ 
+ /* inserts a new HashChain structure corresponding to this address */
+ void
+ 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);
+ 
+     /* 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.
+  */
+ int
+ addInterfaceAddr_r(struct host *host, afs_uint32 addr, afs_uint16 port)
+ {
+     int i;
+     int number;
+     int found;
+     struct Interface *interface;
+     char hoststr[16], hoststr2[16];
+ 
+     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.
+      */
+     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));
+ 	if (!interface) {
+ 	    ViceLog(0, ("Failed malloc in addInterfaceAddr_r\n"));
+ 	    assert(0);
+ 	}
+ 	interface->numberOfInterfaces = number + 1;
+ 	interface->uuid = host->interface->uuid;
+ 	for (i = 0; i < number; i++)
+ 	    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.
+  */
+ int
+ removeInterfaceAddr_r(struct host *host, afs_uint32 addr, afs_uint16 port)
+ {
+     int i;
+     int number;
+     int found;
+     struct Interface *interface;
+     char hoststr[16], hoststr2[16];
+ 
+     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)));
+ 
+     /*
+      * Make sure this address is on the list of known addresses
+      * for this host.
+      */
+     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;
+     }
+ 
+     /*
+      * Remove the hash table entry for this address
+      */
+     hashDelete_r(addr, port, host);
+ 
+     return 0;
+ }
+ 
+ 
  /* Host is returned held */
  struct host *
  h_GetHost_r(struct rx_connection *tcon)
***************
*** 939,950 ****
      struct host *host;
      struct host *oldHost;
      int code;
!     int held;
      struct interfaceAddr interf;
      int interfValid = 0;
      struct Identity *identP = NULL;
!     afs_int32 haddr;
!     afs_int32 hport;
      char hoststr[16], hoststr2[16];
      Capabilities caps;
      struct rx_connection *cb_conn = NULL;
--- 1089,1100 ----
      struct host *host;
      struct host *oldHost;
      int code;
!     int held, oheld;
      struct interfaceAddr interf;
      int interfValid = 0;
      struct Identity *identP = NULL;
!     afs_uint32 haddr;
!     afs_uint16 hport;
      char hoststr[16], hoststr2[16];
      Capabilities caps;
      struct rx_connection *cb_conn = NULL;
***************
*** 1166,1184 ****
                  if (oldHost) {
                      int probefail = 0;
  
! 		    if (!(held = h_Held_r(oldHost)))
  			h_Hold_r(oldHost);
  		    h_Lock_r(oldHost);
  
                      if (oldHost->interface) {
  			afsUUID uuid = oldHost->interface->uuid;
!                         cb_conn = host->callback_rxcon;
                          rx_GetConnection(cb_conn);
  			H_UNLOCK;
  			code = RXAFSCB_ProbeUuid(cb_conn, &uuid);
                          rx_PutConnection(cb_conn);
                          cb_conn=NULL;
- 			H_LOCK;
  			if (code && MultiProbeAlternateAddress_r(oldHost)) {
                              probefail = 1;
                          }
--- 1316,1338 ----
                  if (oldHost) {
                      int probefail = 0;
  
! 		    if (!(oheld = h_Held_r(oldHost)))
  			h_Hold_r(oldHost);
  		    h_Lock_r(oldHost);
  
                      if (oldHost->interface) {
  			afsUUID uuid = oldHost->interface->uuid;
!                         cb_conn = oldHost->callback_rxcon;
                          rx_GetConnection(cb_conn);
+ 			rx_SetConnDeadTime(cb_conn, 2);
+ 			rx_SetConnHardDeadTime(cb_conn, AFS_HARDDEADTIME);
  			H_UNLOCK;
  			code = RXAFSCB_ProbeUuid(cb_conn, &uuid);
+ 			H_LOCK;
+ 			rx_SetConnDeadTime(cb_conn, 50);
+ 			rx_SetConnHardDeadTime(cb_conn, AFS_HARDDEADTIME);
                          rx_PutConnection(cb_conn);
                          cb_conn=NULL;
  			if (code && MultiProbeAlternateAddress_r(oldHost)) {
                              probefail = 1;
                          }
***************
*** 1193,1217 ****
                           * Delete it! */
                          oldHost->hostFlags |= HOSTDELETED;
                          h_Unlock_r(oldHost);
!                         h_Release_r(oldHost);
!                         oldHost = NULL;
                      }
                  }
  		if (oldHost) {
  		    /* 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. */
! 		    ViceLog(25,
! 			    ("CB: new addr %s:%d for old host %s:%d\n",
! 			     afs_inet_ntoa_r(host->host, hoststr),
! 			     ntohs(host->port), afs_inet_ntoa_r(oldHost->host,
! 								hoststr2),
! 			     ntohs(oldHost->port)));
! 		    addInterfaceAddr_r(oldHost, haddr);
  		    host->hostFlags |= HOSTDELETED;
  		    h_Unlock_r(host);
  		    h_Release_r(host);
  		    host = oldHost;
  		} else {
  		    /* This really is a new host */
  		    hashInsertUuid_r(&identP->uuid, host);
--- 1347,1401 ----
                           * Delete it! */
                          oldHost->hostFlags |= HOSTDELETED;
                          h_Unlock_r(oldHost);
! 			/* Let the holder be last release */
! 			if (!oheld) {
! 			    h_Release_r(oldHost);
! 			}
! 			oldHost = NULL;
                      }
                  }
  		if (oldHost) {
  		    /* 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) {
! 			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 (oldHost->host == haddr) {
! 			    /* We have just been contacted by a client behind a NAT */
! 			    removeInterfaceAddr_r(oldHost, oldHost->host, oldHost->port);
! 			} else {
! 			    int i, found;
! 			    struct Interface *interface = oldHost->interface;
! 			    int number = oldHost->interface->numberOfInterfaces;
! 			    for (i = 0, found = 0; i < number; i++) {
! 				if (interface->interface[i].addr == haddr &&
! 				    interface->interface[i].port != hport) {
! 				    found = 1;
! 				    break;
! 				}
! 			    }
! 			    if (found) {
! 				/* We have just been contacted by a client that has been
! 				 * seen from behind a NAT and at least one other address.
! 				 */
! 				removeInterfaceAddr_r(oldHost, haddr, interface->interface[i].port);
! 			    }
! 			}
! 			addInterfaceAddr_r(oldHost, haddr, hport);
! 			oldHost->host = haddr;
! 			oldHost->port = hport;
! 		    }
  		    host->hostFlags |= HOSTDELETED;
  		    h_Unlock_r(host);
+ 		    /* release host because it was allocated by h_Alloc_r */
  		    h_Release_r(host);
  		    host = oldHost;
+ 		    /* the new host is held and locked */
  		} else {
  		    /* This really is a new host */
  		    hashInsertUuid_r(&identP->uuid, host);
***************
*** 1240,1248 ****
  			("CB: RCallBackConnectBack failed for %s:%d\n",
  			 hoststr, ntohs(host->port)));
  		host->hostFlags |= VENUSDOWN;
! 	    } else
  		host->hostFlags |= RESETDONE;
! 
  	}
  	if (caps.Capabilities_val
  	    && (caps.Capabilities_val[0] & CAPABILITY_ERRORTRANS))
--- 1424,1435 ----
  			("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;
! 	    }
  	}
  	if (caps.Capabilities_val
  	    && (caps.Capabilities_val[0] & CAPABILITY_ERRORTRANS))
***************
*** 1359,1365 ****
  /*MapName*/
  
  
! /* NOTE: this returns the client with a Write lock */
  struct client *
  h_ID2Client(afs_int32 vid)
  {
--- 1546,1552 ----
  /*MapName*/
  
  
! /* NOTE: this returns the client with a Write lock and a refCount */
  struct client *
  h_ID2Client(afs_int32 vid)
  {
***************
*** 1375,1383 ****
  		client->refCount++;
  		H_UNLOCK;
  		ObtainWriteLock(&client->lock);
- 		H_LOCK;
- 		client->refCount--;
- 		H_UNLOCK;
  		return client;
  	    }
  	}
--- 1562,1567 ----
***************
*** 1393,1398 ****
--- 1577,1585 ----
   * isn't around. The client is returned with its reference count incremented
   * by one. The caller must call h_ReleaseClient_r when finished with
   * the client.
+  *
+  * the client->host is returned held.  h_ReleaseClient_r does not release
+  * the hold on client->host.
   */
  struct client *
  h_FindClient_r(struct rx_connection *tcon)
***************
*** 1412,1423 ****
      char uname[PR_MAXNAMELEN];
      char tcell[MAXKTCREALMLEN];
      int fail = 0;
  
      client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     if (client && !client->deleted) {
  	client->refCount++;
  	h_Hold_r(client->host);
! 	if (client->prfail != 2) {	/* Could add shared lock on client here */
  	    /* note that we don't have to lock entry in this path to
  	     * ensure CPS is initialized, since we don't call rx_SetSpecific
  	     * until initialization is done, and we only get here if
--- 1599,1612 ----
      char uname[PR_MAXNAMELEN];
      char tcell[MAXKTCREALMLEN];
      int fail = 0;
+     int created = 0;
  
      client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
!     if (client) {
  	client->refCount++;
  	h_Hold_r(client->host);
! 	if (!client->deleted && client->prfail != 2) {	
! 	    /* Could add shared lock on client here */
  	    /* note that we don't have to lock entry in this path to
  	     * ensure CPS is initialized, since we don't call rx_SetSpecific
  	     * until initialization is done, and we only get here if
***************
*** 1428,1435 ****
  	H_UNLOCK;
  	ObtainWriteLock(&client->lock);	/* released at end */
  	H_LOCK;
-     } else if (client) {
- 	client->refCount++;
      }
  
      authClass = rx_SecurityClassOf((struct rx_connection *)tcon);
--- 1617,1622 ----
***************
*** 1480,1486 ****
  	expTime = 0x7fffffff;
      }
  
!     if (!client) {
  	host = h_GetHost_r(tcon);	/* Returns it h_Held */
  
      retryfirstclient:
--- 1667,1673 ----
  	expTime = 0x7fffffff;
      }
  
!     if (!client) { /* loop */
  	host = h_GetHost_r(tcon);	/* Returns it h_Held */
  
      retryfirstclient:
***************
*** 1497,1510 ****
  			(struct client *)rx_GetSpecific(client->tcon,
  							rxcon_client_key);
  		    if (oldClient) {
! 			if (oldClient == client)
  			    rx_SetSpecific(client->tcon, rxcon_client_key,
  					   NULL);
! 			else
  			    ViceLog(0,
  				    ("Client-conn mismatch: CL1=%x, CN=%x, CL2=%x\n",
  				     client, client->tcon, oldClient));
  		    }
  		    client->tcon = (struct rx_connection *)0;
  		}
  		client->refCount++;
--- 1684,1698 ----
  			(struct client *)rx_GetSpecific(client->tcon,
  							rxcon_client_key);
  		    if (oldClient) {
! 			if (oldClient == client) {
  			    rx_SetSpecific(client->tcon, rxcon_client_key,
  					   NULL);
! 			} else
  			    ViceLog(0,
  				    ("Client-conn mismatch: CL1=%x, CN=%x, CL2=%x\n",
  				     client, client->tcon, oldClient));
  		    }
+ 		    rx_PutConnection(client->tcon);
  		    client->tcon = (struct rx_connection *)0;
  		}
  		client->refCount++;
***************
*** 1526,1537 ****
  		    goto retryfirstclient;
  		}
  	    }
  	    client = GetCE();
  	    ObtainWriteLock(&client->lock);
  	    client->refCount = 1;
  	    client->host = host;
- 	    client->next = host->FirstClient;
- 	    host->FirstClient = client;
  #if FS_STATS_DETAILED
  	    client->InSameNetwork = host->InSameNetwork;
  #endif /* FS_STATS_DETAILED */
--- 1714,1724 ----
  		    goto retryfirstclient;
  		}
  	    }
+ 	    created = 1;
  	    client = GetCE();
  	    ObtainWriteLock(&client->lock);
  	    client->refCount = 1;
  	    client->host = host;
  #if FS_STATS_DETAILED
  	    client->InSameNetwork = host->InSameNetwork;
  #endif /* FS_STATS_DETAILED */
***************
*** 1543,1559 ****
  	    client->CPS.prlist_val = 0;
  	    client->CPS.prlist_len = 0;
  	    h_Unlock_r(host);
- 	    CurrentConnections++;	/* increment number of connections */
  	}
      }
      client->prfail = fail;
  
      if (!(client->CPS.prlist_val) || (viceid != client->ViceId)) {
! 	if (client->CPS.prlist_val && (client->ViceId != ANONYMOUSID)) {
  	    free(client->CPS.prlist_val);
- 	}
  	client->CPS.prlist_val = NULL;
- 	client->CPS.prlist_len = 0;
  	client->ViceId = viceid;
  	client->expTime = expTime;
  
--- 1730,1744 ----
  	    client->CPS.prlist_val = 0;
  	    client->CPS.prlist_len = 0;
  	    h_Unlock_r(host);
  	}
      }
      client->prfail = fail;
  
      if (!(client->CPS.prlist_val) || (viceid != client->ViceId)) {
! 	client->CPS.prlist_len = 0;
! 	if (client->CPS.prlist_val && (client->ViceId != ANONYMOUSID))
  	    free(client->CPS.prlist_val);
  	client->CPS.prlist_val = NULL;
  	client->ViceId = viceid;
  	client->expTime = expTime;
  
***************
*** 1603,1614 ****
       */
      oldClient = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
      if (oldClient && oldClient->tcon == tcon) {
! 	oldClient->tcon = (struct rx_connection *)0;
! 	ViceLog(0, ("FindClient: client %x(%x) already had conn %x (host %x), stolen by client %x(%x)\n", 
! 		    oldClient, oldClient->sid, tcon, 
! 		    rx_HostOf(rx_PeerOf(tcon)), client, client->sid));
! 	/* rx_SetSpecific will be done immediately below */
      }
      client->tcon = tcon;
      rx_SetSpecific(tcon, rxcon_client_key, client);
      ReleaseWriteLock(&client->lock);
--- 1788,1840 ----
       */
      oldClient = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
      if (oldClient && oldClient->tcon == tcon) {
! 	char hoststr[16];
! 	if (!oldClient->deleted) {
! 	    /* if we didn't create it, it's not ours to put back */
! 	    if (created) {
! 		ViceLog(0, ("FindClient: stillborn client %x(%x); conn %x (host %s:%d) had client %x(%x)\n", 
! 			    client, client->sid, tcon, 
! 			    afs_inet_ntoa_r(rxr_HostOf(tcon), hoststr),
! 			    ntohs(rxr_PortOf(tcon)),
! 			    oldClient, oldClient->sid));
! 		if ((client->ViceId != ANONYMOUSID) && client->CPS.prlist_val)
! 		    free(client->CPS.prlist_val);
! 		client->CPS.prlist_val = NULL;
! 		client->CPS.prlist_len = 0;
! 		if (client->tcon) {
! 		    rx_SetSpecific(client->tcon, rxcon_client_key, (void *)0);
! 		}
! 	    }
! 	    /* We should perhaps check for 0 here */
! 	    client->refCount--;
! 	    ReleaseWriteLock(&client->lock);
! 	    if (created) {
! 		FreeCE(client);
! 		created = 0;
! 	    } 
! 	    ObtainWriteLock(&oldClient->lock);
! 	    oldClient->refCount++;
! 	    client = oldClient;
! 	} else {
! 	    rx_PutConnection(oldClient->tcon);
! 	    oldClient->tcon = (struct rx_connection *)0;
! 	    ViceLog(0, ("FindClient: deleted client %x(%x) already had conn %x (host %s:%d), stolen by client %x(%x)\n", 
! 			oldClient, oldClient->sid, tcon, 
! 			afs_inet_ntoa_r(rxr_HostOf(tcon), hoststr),
! 			ntohs(rxr_PortOf(tcon)),
! 			client, client->sid));
! 	    /* rx_SetSpecific will be done immediately below */
! 	}
!     }
!     /* Avoid chaining in more than once. */
!     if (created) {
! 	h_Lock_r(host);
! 	client->next = host->FirstClient;
! 	host->FirstClient = client;
! 	h_Unlock_r(host);
! 	CurrentConnections++;	/* increment number of connections */
      }
+     rx_GetConnection(tcon);
      client->tcon = tcon;
      rx_SetSpecific(tcon, rxcon_client_key, client);
      ReleaseWriteLock(&client->lock);
***************
*** 1639,1649 ****
      register struct client *client;
  
      H_LOCK;
!     *cp = client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
      if (client == NULL || client->tcon == NULL) {
  	ViceLog(0,
! 		("GetClient: no client in conn %x (host %x), VBUSYING\n",
! 		 tcon, rx_HostOf(rx_PeerOf(tcon))));
  	H_UNLOCK;
  	return VBUSY;
      }
--- 1865,1876 ----
      register struct client *client;
  
      H_LOCK;
!     *cp = NULL;
!     client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
      if (client == NULL || client->tcon == NULL) {
  	ViceLog(0,
! 		("GetClient: no client in conn %x (host %x:%d), VBUSYING\n",
! 		 tcon, rxr_HostOf(tcon),ntohs(rxr_PortOf(tcon))));
  	H_UNLOCK;
  	return VBUSY;
      }
***************
*** 1674,1684 ****
  	return VICETOKENDEAD;
      }
  
      H_UNLOCK;
      return 0;
- 
  }				/*GetClient */
  
  
  /* Client user name for short term use.  Note that this is NOT inexpensive */
  char *
--- 1901,1925 ----
  	return VICETOKENDEAD;
      }
  
+     client->refCount++;
+     *cp = client;
      H_UNLOCK;
      return 0;
  }				/*GetClient */
  
+ int
+ PutClient(struct client **cp)
+ {
+     if (*cp == NULL) 
+ 	return -1;
+ 
+     H_LOCK;
+     h_ReleaseClient_r(*cp);
+     *cp = NULL;
+     H_UNLOCK;
+     return 0;
+ }				/*PutClient */
+ 
  
  /* Client user name for short term use.  Note that this is NOT inexpensive */
  char *
***************
*** 1819,1829 ****
  {
      int i;
      char tmpStr[256];
  
      H_LOCK;
      (void)afs_snprintf(tmpStr, sizeof tmpStr,
! 		       "ip:%x port:%d hidx:%d cbid:%d lock:%x last:%u active:%u down:%d del:%d cons:%d cldel:%d\n\t hpfailed:%d hcpsCall:%u hcps [",
! 		       host->host, ntohs(host->port), host->index,
  		       host->cblist, CheckLock(&host->lock), host->LastCall,
  		       host->ActiveCall, (host->hostFlags & VENUSDOWN),
  		       host->hostFlags & HOSTDELETED, host->Console,
--- 2060,2071 ----
  {
      int i;
      char tmpStr[256];
+     char hoststr[16];
  
      H_LOCK;
      (void)afs_snprintf(tmpStr, sizeof tmpStr,
! 		       "ip:%s port:%d hidx:%d cbid:%d lock:%x last:%u active:%u down:%d del:%d cons:%d cldel:%d\n\t hpfailed:%d hcpsCall:%u hcps [",
! 		       afs_inet_ntoa_r(host->host, hoststr), ntohs(host->port), host->index,
  		       host->cblist, CheckLock(&host->lock), host->LastCall,
  		       host->ActiveCall, (host->hostFlags & VENUSDOWN),
  		       host->hostFlags & HOSTDELETED, host->Console,
***************
*** 1840,1846 ****
      (void)STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
      if (host->interface)
  	for (i = 0; i < host->interface->numberOfInterfaces; i++) {
! 	    sprintf(tmpStr, " %x", host->interface->addr[i]);
  	    (void)STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
  	}
      sprintf(tmpStr, "] holds: ");
--- 2082,2091 ----
      (void)STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
      if (host->interface)
  	for (i = 0; i < host->interface->numberOfInterfaces; i++) {
! 	    char hoststr[16];
! 	    sprintf(tmpStr, " %s:%d", 
! 		     afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
! 		     ntohs(host->interface->interface[i].port));
  	    (void)STREAM_WRITE(tmpStr, strlen(tmpStr), 1, file);
  	}
      sprintf(tmpStr, "] holds: ");
***************
*** 2114,2122 ****
      }
      if (host->LastCall < checktime) {
  	h_Lock_r(host);
- 	cb_conn = host->callback_rxcon;
- 	rx_GetConnection(cb_conn);
  	if (!(host->hostFlags & HOSTDELETED)) {
  	    if (host->LastCall < clientdeletetime) {
  		host->hostFlags |= HOSTDELETED;
  		if (!(host->hostFlags & VENUSDOWN)) {
--- 2359,2367 ----
      }
      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)) {
***************
*** 2181,2191 ****
  		    }
  		}
  	    }
  	}
- 	H_UNLOCK;
- 	rx_PutConnection(cb_conn);
- 	cb_conn=NULL;
- 	H_LOCK;
  	h_Unlock_r(host);
      }
      H_UNLOCK;
--- 2426,2436 ----
  		    }
  		}
  	    }
+ 	    H_UNLOCK;
+ 	    rx_PutConnection(cb_conn);
+ 	    cb_conn=NULL;
+ 	    H_LOCK;
  	}
  	h_Unlock_r(host);
      }
      H_UNLOCK;
***************
*** 2221,2238 ****
  
  /*
   * 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.
   *
!  * The addresses in the ineterfaceAddr list are in host byte order.
   */
  int
  initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf)
  {
      int i, j;
      int number, count;
!     afs_int32 myHost;
      int found;
      struct Interface *interface;
  
--- 2466,2484 ----
  
  /*
   * 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.
   */
  int
  initInterfaceAddr_r(struct host *host, struct interfaceAddr *interf)
  {
      int i, j;
      int number, count;
!     afs_uint32 myAddr;
!     afs_uint16 myPort;
      int found;
      struct Interface *interface;
  
***************
*** 2244,2250 ****
  	     interf->numberOfInterfaces));
  
      number = interf->numberOfInterfaces;
!     myHost = host->host;	/* current interface address */
  
      /* validation checks */
      if (number < 0 || number > AFS_MAX_INTERFACE_ADDR) {
--- 2490,2497 ----
  	     interf->numberOfInterfaces));
  
      number = interf->numberOfInterfaces;
!     myAddr = host->host;	/* current interface address */
!     myPort = host->port;	/* current port */
  
      /* validation checks */
      if (number < 0 || number > AFS_MAX_INTERFACE_ADDR) {
***************
*** 2265,2271 ****
  	}
  	if (j == count) {
  	    interf->addr_in[count] = interf->addr_in[i];
! 	    if (interf->addr_in[count] == myHost)
  		found = 1;
  	    count++;
  	}
--- 2512,2518 ----
  	}
  	if (j == count) {
  	    interf->addr_in[count] = interf->addr_in[i];
! 	    if (interf->addr_in[count] == myAddr)
  		found = 1;
  	    count++;
  	}
***************
*** 2277,2283 ****
      if (found) {
  	interface = (struct Interface *)
  	    malloc(sizeof(struct Interface) +
! 		   (sizeof(afs_int32) * (count - 1)));
  	if (!interface) {
  	    ViceLog(0, ("Failed malloc in initInterfaceAddr_r\n"));
  	    assert(0);
--- 2524,2530 ----
      if (found) {
  	interface = (struct Interface *)
  	    malloc(sizeof(struct Interface) +
! 		   (sizeof(struct AddrPort) * (count - 1)));
  	if (!interface) {
  	    ViceLog(0, ("Failed malloc in initInterfaceAddr_r\n"));
  	    assert(0);
***************
*** 2285,2397 ****
  	interface->numberOfInterfaces = count;
      } else {
  	interface = (struct Interface *)
! 	    malloc(sizeof(struct Interface) + (sizeof(afs_int32) * count));
  	assert(interface);
  	interface->numberOfInterfaces = count + 1;
! 	interface->addr[count] = myHost;
      }
      interface->uuid = interf->uuid;
!     for (i = 0; i < count; i++)
! 	interface->addr[i] = interf->addr_in[i];
  
      assert(!host->interface);
      host->interface = interface;
  
      for (i = 0; i < host->interface->numberOfInterfaces; i++) {
! 	ViceLog(125, ("--- alt address %x\n", host->interface->addr[i]));
!     }
! 
!     return 0;
! }
! 
! /* inserts a new HashChain structure corresponding to this address */
! void
! hashInsert_r(afs_int32 addr, struct host *host)
! {
!     int index;
!     struct h_hashChain *chain;
! 
!     /* hash into proper bucket */
!     index = h_HashIndex(addr);
! 
!     /* 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;
!     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.
!  */
! int
! addInterfaceAddr_r(struct host *host, afs_int32 addr)
! {
!     int i;
!     int number;
!     int found;
!     struct Interface *interface;
! 
!     assert(host);
!     assert(host->interface);
! 
!     ViceLog(125, ("addInterfaceAddr : host %x addr %d\n", host->host, addr));
! 
!     /*
!      * Make sure this address is on the list of known addresses
!      * for this host.
!      */
!     number = host->interface->numberOfInterfaces;
!     for (i = 0, found = 0; i < number && !found; i++) {
! 	if (host->interface->addr[i] == addr)
! 	    found = 1;
!     }
!     if (!found) {
! 	interface = (struct Interface *)
! 	    malloc(sizeof(struct Interface) + (sizeof(afs_int32) * number));
! 	if (!interface) {
! 	    ViceLog(0, ("Failed malloc in addInterfaceAddr_r\n"));
! 	    assert(0);
! 	}
! 	interface->numberOfInterfaces = number + 1;
! 	interface->uuid = host->interface->uuid;
! 	for (i = 0; i < number; i++)
! 	    interface->addr[i] = host->interface->addr[i];
! 	interface->addr[number] = addr;
! 	free(host->interface);
! 	host->interface = interface;
      }
  
-     /*
-      * Create a hash table entry for this address
-      */
-     hashInsert_r(addr, host);
- 
      return 0;
  }
  
  /* deleted a HashChain structure for this address and host */
  /* returns 1 on success */
! int
! hashDelete_r(afs_int32 addr, 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) {
  	    *hp = th->next;
  	    free(th);
  	    flag = 1;
--- 2532,2577 ----
  	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++) {
! 	char hoststr[16];
! 	ViceLog(125, ("--- alt address %s:%d\n", 
! 		       afs_inet_ntoa_r(host->interface->interface[i].addr, hoststr),
! 		       ntohs(host->interface->interface[i].port)));
      }
  
      return 0;
  }
  
  /* 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;
  	    free(th);
  	    flag = 1;
***************
*** 2412,2423 ****
  printInterfaceAddr(struct host *host, int level)
  {
      int i, number;
      if (host->interface) {
  	/* check alternate addresses */
  	number = host->interface->numberOfInterfaces;
  	assert(number > 0);
  	for (i = 0; i < number; i++)
! 	    ViceLog(level, ("%x ", host->interface->addr[i]));
      }
      ViceLog(level, ("\n"));
  }
--- 2592,2606 ----
  printInterfaceAddr(struct host *host, int level)
  {
      int i, number;
+     char hoststr[16];
+ 
      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"));
  }
Index: openafs/src/viced/host.h
diff -c openafs/src/viced/host.h:1.9.2.1 openafs/src/viced/host.h:1.9.2.8
*** openafs/src/viced/host.h:1.9.2.1	Wed Feb 23 23:46:39 2005
--- openafs/src/viced/host.h	Mon Mar 13 19:33:46 2006
***************
*** 41,57 ****
  #define h_threadsMask		31	/* for remainder */
  
  /* size of the hold array for each host */
! #define h_maxSlots	((MAX_FILESERVER_THREAD+h_threadsPerSlot-1)>>h_threadsShift)
  
  struct Identity {
      char valid;			/* zero if UUID is unknown */
      afsUUID uuid;
  };
  
  struct Interface {
-     int numberOfInterfaces;
      afsUUID uuid;
!     afs_int32 addr[1];		/* there are actually more than one here */
      /* in network byte order */
  };
  struct host {
--- 41,62 ----
  #define h_threadsMask		31	/* for remainder */
  
  /* size of the hold array for each host */
! #define h_maxSlots	(((MAX_FILESERVER_THREAD+h_threadsPerSlot-1)>>h_threadsShift)+1)
  
  struct Identity {
      char valid;			/* zero if UUID is unknown */
      afsUUID uuid;
  };
  
+ struct AddrPort  {
+     afs_uint32 addr;		/* in network byte order */
+     afs_uint16 port;		/* in network byte order */
+ };
+ 
  struct Interface {
      afsUUID uuid;
!     int numberOfInterfaces;
!     struct AddrPort interface[1];/* there are actually more than one here */
      /* in network byte order */
  };
  struct host {
***************
*** 61,70 ****
      /* holds on this host; 1 bit per lwp.
       * A hold prevents this structure and
       * inferior structures from disappearing */
!     unsigned int host;		/* IP address of host interface that is
  				 * currently being used, in network
  				 * byte order */
!     unsigned short port;	/* port address of host */
      char Console;		/* XXXX This host is a console */
      unsigned short hostFlags;		/*  bit map */
  #if FS_STATS_DETAILED
--- 66,75 ----
      /* holds on this host; 1 bit per lwp.
       * A hold prevents this structure and
       * inferior structures from disappearing */
!     afs_uint32 host;		/* IP address of host interface that is
  				 * currently being used, in network
  				 * byte order */
!     afs_uint16 port;		/* port address of host */
      char Console;		/* XXXX This host is a console */
      unsigned short hostFlags;		/*  bit map */
  #if FS_STATS_DETAILED
***************
*** 75,81 ****
      char hcpsfailed;		/* Retry the cps call next time */
      prlist hcps;		/* cps for hostip acls */
      afs_uint32 LastCall;	/* time of last call from host */
!     afs_uint32 ActiveCall;	/* time of any call but gettime */
      struct client *FirstClient;	/* first connection from host */
      afs_uint32 cpsCall;		/* time of last cps call from this host */
      struct Interface *interface;	/* all alternate addr for client */
--- 80,87 ----
      char hcpsfailed;		/* Retry the cps call next time */
      prlist hcps;		/* cps for hostip acls */
      afs_uint32 LastCall;	/* time of last call from host */
!     afs_uint32 ActiveCall;	/* time of any call but gettime, 
!                                    getstats and getcaps */
      struct client *FirstClient;	/* first connection from host */
      afs_uint32 cpsCall;		/* time of last cps call from this host */
      struct Interface *interface;	/* all alternate addr for client */
***************
*** 99,105 ****
  struct h_hashChain {
      struct host *hostPtr;
      struct h_hashChain *next;
!     afs_int32 addr;
  };
  
  struct client {
--- 105,112 ----
  struct h_hashChain {
      struct host *hostPtr;
      struct h_hashChain *next;
!     afs_uint32 addr;
!     afs_uint16 port;
  };
  
  struct client {
***************
*** 190,199 ****
  				(h)->prev ? ((h)->prev->next = (h)->next):0;\
  				( h == hostList )? (hostList = h->next):0;
  
  extern struct host *h_Alloc(register struct rx_connection *r_con);
  extern struct host *h_Alloc_r(register struct rx_connection *r_con);
! extern struct host *h_Lookup_r(afs_uint32 hostaddr, afs_uint32 hport,
  			       int *heldp);
  extern struct host *h_LookupUuid_r(afsUUID * uuidp);
  extern int h_FreeConnection(struct rx_connection *tcon);
  extern void h_Enumerate(int (*proc) (), char *param);
--- 197,209 ----
  				(h)->prev ? ((h)->prev->next = (h)->next):0;\
  				( h == hostList )? (hostList = h->next):0;
  
+ extern int DeleteAllCallBacks_r(struct host *host, int deletefe);
  extern struct host *h_Alloc(register struct rx_connection *r_con);
  extern struct host *h_Alloc_r(register struct rx_connection *r_con);
! extern struct host *h_Lookup_r(afs_uint32 hostaddr, afs_uint16 hport,
  			       int *heldp);
+ extern void   hashInsert_r(afs_uint32 addr, afs_uint16 port, 
+ 			   struct host* host);
  extern struct host *h_LookupUuid_r(afsUUID * uuidp);
  extern int h_FreeConnection(struct rx_connection *tcon);
  extern void h_Enumerate(int (*proc) (), char *param);
***************
*** 202,218 ****
  extern int h_ReleaseClient_r(struct client *client);
  extern struct client *h_ID2Client(afs_int32 vid);
  extern int GetClient(struct rx_connection *tcon, struct client **cp);
  extern void h_PrintStats();
  extern void h_PrintClients();
  extern void h_GetWorkStats();
  extern void h_flushhostcps(register afs_uint32 hostaddr,
! 			   register afs_uint32 hport);
  struct Interface *MultiVerifyInterface_r();
  
  struct host *(hosttableptrs[h_MAXHOSTTABLES]);	/* Used by h_itoh */
  #define h_htoi(host) ((host)->index)	/* index isn't zeroed, no need to lock */
  #define h_itoh(hostindex) (hosttableptrs[(hostindex)>>h_HTSHIFT]+((hostindex)&(h_HTSPERBLOCK-1)))
  
  #define HCPS_INPROGRESS			0x01	/*set when CPS is being updated */
  #define HCPS_WAITING			0x02	/*waiting for CPS to get updated */
  #define ALTADDR				0x04	/*InitCallBack is being done */
--- 212,239 ----
  extern int h_ReleaseClient_r(struct client *client);
  extern struct client *h_ID2Client(afs_int32 vid);
  extern int GetClient(struct rx_connection *tcon, struct client **cp);
+ extern int PutClient(struct client **cp);
  extern void h_PrintStats();
  extern void h_PrintClients();
  extern void h_GetWorkStats();
  extern void h_flushhostcps(register afs_uint32 hostaddr,
! 			   register afs_uint16 hport);
  struct Interface *MultiVerifyInterface_r();
  
  struct host *(hosttableptrs[h_MAXHOSTTABLES]);	/* Used by h_itoh */
  #define h_htoi(host) ((host)->index)	/* index isn't zeroed, no need to lock */
  #define h_itoh(hostindex) (hosttableptrs[(hostindex)>>h_HTSHIFT]+((hostindex)&(h_HTSPERBLOCK-1)))
  
+ #define rxr_GetEpoch(aconn) (((struct rx_connection *)(aconn))->epoch)
+ 
+ #define rxr_CidOf(aconn) (((struct rx_connection *)(aconn))->cid)
+ 
+ #define rxr_PortOf(aconn) \
+     rx_PortOf(rx_PeerOf(((struct rx_connection *)(aconn))))
+ 
+ #define rxr_HostOf(aconn) \
+     rx_HostOf(rx_PeerOf((struct rx_connection *)(aconn)))
+ 
  #define HCPS_INPROGRESS			0x01	/*set when CPS is being updated */
  #define HCPS_WAITING			0x02	/*waiting for CPS to get updated */
  #define ALTADDR				0x04	/*InitCallBack is being done */
***************
*** 222,224 ****
--- 243,247 ----
  #define RESETDONE			0x40	/* callback reset done */
  #define HFE_LATER                       0x80	/* host has FE_LATER callbacks */
  #define HERRORTRANS                    0x100	/* do error translation */
+ 
+ 
Index: openafs/src/viced/viced.c
diff -c openafs/src/viced/viced.c:1.58.2.7 openafs/src/viced/viced.c:1.58.2.11
*** openafs/src/viced/viced.c:1.58.2.7	Mon Jul 11 15:08:50 2005
--- openafs/src/viced/viced.c	Wed Feb 22 00:02:04 2006
***************
*** 20,26 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/viced.c,v 1.58.2.7 2005/07/11 19:08:50 shadow Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
--- 20,26 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/viced/viced.c,v 1.58.2.11 2006/02/22 05:02:04 jaltman Exp $");
  
  #include <stdio.h>
  #include <stdlib.h>
***************
*** 167,172 ****
--- 167,173 ----
  int debuglevel = 0;
  int printBanner = 0;
  int rxJumbograms = 1;		/* default is to send and receive jumbograms. */
+ int rxMaxMTU = -1;
  afs_int32 implicitAdminRights = PRSFS_LOOKUP;	/* The ADMINISTER right is 
  						 * already implied */
  afs_int32 readonlyServer = 0;
***************
*** 336,343 ****
  	return 1;
      }
      code = afsconf_GetKey(confDir, akvno, tkey.key);
!     if (code)
  	return code;
      memcpy(akey, tkey.key, sizeof(tkey.key));
      return 0;
  
--- 337,346 ----
  	return 1;
      }
      code = afsconf_GetKey(confDir, akvno, tkey.key);
!     if (code) {
! 	ViceLog(0, ("afsconf_GetKey failure: kvno %d code %d\n", akvno, code));
  	return code;
+     }
      memcpy(akey, tkey.key, sizeof(tkey.key));
      return 0;
  
***************
*** 734,739 ****
--- 737,743 ----
      strcat(buffer, "[-rxpck <number of rx extra packets>] ");
      strcat(buffer, "[-rxdbg (enable rx debugging)] ");
      strcat(buffer, "[-rxdbge (enable rxevent debugging)] ");
+     strcat(buffer, "[-rxmaxmtu <bytes>] ");
  #if AFS_PTHREAD_ENV
      strcat(buffer, "[-vattachpar <number of volume attach threads>] ");
  #endif
***************
*** 749,754 ****
--- 753,759 ----
      strcat(buffer, "[-realm <Kerberos realm name>] ");
      strcat(buffer, "[-udpsize <size of socket buffer in bytes>] ");
      strcat(buffer, "[-sendsize <size of send buffer in bytes>] ");
+     strcat(buffer, "[-abortthreshold <abort threshold>] ");
  /*   strcat(buffer, "[-enable_peer_stats] "); */
  /*   strcat(buffer, "[-enable_process_stats] "); */
      strcat(buffer, "[-help]\n");
***************
*** 1049,1054 ****
--- 1054,1072 ----
  #endif
  	else if (!strcmp(argv[i], "-nojumbo")) {
  	    rxJumbograms = 0;
+ 	} else if (!strcmp(argv[i], "-rxmaxmtu")) {
+ 	    if ((i + 1) >= argc) {
+ 		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
+ 		return -1; 
+ 	    }
+ 	    rxMaxMTU = atoi(argv[++i]);
+ 	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) || 
+ 		(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
+ 		printf("rxMaxMTU %d% invalid; must be between %d-%d\n",
+ 		       rxMaxMTU, RX_MIN_PACKET_SIZE, 
+ 		       RX_MAX_PACKET_DATA_SIZE);
+ 		return -1;
+ 	    }
  	} else if (!strcmp(argv[i], "-realm")) {
  	    extern char local_realm[AFS_REALM_SZ];
  	    if ((i + 1) >= argc) {
***************
*** 1627,1632 ****
--- 1645,1651 ----
      sigaction(SIGABRT, &nsa, NULL);
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
+     osi_audit_init();
  
      /* Initialize dirpaths */
      if (!(initAFSDirPath() & AFSDIR_SERVER_PATHS_OK)) {
***************
*** 1789,1794 ****
--- 1808,1816 ----
  	/* Don't send and don't allow 3.4 clients to send jumbograms. */
  	rx_SetNoJumbo();
      }
+     if (rxMaxMTU != -1) {
+ 	rx_SetMaxMTU(rxMaxMTU);
+     }
      rx_GetIFInfo();
      rx_SetRxDeadTime(30);
      sc[0] = rxnull_NewServerSecurityObject();
Index: openafs/src/viced/viced.h
diff -c openafs/src/viced/viced.h:1.6 openafs/src/viced/viced.h:1.6.2.1
*** openafs/src/viced/viced.h:1.6	Tue Jul 29 14:58:20 2003
--- openafs/src/viced/viced.h	Wed Feb  1 10:59:43 2006
***************
*** 117,122 ****
--- 117,123 ----
      afs_uint32 GetRootVolume;
      afs_uint32 CheckToken;
      afs_uint32 GetTime;
+     afs_uint32 GetCapabilities;
  
      /* General Fetch/Store Stats */
      afs_uint32 TotalCalls;
Index: openafs/src/vlserver/vlserver.c
diff -c openafs/src/vlserver/vlserver.c:1.18.2.1 openafs/src/vlserver/vlserver.c:1.18.2.3
*** openafs/src/vlserver/vlserver.c:1.18.2.1	Mon Jul 11 15:08:50 2005
--- openafs/src/vlserver/vlserver.c	Tue Feb 21 23:09:32 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.18.2.1 2005/07/11 19:08:50 shadow Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
--- 11,17 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vlserver/vlserver.c,v 1.18.2.3 2006/02/22 04:09:32 jaltman Exp $");
  
  #include <afs/stds.h>
  #include <sys/types.h>
***************
*** 71,76 ****
--- 71,77 ----
  int LogLevel = 0;
  int smallMem = 0;
  int rxJumbograms = 1;		/* default is to send and receive jumbo grams */
+ int rxMaxMTU = -1;
  
  static void
  CheckSignal_Signal()
***************
*** 160,165 ****
--- 161,168 ----
      sigaction(SIGABRT, &nsa, NULL);
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
+     osi_audit_init();
+ 
      /* Parse command line */
      for (index = 1; index < argc; index++) {
  	if (strcmp(argv[index], "-noauth") == 0) {
***************
*** 176,181 ****
--- 179,198 ----
  	} else if (strcmp(argv[index], "-nojumbo") == 0) {
  	    rxJumbograms = 0;
  
+ 	} else if (!strcmp(argv[i], "-rxmaxmtu")) {
+ 	    if ((i + 1) >= argc) {
+ 		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
+ 		return -1; 
+ 	    }
+ 	    rxMaxMTU = atoi(argv[++i]);
+ 	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) || 
+ 		(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
+ 		printf("rxMaxMTU %d% invalid; must be between %d-%d\n",
+ 		       rxMaxMTU, RX_MIN_PACKET_SIZE, 
+ 		       RX_MAX_PACKET_DATA_SIZE);
+ 		return -1;
+ 	    }
+ 
  	} else if (strcmp(argv[index], "-smallmem") == 0) {
  	    smallMem = 1;
  
***************
*** 228,239 ****
--- 245,258 ----
  	    /* support help flag */
  #ifndef AFS_NT40_ENV
  	    printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
+ 		   "[-rxmaxmtu <bytes>] "
  		   "[-auditlog <log path>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
  #else
  	    printf("Usage: vlserver [-p <number of processes>] [-nojumbo] "
+ 		   "[-rxmaxmtu <bytes>] "
  		   "[-auditlog <log path>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
***************
*** 321,326 ****
--- 340,348 ----
      if (!rxJumbograms) {
  	rx_SetNoJumbo();
      }
+     if (rxMaxMTU != -1) {
+ 	rx_SetMaxMTU(rxMaxMTU);
+     }
      rx_SetRxDeadTime(50);
  
      memset(HostAddress, 0, sizeof(HostAddress));
Index: openafs/src/vol/Makefile.in
diff -c openafs/src/vol/Makefile.in:1.18.2.1 openafs/src/vol/Makefile.in:1.18.2.3
*** openafs/src/vol/Makefile.in:1.18.2.1	Tue Dec  7 01:06:17 2004
--- openafs/src/vol/Makefile.in	Thu Mar  9 01:42:27 2006
***************
*** 16,29 ****
  	${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdir.a \
  	${TOP_LIBDIR}/liblwp.a  ${TOP_LIBDIR}/libacl.a
  
! CFLAGS = ${COMMON_CFLAGS} -D${SYS_NAME} ${FSINCLUDES} ${XCFLAGS}
  
  PUBLICHEADERS=nfs.h vnode.h viceinode.h volume.h voldefs.h partition.h\
  	fssync.h ihandle.h namei_ops.h
  
  VLIBOBJS=vnode.o volume.o vutil.o partition.o fssync.o purge.o \
  	 clone.o nuke.o devname.o listinodes.o common.o ihandle.o \
! 	 namei_ops.o fstab.o
  
  OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o vol-dump.o vol-bless.o
  
--- 16,29 ----
  	${TOP_LIBDIR}/libsys.a ${TOP_LIBDIR}/libdir.a \
  	${TOP_LIBDIR}/liblwp.a  ${TOP_LIBDIR}/libacl.a
  
! CFLAGS = ${COMMON_CFLAGS} -D${SYS_NAME} ${FSINCLUDES} ${XCFLAGS} ${ARCHFLAGS}
  
  PUBLICHEADERS=nfs.h vnode.h viceinode.h volume.h voldefs.h partition.h\
  	fssync.h ihandle.h namei_ops.h
  
  VLIBOBJS=vnode.o volume.o vutil.o partition.o fssync.o purge.o \
  	 clone.o nuke.o devname.o listinodes.o common.o ihandle.o \
! 	 namei_ops.o
  
  OBJECTS=${VLIBOBJS} physio.o vol-salvage.o vol-info.o vol-dump.o vol-bless.o
  
***************
*** 147,152 ****
--- 147,155 ----
  		hp?00_ux101 | hp_ux10? )		\
  			${CC} ${CFLAGS} -D_FILE64 -c ${srcdir}/listinodes.c \
  				;;			\
+ 		hp_ux11* )		\
+ 			${CC} ${CFLAGS} -D_FILE_OFFSET_BITS=64 -c ${srcdir}/listinodes.c \
+ 				;;			\
  		* )	${CC} ${CFLAGS} -c ${srcdir}/listinodes.c \
  				;;			\
  	esac
***************
*** 160,168 ****
  			${CC} ${LDFLAGS} -o gi gi.o ${TOP_LIBDIR}/libsys.a;; \
          esac
  
! volinfo: vol-info.o physio.o ihandle.o fstab.o ${LIBS}
  	${CC} ${CFLAGS} -o volinfo vol-info.o physio.o \
! 		ihandle.o fstab.o ${LIBS} ${XLIBS}
  
  vol-bless: vol-bless.o physio.o ihandle.o ${LIBS}
  	${CC} ${CFLAGS} -o vol-bless vol-bless.o physio.o ${LIBS} ${XLIBS}
--- 163,171 ----
  			${CC} ${LDFLAGS} -o gi gi.o ${TOP_LIBDIR}/libsys.a;; \
          esac
  
! volinfo: vol-info.o physio.o ihandle.o ${LIBS}
  	${CC} ${CFLAGS} -o volinfo vol-info.o physio.o \
! 		ihandle.o ${LIBS} ${XLIBS}
  
  vol-bless: vol-bless.o physio.o ihandle.o ${LIBS}
  	${CC} ${CFLAGS} -o vol-bless vol-bless.o physio.o ${LIBS} ${XLIBS}
Index: openafs/src/vol/fstab.c
diff -c openafs/src/vol/fstab.c:1.3.2.1 openafs/src/vol/fstab.c:1.3.2.2
*** openafs/src/vol/fstab.c:1.3.2.1	Wed Aug 25 03:14:19 2004
--- openafs/src/vol/fstab.c	Thu Mar  9 01:42:27 2006
***************
*** 1,181 ****
- /*
-  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
-  *
-  * @APPLE_LICENSE_HEADER_START@
-  * 
-  * This file contains Original Code and/or Modifications of Original Code
-  * as defined in and that are subject to the Apple Public Source License
-  * Version 2.0 (the 'License'). You may not use this file except in
-  * compliance with the License. Please obtain a copy of the License at
-  * http://www.opensource.apple.com/apsl/ and read it before using this
-  * file.
-  * 
-  * The Original Code and all software distributed under the License are
-  * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
-  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
-  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
-  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
-  * Please see the License for the specific language governing rights and
-  * limitations under the License.
-  * 
-  * @APPLE_LICENSE_HEADER_END@
-  */
- /*
-  * Copyright (c) 1980, 1988, 1993
-  *	The Regents of the University of California.  All rights reserved.
-  *
-  * Redistribution and use in source and binary forms, with or without
-  * modification, are permitted provided that the following conditions
-  * are met:
-  * 1. Redistributions of source code must retain the above copyright
-  *    notice, this list of conditions and the following disclaimer.
-  * 2. Redistributions in binary form must reproduce the above copyright
-  *    notice, this list of conditions and the following disclaimer in the
-  *    documentation and/or other materials provided with the distribution.
-  * 3. All advertising materials mentioning features or use of this software
-  *    must display the following acknowledgement:
-  *	This product includes software developed by the University of
-  *	California, Berkeley and its contributors.
-  * 4. Neither the name of the University nor the names of its contributors
-  *    may be used to endorse or promote products derived from this software
-  *    without specific prior written permission.
-  *
-  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-  * SUCH DAMAGE.
-  */
- 
- #include <afs/param.h>
- 
- #if defined(AFS_DARWIN_ENV)
- /*-----------------------------------------------------------------------
-  * This version of fstab.c is intended to be used on Darwin systems to
-  * replace getfsent() and family.  It has been modified so that rather
-  * than read /etc/fstab, it calls getfsstat() to get the real list of
-  * mounted volumes.
-  *-----------------------------------------------------------------------*/
- 
- #include <errno.h>
- #include <fstab.h>
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
- #include <sys/param.h>
- #include <sys/ucred.h>
- #include <sys/mount.h>
- 
- #define	STDERR_FILENO	2
- 
- static struct fstab _fs_fstab;
- static struct statfs *_fs_buf;
- static struct statfs *_fs_ptr;
- static int _fs_count;
- 
- static error __P((int));
- static fstabscan __P((void));
- 
- static
- fstabscan()
- {
-     if (_fs_count <= 0)
- 	return (0);
-     _fs_fstab.fs_spec = _fs_ptr->f_mntfromname;
-     _fs_fstab.fs_file = _fs_ptr->f_mntonname;
-     _fs_fstab.fs_vfstype = _fs_ptr->f_fstypename;
-     _fs_fstab.fs_mntops = _fs_ptr->f_fstypename;	// no mount options given
-     _fs_fstab.fs_type = (_fs_ptr->f_flags & MNT_RDONLY) ? FSTAB_RO : FSTAB_RW;
-     _fs_fstab.fs_freq = 0;
-     _fs_fstab.fs_passno = 0;
- 
-     _fs_ptr++;
-     _fs_count--;
-     return (1);
- }
- 
- struct fstab *
- getfsent()
- {
-     if (!_fs_buf && !setfsent() || !fstabscan())
- 	return ((struct fstab *)NULL);
-     return (&_fs_fstab);
- }
- 
- struct fstab *
- getfsspec(name)
-      register const char *name;
- {
-     if (setfsent())
- 	while (fstabscan())
- 	    if (!strcmp(_fs_fstab.fs_spec, name))
- 		return (&_fs_fstab);
-     return ((struct fstab *)NULL);
- }
- 
- struct fstab *
- getfsfile(name)
-      register const char *name;
- {
-     if (setfsent())
- 	while (fstabscan())
- 	    if (!strcmp(_fs_fstab.fs_file, name))
- 		return (&_fs_fstab);
-     return ((struct fstab *)NULL);
- }
- 
- setfsent()
- {
-     long bufsize;
- 
-     if (_fs_buf) {
- 	free(_fs_buf);
- 	_fs_buf = NULL;
-     }
-     if ((_fs_count = getfsstat(NULL, 0, MNT_WAIT)) < 0) {
- 	error(errno);
- 	return (0);
-     }
-     bufsize = (long)_fs_count *sizeof(struct statfs);
-     if ((_fs_buf = malloc(bufsize)) == NULL) {
- 	error(errno);
- 	return (0);
-     }
-     if (getfsstat(_fs_buf, bufsize, MNT_WAIT) < 0) {
- 	error(errno);
- 	return (0);
-     }
-     _fs_ptr = _fs_buf;
-     return (1);
- }
- 
- void
- endfsent()
- {
-     if (_fs_buf) {
- 	free(_fs_buf);
- 	_fs_buf = NULL;
-     }
-     _fs_count = 0;
- }
- 
- static
- error(err)
-      int err;
- {
-     char *p;
- 
-     (void)write(STDERR_FILENO, "fstab: ", 7);
-     (void)write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1);
-     (void)write(STDERR_FILENO, ": ", 1);
-     p = strerror(err);
-     (void)write(STDERR_FILENO, p, strlen(p));
-     (void)write(STDERR_FILENO, "\n", 1);
- }
- #endif /* defined(AFS_DARWIN_ENV) */
--- 0 ----
Index: openafs/src/vol/listinodes.c
diff -c openafs/src/vol/listinodes.c:1.13.2.2 openafs/src/vol/listinodes.c:1.13.2.3
*** openafs/src/vol/listinodes.c:1.13.2.2	Sun Apr  3 14:15:55 2005
--- openafs/src/vol/listinodes.c	Tue Nov  1 11:45:44 2005
***************
*** 21,27 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/listinodes.c,v 1.13.2.2 2005/04/03 18:15:55 shadow Exp $");
  
  #ifndef AFS_NAMEI_ENV
  #if defined(AFS_LINUX20_ENV) || defined(AFS_SUN4_ENV)
--- 21,27 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/listinodes.c,v 1.13.2.3 2005/11/01 16:45:44 shadow Exp $");
  
  #ifndef AFS_NAMEI_ENV
  #if defined(AFS_LINUX20_ENV) || defined(AFS_SUN4_ENV)
***************
*** 109,114 ****
--- 109,136 ----
  #endif
  #include "partition.h"
  
+ /*@+fcnmacros +macrofcndecl@*/
+ #ifdef O_LARGEFILE
+ #ifdef S_SPLINT_S
+ extern off64_t afs_lseek(int FD, off64_t O, int F);
+ #endif /*S_SPLINT_S */
+ #define afs_lseek(FD, O, F)   lseek64(FD, (off64_t) (O), F)
+ #define afs_stat      stat64
+ #define afs_fstat     fstat64
+ #define afs_open      open64
+ #define afs_fopen     fopen64
+ #else /* !O_LARGEFILE */
+ #ifdef S_SPLINT_S
+ extern off_t afs_lseek(int FD, off_t O, int F);
+ #endif /*S_SPLINT_S */
+ #define afs_lseek(FD, O, F)   lseek(FD, (off_t) (O), F)
+ #define afs_stat      stat
+ #define afs_fstat     fstat
+ #define afs_open      open
+ #define afs_fopen     fopen
+ #endif /* !O_LARGEFILE */
+ /*@=fcnmacros =macrofcndecl@*/
+ 
  /* Notice:  parts of this module have been cribbed from vfsck.c */
  
  #define	ROOTINODE	2
***************
*** 248,254 ****
  
      fmax = fs.s_fsize / (FSBSIZE / 512);	/* first invalid blk num */
  
!     pfd = open(rdev, O_RDONLY);
      if (pfd < 0) {
  	Log("Unable to open `%s' inode for reading\n", rdev);
  	return -1;
--- 270,276 ----
  
      fmax = fs.s_fsize / (FSBSIZE / 512);	/* first invalid blk num */
  
!     pfd = afs_open(rdev, O_RDONLY);
      if (pfd < 0) {
  	Log("Unable to open `%s' inode for reading\n", rdev);
  	return -1;
***************
*** 359,365 ****
  {
      int pfd;
  
!     pfd = open(devName, O_RDONLY);
      if (pfd < 0) {
  	Log("Unable to open inode on %s for reading superblock.\n", devName);
  	return -1;
--- 381,387 ----
  {
      int pfd;
  
!     pfd = afs_open(devName, O_RDONLY);
      if (pfd < 0) {
  	Log("Unable to open inode on %s for reading superblock.\n", devName);
  	return -1;
***************
*** 797,803 ****
  		      int_to_base64(stmp, renames[i].uniq));
  	for (tag = 2, j = 0; j < 64; tag++, j++) {
  	    (void)sprintf(npath, "%s.%s", nbase, int_to_base64(stmp, tag));
! 	    fd = open(npath, O_CREAT | O_EXCL | O_RDWR, 0);
  	    if (fd > 0) {
  		close(fd);
  		break;
--- 819,825 ----
  		      int_to_base64(stmp, renames[i].uniq));
  	for (tag = 2, j = 0; j < 64; tag++, j++) {
  	    (void)sprintf(npath, "%s.%s", nbase, int_to_base64(stmp, tag));
! 	    fd = afs_open(npath, O_CREAT | O_EXCL | O_RDWR, 0);
  	    if (fd > 0) {
  		close(fd);
  		break;
***************
*** 1145,1151 ****
      sleep(10);
  #endif
  
!     pfd = open(rdev, O_RDONLY);
      if (pfd <= 0) {
  	sprintf(err1, "Could not open device %s to get inode list\n", rdev);
  	perror(err1);
--- 1167,1173 ----
      sleep(10);
  #endif
  
!     pfd = afs_open(rdev, O_RDONLY);
      if (pfd <= 0) {
  	sprintf(err1, "Could not open device %s to get inode list\n", rdev);
  	perror(err1);
***************
*** 1286,1295 ****
  	i = c * sblock.fs_ipg;
  	e = i + sblock.fs_ipg;
  #if	defined(AFS_HPUX102_ENV)
! 	if (lseek(pfd, dbtoo(fsbtodb(&sblock, itod(&sblock, i))), L_SET) ==
  	    -1) {
  #else
! 	if (lseek(pfd, dbtob(fsbtodb(&sblock, itod(&sblock, i))), L_SET) ==
  	    -1) {
  #endif
  #else
--- 1308,1317 ----
  	i = c * sblock.fs_ipg;
  	e = i + sblock.fs_ipg;
  #if	defined(AFS_HPUX102_ENV)
! 	if (afs_lseek(pfd, dbtoo(fsbtodb(&sblock, itod(&sblock, i))), L_SET) ==
  	    -1) {
  #else
! 	if (afs_lseek(pfd, dbtob(fsbtodb(&sblock, itod(&sblock, i))), L_SET) ==
  	    -1) {
  #endif
  #else
***************
*** 1307,1320 ****
  	e = i + super.fs.fs_ipg;
  #ifdef	AFS_OSF_ENV
  	dblk1 = fsbtodb(&super.fs, itod(&super.fs, i));
! 	if (lseek(pfd, (off_t) ((off_t) dblk1 * DEV_BSIZE), L_SET) == -1) {
  #else
  #if defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV)
  	f1 = fsbtodb(&super.fs, itod(&super.fs, i));
  	off = (offset_t) f1 << DEV_BSHIFT;
  	if (llseek(pfd, off, L_SET) == -1) {
  #else
! 	if (lseek(pfd, dbtob(fsbtodb(&super.fs, itod(&super.fs, i))), L_SET)
  	    == -1) {
  #endif /* AFS_SUN5_ENV */
  #endif /* AFS_OSF_ENV */
--- 1329,1342 ----
  	e = i + super.fs.fs_ipg;
  #ifdef	AFS_OSF_ENV
  	dblk1 = fsbtodb(&super.fs, itod(&super.fs, i));
! 	if (afs_lseek(pfd, (off_t) ((off_t) dblk1 * DEV_BSIZE), L_SET) == -1) {
  #else
  #if defined(AFS_SUN5_ENV) || defined(AFS_DARWIN_ENV)
  	f1 = fsbtodb(&super.fs, itod(&super.fs, i));
  	off = (offset_t) f1 << DEV_BSHIFT;
  	if (llseek(pfd, off, L_SET) == -1) {
  #else
! 	if (afs_lseek(pfd, dbtob(fsbtodb(&super.fs, itod(&super.fs, i))), L_SET)
  	    == -1) {
  #endif /* AFS_SUN5_ENV */
  #endif /* AFS_OSF_ENV */
***************
*** 1336,1342 ****
  		for (bj = bk = 0; bj < bufsize; bj = bj + 512, bk++) {
  		    if ((code = read(pfd, dptr, 512)) != 512) {
  			Log("Error reading inode %d? for partition %s (errno = %d); run vfsck\n", bk + i, partition, errno);
! 			if (lseek(pfd, 512, L_SET) == -1) {
  			    Log("Lseek failed\n");
  			    goto out;
  			}
--- 1358,1364 ----
  		for (bj = bk = 0; bj < bufsize; bj = bj + 512, bk++) {
  		    if ((code = read(pfd, dptr, 512)) != 512) {
  			Log("Error reading inode %d? for partition %s (errno = %d); run vfsck\n", bk + i, partition, errno);
! 			if (afs_lseek(pfd, 512, L_SET) == -1) {
  			    Log("Lseek failed\n");
  			    goto out;
  			}
***************
*** 1496,1507 ****
  	return -1;
      }
  #else /* AFS_AIX41_ENV */
!     if (lseek(fd, blk * Bsize, 0) < 0) {
  	Log("Unable to seek to offset %u for block %u\n", blk * Bsize, blk);
      }
  #endif /* AFS_AIX41_ENV */
  #else
!     if (lseek(fd, (off_t) dbtob(blk), L_SET) < 0) {
  	Log("Unable to seek to offset %u for block %u\n", dbtob(blk), blk);
      }
  #endif
--- 1518,1529 ----
  	return -1;
      }
  #else /* AFS_AIX41_ENV */
!     if (afs_lseek(fd, blk * Bsize, 0) < 0) {
  	Log("Unable to seek to offset %u for block %u\n", blk * Bsize, blk);
      }
  #endif /* AFS_AIX41_ENV */
  #else
!     if (afs_lseek(fd, (off_t) dbtob(blk), L_SET) < 0) {
  	Log("Unable to seek to offset %u for block %u\n", dbtob(blk), blk);
      }
  #endif
Index: openafs/src/vol/namei_ops.c
diff -c openafs/src/vol/namei_ops.c:1.21.2.3 openafs/src/vol/namei_ops.c:1.21.2.4
*** openafs/src/vol/namei_ops.c:1.21.2.3	Tue Nov  9 12:16:40 2004
--- openafs/src/vol/namei_ops.c	Tue Nov  1 11:45:44 2005
***************
*** 13,19 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/namei_ops.c,v 1.21.2.3 2004/11/09 17:16:40 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.4 2005/11/01 16:45:44 shadow Exp $");
  
  #ifdef AFS_NAMEI_ENV
  #include <stdio.h>
***************
*** 30,36 ****
  #ifdef AFS_AIX_ENV
  #include <sys/lockf.h>
  #endif
! #ifdef AFS_SUN5_ENV
  #include <unistd.h>
  #endif
  #include <afs/afsutil.h>
--- 30,36 ----
  #ifdef AFS_AIX_ENV
  #include <sys/lockf.h>
  #endif
! #if defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
  #include <unistd.h>
  #endif
  #include <afs/afsutil.h>
***************
*** 860,866 ****
      namei_GetLCOffsetAndIndexFromIno(ino, &offset, &index);
  
      if (lockit) {
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
  	if (lockf(h->fd_fd, F_LOCK, 0) < 0)
  #else
  	if (flock(h->fd_fd, LOCK_EX) < 0)
--- 860,866 ----
      namei_GetLCOffsetAndIndexFromIno(ino, &offset, &index);
  
      if (lockit) {
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
  	if (lockf(h->fd_fd, F_LOCK, 0) < 0)
  #else
  	if (flock(h->fd_fd, LOCK_EX) < 0)
***************
*** 879,885 ****
  
    bad_getLinkByte:
      if (lockit)
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
  	lockf(h->fd_fd, F_ULOCK, 0);
  #else
  	flock(h->fd_fd, LOCK_UN);
--- 879,885 ----
  
    bad_getLinkByte:
      if (lockit)
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
  	lockf(h->fd_fd, F_ULOCK, 0);
  #else
  	flock(h->fd_fd, LOCK_UN);
***************
*** 904,910 ****
  	return -1;
  
      /* Only one manipulates at a time. */
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
      if (lockf(fdP->fd_fd, F_LOCK, 0) < 0) {
  #else
      if (flock(fdP->fd_fd, LOCK_EX) < 0) {
--- 904,910 ----
  	return -1;
  
      /* Only one manipulates at a time. */
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
      if (lockf(fdP->fd_fd, F_LOCK, 0) < 0) {
  #else
      if (flock(fdP->fd_fd, LOCK_EX) < 0) {
***************
*** 944,950 ****
  	goto badGetFreeTag;
      }
      FDH_SYNC(fdP);
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
      lockf(fdP->fd_fd, F_ULOCK, 0);
  #else
      flock(fdP->fd_fd, LOCK_UN);
--- 944,950 ----
  	goto badGetFreeTag;
      }
      FDH_SYNC(fdP);
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
      lockf(fdP->fd_fd, F_ULOCK, 0);
  #else
      flock(fdP->fd_fd, LOCK_UN);
***************
*** 953,959 ****
      return col;;
  
    badGetFreeTag:
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
      lockf(fdP->fd_fd, F_ULOCK, 0);
  #else
      flock(fdP->fd_fd, LOCK_UN);
--- 953,959 ----
      return col;;
  
    badGetFreeTag:
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
      lockf(fdP->fd_fd, F_ULOCK, 0);
  #else
      flock(fdP->fd_fd, LOCK_UN);
***************
*** 980,986 ****
      namei_GetLCOffsetAndIndexFromIno(ino, &offset, &index);
  
      if (!locked) {
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
  	if (lockf(fdP->fd_fd, F_LOCK, 0) < 0) {
  #else
  	if (flock(fdP->fd_fd, LOCK_EX) < 0) {
--- 980,986 ----
      namei_GetLCOffsetAndIndexFromIno(ino, &offset, &index);
  
      if (!locked) {
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
  	if (lockf(fdP->fd_fd, F_LOCK, 0) < 0) {
  #else
  	if (flock(fdP->fd_fd, LOCK_EX) < 0) {
***************
*** 1023,1029 ****
  
  
    bad_SetLinkCount:
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV)
      lockf(fdP->fd_fd, F_ULOCK, 0);
  #else
      flock(fdP->fd_fd, LOCK_UN);
--- 1023,1029 ----
  
  
    bad_SetLinkCount:
! #if defined(AFS_AIX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_HPUX_ENV)
      lockf(fdP->fd_fd, F_ULOCK, 0);
  #else
      flock(fdP->fd_fd, LOCK_UN);
Index: openafs/src/vol/partition.c
diff -c openafs/src/vol/partition.c:1.30.2.1.4.1 openafs/src/vol/partition.c:1.30.2.2
*** openafs/src/vol/partition.c:1.30.2.1.4.1	Mon Oct 17 16:48:29 2005
--- openafs/src/vol/partition.c	Mon Oct 17 16:47:07 2005
***************
*** 21,27 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/vol/partition.c,v 1.30.2.1.4.1 2005/10/17 20:48:29 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.2 2005/10/17 20:47:07 shadow Exp $");
  
  #include <ctype.h>
  #ifdef AFS_NT40_ENV
Index: openafs/src/vol/test/Makefile.in
diff -c openafs/src/vol/test/Makefile.in:1.7 openafs/src/vol/test/Makefile.in:1.7.2.1
*** openafs/src/vol/test/Makefile.in:1.7	Tue Oct 15 23:59:28 2002
--- openafs/src/vol/test/Makefile.in	Thu Mar  9 01:42:29 2006
***************
*** 11,17 ****
  
  INCDIRS=-I. -I.. -I${TOP_INCDIR} ${FSINCLUDES}
  INSTALL = ${SRCDIR}/bin/install
! LDFLAGS = ${OPTMZ} ${PROF} ${LDIRS} ${XLDFLAGS}
  
  LIBS=${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/vlib.a \
  	${TOP_LIBDIR}/util.a \
--- 11,17 ----
  
  INCDIRS=-I. -I.. -I${TOP_INCDIR} ${FSINCLUDES}
  INSTALL = ${SRCDIR}/bin/install
! LDFLAGS = ${OPTMZ} ${PROF} ${LDIRS} ${XLDFLAGS} ${ARCHFLAGS}
  
  LIBS=${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/vlib.a \
  	${TOP_LIBDIR}/util.a \
***************
*** 20,26 ****
  
  NAMEI_LIBS=../vlib.a ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/liblwp.a
  
! CFLAGS = -D${SYS_NAME} ${OPTMZ} ${INCDIRS} ${XCFLAGS} -g
  
  PROGS = listVicepx
  
--- 20,26 ----
  
  NAMEI_LIBS=../vlib.a ${TOP_LIBDIR}/util.a ${TOP_LIBDIR}/liblwp.a
  
! CFLAGS = -D${SYS_NAME} ${OPTMZ} ${INCDIRS} ${XCFLAGS} ${ARCHFLAGS} -g
  
  PROGS = listVicepx
  
Index: openafs/src/volser/volmain.c
diff -c openafs/src/volser/volmain.c:1.18.2.2 openafs/src/volser/volmain.c:1.18.2.4
*** openafs/src/volser/volmain.c:1.18.2.2	Mon Jul 11 15:08:51 2005
--- openafs/src/volser/volmain.c	Tue Feb 21 23:09:32 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volmain.c,v 1.18.2.2 2005/07/11 19:08:51 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.4 2006/02/22 04:09:32 jaltman Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 242,247 ****
--- 242,248 ----
      char commandLine[150];
      int i;
      int rxJumbograms = 1;	/* default is to send and receive jumbograms. */
+     int rxMaxMTU = -1;
      int bufSize = 0;		/* temp variable to read in udp socket buf size */
  
  #ifdef	AFS_AIX32_ENV
***************
*** 259,264 ****
--- 260,266 ----
      sigaction(SIGABRT, &nsa, NULL);
      sigaction(SIGSEGV, &nsa, NULL);
  #endif
+     osi_audit_init();
      osi_audit(VS_StartEvent, 0, AUD_END);
  
      /* Initialize dirpaths */
***************
*** 325,330 ****
--- 327,345 ----
  		printf("Warning: auditlog %s not writable, ignored.\n", fileName);
  	} else if (strcmp(argv[code], "-nojumbo") == 0) {
  	    rxJumbograms = 0;
+ 	} else if (!strcmp(argv[code], "-rxmaxmtu")) {
+ 	    if ((code + 1) >= argc) {
+ 		fprintf(stderr, "missing argument for -rxmaxmtu\n"); 
+ 		exit(1); 
+ 	    }
+ 	    rxMaxMTU = atoi(argv[++code]);
+ 	    if ((rxMaxMTU < RX_MIN_PACKET_SIZE) || 
+ 		(rxMaxMTU > RX_MAX_PACKET_DATA_SIZE)) {
+ 		printf("rxMaxMTU %d% invalid; must be between %d-%d\n",
+ 		       rxMaxMTU, RX_MIN_PACKET_SIZE, 
+ 		       RX_MAX_PACKET_DATA_SIZE);
+ 		exit(1);
+ 	    }
  	} else if (strcmp(argv[code], "-sleep") == 0) {
  	    sscanf(argv[++code], "%d/%d", &TTsleep, &TTrun);
  	    if ((TTsleep < 0) || (TTrun <= 0)) {
***************
*** 364,369 ****
--- 379,385 ----
  #ifndef AFS_NT40_ENV
  	    printf("Usage: volserver [-log] [-p <number of processes>] "
  		   "[-auditlog <log path>] "
+ 		   "[-nojumbo] [-rxmaxmtu <bytes>] "
  		   "[-udpsize <size of socket buffer in bytes>] "
  		   "[-syslog[=FACILITY]] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
***************
*** 371,376 ****
--- 387,393 ----
  #else
  	    printf("Usage: volserver [-log] [-p <number of processes>] "
  		   "[-auditlog <log path>] "
+ 		   "[-nojumbo] [-rxmaxmtu <bytes>] "
  		   "[-udpsize <size of socket buffer in bytes>] "
  		   "[-enable_peer_stats] [-enable_process_stats] "
  		   "[-help]\n");
***************
*** 419,424 ****
--- 436,444 ----
  	/* Don't allow 3.4 vos clients to send jumbograms and we don't send. */
  	rx_SetNoJumbo();
      }
+     if (rxMaxMTU != -1) {
+ 	rx_SetMaxMTU(rxMaxMTU);
+     }
      rx_GetIFInfo();
      rx_SetRxDeadTime(420);
      memset(busyFlags, 0, sizeof(busyFlags));
Index: openafs/src/volser/volprocs.c
diff -c openafs/src/volser/volprocs.c:1.34.2.4 openafs/src/volser/volprocs.c:1.34.2.5
*** openafs/src/volser/volprocs.c:1.34.2.4	Wed Aug 31 18:14:59 2005
--- openafs/src/volser/volprocs.c	Tue Jan 24 22:25:49 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/volprocs.c,v 1.34.2.4 2005/08/31 22:14:59 shadow 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.5 2006/01/25 03:25:49 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 1790,1796 ****
  		pntr->volid = volid;
  		goto drop;
  	    }
! 	    tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
  	    if (error) {
  		pntr->status = 0;	/*things are messed up */
  		strcpy(pntr->name, volname);
--- 1790,1796 ----
  		pntr->volid = volid;
  		goto drop;
  	    }
! 	    tv = VAttachVolumeByName(&error, pname, volname, V_READONLY);
  	    if (error) {
  		pntr->status = 0;	/*things are messed up */
  		strcpy(pntr->name, volname);
***************
*** 2004,2010 ****
  	    /*
  	     * Attach the volume, give up on the volume if we can't.
  	     */
! 	    tv = VAttachVolumeByName(&error, pname, volname, V_PEEK);
  	    if (error) {
  		xInfoP->status = 0;	/*things are messed up */
  		strcpy(xInfoP->name, volname);
--- 2004,2010 ----
  	    /*
  	     * Attach the volume, give up on the volume if we can't.
  	     */
! 	    tv = VAttachVolumeByName(&error, pname, volname, V_READONLY);
  	    if (error) {
  		xInfoP->status = 0;	/*things are messed up */
  		strcpy(xInfoP->name, volname);
Index: openafs/src/volser/vos.c
diff -c openafs/src/volser/vos.c:1.40.2.12 openafs/src/volser/vos.c:1.40.2.13
*** openafs/src/volser/vos.c:1.40.2.12	Mon Aug 15 11:55:49 2005
--- openafs/src/volser/vos.c	Thu Dec 15 23:26:40 2005
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vos.c,v 1.40.2.12 2005/08/15 15:55:49 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.13 2005/12/16 04:26:40 shadow Exp $");
  
  #include <sys/types.h>
  #ifdef AFS_NT40_ENV
***************
*** 2880,2886 ****
       register struct cmd_syndesc *as;
  
  {
!     afs_int32 avolid, aserver, apart, code, vcode, err;
      afs_int32 aoverwrite = ASK;
      afs_int32 acreation = 0, alastupdate = 0;
      int restoreflags, readonly = 0, offline = 0, voltype = RWVOL;
--- 2880,2886 ----
       register struct cmd_syndesc *as;
  
  {
!     afs_int32 avolid, aparentid, aserver, apart, code, vcode, err;
      afs_int32 aoverwrite = ASK;
      afs_int32 acreation = 0, alastupdate = 0;
      int restoreflags, readonly = 0, offline = 0, voltype = RWVOL;
***************
*** 2891,2896 ****
--- 2891,2897 ----
  
      prompt = 'n';
  
+     aparentid = 0;
      if (as->parms[4].items) {
  	avolid = vsu_GetVolumeID(as->parms[4].items->data, cstruct, &err);
  	if (avolid == 0) {
***************
*** 3032,3037 ****
--- 3033,3039 ----
  		   && entry.volumeId[voltype] != avolid) {
  	    avolid = entry.volumeId[voltype];
  	}
+         aparentid = entry.volumeId[RWVOL];
      }
  
      else {			/* volume exists - do we do a full incremental or abort */
***************
*** 3045,3050 ****
--- 3047,3053 ----
  		   && entry.volumeId[voltype] != avolid) {
  	    avolid = entry.volumeId[voltype];
  	}
+         aparentid = entry.volumeId[RWVOL];
  
  	/* A file name was specified  - check if volume is on another partition */
  	vcode = GetVolumeInfo(avolid, &Oserver, &Opart, &Otype, &Oentry);
***************
*** 3147,3154 ****
      }
  
      code =
! 	UV_RestoreVolume(aserver, apart, avolid, avolname, restoreflags,
! 			 WriteData, afilename);
      if (code) {
  	PrintDiagnostics("restore", code);
  	exit(1);
--- 3150,3157 ----
      }
  
      code =
! 	UV_RestoreVolume2(aserver, apart, avolid, aparentid,
!                           avolname, restoreflags, WriteData, afilename);
      if (code) {
  	PrintDiagnostics("restore", code);
  	exit(1);
Index: openafs/src/volser/vsprocs.c
diff -c openafs/src/volser/vsprocs.c:1.33.2.4 openafs/src/volser/vsprocs.c:1.33.2.6
*** openafs/src/volser/vsprocs.c:1.33.2.4	Fri Apr 15 14:46:26 2005
--- openafs/src/volser/vsprocs.c	Tue Jan 24 22:49:53 2006
***************
*** 11,17 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/volser/vsprocs.c,v 1.33.2.4 2005/04/15 18:46:26 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.6 2006/01/25 03:49:53 shadow Exp $");
  
  #include <stdio.h>
  #include <sys/types.h>
***************
*** 56,61 ****
--- 56,62 ----
  #include <errno.h>
  #define ERRCODE_RANGE 8		/* from error_table.h */
  #define	CLOCKSKEW   2		/* not really skew, but resolution */
+ #define CLOCKADJ(x) (((x) < CLOCKSKEW) ? 0 : (x) - CLOCKSKEW)
  
  /* for UV_MoveVolume() recovery */
  
***************
*** 1329,1335 ****
  	       newVol);
  	VDONE;
  
! 	fromDate = tstatus.creationDate - CLOCKSKEW;
      } else {
  	/* With RV_NOCLONE, just do a full copy from the source */
  	fromDate = 0;
--- 1330,1336 ----
  	       newVol);
  	VDONE;
  
! 	fromDate = CLOCKADJ(tstatus.creationDate);
      } else {
  	/* With RV_NOCLONE, just do a full copy from the source */
  	fromDate = 0;
***************
*** 2162,2168 ****
  	       cloneVol);
  	VDONE;
  
! 	fromDate = tstatus.creationDate - CLOCKSKEW;
      } else {
  	fromDate = 0;
      }
--- 2163,2169 ----
  	       cloneVol);
  	VDONE;
  
! 	fromDate = CLOCKADJ(tstatus.creationDate);
      } else {
  	fromDate = 0;
      }
***************
*** 2180,2186 ****
  	    VDONE;
  
  	    /* Using the update date should be OK here, but add some fudge */
! 	    cloneFromDate = tstatus.updateDate - CLOCKSKEW;
  	    if ((flags & RV_NOCLONE))
  		fromDate = cloneFromDate;
  
--- 2181,2187 ----
  	    VDONE;
  
  	    /* Using the update date should be OK here, but add some fudge */
! 	    cloneFromDate = CLOCKADJ(tstatus.updateDate);
  	    if ((flags & RV_NOCLONE))
  		fromDate = cloneFromDate;
  
***************
*** 3087,3094 ****
  		       code);
  	    goto fail;
  	}
! 	*crtimePtr = tstatus.creationDate - CLOCKSKEW;
! 	*uptimePtr = tstatus.updateDate - CLOCKSKEW;
      }
  
      return 0;
--- 3088,3095 ----
  		       code);
  	    goto fail;
  	}
! 	*crtimePtr = CLOCKADJ(tstatus.creationDate);
! 	*uptimePtr = CLOCKADJ(tstatus.updateDate);
      }
  
      return 0;
***************
*** 4047,4055 ****
   * after extracting params from the rock 
   */
  int
! UV_RestoreVolume(afs_int32 toserver, afs_int32 topart, afs_int32 tovolid,
! 		 char tovolname[], int flags, afs_int32(*WriteData) (),
! 		 char *rock)
  {
      struct rx_connection *toconn, *tempconn;
      struct rx_call *tocall;
--- 4048,4056 ----
   * after extracting params from the rock 
   */
  int
! UV_RestoreVolume2(afs_int32 toserver, afs_int32 topart, afs_int32 tovolid,
! 		  afs_int32 toparentid, char tovolname[], int flags,
! 		  afs_int32(*WriteData) (), char *rock)
  {
      struct rx_connection *toconn, *tempconn;
      struct rx_call *tocall;
***************
*** 4058,4064 ****
      struct volser_status tstatus;
      struct volintInfo vinfo;
      char partName[10];
!     afs_int32 pvolid;
      afs_int32 temptid;
      int success;
      struct nvldbentry entry, storeEntry;
--- 4059,4065 ----
      struct volser_status tstatus;
      struct volintInfo vinfo;
      char partName[10];
!     afs_int32 pvolid, pparentid;
      afs_int32 temptid;
      int success;
      struct nvldbentry entry, storeEntry;
***************
*** 4092,4097 ****
--- 4093,4099 ----
      }
  
      pvolid = tovolid;
+     pparentid = toparentid;
      toconn = UV_Bind(toserver, AFSCONF_VOLUMEPORT);
      if (pvolid == 0) {		/*alot a new id if needed */
  	vcode = VLDB_GetEntryByName(tovolname, &entry);
***************
*** 4120,4129 ****
--- 4122,4134 ----
  		goto refail;
  	    }
  	    pvolid = entry.volumeId[ROVOL];
+ 	    pparentid = entry.volumeId[RWVOL];
  	} else {
  	    pvolid = entry.volumeId[RWVOL];
+ 	    pparentid = entry.volumeId[RWVOL];
  	}
      }
+     if (!pparentid) pparentid = pvolid;
      /* at this point we have a volume id to use/reuse for the volume to be restored */
      if (strlen(tovolname) > (VOLSER_OLDMAXVOLNAME - 1)) {
  	EGOTO1(refail, VOLSERBADOP,
***************
*** 4136,4142 ****
  	    hostutil_GetNameByINet(toserver), partName);
      fflush(STDOUT);
      code =
! 	AFSVolCreateVolume(toconn, topart, tovolname, volsertype, 0, &pvolid,
  			   &totid);
      if (code) {
  	if (flags & RV_FULLRST) {	/* full restore: delete then create anew */
--- 4141,4147 ----
  	    hostutil_GetNameByINet(toserver), partName);
      fflush(STDOUT);
      code =
! 	AFSVolCreateVolume(toconn, topart, tovolname, volsertype, pparentid, &pvolid,
  			   &totid);
      if (code) {
  	if (flags & RV_FULLRST) {	/* full restore: delete then create anew */
***************
*** 4172,4178 ****
  	    VDONE;
  
  	    code =
! 		AFSVolCreateVolume(toconn, topart, tovolname, volsertype, 0,
  				   &pvolid, &totid);
  	    EGOTO1(refail, code, "Could not create new volume %u\n", pvolid);
  	} else {
--- 4177,4183 ----
  	    VDONE;
  
  	    code =
! 		AFSVolCreateVolume(toconn, topart, tovolname, volsertype, pparentid,
  				   &pvolid, &totid);
  	    EGOTO1(refail, code, "Could not create new volume %u\n", pvolid);
  	} else {
***************
*** 4193,4199 ****
  	oldUpdateDate = 0;
      }
  
!     cookie.parent = pvolid;
      cookie.type = voltype;
      cookie.clone = 0;
      strncpy(cookie.name, tovolname, VOLSER_OLDMAXVOLNAME);
--- 4198,4204 ----
  	oldUpdateDate = 0;
      }
  
!     cookie.parent = pparentid;
      cookie.type = voltype;
      cookie.clone = 0;
      strncpy(cookie.name, tovolname, VOLSER_OLDMAXVOLNAME);
***************
*** 4226,4232 ****
  	error = code;
  	goto refail;
      }
!     code = AFSVolSetIdsTypes(toconn, totid, tovolname, voltype, pvolid, 0, 0);
      if (code) {
  	fprintf(STDERR, "Could not set the right type and ID on %lu\n",
  		(unsigned long)pvolid);
--- 4231,4237 ----
  	error = code;
  	goto refail;
      }
!     code = AFSVolSetIdsTypes(toconn, totid, tovolname, voltype, pparentid, 0, 0);
      if (code) {
  	fprintf(STDERR, "Could not set the right type and ID on %lu\n",
  		(unsigned long)pvolid);
***************
*** 4316,4322 ****
  		entry.volumeId[ROVOL] = tstatus.cloneID;	/*this should come from status info on the volume if non zero */
  	    } else
  		entry.volumeId[ROVOL] = INVALID_BID;
! 	    entry.volumeId[RWVOL] = pvolid;
  	    entry.cloneId = 0;
  	    if (tstatus.backupID != 0) {
  		entry.volumeId[BACKVOL] = tstatus.backupID;
--- 4321,4327 ----
  		entry.volumeId[ROVOL] = tstatus.cloneID;	/*this should come from status info on the volume if non zero */
  	    } else
  		entry.volumeId[ROVOL] = INVALID_BID;
! 	    entry.volumeId[RWVOL] = pparentid;
  	    entry.cloneId = 0;
  	    if (tstatus.backupID != 0) {
  		entry.volumeId[BACKVOL] = tstatus.backupID;
***************
*** 4502,4507 ****
--- 4507,4521 ----
      return error;
  }
  
+ int
+ UV_RestoreVolume(afs_int32 toserver, afs_int32 topart, afs_int32 tovolid,
+ 		 char tovolname[], int flags, afs_int32(*WriteData) (),
+ 		 char *rock)
+ {
+     return UV_RestoreVolume2(toserver, topart, tovolid, 0, tovolname, flags,
+ 			     WriteData, rock);
+ }
+ 
  
  /*unlocks the vldb entry associated with <volid> */
  int
Index: openafs/src/xstat/NTMakefile
diff -c /dev/null openafs/src/xstat/NTMakefile:1.2.2.2
*** /dev/null	Fri Apr 14 09:27:34 2006
--- openafs/src/xstat/NTMakefile	Sun Mar  5 22:16:41 2006
***************
*** 0 ****
--- 1,81 ----
+ # 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
+ 
+ # Makefile for the module providing the client side of the File Server
+ # and Cache Manager extended statistics gathering.
+ 
+ RELDIR=xstat
+ !INCLUDE ..\config\NTMakefile.$(SYS_NAME)
+ !INCLUDE ..\config\NTMakefile.version
+ 
+ LIBDIR = $(DESTDIR)\lib
+ INCDIR = $(DESTDIR)\include
+ BINDIR = $(DESTDIR)\bin
+ 
+ RPCINCLS=$(INCDIR)\lwp.h $(INCDIR)\rx\rx.h
+ 
+ LIBS= \
+  	$(LIBDIR)\afs\afsint.lib \
+ 	$(LIBDIR)\afs\afscmd.lib \
+ 	$(LIBDIR)\afsrx.lib \
+ 	$(LIBDIR)\afslwp.lib \
+ 	$(LIBDIR)\afs\afspioctl.lib \
+ 	$(LIBDIR)\afs\afsutil.lib \
+ 	$(LIBDIR)\afs\afsreg.lib
+ 
+ 
+ install: \
+ 	$(INCDIR)\afs\xstat_fs.h \
+ 	$(INCDIR)\afs\xstat_cm.h \
+ 	$(LIBDIR)\afs_xstat_fs.lib \
+ 	$(LIBDIR)\afs_xstat_cm.lib \
+ 	$(BINDIR)\xstat_fs_test.exe \
+ 	$(BINDIR)\xstat_cm_test.exe
+ 
+ #
+ # File Server data collection
+ #
+ FSINCLS= $(INCDIR)\xstat_fs.h $(RPCINCLS)
+ 
+ {.}.c{$(OUT)}.obj:
+     $(C2OBJ) $<
+ 
+ $(LIBDIR)\afs_xstat_fs.lib: $(OUT)\xstat_fs.obj $(OUT)\xstat_fs_callback.obj $(OUT)\AFS_component_version_number.obj
+ 	$(LIBARCH)
+ 
+ $(BINDIR)\xstat_fs_test.exe: $(OUT)\xstat_fs_test.obj $(LIBDIR)\afs_xstat_fs.lib $(LIBS)
+ 	$(EXECONLINK) rpcrt4.lib
+ 	$(_VC_MANIFEST_EMBED_EXE)
+ 	$(EXEPREP)
+ 
+ #
+ # Cache Manager data collection
+ #
+ CMINCLS=$(INCDIR)\xstat_cm.h $(RPCINCLS)
+ 
+ $(LIBDIR)\afs_xstat_cm.lib: $(OUT)\xstat_cm.obj $(OUT)\AFS_component_version_number.obj
+ 	$(LIBARCH)
+ 
+ $(BINDIR)\xstat_cm_test.exe: $(OUT)\xstat_cm_test.obj $(LIBDIR)\afs_xstat_cm.lib $(LIBS)
+ 	$(EXECONLINK) 
+ 	$(_VC_MANIFEST_EMBED_EXE)
+ 	$(EXEPREP)
+ 
+ #
+ # Misc targets
+ #
+ clean::
+ 	$(DEL) -f $(OUT)\*.obj
+ 	$(DEL) -f $(OUT)\*.pdb
+ 	$(DEL) -f $(OUT)\*.ilk
+  	$(DEL) -f $(INCDIR)\afs\xstat_fs.h
+ 	$(DEL) -f $(INCDIR)\afs\xstat_cm.h
+ 	$(DEL) -f $(LIBDIR)\afs_xstat_fs.lib
+ 	$(DEL) -f $(LIBDIR)\afs_xstat_cm.lib
+ 	$(DEL) -f $(BINDIR)\xstat_cm_test.exe
+ 	$(DEL) -f $(BINDIR)\xstat_fs_test.exe
+ 	$(DEL) -f AFS_component_version_number.c
Index: openafs/src/xstat/xstat_cm.c
diff -c openafs/src/xstat/xstat_cm.c:1.9 openafs/src/xstat/xstat_cm.c:1.9.2.1
*** openafs/src/xstat/xstat_cm.c:1.9	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_cm.c	Sun Mar  5 22:16:41 2006
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm.c,v 1.9 2003/07/15 23:17:52 shadow Exp $");
  
  #include "xstat_cm.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm.c,v 1.9.2.1 2006/03/06 03:16:41 jaltman Exp $");
  
  #include "xstat_cm.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
***************
*** 403,408 ****
--- 403,409 ----
      char *hostNameFound;	/*Ptr to returned host name */
      int conn_err;		/*Connection error? */
      int collIDBytes;		/*Num bytes in coll ID array */
+     char hoststr[16];
  
      /*
       * If we've already been called, snicker at the bozo, gently
***************
*** 528,536 ****
  	 */
  	if (xstat_cm_debug) {
  	    printf("[%s] Copying in the following socket info:\n", rn);
! 	    printf("[%s] IP addr 0x%lx, port %d\n", rn,
! 		   (a_socketArray + curr_srv)->sin_addr.s_addr,
! 		   (a_socketArray + curr_srv)->sin_port);
  	}
  	memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
  	       sizeof(struct sockaddr_in));
--- 529,537 ----
  	 */
  	if (xstat_cm_debug) {
  	    printf("[%s] Copying in the following socket info:\n", rn);
! 	    printf("[%s] IP addr 0s, port %d\n", rn,
! 		   afs_inet_ntoa_r((a_socketArray + curr_srv)->sin_addr.s_addr,hoststr),
! 		   ntohs((a_socketArray + curr_srv)->sin_port));
  	}
  	memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
  	       sizeof(struct sockaddr_in));
***************
*** 539,546 ****
  	    hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
  	if (hostNameFound == NULL) {
  	    fprintf(stderr,
! 		    "[%s] Can't map Internet address %lu to a string name\n",
! 		    rn, curr_conn->skt.sin_addr.s_addr);
  	    curr_conn->hostName[0] = '\0';
  	} else {
  	    strcpy(curr_conn->hostName, hostNameFound);
--- 540,547 ----
  	    hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
  	if (hostNameFound == NULL) {
  	    fprintf(stderr,
! 		    "[%s] Can't map Internet address %s to a string name\n",
! 		    rn, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr));
  	    curr_conn->hostName[0] = '\0';
  	} else {
  	    strcpy(curr_conn->hostName, hostNameFound);
***************
*** 554,562 ****
  	 */
  	if (xstat_cm_debug)
  	    printf
! 		("[%s] Connecting to srv idx %d, IP addr 0x%lx, port %d, service 1\n",
! 		 rn, curr_srv, curr_conn->skt.sin_addr.s_addr,
! 		 curr_conn->skt.sin_port);
  	curr_conn->rxconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr,	/*Server addr */
  					     curr_conn->skt.sin_port,	/*Server port */
  					     1,	/*AFS service # */
--- 555,563 ----
  	 */
  	if (xstat_cm_debug)
  	    printf
! 		("[%s] Connecting to srv idx %d, IP addr %s, port %d, service 1\n",
! 		 rn, curr_srv, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr),
! 		 ntohs(curr_conn->skt.sin_port));
  	curr_conn->rxconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr,	/*Server addr */
  					     curr_conn->skt.sin_port,	/*Server port */
  					     1,	/*AFS service # */
***************
*** 564,571 ****
  					     0);	/*# of above */
  	if (curr_conn->rxconn == (struct rx_connection *)0) {
  	    fprintf(stderr,
! 		    "[%s] Can't create Rx connection to server '%s' (%lu)\n",
! 		    rn, curr_conn->hostName, curr_conn->skt.sin_addr.s_addr);
  	    conn_err = 1;
  	}
  	if (xstat_cm_debug)
--- 565,572 ----
  					     0);	/*# of above */
  	if (curr_conn->rxconn == (struct rx_connection *)0) {
  	    fprintf(stderr,
! 		    "[%s] Can't create Rx connection to server '%s' (%s)\n",
! 		    rn, curr_conn->hostName, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr));
  	    conn_err = 1;
  	}
  	if (xstat_cm_debug)
Index: openafs/src/xstat/xstat_cm.h
diff -c openafs/src/xstat/xstat_cm.h:1.3 openafs/src/xstat/xstat_cm.h:1.3.2.1
*** openafs/src/xstat/xstat_cm.h:1.3	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_cm.h	Sun Mar  5 22:16:41 2006
***************
*** 21,26 ****
--- 21,27 ----
   *------------------------------------------------------------------------*/
  
  #include <sys/types.h>		/*Basic system types */
+ #ifndef AFS_NT40_ENV
  #ifndef	IPPROTO_IP
  #include <netinet/in.h>		/*Internet definitions */
  #endif
***************
*** 34,39 ****
--- 35,41 ----
  #define _socket_h_
  #include <sys/socket.h>		/*Socket definitions */
  #endif
+ #endif /* AFS_NT40_ENV */
  
  #include <rx/rx.h>		/*Rx definitions */
  #include <afs/afscbint.h>	/*AFS CM callback interface */
Index: openafs/src/xstat/xstat_cm_test.c
diff -c openafs/src/xstat/xstat_cm_test.c:1.8.2.2 openafs/src/xstat/xstat_cm_test.c:1.8.2.3
*** openafs/src/xstat/xstat_cm_test.c:1.8.2.2	Tue Jun 21 16:13:55 2005
--- openafs/src/xstat/xstat_cm_test.c	Thu Mar  9 01:42:30 2006
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm_test.c,v 1.8.2.2 2005/06/21 20:13:55 shadow Exp $");
  
  #include "xstat_cm.h"		/*Interface for xstat_cm module */
  #include <cmd.h>		/*Command line interpreter */
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_cm_test.c,v 1.8.2.3 2006/03/09 06:42:30 shadow Exp $");
  
  #include "xstat_cm.h"		/*Interface for xstat_cm module */
  #include <cmd.h>		/*Command line interpreter */
***************
*** 1304,1310 ****
--- 1304,1314 ----
       */
      curr_item = a_s->parms[P_CM_NAMES].items;
      for (currCM = 0; currCM < numCMs; currCM++) {
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	CMSktArray[currCM].sin_family = AF_INET;	/*Internet family */
+ #else
  	CMSktArray[currCM].sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	CMSktArray[currCM].sin_port = htons(7001);	/*Cache Manager port */
  	he = hostutil_GetHostByName(curr_item->data);
  	if (he == NULL) {
Index: openafs/src/xstat/xstat_fs.c
diff -c openafs/src/xstat/xstat_fs.c:1.9 openafs/src/xstat/xstat_fs.c:1.9.2.1
*** openafs/src/xstat/xstat_fs.c:1.9	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_fs.c	Sun Mar  5 22:16:41 2006
***************
*** 18,24 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs.c,v 1.9 2003/07/15 23:17:52 shadow Exp $");
  
  #include "xstat_fs.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
--- 18,24 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs.c,v 1.9.2.1 2006/03/06 03:16:41 jaltman Exp $");
  
  #include "xstat_fs.h"		/*Interface for this module */
  #include <lwp.h>		/*Lightweight process package */
***************
*** 46,51 ****
--- 46,52 ----
  extern afs_int32 SRXAFSCB_CallBack();
  extern afs_int32 SRXAFSCB_InitCallBackState3();
  extern afs_int32 SRXAFSCB_Probe();
+ extern afs_int32 SRXAFSCB_ProbeUUID();
  extern afs_int32 SRXAFSCB_GetCE();
  extern afs_int32 SRXAFSCB_GetLock();
  
***************
*** 444,449 ****
--- 445,451 ----
      int conn_err;		/*Connection error? */
      int PortToUse;		/*Callback port to use */
      int collIDBytes;		/*Num bytes in coll ID array */
+     char hoststr[16];
  
      /*
       * If we've already been called, snicker at the bozo, gently
***************
*** 594,603 ****
  	 * printable name if possible.
  	 */
  	if (xstat_fs_debug) {
  	    printf("[%s] Copying in the following socket info:\n", rn);
! 	    printf("[%s] IP addr 0x%lx, port %d\n", rn,
! 		   (a_socketArray + curr_srv)->sin_addr.s_addr,
! 		   (a_socketArray + curr_srv)->sin_port);
  	}
  	memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
  	       sizeof(struct sockaddr_in));
--- 596,606 ----
  	 * printable name if possible.
  	 */
  	if (xstat_fs_debug) {
+ 	    char hoststr[16];
  	    printf("[%s] Copying in the following socket info:\n", rn);
! 	    printf("[%s] IP addr %s, port %d\n", rn,
! 		   afs_inet_ntoa_r((a_socketArray + curr_srv)->sin_addr.s_addr,hoststr),
! 		   ntohs((a_socketArray + curr_srv)->sin_port));
  	}
  	memcpy(&(curr_conn->skt), a_socketArray + curr_srv,
  	       sizeof(struct sockaddr_in));
***************
*** 606,613 ****
  	    hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
  	if (hostNameFound == NULL) {
  	    fprintf(stderr,
! 		    "[%s] Can't map Internet address %lu to a string name\n",
! 		    rn, curr_conn->skt.sin_addr.s_addr);
  	    curr_conn->hostName[0] = '\0';
  	} else {
  	    strcpy(curr_conn->hostName, hostNameFound);
--- 609,616 ----
  	    hostutil_GetNameByINet(curr_conn->skt.sin_addr.s_addr);
  	if (hostNameFound == NULL) {
  	    fprintf(stderr,
! 		    "[%s] Can't map Internet address %s to a string name\n",
! 		    rn, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr));
  	    curr_conn->hostName[0] = '\0';
  	} else {
  	    strcpy(curr_conn->hostName, hostNameFound);
***************
*** 621,629 ****
  	 */
  	if (xstat_fs_debug)
  	    printf
! 		("[%s] Connecting to srv idx %d, IP addr 0x%lx, port %d, service 1\n",
! 		 rn, curr_srv, curr_conn->skt.sin_addr.s_addr,
! 		 curr_conn->skt.sin_port);
  
  	curr_conn->rxconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr,	/*Server addr */
  					     curr_conn->skt.sin_port,	/*Server port */
--- 624,632 ----
  	 */
  	if (xstat_fs_debug)
  	    printf
! 		("[%s] Connecting to srv idx %d, IP addr %s, port %d, service 1\n",
! 		 rn, curr_srv, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr),
! 		 ntohs(curr_conn->skt.sin_port));
  
  	curr_conn->rxconn = rx_NewConnection(curr_conn->skt.sin_addr.s_addr,	/*Server addr */
  					     curr_conn->skt.sin_port,	/*Server port */
***************
*** 632,639 ****
  					     0);	/*# of above */
  	if (curr_conn->rxconn == (struct rx_connection *)0) {
  	    fprintf(stderr,
! 		    "[%s] Can't create Rx connection to server '%s' (%lu)\n",
! 		    rn, curr_conn->hostName, curr_conn->skt.sin_addr.s_addr);
  	    conn_err = 1;
  	}
  	if (xstat_fs_debug)
--- 635,642 ----
  					     0);	/*# of above */
  	if (curr_conn->rxconn == (struct rx_connection *)0) {
  	    fprintf(stderr,
! 		    "[%s] Can't create Rx connection to server '%s' (%s)\n",
! 		    rn, curr_conn->hostName, afs_inet_ntoa_r(curr_conn->skt.sin_addr.s_addr,hoststr));
  	    conn_err = 1;
  	}
  	if (xstat_fs_debug)
Index: openafs/src/xstat/xstat_fs.h
diff -c openafs/src/xstat/xstat_fs.h:1.3 openafs/src/xstat/xstat_fs.h:1.3.2.1
*** openafs/src/xstat/xstat_fs.h:1.3	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_fs.h	Sun Mar  5 22:16:41 2006
***************
*** 21,26 ****
--- 21,27 ----
   *------------------------------------------------------------------------*/
  
  #include <sys/types.h>		/*Basic system types */
+ #ifndef AFS_NT40_ENV
  #ifndef	IPPROTO_IP
  #include <netinet/in.h>		/*Internet definitions */
  #endif
***************
*** 34,39 ****
--- 35,41 ----
  #define _socket_h_
  #include <sys/socket.h>		/*Socket definitions */
  #endif
+ #endif /* AFS_NT40_ENV */
  
  #include <rx/rx.h>		/*Rx definitions */
  #include <afs/afsint.h>		/*AFS FileServer interface */
Index: openafs/src/xstat/xstat_fs_callback.c
diff -c openafs/src/xstat/xstat_fs_callback.c:1.13 openafs/src/xstat/xstat_fs_callback.c:1.13.2.1
*** openafs/src/xstat/xstat_fs_callback.c:1.13	Tue Jul 15 19:17:52 2003
--- openafs/src/xstat/xstat_fs_callback.c	Sun Mar  5 22:16:41 2006
***************
*** 24,32 ****
  
  #include <afsconfig.h>
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_callback.c,v 1.13 2003/07/15 23:17:52 shadow Exp $");
  
  #include <errno.h>
  #include <stdio.h>		/*Standard I/O stuff */
--- 24,36 ----
  
  #include <afsconfig.h>
  #include <afs/param.h>
+ #ifdef AFS_NT40_ENV
+ #include <windows.h>
+ #include <rpc.h>
+ #endif
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_callback.c,v 1.13.2.1 2006/03/06 03:16:41 jaltman Exp $");
  
  #include <errno.h>
  #include <stdio.h>		/*Standard I/O stuff */
***************
*** 54,60 ****
--- 58,68 ----
  {
      int count;
  
+ #ifdef AFS_NT40_ENV
+     UuidCreate((UUID *)&afs_cb_interface.uuid);
+ #else
      afs_uuid_create(&afs_cb_interface.uuid);
+ #endif
      count = rx_getAllAddr(&afs_cb_interface.addr_in, AFS_MAX_INTERFACE_ADDR);
      if (count <= 0)
  	afs_cb_interface.numberOfInterfaces = 0;
Index: openafs/src/xstat/xstat_fs_test.c
diff -c openafs/src/xstat/xstat_fs_test.c:1.8.2.1 openafs/src/xstat/xstat_fs_test.c:1.8.2.6
*** openafs/src/xstat/xstat_fs_test.c:1.8.2.1	Sun Jan 30 23:14:51 2005
--- openafs/src/xstat/xstat_fs_test.c	Mon Apr 10 11:46:46 2006
***************
*** 17,23 ****
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_test.c,v 1.8.2.1 2005/01/31 04:14:51 shadow Exp $");
  
  #include "xstat_fs.h"		/*Interface for xstat_fs module */
  #include <cmd.h>		/*Command line interpreter */
--- 17,23 ----
  #include <afs/param.h>
  
  RCSID
!     ("$Header: /cvs/openafs/src/xstat/xstat_fs_test.c,v 1.8.2.6 2006/04/10 15:46:46 shadow Exp $");
  
  #include "xstat_fs.h"		/*Interface for xstat_fs module */
  #include <cmd.h>		/*Command line interpreter */
***************
*** 249,255 ****
      printf("\t%10d rx_nFreeCallStructs\n", a_ovP->rx_nFreeCallStructs);
      printf("\t%10d rx_nBusies\n\n", a_ovP->rx_nBusies);
  
!     printf("\t%10d fs_nBusies\n\n", a_ovP->fs_nBusies);
      /*
       * Host module fields.
       */
--- 249,256 ----
      printf("\t%10d rx_nFreeCallStructs\n", a_ovP->rx_nFreeCallStructs);
      printf("\t%10d rx_nBusies\n\n", a_ovP->rx_nBusies);
  
!     printf("\t%10d fs_nBusies\n", a_ovP->fs_nBusies);
!     printf("\t%10d fs_GetCapabilities\n\n", a_ovP->fs_nGetCaps);
      /*
       * Host module fields.
       */
***************
*** 493,498 ****
--- 494,527 ----
      PrintOverallPerfInfo(perfP);
  }
  
+ static char *CbCounterStrings[] = {
+     "DeleteFiles",
+     "DeleteCallBacks",
+     "BreakCallBacks",
+     "AddCallBack",
+     "GotSomeSpaces",
+     "DeleteAllCallBacks",
+     "nFEs", "nCBs", "nblks",
+     "CBsTimedOut",
+     "nbreakers",
+     "GSS1", "GSS2", "GSS3", "GSS4", "GSS5"
+ };
+ 
+ 
+ void
+ PrintCbCounters() {
+     int numInt32s = sizeof(CbCounterStrings)/sizeof(char *);
+     int i;
+     afs_uint32 *val=xstat_fs_Results.data.AFS_CollData_val;
+ 
+     if (numInt32s > xstat_fs_Results.data.AFS_CollData_len)
+ 	numInt32s = xstat_fs_Results.data.AFS_CollData_len;
+ 
+     for (i=0; i<numInt32s; i++) {
+ 	printf("\t%10u %s\n", val[i], CbCounterStrings[i]);
+     }
+ }
+ 
  
  /*------------------------------------------------------------------------
   * FS_Handler
***************
*** 549,554 ****
--- 578,587 ----
  	PrintFullPerfInfo();
  	break;
  
+     case AFS_XSTATSCOLL_CBSTATS:
+ 	PrintCbCounters();
+ 	break;
+ 
      default:
  	printf("** Unknown collection: %d\n",
  	       xstat_fs_Results.collectionNumber);
***************
*** 687,693 ****
--- 720,730 ----
       */
      curr_item = a_s->parms[P_FS_NAMES].items;
      for (currFS = 0; currFS < numFSs; currFS++) {
+ #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+ 	FSSktArray[currFS].sin_family = AF_INET;	/*Internet family */
+ #else
  	FSSktArray[currFS].sin_family = htons(AF_INET);	/*Internet family */
+ #endif
  	FSSktArray[currFS].sin_port = htons(7000);	/*FileServer port */
  	he = hostutil_GetHostByName(curr_item->data);
  	if (he == NULL) {
