svn commit: samba r8366 - branches/SAMBA_3_0/source/modules
trunk/source/modules
vlendec at samba.org
vlendec at samba.org
Tue Jul 12 09:18:51 GMT 2005
Author: vlendec
Date: 2005-07-12 09:18:50 +0000 (Tue, 12 Jul 2005)
New Revision: 8366
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8366
Log:
Root-level files don't have a slash, but acls need to be settable on
them. Thanks to Brent Trotter for reminding me to commit this :-)
Volker
Modified:
branches/SAMBA_3_0/source/modules/vfs_afsacl.c
trunk/source/modules/vfs_afsacl.c
Changeset:
Modified: branches/SAMBA_3_0/source/modules/vfs_afsacl.c
===================================================================
--- branches/SAMBA_3_0/source/modules/vfs_afsacl.c 2005-07-12 09:09:42 UTC (rev 8365)
+++ branches/SAMBA_3_0/source/modules/vfs_afsacl.c 2005-07-12 09:18:50 UTC (rev 8366)
@@ -891,12 +891,14 @@
pstr_sprintf(name, fsp->fsp_name);
if (!fsp->is_directory) {
+ /* We need to get the name of the directory containing the
+ * file, this is where the AFS acls live */
char *p = strrchr(name, '/');
- if (p == NULL) {
- DEBUG(3, ("No / in file string\n"));
- return False;
+ if (p != NULL) {
+ *p = '\0';
+ } else {
+ pstrcpy(name, ".");
}
- *p = '\0';
}
if (!afs_get_afs_acl(name, &old_afs_acl)) {
Modified: trunk/source/modules/vfs_afsacl.c
===================================================================
--- trunk/source/modules/vfs_afsacl.c 2005-07-12 09:09:42 UTC (rev 8365)
+++ trunk/source/modules/vfs_afsacl.c 2005-07-12 09:18:50 UTC (rev 8366)
@@ -891,12 +891,14 @@
pstr_sprintf(name, fsp->fsp_name);
if (!fsp->is_directory) {
+ /* We need to get the name of the directory containing the
+ * file, this is where the AFS acls live */
char *p = strrchr(name, '/');
- if (p == NULL) {
- DEBUG(3, ("No / in file string\n"));
- return False;
+ if (p != NULL) {
+ *p = '\0';
+ } else {
+ pstrcpy(name, ".");
}
- *p = '\0';
}
if (!afs_get_afs_acl(name, &old_afs_acl)) {
More information about the samba-cvs
mailing list