Web lists-archives.com

[Samba] sysvolreset optimization




Hello

I'm trying to improve the performance of "samba-tool ntacl sysvolreset" on samba.
Indeed I have a lot of gpo and over 10 000 files in the sysvol.

After some diagnosis I found why the "samba-tool ntacl sysvolreset" is slow.
The problem is in samba/ntacls.py in the setntacl function, the call to smbd.set_nt_ac is too slow.

I would like to make sure that in the setntacl function, the call to smbd.set_nt_acl is done only if rights need to be reset, so to save time.

I would like to do something like this at the end of the function:

if getntacl (lp, file, None, None, direct_db_access = False, service = None) .as_sddl(sid) == sd.as_sddl(sid):
    return


But I can not get getntacl to work correctly in the ntacls.py file

Do you think my suggested method could work ?

Simon


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba