s3:pylibsmb: Add .loadfile() API to SMB py bindings
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 5 Dec 2018 02:08:09 +0000 (15:08 +1300)
committerTim Beale <timbeale@samba.org>
Mon, 7 Jan 2019 00:23:08 +0000 (01:23 +0100)
commitd7c7d6203ba85785d23481f3926aa6ddb29a7311
tree0cadcf8bd77f8f4bf8ad236130033b11b278fb2b
parent0af78faf5c9424514ba5bc0baa18701c65c884e7
s3:pylibsmb: Add .loadfile() API to SMB py bindings

Add a .loadfile API to read a file's contents. This provides a
convenient way to read a file and is consistent with the existing
source4 API, which is used by things like the GPO python code and the
ntacls backup.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
python/samba/tests/smb.py
source3/libsmb/pylibsmb.c