more patches: arlad/messages.c, fs.c
Nickolai Zeldovich
kolya at mit.edu
Sun Dec 31 07:44:46 CET 2000
Looks like I've ran into another arlad bug tonight -- in viocgetacl,
the opaque struct is never initialized, and thus contains random
stack garbage. If the getacl call fails, opaque is passed without
initialization to xfs_send_message_wakeup_data() which tries to
memcpy from it..
The second patch makes fs behave more like the Transarc fs, in that
it will not stop doing listacl if it encounters EACCES.
(In my case, I crashed arlad by doing something like:
% cd ~; mkdir foo bar baz
% fs sa foo system:anyuser rl
% fs sa bar system:anyuser none
% fs sa baz system:anyuser none
% fs la foo bar baz ; fs la baz
)
-- kolya
--- arlad/messages.c 2000/10/14 23:30:59 1.230
+++ arlad/messages.c 2000/12/31 06:37:49
@@ -1944,6 +1944,11 @@
CredCacheEntry *ce;
int error;
+ /* Make sure xfs_send_message_wakeup_data doesn't try to copy data
+ * from opaque unless something actually writes to it.
+ */
+ opaque.len = 0;
+
if (!h->handle.a && !h->handle.b && !h->handle.c && !h->handle.d)
return xfs_send_message_wakeup (fd, h->header.sequence_num, EINVAL);
--- appl/fs/fs.c 2000/10/03 00:07:34 1.88
+++ appl/fs/fs.c 2000/12/31 06:37:51
@@ -1451,8 +1452,12 @@
struct AclEntry *position;
int i;
- if((acl=afs_getacl(path))==NULL)
- exit(1);
+ if((acl=afs_getacl(path))==NULL) {
+ if (errno == EACCES)
+ return;
+ else
+ exit(1);
+ }
printf("Access list for %s is\n", path);
if(acl->NumPositiveEntries) {
More information about the Arla-drinkers
mailing list