r13759: As pointed out by Volker, it isn't much good creating
authorJeremy Allison <jra@samba.org>
Tue, 28 Feb 2006 15:58:09 +0000 (15:58 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:10:52 +0000 (11:10 -0500)
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)

source3/smbd/posix_acls.c

index d4801d1743b0cc05c35f514f2a2731762ec09379..9e513580c3e499a0a030ffc243c01be8b233906b 100644 (file)
@@ -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: