[PATCH] Allow py_smb_savefile() to except utf text

David Mulder dmulder at suse.com
Mon Jul 31 13:24:13 UTC 2017

Do you of any instructions in the wiki on how to write a torture test
via python? I can't find any.

On 07/28/2017 04:27 PM, Andrew Bartlett wrote:
> On Fri, 2017-07-28 at 09:04 -0600, David Mulder via samba-technical
> wrote:
>> Hi,
>> 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.
> Any chance of a test?
> This just feels like the kind of thing that we need to be really
> careful to have a test for giving future conversions to python3 where
> the string behaviour changes.
> Thanks,
> Andrew Bartlett

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)

More information about the samba-technical mailing list