s3:rpc_server: create binding_handle in rpc_pipe_open_external()
authorStefan Metzmacher <metze@samba.org>
Wed, 9 Feb 2011 05:56:25 +0000 (06:56 +0100)
committerVolker Lendecke <vlendec@samba.org>
Wed, 9 Feb 2011 11:30:50 +0000 (12:30 +0100)
metze

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Feb  9 12:30:50 CET 2011 on sn-devel-104

source3/rpc_server/rpc_ncacn_np.c

index 896a53dcc00b090b603f228bdf739475c5372915..af21ec2aad236d512ebf17ee1faa2a1c942d1e52 100644 (file)
@@ -762,6 +762,13 @@ static NTSTATUS rpc_pipe_open_external(TALLOC_CTX *mem_ctx,
                goto done;
        }
 
+       result->binding_handle = rpccli_bh_create(result);
+       if (result->binding_handle == NULL) {
+               status = NT_STATUS_NO_MEMORY;
+               DEBUG(0, ("Failed to create binding handle.\n"));
+               goto done;
+       }
+
        result->auth = talloc_zero(result, struct pipe_auth_data);
        if (!result->auth) {
                status = NT_STATUS_NO_MEMORY;
@@ -778,9 +785,10 @@ static NTSTATUS rpc_pipe_open_external(TALLOC_CTX *mem_ctx,
 
        status = rpc_pipe_bind(result, auth);
        if (!NT_STATUS_IS_OK(status)) {
-               DEBUG(0, ("Failed to bind spoolss pipe.\n"));
+               DEBUG(0, ("Failed to bind external pipe.\n"));
                goto done;
        }
+
 done:
        if (!NT_STATUS_IS_OK(status)) {
                TALLOC_FREE(result);