[PATCH] Fix Segfault when using Credentials object without uninitialized domain/workstation parts
Andrew Bartlett
abartlet at samba.org
Wed Jan 5 18:40:28 MST 2011
On Thu, 2011-01-06 at 03:17 +0200, Kamen Mazdrashki wrote:
> Hi Andrew,
>
> Recently I saw someone having troubles using Py Credentials object.
> It segfaults if you construct a Credentials object without calling
> Credentials.guess
> method, but just set username/password.
> I've hit same issue recently.
>
> Actually the problem is with 'msrpc_gen' which tries to serialize a NULL pointer
> (such NULL pointers are cli_credentials.domain and cli_credentials.workstation
> if their are not explicitly set and cli_credentials_guess is not called)
>
> I think attached patch should fix this problem I am just not sure if I fixed it
> on the right spot.
> Oups, the patch is not attached but is at this address:
> http://git.samba.org/?p=kamenim/samba.git;a=shortlog;h=refs/heads/py-review
No, I don't think this is the right approach. The caller must supply a
initialised credentials structure.
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Cisco Inc.
More information about the samba-technical
mailing list