[PATCH] Fix Segfault when using Credentials object without uninitialized domain/workstation parts

Stefan (metze) Metzmacher metze at samba.org
Thu Jan 6 02:21:59 MST 2011


Hi Kamen,

> 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

I haven't looked at the code, but please commit the fix before the test,
so that git bisect doesn't hit the segfault.

metze

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110106/d8c70f81/attachment.pgp>


More information about the samba-technical mailing list