minor arlad bug in disconnected mode

Nickolai Zeldovich kolya at mit.edu
Sun Mar 25 04:44:02 CEST 2001


In disconnected mode, "fs listacl" will cause arlad to crash in
some cases because the opaque struct isn't initialized and has
stack garbage in it instead..

This patch should fix the problem, although I've not tested it
myself.. (Accidentally triggered the bug when my cell collapsed
and arla went into disconnected mode :-)

-- kolya

Index: fcache.c
===================================================================
RCS file: /stacken-cvs/arla/arlad/fcache.c,v
retrieving revision 1.319
diff -u -r1.319 fcache.c
--- fcache.c	2001/02/19 15:52:42	1.319
+++ fcache.c	2001/03/25 02:21:05
@@ -4131,6 +4131,9 @@
     int ret;
     fs_server_context context;
   
+    opaque->len = 0;
+    opaque->val = NULL;
+
     if (connected_mode != CONNECTED)
 	return EINVAL;
 
@@ -4145,9 +4148,6 @@
     for (conn = find_first_fs (dire, ce, &context);
 	 conn != NULL;
 	 conn = find_next_fs (&context, conn, host_downp (ret))) {
-
-	opaque->len = 0;
-	opaque->val = NULL;
 
 	ret = RXAFS_FetchACL (conn->connection, &fid.fid,
 			      opaque, &status, &volsync);





More information about the Arla-drinkers mailing list