Don't try and delete a default ACL from a file.
authorGünter Kukkukk <linux@kukkukk.com>
Fri, 6 Feb 2009 02:57:41 +0000 (18:57 -0800)
committerJeremy Allison <jra@samba.org>
Fri, 6 Feb 2009 02:57:41 +0000 (18:57 -0800)
source3/smbd/posix_acls.c

index 7ea6e39fcbeca27cb997fa4d56e1dcafadcaf24e..e9b581efe82a44e67e3bfb86886f44fd9f2ffbe8 100644 (file)
@@ -4209,10 +4209,14 @@ bool set_unix_posix_default_acl(connection_struct *conn, const char *fname, SMB_
 {
        SMB_ACL_T def_acl = NULL;
 
-       if (num_def_acls && !S_ISDIR(psbuf->st_mode)) {
-               DEBUG(5,("set_unix_posix_default_acl: Can't set default ACL on non-directory file %s\n", fname ));
-               errno = EISDIR;
-               return False;
+       if (!S_ISDIR(psbuf->st_mode)) {
+               if (num_def_acls) {
+                       DEBUG(5,("set_unix_posix_default_acl: Can't set default ACL on non-directory file %s\n", fname ));
+                       errno = EISDIR;
+                       return False;
+               } else {
+                       return True;
+               }
        }
 
        if (!num_def_acls) {