summaryrefslogtreecommitdiff
path: root/source3/python
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-05-28 03:15:09 +0000
committerTim Potter <tpot@samba.org>2002-05-28 03:15:09 +0000
commitd80f078647c62b6d8e66a717ba67e36cc1107f4b (patch)
tree2ec6b0011c2402b0c483f606905f9bf6ac24bb00 /source3/python
parent6aaaa165b7135a845f9fe66c4bc4fe5742d3c7e7 (diff)
downloadsamba-d80f078647c62b6d8e66a717ba67e36cc1107f4b.tar.gz
samba-d80f078647c62b6d8e66a717ba67e36cc1107f4b.tar.bz2
samba-d80f078647c62b6d8e66a717ba67e36cc1107f4b.zip
Separate error handling for cli_full_connection() and cli_nt_session_open()
(This used to be commit 6f269de03e91b823a30a2a12e41f25f1fa050870)
Diffstat (limited to 'source3/python')
-rw-r--r--source3/python/py_common.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/python/py_common.c b/source3/python/py_common.c
index d81e141e9c..eb36fc552c 100644
--- a/source3/python/py_common.c
+++ b/source3/python/py_common.c
@@ -183,10 +183,15 @@ struct cli_state *open_pipe_creds(char *server, PyObject *creds,
&cli, global_myname, server, &server_ip, 0, "IPC$", "IPC",
username, domain, password, strlen(password));
- if (!NT_STATUS_IS_OK(result) || !cli_nt_session_open(cli, pipe_name)) {
+ if (!NT_STATUS_IS_OK(result)) {
+ *errstr = strdup("error connecting to IPC$ pipe");
+ return NULL;
+ }
+
+ if (!cli_nt_session_open(cli, pipe_name)) {
cli_shutdown(cli);
free(cli);
- *errstr = strdup("pipe not available");
+ asprintf(errstr, "error opening %s", pipe_name);
return NULL;
}