[Samba] sysvolreset optimization
Simon FONTENEAU
sfonteneau at tranquil.it
Fri May 24 09:25:38 UTC 2019
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
More information about the samba
mailing list