samba-cvs.cvs
[Top] [All Lists]

[SCM] Samba Shared Repository - branch master updated

Subject: [SCM] Samba Shared Repository - branch master updated
From: Stefan Metzmacher
Date: Mon, 1 Mar 2010 09:12:27 -0600 CST
The branch, master has been updated
       via  719cecb... s4:RPC-NETLOGON: remove useless rpc callback
       via  22b1e0b... s4:RPC-ECHO: don't look at the internals of 'struct 
rpc_request'
       via  56b9700... s4:libnet_become_dc: don't look at the internals of 
'struct rpc_request'
       via  0547af2... s4:drepl_out_helpers: don't look at the internals of 
'struct rpc_request'
       via  1955cde... s4:drepl_notify: don't look at the internals of 'struct 
rpc_request'
       via  8ba2128... s4:librpc/rpc: make use of explicit dcerpc_*_recv 
functions
       via  c84b4b2... s4:torture/rpc: make use of explicit dcerpc_*_recv 
functions
       via  598cf9f... s4:winbind: make use of explicit dcerpc_*_recv functions
       via  c4e72ad... s4:dsdb/repl: make use of explicit dcerpc_*_recv 
functions
       via  f995e59... s4:libnet: make use of explicit dcerpc_*_recv functions
       via  5d33c6d... s4:libnet_become_dc: make use of explicit dcerpc_*_recv 
functions
       via  20980eb... pidl:NDR/Client.pm: generate explicit _recv functions
      from  1a64d3c... s4-smbtorture: add stricter SetPrinterDataEx tests to 
spoolss tests.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 719cecba848b3e446ea3bc06f14cf90e9cddab9e
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 10:02:40 2010 +0100

    s4:RPC-NETLOGON: remove useless rpc callback
    
    If we got a failure from one request we bail out early.
    
    metze

commit 22b1e0bf324113db12e40567cc1cb9d645049681
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 10:01:50 2010 +0100

    s4:RPC-ECHO: don't look at the internals of 'struct rpc_request'
    
    metze

commit 56b97000bd7842d3b861656880b68ad333594d71
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 10:00:42 2010 +0100

    s4:libnet_become_dc: don't look at the internals of 'struct rpc_request'
    
    metze

commit 0547af244a46e5647eb7dfc9b4a92924d15ab15d
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 09:46:30 2010 +0100

    s4:drepl_out_helpers: don't look at the internals of 'struct rpc_request'
    
    metze

commit 1955cde46c33409da85617dfe058a9a965e4b4f7
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 09:43:21 2010 +0100

    s4:drepl_notify: don't look at the internals of 'struct rpc_request'
    
    metze

commit 8ba2128e1e4b242bba582b4c8b419c3dc5cd4016
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 10:59:14 2010 +0100

    s4:librpc/rpc: make use of explicit dcerpc_*_recv functions
    
    metze

commit c84b4b23c8b7f7c32ce0a17b5dfb526dbda66f6a
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 10:59:14 2010 +0100

    s4:torture/rpc: make use of explicit dcerpc_*_recv functions
    
    metze

commit 598cf9f5097aafac95c9e9b420b849ad6090c30e
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 10:59:14 2010 +0100

    s4:winbind: make use of explicit dcerpc_*_recv functions
    
    metze

commit c4e72add67c05ce502e448a49094a3e3006d6384
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 10:59:14 2010 +0100

    s4:dsdb/repl: make use of explicit dcerpc_*_recv functions
    
    metze

commit f995e596bbc0e1b44335b10bf23458ac7328188b
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 10:59:14 2010 +0100

    s4:libnet: make use of explicit dcerpc_*_recv functions
    
    metze

commit 5d33c6d4f9719e36a3ed0f6b54c4365324ff352c
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Mon Mar 1 13:56:01 2010 +0100

    s4:libnet_become_dc: make use of explicit dcerpc_*_recv functions
    
    metze

commit 20980eb7870cf3478d9e8e78fb412c5bd299cca5
Author: Stefan Metzmacher <metze@xxxxxxxxx>
Date:   Sat Feb 27 10:34:04 2010 +0100

    pidl:NDR/Client.pm: generate explicit _recv functions
    
    metze

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

Summary of changes:
 pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm |   32 +++++++++
 source4/dsdb/repl/drepl_notify.c         |   12 +++-
 source4/dsdb/repl/drepl_out_helpers.c    |   21 +++++--
 source4/libnet/groupinfo.c               |    8 +-
 source4/libnet/groupman.c                |    8 +-
 source4/libnet/libnet_become_dc.c        |  108 ++++++++---------------------
 source4/libnet/libnet_domain.c           |   20 +++---
 source4/libnet/libnet_group.c            |    5 +-
 source4/libnet/libnet_lookup.c           |    2 +-
 source4/libnet/libnet_rpc.c              |    6 +-
 source4/libnet/libnet_unbecome_dc.c      |    4 +-
 source4/libnet/libnet_user.c             |    4 +-
 source4/libnet/userinfo.c                |    8 +-
 source4/libnet/userman.c                 |   16 ++--
 source4/librpc/rpc/dcerpc_schannel.c     |    4 +-
 source4/librpc/rpc/dcerpc_util.c         |    2 +-
 source4/torture/rpc/echo.c               |   24 +++++--
 source4/torture/rpc/lsa.c                |    2 +-
 source4/torture/rpc/netlogon.c           |   21 +-----
 source4/torture/rpc/samr.c               |    2 +-
 source4/torture/rpc/schannel.c           |    2 +-
 source4/winbind/wb_async_helpers.c       |   10 ++--
 source4/winbind/wb_cmd_getdcname.c       |    2 +-
 source4/winbind/wb_cmd_list_trustdom.c   |    2 +-
 source4/winbind/wb_cmd_usersids.c        |    2 +-
 source4/winbind/wb_connect_lsa.c         |    2 +-
 source4/winbind/wb_connect_sam.c         |    4 +-
 source4/winbind/wb_dom_info_trusted.c    |    6 +-
 source4/winbind/wb_init_domain.c         |    4 +-
 source4/winbind/wb_sam_logon.c           |    2 +-
 30 files changed, 170 insertions(+), 175 deletions(-)


Changeset truncated at 500 lines:

diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm 
b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
index 9d3ccaf..958f215 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
@@ -43,6 +43,37 @@ sub ParseFunctionSend($$$)
        $res .= "}\n\n";
 }
 
+sub ParseFunctionRecv($$$)
+{
+       my ($interface, $fn, $name) = @_;
+       my $uname = uc $name;
+
+       my $proto = "NTSTATUS dcerpc_$name\_recv(struct rpc_request *rreq)";
+
+       $res_hdr .= "\n$proto;\n";
+
+       $res .= "$proto\n{\n";
+
+       if (has_property($fn, "todo")) {
+               $res .= "\treturn NT_STATUS_NOT_IMPLEMENTED;\n";
+       } else {
+               $res .= "NTSTATUS status;
+       struct dcerpc_pipe *p = rreq->p;
+       struct $name *r = (struct $name *)rreq->ndr.struct_ptr;
+
+       status = dcerpc_ndr_request_recv(rreq);
+
+       if (NT_STATUS_IS_OK(status) && (p->conn->flags & 
DCERPC_DEBUG_PRINT_OUT)) {
+               NDR_PRINT_OUT_DEBUG($name, r);
+       }
+
+       return status;
+";
+       }
+
+       $res .= "}\n\n";
+}
+
 sub ParseFunctionSync($$$)
 {
        my ($interface, $fn, $name) = @_;
@@ -90,6 +121,7 @@ sub ParseFunction($$)
        my ($interface, $fn) = @_;
 
        ParseFunctionSend($interface, $fn, $fn->{NAME});
+       ParseFunctionRecv($interface, $fn, $fn->{NAME});
        ParseFunctionSync($interface, $fn, $fn->{NAME});
 }
 
diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c
index eecb444..c3ca5ed 100644
--- a/source4/dsdb/repl/drepl_notify.c
+++ b/source4/dsdb/repl/drepl_notify.c
@@ -39,6 +39,7 @@
 
 struct dreplsrv_op_notify_state {
        struct dreplsrv_notify_operation *op;
+       void *ndr_struct_ptr;
 };
 
 static void dreplsrv_op_notify_connect_done(struct tevent_req *subreq);
@@ -122,6 +123,8 @@ static void dreplsrv_op_notify_replica_sync_trigger(struct 
tevent_req *req)
                r->in.req->req1.options |= DRSUAPI_DRS_SYNC_URGENT;
        }
 
+       state->ndr_struct_ptr = r;
+
        rreq = dcerpc_drsuapi_DsReplicaSync_send(drsuapi->pipe, r, r);
        if (tevent_req_nomem(rreq, req)) {
                return;
@@ -133,11 +136,16 @@ static void dreplsrv_op_notify_replica_sync_done(struct 
rpc_request *rreq)
 {
        struct tevent_req *req = talloc_get_type(rreq->async.private_data,
                                                 struct tevent_req);
-       struct drsuapi_DsReplicaSync *r = talloc_get_type(rreq->ndr.struct_ptr,
+       struct dreplsrv_op_notify_state *state =
+               tevent_req_data(req,
+               struct dreplsrv_op_notify_state);
+       struct drsuapi_DsReplicaSync *r = talloc_get_type(state->ndr_struct_ptr,
                                                          struct 
drsuapi_DsReplicaSync);
        NTSTATUS status;
 
-       status = dcerpc_ndr_request_recv(rreq);
+       state->ndr_struct_ptr = NULL;
+
+       status = dcerpc_drsuapi_DsReplicaSync_recv(rreq);
        if (tevent_req_nterror(req, status)) {
                return;
        }
diff --git a/source4/dsdb/repl/drepl_out_helpers.c 
b/source4/dsdb/repl/drepl_out_helpers.c
index 4226170..3436b45 100644
--- a/source4/dsdb/repl/drepl_out_helpers.c
+++ b/source4/dsdb/repl/drepl_out_helpers.c
@@ -138,7 +138,7 @@ static void dreplsrv_out_drsuapi_bind_done(struct 
rpc_request *rreq)
                                                   struct 
dreplsrv_out_drsuapi_state);
        NTSTATUS status;
 
-       status = dcerpc_ndr_request_recv(rreq);
+       status = dcerpc_drsuapi_DsBind_recv(rreq);
        if (tevent_req_nterror(req, status)) {
                return;
        }
@@ -203,6 +203,7 @@ NTSTATUS dreplsrv_out_drsuapi_recv(struct tevent_req *req)
 
 struct dreplsrv_op_pull_source_state {
        struct dreplsrv_out_operation *op;
+       void *ndr_struct_ptr;
 };
 
 static void dreplsrv_op_pull_source_connect_done(struct tevent_req *subreq);
@@ -322,6 +323,7 @@ static void 
dreplsrv_op_pull_source_get_changes_trigger(struct tevent_req *req)
        NDR_PRINT_IN_DEBUG(drsuapi_DsGetNCChanges, r);
 #endif
 
+       state->ndr_struct_ptr = r;
        rreq = dcerpc_drsuapi_DsGetNCChanges_send(drsuapi->pipe, r, r);
        if (tevent_req_nomem(rreq, req)) {
                return;
@@ -339,14 +341,18 @@ static void 
dreplsrv_op_pull_source_get_changes_done(struct rpc_request *rreq)
 {
        struct tevent_req *req = talloc_get_type(rreq->async.private_data,
                                                 struct tevent_req);
+       struct dreplsrv_op_pull_source_state *state = tevent_req_data(req,
+                                                     struct 
dreplsrv_op_pull_source_state);
        NTSTATUS status;
-       struct drsuapi_DsGetNCChanges *r = talloc_get_type(rreq->ndr.struct_ptr,
+       struct drsuapi_DsGetNCChanges *r = 
talloc_get_type(state->ndr_struct_ptr,
                                           struct drsuapi_DsGetNCChanges);
        uint32_t ctr_level = 0;
        struct drsuapi_DsGetNCChangesCtr1 *ctr1 = NULL;
        struct drsuapi_DsGetNCChangesCtr6 *ctr6 = NULL;
 
-       status = dcerpc_ndr_request_recv(rreq);
+       state->ndr_struct_ptr = NULL;
+
+       status = dcerpc_drsuapi_DsGetNCChanges_recv(rreq);
        if (tevent_req_nterror(req, status)) {
                return;
        }
@@ -552,6 +558,7 @@ static void dreplsrv_update_refs_trigger(struct tevent_req 
*req)
                r->in.req.req1.options |= DRSUAPI_DRS_WRIT_REP;
        }
 
+       state->ndr_struct_ptr = r;
        rreq = dcerpc_drsuapi_DsReplicaUpdateRefs_send(drsuapi->pipe, r, r);
        if (tevent_req_nomem(rreq, req)) {
                return;
@@ -566,11 +573,15 @@ static void dreplsrv_update_refs_done(struct rpc_request 
*rreq)
 {
        struct tevent_req *req = talloc_get_type(rreq->async.private_data,
                                 struct tevent_req);
-       struct drsuapi_DsReplicaUpdateRefs *r = 
talloc_get_type(rreq->ndr.struct_ptr,
+       struct dreplsrv_op_pull_source_state *state = tevent_req_data(req,
+                                                     struct 
dreplsrv_op_pull_source_state);
+       struct drsuapi_DsReplicaUpdateRefs *r = 
talloc_get_type(state->ndr_struct_ptr,
                                                                struct 
drsuapi_DsReplicaUpdateRefs);
        NTSTATUS status;
 
-       status = dcerpc_ndr_request_recv(rreq);
+       state->ndr_struct_ptr = NULL;
+
+       status = dcerpc_drsuapi_DsReplicaUpdateRefs_recv(rreq);
        if (!NT_STATUS_IS_OK(status)) {
                DEBUG(0,("UpdateRefs failed with %s\n", 
                         nt_errstr(status)));
diff --git a/source4/libnet/groupinfo.c b/source4/libnet/groupinfo.c
index 1779c28..4b60d45 100644
--- a/source4/libnet/groupinfo.c
+++ b/source4/libnet/groupinfo.c
@@ -67,7 +67,7 @@ static void continue_groupinfo_lookup(struct rpc_request *req)
        s = talloc_get_type(c->private_data, struct groupinfo_state);
 
        /* receive samr_Lookup reply */
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_samr_LookupNames_recv(req);
        if (!composite_is_ok(c)) return;
        
        /* there could be a problem with name resolving itself */
@@ -126,7 +126,7 @@ static void continue_groupinfo_opengroup(struct rpc_request 
*req)
        s = talloc_get_type(c->private_data, struct groupinfo_state);
 
        /* receive samr_OpenGroup reply */
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_samr_OpenGroup_recv(req);
        if (!composite_is_ok(c)) return;
 
        if (!NT_STATUS_IS_OK(s->querygroupinfo.out.result)) {
@@ -175,7 +175,7 @@ static void continue_groupinfo_getgroup(struct rpc_request 
*req)
        s = talloc_get_type(c->private_data, struct groupinfo_state);
 
        /* receive samr_QueryGroupInfo reply */
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_samr_QueryGroupInfo_recv(req);
        if (!composite_is_ok(c)) return;
 
        /* check if querygroup itself went ok */
@@ -223,7 +223,7 @@ static void continue_groupinfo_closegroup(struct 
rpc_request *req)
        s = talloc_get_type(c->private_data, struct groupinfo_state);
 
        /* receive samr_Close reply */
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_samr_Close_recv(req);
        if (!composite_is_ok(c)) return;
 
        if (!NT_STATUS_IS_OK(s->samrclose.out.result)) {
diff --git a/source4/libnet/groupman.c b/source4/libnet/groupman.c
index 0f54db9..8e84d3c 100644
--- a/source4/libnet/groupman.c
+++ b/source4/libnet/groupman.c
@@ -107,7 +107,7 @@ static void continue_groupadd_created(struct rpc_request 
*req)
        c = talloc_get_type(req->async.private_data, struct composite_context);
        s = talloc_get_type(c->private_data, struct groupadd_state);
 
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_samr_CreateDomainGroup_recv(req);
        if (!composite_is_ok(c)) return;
 
        c->status = s->creategroup.out.result;
@@ -196,7 +196,7 @@ static void continue_groupdel_name_found(struct rpc_request 
*req)
        s = talloc_get_type(c->private_data, struct groupdel_state);
 
        /* receive samr_LookupNames result */
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_samr_LookupNames_recv(req);
        if (!composite_is_ok(c)) return;
 
        c->status = s->lookupname.out.result;
@@ -242,7 +242,7 @@ static void continue_groupdel_group_opened(struct 
rpc_request *req)
        s = talloc_get_type(c->private_data, struct groupdel_state);
 
        /* receive samr_OpenGroup result */
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_samr_OpenGroup_recv(req);
        if (!composite_is_ok(c)) return;
 
        c->status = s->opengroup.out.result;
@@ -273,7 +273,7 @@ static void continue_groupdel_deleted(struct rpc_request 
*req)
        s = talloc_get_type(c->private_data, struct groupdel_state);
 
        /* receive samr_DeleteGroup result */
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_samr_DeleteDomainGroup_recv(req);
        if (!composite_is_ok(c)) return;
 
        /* return the actual function call status */
diff --git a/source4/libnet/libnet_become_dc.c 
b/source4/libnet/libnet_become_dc.c
index 0852373..45a3d04 100644
--- a/source4/libnet/libnet_become_dc.c
+++ b/source4/libnet/libnet_become_dc.c
@@ -710,6 +710,8 @@ struct libnet_BecomeDC_state {
                struct policy_handle bind_handle;
        } drsuapi1, drsuapi2, drsuapi3;
 
+       void *ndr_struct_ptr;
+
        struct libnet_BecomeDC_Domain domain;
        struct libnet_BecomeDC_Forest forest;
        struct libnet_BecomeDC_SourceDSA source_dsa;
@@ -1714,19 +1716,9 @@ static void becomeDC_drsuapi1_bind_recv(struct 
rpc_request *req)
        struct composite_context *c = s->creq;
        WERROR status;
 
-       bool print = false;
-
-       if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
-               print = true;
-       }
-
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_drsuapi_DsBind_recv(req);
        if (!composite_is_ok(c)) return;
 
-       if (print) {
-               NDR_PRINT_OUT_DEBUG(drsuapi_DsBind, &s->drsuapi1.bind_r);
-       }
-
        status = becomeDC_drsuapi_bind_recv(s, &s->drsuapi1);
        if (!W_ERROR_IS_OK(status)) {
                composite_error(c, werror_to_ntstatus(status));
@@ -2255,6 +2247,7 @@ static void becomeDC_drsuapi1_add_entry_send(struct 
libnet_BecomeDC_state *s)
        r->out.level_out        = talloc(s, int32_t);
        r->out.ctr              = talloc(s, union drsuapi_DsAddEntryCtr);
 
+       s->ndr_struct_ptr = r;
        req = dcerpc_drsuapi_DsAddEntry_send(s->drsuapi1.pipe, r, r);
        composite_continue_rpc(c, req, becomeDC_drsuapi1_add_entry_recv, s);
 }
@@ -2267,22 +2260,15 @@ static void becomeDC_drsuapi1_add_entry_recv(struct 
rpc_request *req)
        struct libnet_BecomeDC_state *s = 
talloc_get_type(req->async.private_data,
                                          struct libnet_BecomeDC_state);
        struct composite_context *c = s->creq;
-       struct drsuapi_DsAddEntry *r = talloc_get_type(req->ndr.struct_ptr,
+       struct drsuapi_DsAddEntry *r = talloc_get_type_abort(s->ndr_struct_ptr,
                                       struct drsuapi_DsAddEntry);
        char *binding_str;
-       bool print = false;
 
-       if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
-               print = true;
-       }
+       s->ndr_struct_ptr = NULL;
 
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_drsuapi_DsAddEntry_recv(req);
        if (!composite_is_ok(c)) return;
 
-       if (print) {
-               NDR_PRINT_OUT_DEBUG(drsuapi_DsAddEntry, r);
-       }
-
        if (!W_ERROR_IS_OK(r->out.result)) {
                composite_error(c, werror_to_ntstatus(r->out.result));
                return;
@@ -2402,19 +2388,9 @@ static void becomeDC_drsuapi2_bind_recv(struct 
rpc_request *req)
        char *binding_str;
        WERROR status;
 
-       bool print = false;
-
-       if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
-               print = true;
-       }
-
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_drsuapi_DsBind_recv(req);
        if (!composite_is_ok(c)) return;
 
-       if (print) {
-               NDR_PRINT_OUT_DEBUG(drsuapi_DsBind, &s->drsuapi2.bind_r);
-       }
-
        status = becomeDC_drsuapi_bind_recv(s, &s->drsuapi2);
        if (!W_ERROR_IS_OK(status)) {
                composite_error(c, werror_to_ntstatus(status));
@@ -2512,6 +2488,7 @@ static void becomeDC_drsuapi_pull_partition_send(struct 
libnet_BecomeDC_state *s
         * are needed for it. Or the same KRB5 TGS is needed on both
         * connections.
         */
+       s->ndr_struct_ptr = r;
        req = dcerpc_drsuapi_DsGetNCChanges_send(drsuapi_p->pipe, r, r);
        composite_continue_rpc(c, req, recv_fn, s);
 }
@@ -2648,23 +2625,15 @@ static void becomeDC_drsuapi3_pull_schema_recv(struct 
rpc_request *req)
        struct libnet_BecomeDC_state *s = 
talloc_get_type(req->async.private_data,
                                          struct libnet_BecomeDC_state);
        struct composite_context *c = s->creq;
-       struct drsuapi_DsGetNCChanges *r = talloc_get_type(req->ndr.struct_ptr,
+       struct drsuapi_DsGetNCChanges *r = 
talloc_get_type_abort(s->ndr_struct_ptr,
                                           struct drsuapi_DsGetNCChanges);
        WERROR status;
 
-       bool print = false;
-
-       if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
-               print = true;
-       }
+       s->ndr_struct_ptr = NULL;
 
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_drsuapi_DsGetNCChanges_recv(req);
        if (!composite_is_ok(c)) return;
 
-       if (print) {
-               NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, r);
-       }
-
        status = becomeDC_drsuapi_pull_partition_recv(s, &s->drsuapi2, 
&s->drsuapi3, &s->schema_part, r);
        if (!W_ERROR_IS_OK(status)) {
                composite_error(c, werror_to_ntstatus(status));
@@ -2713,23 +2682,15 @@ static void becomeDC_drsuapi3_pull_config_recv(struct 
rpc_request *req)
        struct libnet_BecomeDC_state *s = 
talloc_get_type(req->async.private_data,
                                          struct libnet_BecomeDC_state);
        struct composite_context *c = s->creq;
-       struct drsuapi_DsGetNCChanges *r = talloc_get_type(req->ndr.struct_ptr,
+       struct drsuapi_DsGetNCChanges *r = 
talloc_get_type_abort(s->ndr_struct_ptr,
                                           struct drsuapi_DsGetNCChanges);
        WERROR status;
 
-       bool print = false;
-
-       if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
-               print = true;
-       }
+       s->ndr_struct_ptr = NULL;
 
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_drsuapi_DsGetNCChanges_recv(req);
        if (!composite_is_ok(c)) return;
 
-       if (print) {
-               NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, r);
-       }
-
        status = becomeDC_drsuapi_pull_partition_recv(s, &s->drsuapi2, 
&s->drsuapi3, &s->config_part, r);
        if (!W_ERROR_IS_OK(status)) {
                composite_error(c, werror_to_ntstatus(status));
@@ -2784,22 +2745,15 @@ static void becomeDC_drsuapi3_pull_domain_recv(struct 
rpc_request *req)
        struct libnet_BecomeDC_state *s = 
talloc_get_type(req->async.private_data,
                                          struct libnet_BecomeDC_state);
        struct composite_context *c = s->creq;
-       struct drsuapi_DsGetNCChanges *r = talloc_get_type(req->ndr.struct_ptr,
+       struct drsuapi_DsGetNCChanges *r = 
talloc_get_type_abort(s->ndr_struct_ptr,
                                           struct drsuapi_DsGetNCChanges);
        WERROR status;
-       bool print = false;
 
-       if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
-               print = true;
-       }
+       s->ndr_struct_ptr = NULL;
 
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_drsuapi_DsGetNCChanges_recv(req);
        if (!composite_is_ok(c)) return;
 
-       if (print) {
-               NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, r);
-       }
-
        status = becomeDC_drsuapi_pull_partition_recv(s, &s->drsuapi2, 
&s->drsuapi3, &s->domain_part, r);
        if (!W_ERROR_IS_OK(status)) {
                composite_error(c, werror_to_ntstatus(status));
@@ -2852,6 +2806,7 @@ static void becomeDC_drsuapi_update_refs_send(struct 
libnet_BecomeDC_state *s,
                r->in.req.req1.options |= DRSUAPI_DRS_WRIT_REP;
        }
 
+       s->ndr_struct_ptr = r;
        req = dcerpc_drsuapi_DsReplicaUpdateRefs_send(drsuapi->pipe, r, r);
        composite_continue_rpc(c, req, recv_fn, s);
 }
@@ -2863,21 +2818,14 @@ static void 
becomeDC_drsuapi2_update_refs_schema_recv(struct rpc_request *req)
        struct libnet_BecomeDC_state *s = 
talloc_get_type(req->async.private_data,
                                          struct libnet_BecomeDC_state);
        struct composite_context *c = s->creq;
-       struct drsuapi_DsReplicaUpdateRefs *r = 
talloc_get_type(req->ndr.struct_ptr,
+       struct drsuapi_DsReplicaUpdateRefs *r = 
talloc_get_type_abort(s->ndr_struct_ptr,
                                           struct drsuapi_DsReplicaUpdateRefs);
-       bool print = false;
 
-       if (req->p->conn->flags & DCERPC_DEBUG_PRINT_OUT) {
-               print = true;
-       }
+       s->ndr_struct_ptr = NULL;
 
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_drsuapi_DsReplicaUpdateRefs_recv(req);
        if (!composite_is_ok(c)) return;
 
-       if (print) {
-               NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaUpdateRefs, r);
-       }
-
        if (!W_ERROR_IS_OK(r->out.result)) {
                composite_error(c, werror_to_ntstatus(r->out.result));
                return;
@@ -2896,10 +2844,12 @@ static void 
becomeDC_drsuapi2_update_refs_config_recv(struct rpc_request *req)
        struct libnet_BecomeDC_state *s = 
talloc_get_type(req->async.private_data,
                                          struct libnet_BecomeDC_state);
        struct composite_context *c = s->creq;
-       struct drsuapi_DsReplicaUpdateRefs *r = 
talloc_get_type(req->ndr.struct_ptr,
+       struct drsuapi_DsReplicaUpdateRefs *r = 
talloc_get_type(s->ndr_struct_ptr,
                                           struct drsuapi_DsReplicaUpdateRefs);
 
-       c->status = dcerpc_ndr_request_recv(req);
+       s->ndr_struct_ptr = NULL;
+
+       c->status = dcerpc_drsuapi_DsReplicaUpdateRefs_recv(req);
        if (!composite_is_ok(c)) return;
 
        if (!W_ERROR_IS_OK(r->out.result)) {
@@ -2918,10 +2868,12 @@ static void 
becomeDC_drsuapi2_update_refs_domain_recv(struct rpc_request *req)
        struct libnet_BecomeDC_state *s = 
talloc_get_type(req->async.private_data,
                                          struct libnet_BecomeDC_state);
        struct composite_context *c = s->creq;
-       struct drsuapi_DsReplicaUpdateRefs *r = 
talloc_get_type(req->ndr.struct_ptr,
+       struct drsuapi_DsReplicaUpdateRefs *r = 
talloc_get_type(s->ndr_struct_ptr,
                                           struct drsuapi_DsReplicaUpdateRefs);
 
-       c->status = dcerpc_ndr_request_recv(req);
+       s->ndr_struct_ptr = NULL;
+
+       c->status = dcerpc_drsuapi_DsReplicaUpdateRefs_recv(req);
        if (!composite_is_ok(c)) return;
 
        if (!W_ERROR_IS_OK(r->out.result)) {
diff --git a/source4/libnet/libnet_domain.c b/source4/libnet/libnet_domain.c
index 43a6a0e..cae8d2c 100644
--- a/source4/libnet/libnet_domain.c
+++ b/source4/libnet/libnet_domain.c
@@ -98,7 +98,7 @@ static void continue_domain_open_close(struct rpc_request 
*req)
        s = talloc_get_type(c->private_data, struct domain_open_samr_state);
 
        /* receive samr_Close reply */
-       c->status = dcerpc_ndr_request_recv(req);
+       c->status = dcerpc_samr_Close_recv(req);
        if (!composite_is_ok(c)) return;
 
        if (s->monitor_fn) {
@@ -143,7 +143,7 @@ static void continue_domain_open_connect(struct rpc_request 
*req)


-- 
Samba Shared Repository

<Prev in Thread] Current Thread [Next in Thread>