[RFC] Advice on SMB client python bindings?

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Dec 3 07:23:13 UTC 2018

On Mon, Dec 03, 2018 at 04:03:09PM +1300, Tim Beale via samba-technical wrote:
> Hi Metze,
> OK, just to re-cap, would you be happy with the following?
> - I add an optional async=True|False parameter to
> libsmb_samba_internal.Conn(). Default to async=False. This changes the
> py_cli_state_init() behaviour (mostly around self->oplock_waiter).
> - Where possible/simple, we use the async libsmb APIs so they work in
> either case.
> - Where that's not so simple, we just use the synchronous API, i.e. more
> work would be needed in future if we ever wanted to support that API in
> the async=True case.
> A bunch of the libsmb APIs (cli_unlink(), cli_rmdir(), cli_mkdir(),
> cli_chkpath(), cli_query_security_descriptor()) seem to do the
> SMBv1/SMBv2 check in the synchronous API rather than the asynchronous
> API. And it looks to me like trying to add SMBv2 support to the async
> API would not be trivial.

Usually (at least to me) conversion is pretty easy, because the
underlying smbXcli abstraction does async calls. See for example the
recent conversion of cli_notify. That was not purely boilerplate, but
far from rocket science.


Besuchen Sie die verinice.XP 2019 in Berlin!
Anwenderkonferenz für Informationssicherheit
26.-28. Februar 2019 - im Hotel Radisson Blu
Info & Anmeldung hier: http://veriniceXP.org

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba-technical mailing list