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_ty
