diff options
author | Jeremy Allison <jra@samba.org> | 2006-02-28 15:58:09 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:10:52 -0500 |
commit | b532e866446803aaafa0f68340d0a868870d9dfc (patch) | |
tree | ede1f774f204561f20f027d99757a0806a747083 /source3 | |
parent | a8325d28d21f8a11454ea8e3392bc73824c14902 (diff) | |
download | samba-b532e866446803aaafa0f68340d0a868870d9dfc.tar.gz samba-b532e866446803aaafa0f68340d0a868870d9dfc.tar.bz2 samba-b532e866446803aaafa0f68340d0a868870d9dfc.zip |
r13759: As pointed out by Volker, it isn't much good creating
a new empty acl in remove_posix_acl if you don't bother
to set it on the file in question :-).
Jeremy.
(This used to be commit 12eccc8fe4ed043698970de42921757eb0448c84)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/posix_acls.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index d4801d1743..9e513580c3 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -3834,6 +3834,21 @@ static BOOL remove_posix_acl(connection_struct *conn, files_struct *fsp, const c } } + /* Set the new empty file ACL. */ + if (fsp && fsp->fh->fd != -1) { + if (SMB_VFS_SYS_ACL_SET_FD(fsp, fsp->fh->fd, new_file_acl) == -1) { + DEBUG(5,("remove_posix_acl: acl_set_file failed on %s (%s)\n", + fname, strerror(errno) )); + goto done; + } + } else { + if (SMB_VFS_SYS_ACL_SET_FILE(conn, fname, SMB_ACL_TYPE_ACCESS, new_file_acl) == -1) { + DEBUG(5,("remove_posix_acl: acl_set_file failed on %s (%s)\n", + fname, strerror(errno) )); + goto done; + } + } + ret = True; done: |