[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-2586-gb243a03

Günther Deschner gd at samba.org
Fri May 23 23:30:35 GMT 2008


The branch, v3-3-test has been updated
       via  b243a036026e79b8d3fb75bf7f7d59a27cb813af (commit)
      from  bd13c87bac54d4bbae7b3cd7c9dc991d143d4d89 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test


- Log -----------------------------------------------------------------
commit b243a036026e79b8d3fb75bf7f7d59a27cb813af
Author: Günther Deschner <gd at samba.org>
Date:   Sat May 24 01:29:13 2008 +0200

    drsuapi: always use tcp for drsuapi.
    
    cli_rpc_pipe_open() now uses tcp transport for drsuapi and named pipe
    transport for all other pipes.
    
    This finally allows rpcclient to call dscracknames on windows
    (don't forget to call "seal" in advance).
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/rpc_client/cli_pipe.c |   38 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/rpc_client/cli_pipe.c b/source/rpc_client/cli_pipe.c
index 8f41037..cec2797 100644
--- a/source/rpc_client/cli_pipe.c
+++ b/source/rpc_client/cli_pipe.c
@@ -2796,7 +2796,7 @@ NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
  * 
  ****************************************************************************/
 
-static struct rpc_pipe_client *cli_rpc_pipe_open(struct cli_state *cli, int pipe_idx, NTSTATUS *perr)
+static struct rpc_pipe_client *rpc_pipe_open_np(struct cli_state *cli, int pipe_idx, NTSTATUS *perr)
 {
 	struct rpc_pipe_client *result;
 	int fnum;
@@ -2849,7 +2849,7 @@ static struct rpc_pipe_client *cli_rpc_pipe_open(struct cli_state *cli, int pipe
 	fnum = cli_nt_create(cli, result->trans.np.pipe_name,
 			     DESIRED_ACCESS_PIPE);
 	if (fnum == -1) {
-		DEBUG(1,("cli_rpc_pipe_open: cli_nt_create failed on pipe %s "
+		DEBUG(1,("rpc_pipe_open_np: cli_nt_create failed on pipe %s "
 			 "to machine %s.  Error was %s\n",
 			 result->trans.np.pipe_name, cli->desthost,
 			 cli_errstr(cli)));
@@ -2869,6 +2869,40 @@ static struct rpc_pipe_client *cli_rpc_pipe_open(struct cli_state *cli, int pipe
 }
 
 /****************************************************************************
+ Open a pipe to a remote server.
+ ****************************************************************************/
+
+static struct rpc_pipe_client *cli_rpc_pipe_open(struct cli_state *cli,
+						 int pipe_idx,
+						 NTSTATUS *perr)
+{
+	struct rpc_pipe_client *result;
+
+	*perr = NT_STATUS_PIPE_NOT_AVAILABLE;
+
+	switch (pipe_idx) {
+		case PI_DRSUAPI:
+			*perr = rpc_pipe_open_tcp(NULL, cli->desthost,
+						  &ndr_table_drsuapi.syntax_id,
+						  &result);
+			if (!NT_STATUS_IS_OK(*perr)) {
+				return NULL;
+			}
+			break;
+		default:
+			result = rpc_pipe_open_np(cli, pipe_idx, perr);
+			if (result == NULL) {
+				return NULL;
+			}
+			break;
+	}
+
+	*perr = NT_STATUS_OK;
+
+	return result;
+}
+
+/****************************************************************************
  Open a named pipe to an SMB server and bind anonymously.
  ****************************************************************************/
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list