The branch, master has been updated via f61ee72 pylibsmb: Avoid a segfault if no credentials are passed to libsmb.Conn() from 045c446 BUG 9766: Cache name_to_sid/sid_to_name correctly.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit f61ee7238b8430572fb266521dad3ee000d1f252 Author: Volker Lendecke <v...@samba.org> Date: Tue Apr 9 14:29:11 2013 +0200 pylibsmb: Avoid a segfault if no credentials are passed to libsmb.Conn() Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Richard Sharpe <realrichardsha...@gmail.com> Autobuild-User(master): Richard Sharpe <sha...@samba.org> Autobuild-Date(master): Tue Apr 9 18:30:06 CEST 2013 on sn-devel-104 ----------------------------------------------------------------------- Summary of changes: source3/libsmb/pylibsmb.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libsmb/pylibsmb.c b/source3/libsmb/pylibsmb.c index 4fd5921..2b253f9 100644 --- a/source3/libsmb/pylibsmb.c +++ b/source3/libsmb/pylibsmb.c @@ -406,7 +406,7 @@ static int py_cli_state_init(struct py_cli_state *self, PyObject *args, { NTSTATUS status; char *host, *share; - PyObject *creds; + PyObject *creds = NULL; struct cli_credentials *cli_creds; bool ret; @@ -434,10 +434,10 @@ static int py_cli_state_init(struct py_cli_state *self, PyObject *args, return -1; } - cli_creds = cli_credentials_from_py_object(creds); - if (cli_creds == NULL) { - PyErr_SetString(PyExc_TypeError, "Expected credentials"); - return -1; + if (creds == NULL) { + cli_creds = cli_credentials_init_anon(NULL); + } else { + cli_creds = PyCredentials_AsCliCredentials(creds); } status = cli_full_connection( -- Samba Shared Repository