Fwd: Re: [PATCH] Allow py_smb_savefile() to except utf text

David Mulder dmulder at suse.com
Wed Aug 23 19:05:54 UTC 2017


-------- Forwarded Message --------
Subject: 	Re: [PATCH] Allow py_smb_savefile() to except utf text
Date: 	Wed, 23 Aug 2017 13:04:10 -0600
From: 	David Mulder <dmulder at suse.com>
To: 	Andrew Bartlett <abartlet at samba.org>



Here is that same patch, but with testing added. Please review and push.

Thanks!


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)


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


More information about the samba-technical mailing list