Fix bug #6876 - Delete of an object whose parent folder does not have delete rights...
[ira/wip.git] / source3 / smbd / posix_acls.c
index 8d66bf105948c3b8207f4b5a3d9e4edb404b9e6c..7342420a8998c3a7a64b5239926e225be18b451b 100644 (file)
@@ -1107,9 +1107,10 @@ uint32_t map_canon_ace_perms(int snum,
                        nt_mask |= ((perms & S_IWUSR) ? UNIX_ACCESS_W : 0 );
                        nt_mask |= ((perms & S_IXUSR) ? UNIX_ACCESS_X : 0 );
                }
-               if ((perms & S_IWUSR) && lp_dos_filemode(snum)) {
-                       nt_mask |= (SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER);
-               }
+       }
+
+       if ((perms & S_IWUSR) && lp_dos_filemode(snum)) {
+               nt_mask |= (SEC_STD_WRITE_DAC|SEC_STD_WRITE_OWNER|DELETE_ACCESS);
        }
 
        DEBUG(10,("map_canon_ace_perms: Mapped (UNIX) %x to (NT) %x\n",