[PATCH] Add LoadParm optional parameter for Py_Credentials class constructor

Kamen Mazdrashki kamenim at samba.org
Tue Feb 1 03:48:25 MST 2011


On Thu, Jan 27, 2011 at 10:09, Andrew Bartlett <abartlet at samba.org> wrote:
> On Wed, 2011-01-26 at 22:04 +0200, Kamen Mazdrashki wrote:
>> Hi Jelmer,
>>
>> Could you please take a look at following branch:
>> http://git.samba.org/?p=kamenim/samba.git;a=shortlog;h=refs/heads/py-review
>>
>> It is test to exploit a segfault when Py_Credentials object is used without
>> initializing 'domain' and 'workstation' members.
>>
>> After a short discussion with abartlet, he prefers the fix to be
>> implemented in python layer via adding LoadParm parameter
>> for Credentials constructor.
>> This way Py_Credentials instances will get the chance to
>> call cli_credentials_guess() during construction to try to populate
>> cli_credentials structure fields.
>> Basically, most common pattern was:
>>   creds = Credentials()
>>   creds.guess(lp)
>> which now turns into just:
>>   creds = Credentials(lp)
>
> This looks good to me.  Perhaps just put the segfault test at the end of
> the patch stream?
>
Thanks Andrew!
I've moved segfault test at the of the patch -
http://git.samba.org/?p=kamenim/samba.git;a=shortlog;h=refs/heads/py-review
I am waiting for a review from Jelmer in order to push it.

-- 
CU,
Kamen


More information about the samba-technical mailing list