[PATCH] Add LoadParm optional parameter for Py_Credentials class constructor
jelmer at samba.org
Mon Feb 7 10:31:02 MST 2011
On Wed, 2011-01-26 at 22:04 +0200, Kamen Mazdrashki wrote:
> Could you please take a look at following branch:
> 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()
> which now turns into just:
> creds = Credentials(lp)
In particular since we have a global loadparm again, I don't like to
make more things dependent on loadparm. It makes it hard to do proper
testing with alternative settings, and it makes it hard to write
isolated code that's not accidentally influenced by the outside
Is there any reason we can't simply initialize the domain and
workstation members ?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: This is a digitally signed message part
More information about the samba-technical