[PATCH] Allow py_smb_savefile() to except utf text

David Mulder dmulder at suse.com
Fri Jul 28 15:04:15 UTC 2017


This patch allows the smb python bindings to write utf encoded text to a
file. Without this patch, py_smb_savefile() can only write ascii.
Writing ascii to a utf-16 encoded file would leave trailing utf-16 chars
at the end of the file, and trying to pass utf-16 to the savefile
function would throw an exception.

Andrew and Garming,

This is related to the GPO patches. This is needed in order to write to
files in sysvol (since GptTmpl.inf, for example, is utf-16 encoded).
I've written a tool for modifying GPO policies. Please review.


David Mulder
SUSE Labs Software Engineer - Samba
dmulder at suse.com
SUSE Linux GmbH, GF: Felix Imend├Ârffer, Jane Smithard, Graham Norton, HRB 21284 (AG N├╝rnberg)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-py_smb_savefile-to-except-utf-text.patch
Type: text/x-patch
Size: 1429 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20170728/6c426bf4/0001-Allow-py_smb_savefile-to-except-utf-text.bin>

More information about the samba-technical mailing list