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

Kamen Mazdrashki kamenim at samba.org
Wed Jan 5 18:17:14 MST 2011


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

-- 
CU,
Kamen Mazdrashki


More information about the samba-technical mailing list