Make sure we claim that a DACL or SACL is present if the SD says so
[amitay/samba.git] / source3 / libsmb / clisecdesc.c
index aef3432009ec4c4468cecc06ee91860172466a3a..04f661cc8207695dd3c4bfa2ee893ffb694604d8 100644 (file)
@@ -92,9 +92,9 @@ NTSTATUS cli_set_secdesc(struct cli_state *cli, uint16_t fnum,
 
        SIVAL(param, 0, fnum);
 
-       if (sd->dacl)
+       if (sd->dacl || (sd->type & SEC_DESC_DACL_PRESENT))
                sec_info |= SECINFO_DACL;
-       if (sd->sacl)
+       if (sd->sacl || (sd->type & SEC_DESC_SACL_PRESENT))
                sec_info |= SECINFO_SACL;
        if (sd->owner_sid)
                sec_info |= SECINFO_OWNER;