summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-20 11:04:31 +0200
committerVolker Lendecke <vl@samba.org>2008-07-20 17:37:11 +0200
commit1335da2a7cc639310e5d389e8e8dbe67c4e7ca25 (patch)
treeccc12b50a8eb04039345c082168c9cc823696b05 /source3/winbindd
parent18fb7e09776e26dacfa2329607f8a20699ad2969 (diff)
downloadsamba-1335da2a7cc639310e5d389e8e8dbe67c4e7ca25.tar.gz
samba-1335da2a7cc639310e5d389e8e8dbe67c4e7ca25.tar.bz2
samba-1335da2a7cc639310e5d389e8e8dbe67c4e7ca25.zip
Refactoring: Change calling conventions for cli_rpc_pipe_open_noauth
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS (This used to be commit 9abc9dc4dc13bd3e42f98eff64eacf24b51f5779)
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_cm.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 51ef14b708..b7e2f086fc 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1712,10 +1712,11 @@ static void set_dc_type_and_flags_connect( struct winbindd_domain *domain )
DEBUG(5, ("set_dc_type_and_flags_connect: domain %s\n", domain->name ));
- cli = cli_rpc_pipe_open_noauth(domain->conn.cli, PI_DSSETUP,
- &result);
+ result = cli_rpc_pipe_open_noauth(domain->conn.cli,
+ &ndr_table_dssetup.syntax_id,
+ &cli);
- if (cli == NULL) {
+ if (!NT_STATUS_IS_OK(result)) {
DEBUG(5, ("set_dc_type_and_flags_connect: Could not bind to "
"PI_DSSETUP on domain %s: (%s)\n",
domain->name, nt_errstr(result)));
@@ -1759,9 +1760,10 @@ static void set_dc_type_and_flags_connect( struct winbindd_domain *domain )
}
no_dssetup:
- cli = cli_rpc_pipe_open_noauth(domain->conn.cli, PI_LSARPC, &result);
+ result = cli_rpc_pipe_open_noauth(domain->conn.cli,
+ &ndr_table_lsarpc.syntax_id, &cli);
- if (cli == NULL) {
+ if (!NT_STATUS_IS_OK(result)) {
DEBUG(5, ("set_dc_type_and_flags_connect: Could not bind to "
"PI_LSARPC on domain %s: (%s)\n",
domain->name, nt_errstr(result)));
@@ -2031,11 +2033,10 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
anonymous:
/* Finally fall back to anonymous. */
- conn->samr_pipe = cli_rpc_pipe_open_noauth(conn->cli, PI_SAMR,
- &result);
+ result = cli_rpc_pipe_open_noauth(conn->cli, &ndr_table_samr.syntax_id,
+ &conn->samr_pipe);
- if (conn->samr_pipe == NULL) {
- result = NT_STATUS_PIPE_NOT_AVAILABLE;
+ if (!NT_STATUS_IS_OK(result)) {
goto done;
}
@@ -2167,9 +2168,10 @@ NTSTATUS cm_connect_lsa(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
anonymous:
- conn->lsa_pipe = cli_rpc_pipe_open_noauth(conn->cli, PI_LSARPC,
- &result);
- if (conn->lsa_pipe == NULL) {
+ result = cli_rpc_pipe_open_noauth(conn->cli,
+ &ndr_table_lsarpc.syntax_id,
+ &conn->lsa_pipe);
+ if (!NT_STATUS_IS_OK(result)) {
result = NT_STATUS_PIPE_NOT_AVAILABLE;
goto done;
}
@@ -2219,9 +2221,10 @@ NTSTATUS cm_connect_netlogon(struct winbindd_domain *domain,
return NT_STATUS_OK;
}
- netlogon_pipe = cli_rpc_pipe_open_noauth(conn->cli, PI_NETLOGON,
- &result);
- if (netlogon_pipe == NULL) {
+ result = cli_rpc_pipe_open_noauth(conn->cli,
+ &ndr_table_netlogon.syntax_id,
+ &netlogon_pipe);
+ if (!NT_STATUS_IS_OK(result)) {
return result;
}