[OpenAFS-devel] Windows - Client Config error #35, again

James Peterson james@abrakus.com
Thu, 13 Mar 2003 23:02:13 -0800


Another instance of the #35 bug
The full patch should have been:

AFS Client Configuration dialog box:

Atempts to add a new drive, to the root, with a sub mount name, will
sometimes return error #35.

This patch is based on SnapShot 2003-02-25.

diff -NurEB --exclude-from=exclude bas/WINNT/afsd/cm_ioctl.c
upd/WINNT/afsd/cm_ioctl.c
--- bas/WINNT/afsd/cm_ioctl.c	2003-03-13 22:05:38.000000000 -0800
+++ upd/WINNT/afsd/cm_ioctl.c	2003-03-13 22:01:30.000000000 -0800
@@ -1735,7 +1764,7 @@
 			 * leading "/afs" when writing out the submount.
 			 */
 			WritePrivateProfileString("AFS Submounts",
-					submountreqp, &afspath[strlen("/afs")],
+					submountreqp,
(strlen(&afspath[strlen("/afs")]))?&afspath[strlen("/afs")]:"/",
 					"afsdsbmt.ini");

 			strcpy(ioctlp->outDatap, submountreqp);
@@ -1848,7 +1877,7 @@
 	sprintf(ioctlp->outDatap, "auto%ld", nextAutoSubmount);

 	WritePrivateProfileString("AFS Submounts", ioctlp->outDatap,
-					&afspath[lstrlen("/afs")],
+					(strlen(&afspath[lstrlen("/afs")]))?&afspath[lstrlen("/afs")]:"/",
 					"afsdsbmt.ini");

 	ioctlp->outDatap += strlen(ioctlp->outDatap) +1;

James Peterson
"Integrity is the Base of Excellence"