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

Jelmer Vernooij jelmer at samba.org
Thu Jan 6 03:01:11 MST 2011


On Thu, 2011-01-06 at 10:21 +0100, Stefan (metze) Metzmacher wrote:
> > 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.
Can we perhaps just have some magic to make git bisect look at the
autobuild headers rather than individual commits?

Given the model we're using with rebase, I think it's a bad idea to
require every commit (not just every autobuild-tagged commit) to build
and pass the testsuite. 

Committing the fix before the test also makes TDD really painful.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20110106/29f5df2d/attachment.pgp>


More information about the samba-technical mailing list