1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

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 commit is contained in:
Volker Lendecke 2005-07-12 09:18:50 +00:00 committed by Gerald (Jerry) Carter
parent 2d2c49518b
commit dfa9eef7b6

View File

@ -891,12 +891,14 @@ static BOOL afs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
pstr_sprintf(name, fsp->fsp_name); pstr_sprintf(name, fsp->fsp_name);
if (!fsp->is_directory) { 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, '/'); char *p = strrchr(name, '/');
if (p == NULL) { if (p != NULL) {
DEBUG(3, ("No / in file string\n")); *p = '\0';
return False; } else {
pstrcpy(name, ".");
} }
*p = '\0';
} }
if (!afs_get_afs_acl(name, &old_afs_acl)) { if (!afs_get_afs_acl(name, &old_afs_acl)) {