[Samba] sysvolreset optimization

Garming Sam garming at catalyst.net.nz
Thu Jun 27 03:06:10 UTC 2019


Hi Simon,

I was wondering where you were at with this change. The idea is good,
but to upstream, I think we need to make sure it's still possible to
perform the original behaviour with an option like, --force. The other
possible change to sysvolreset I think was suggested was to take a
subdirectory argument and to only recurse from there. That could be
separate though.

Normally, developer discussion like this appears on the samba-technical
mailing list (which I've now cc'd), but lots of it has also moved to
Gitlab merge requests. I should have just added you to the CI repo, so
you can run the tests that way (and maybe create a pull request).

https://wiki.samba.org/index.php/Samba_CI_on_gitlab

If you have any other questions, just ask.

Cheers,

Garming

On 24/05/19 9:25 PM, Simon FONTENEAU via samba wrote:
> 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-technical mailing list