summaryrefslogtreecommitdiffstats
path: root/source/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-07-12 09:18:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:58:20 -0500
commitdfa9eef7b6892ceb0e67b0c4bfb56431ead1ac3d (patch)
tree6f5413644783bf58a2c695a7516d9224443f4b64 /source/modules
parent2d2c49518b7de63ebab2d52008eb726bde6681bc (diff)
downloadsamba-dfa9eef7b6892ceb0e67b0c4bfb56431ead1ac3d.tar.gz
samba-dfa9eef7b6892ceb0e67b0c4bfb56431ead1ac3d.tar.xz
samba-dfa9eef7b6892ceb0e67b0c4bfb56431ead1ac3d.zip
r8366: 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
Diffstat (limited to 'source/modules')
-rw-r--r--source/modules/vfs_afsacl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/modules/vfs_afsacl.c b/source/modules/vfs_afsacl.c
index 731ddfa5836..0e2e1295b9f 100644
--- a/source/modules/vfs_afsacl.c
+++ b/source/modules/vfs_afsacl.c
@@ -891,12 +891,14 @@ static BOOL afs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
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)) {