From: Jeffrey Altman Date: Sun, 9 May 2010 14:50:07 +0000 (-0400) Subject: Windows: Freelance vs ACLs X-Git-Tag: openafs-devel-1_5_75~293 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=63ed515374bb0f7fea9436a7346382d65c6efa6f;p=packages%2Fo%2Fopenafs.git Windows: Freelance vs ACLs If the user attempts to list acls or set acls on the freelance root.afs volume, generate a meaningful error. Change-Id: I6e5b147bf0cdd98ec0224a723098f5bbcb37b1e1 Reviewed-on: http://gerrit.openafs.org/1931 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/fs.c b/src/WINNT/afsd/fs.c index d1f437d19..d56c36372 100644 --- a/src/WINNT/afsd/fs.c +++ b/src/WINNT/afsd/fs.c @@ -1007,6 +1007,11 @@ SetACLCmd(struct cmd_syndesc *as, void *arock) clear = 0; plusp = !(as->parms[3].items); for(ti=as->parms[0].items; ti;ti=ti->next) { + if ( IsFreelanceRoot(ti->data) ) { + fprintf(stderr,"%s: ACLs cannot be set on the Freelance root.afs volume.\n", pn); + error = 1; + continue; + } blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; @@ -1449,7 +1454,14 @@ ListACLCmd(struct cmd_syndesc *as, void *arock) SetDotDefault(&as->parms[0].items); for(ti=as->parms[0].items; ti; ti=ti->next) { char separator; - blob.out_size = AFS_PIOCTL_MAXSIZE; + + if ( IsFreelanceRoot(ti->data) ) { + fprintf(stderr,"%s: ACLs are not set on the Freelance root.afs volume.\n", pn); + error = 1; + continue; + } + + blob.out_size = AFS_PIOCTL_MAXSIZE; blob.in_size = idf; blob.in = blob.out = space; code = pioctl_utf8(ti->data, VIOCGETAL, &blob, 1); @@ -2309,7 +2321,7 @@ MakeMountCmd(struct cmd_syndesc *as, void *arock) } if ( IsFreelanceRoot(parent) ) { if ( !IsAdmin() ) { - fprintf(stderr,"%s: Only AFS Client Administrators may alter the root.afs volume\n", pn); + fprintf(stderr,"%s: Only AFS Client Administrators may alter the Freelance root.afs volume\n", pn); return 1; } @@ -2486,7 +2498,7 @@ RemoveMountCmd(struct cmd_syndesc *as, void *arock) { } if ( IsFreelanceRoot(tbuffer) && !IsAdmin() ) { - fprintf(stderr,"%s: Only AFS Client Administrators may alter the root.afs volume\n", pn); + fprintf(stderr,"%s: Only AFS Client Administrators may alter the Freelance root.afs volume\n", pn); error = 1; continue; /* skip */ }