summaryrefslogtreecommitdiff
path: root/source3
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
commitcfda53db8b22c7afbfae848506258f13ead041bf (patch)
tree91fe36022814c5763b39113ebc6206b01939c100 /source3
parentb4da56ce8d4bd0be8a234de0e8b5120054be0a80 (diff)
downloadsamba-cfda53db8b22c7afbfae848506258f13ead041bf.tar.gz
samba-cfda53db8b22c7afbfae848506258f13ead041bf.tar.bz2
samba-cfda53db8b22c7afbfae848506258f13ead041bf.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 (This used to be commit dfa9eef7b6892ceb0e67b0c4bfb56431ead1ac3d)
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/vfs_afsacl.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c
index 731ddfa583..0e2e1295b9 100644
--- a/source3/modules/vfs_afsacl.c
+++ b/source3/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)) {