mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:libnet: make use of explicit dcerpc_*_recv functions
metze
This commit is contained in:
parent
5d33c6d4f9
commit
f995e596bb
@ -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)) {
|
||||
|
@ -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 */
|
||||
|
@ -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)
|
||||
s = talloc_get_type(c->private_data, struct domain_open_samr_state);
|
||||
|
||||
/* receive samr_Connect reply */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_Connect_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (s->monitor_fn) {
|
||||
@ -184,7 +184,7 @@ static void continue_domain_open_lookup(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct domain_open_samr_state);
|
||||
|
||||
/* receive samr_LookupDomain reply */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_LookupDomain_recv(req);
|
||||
|
||||
if (s->monitor_fn) {
|
||||
struct monitor_msg msg;
|
||||
@ -234,7 +234,7 @@ static void continue_domain_open_open(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct domain_open_samr_state);
|
||||
|
||||
/* receive samr_OpenDomain reply */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_OpenDomain_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (s->monitor_fn) {
|
||||
@ -521,7 +521,7 @@ static void continue_lsa_policy_open(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct domain_open_lsa_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_lsa_OpenPolicy2_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (s->monitor_fn) {
|
||||
@ -721,7 +721,7 @@ static void continue_lsa_close(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct domain_close_lsa_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_lsa_Close_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (s->monitor_fn) {
|
||||
@ -823,7 +823,7 @@ static void continue_samr_close(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct domain_close_samr_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_Close_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (s->monitor_fn) {
|
||||
@ -987,7 +987,7 @@ static void continue_samr_connect(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct domain_list_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_Connect_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (s->monitor_fn) {
|
||||
@ -1030,7 +1030,7 @@ static void continue_samr_enum_domains(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct domain_list_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_EnumDomains_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (s->monitor_fn) {
|
||||
@ -1090,7 +1090,7 @@ static void continue_samr_close_handle(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct domain_list_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_Close_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (s->monitor_fn) {
|
||||
|
@ -449,7 +449,6 @@ struct grouplist_state {
|
||||
static void continue_lsa_domain_opened(struct composite_context *ctx);
|
||||
static void continue_domain_queried(struct rpc_request *req);
|
||||
static void continue_samr_domain_opened(struct composite_context *ctx);
|
||||
static void continue_domain_queried(struct rpc_request *req);
|
||||
static void continue_groups_enumerated(struct rpc_request *req);
|
||||
|
||||
|
||||
@ -554,7 +553,7 @@ static void continue_domain_queried(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct grouplist_state);
|
||||
|
||||
/* receive result of rpc request */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_lsa_QueryInfoPolicy_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
/* get the returned domain info */
|
||||
@ -631,7 +630,7 @@ static void continue_groups_enumerated(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct grouplist_state);
|
||||
|
||||
/* receive result of rpc request */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_EnumDomainGroups_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
/* get the actual status of the rpc call result
|
||||
|
@ -348,7 +348,7 @@ static void continue_name_found(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct lookup_name_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_lsa_LookupNames_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
c->status = s->lookup.out.result;
|
||||
|
@ -593,7 +593,7 @@ static void continue_lsa_policy(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct rpc_connect_dci_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_lsa_OpenPolicy2_recv(req);
|
||||
if (!NT_STATUS_IS_OK(c->status)) {
|
||||
composite_error(c, c->status);
|
||||
return;
|
||||
@ -650,7 +650,7 @@ static void continue_lsa_query_info2(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct rpc_connect_dci_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_lsa_QueryInfoPolicy2_recv(req);
|
||||
|
||||
/* In case of error just null the realm and guid and proceed
|
||||
to the next step. After all, it doesn't have to be AD domain
|
||||
@ -723,7 +723,7 @@ static void continue_lsa_query_info(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct rpc_connect_dci_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_lsa_QueryInfoPolicy_recv(req);
|
||||
if (!NT_STATUS_IS_OK(c->status)) {
|
||||
s->r.out.error_string = talloc_asprintf(c,
|
||||
"lsa_QueryInfoPolicy failed: %s",
|
||||
|
@ -605,7 +605,7 @@ static void unbecomeDC_drsuapi_bind_recv(struct rpc_request *req)
|
||||
struct libnet_UnbecomeDC_state);
|
||||
struct composite_context *c = s->creq;
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_drsuapi_DsBind_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (!W_ERROR_IS_OK(s->drsuapi.bind_r.out.result)) {
|
||||
@ -672,7 +672,7 @@ static void unbecomeDC_drsuapi_remove_ds_server_recv(struct rpc_request *req)
|
||||
struct composite_context *c = s->creq;
|
||||
struct drsuapi_DsRemoveDSServer *r = &s->drsuapi.rm_ds_srv_r;
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_drsuapi_DsRemoveDSServer_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (!W_ERROR_IS_OK(r->out.result)) {
|
||||
|
@ -1015,7 +1015,7 @@ static void continue_domain_queried(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct userlist_state);
|
||||
|
||||
/* receive result of rpc request */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_lsa_QueryInfoPolicy_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
/* get the returned domain info */
|
||||
@ -1094,7 +1094,7 @@ static void continue_users_enumerated(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct userlist_state);
|
||||
|
||||
/* receive result of rpc request */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_EnumDomainUsers_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
/* get the actual status of the rpc call result
|
||||
|
@ -66,7 +66,7 @@ static void continue_userinfo_lookup(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct userinfo_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 */
|
||||
@ -125,7 +125,7 @@ static void continue_userinfo_openuser(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct userinfo_state);
|
||||
|
||||
/* receive samr_OpenUser reply */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_OpenUser_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
if (!NT_STATUS_IS_OK(s->queryuserinfo.out.result)) {
|
||||
@ -174,7 +174,7 @@ static void continue_userinfo_getuser(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct userinfo_state);
|
||||
|
||||
/* receive samr_QueryUserInfo reply */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_QueryUserInfo_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
/* check if queryuser itself went ok */
|
||||
@ -222,7 +222,7 @@ static void continue_userinfo_closeuser(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct userinfo_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)) {
|
||||
|
@ -58,7 +58,7 @@ static void continue_useradd_create(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct useradd_state);
|
||||
|
||||
/* check rpc layer status code */
|
||||
c->status = dcerpc_ndr_request_recv(s->req);
|
||||
c->status = dcerpc_samr_CreateUser_recv(s->req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
/* check create user call status code */
|
||||
@ -222,7 +222,7 @@ static void continue_userdel_name_found(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct userdel_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;
|
||||
@ -285,7 +285,7 @@ static void continue_userdel_user_opened(struct rpc_request* req)
|
||||
s = talloc_get_type(c->private_data, struct userdel_state);
|
||||
|
||||
/* receive samr_OpenUser result */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_OpenUser_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
c->status = s->openuser.out.result;
|
||||
@ -333,7 +333,7 @@ static void continue_userdel_deleted(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct userdel_state);
|
||||
|
||||
/* receive samr_DeleteUser result */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_DeleteUser_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
/* return the actual function call status */
|
||||
@ -490,7 +490,7 @@ static void continue_usermod_name_found(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct usermod_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;
|
||||
@ -714,7 +714,7 @@ static void continue_usermod_user_opened(struct rpc_request *req)
|
||||
c = talloc_get_type(req->async.private_data, struct composite_context);
|
||||
s = talloc_get_type(c->private_data, struct usermod_state);
|
||||
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_OpenUser_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
c->status = s->openuser.out.result;
|
||||
@ -744,7 +744,7 @@ static void continue_usermod_user_queried(struct rpc_request *req)
|
||||
i = &s->info;
|
||||
|
||||
/* receive samr_QueryUserInfo result */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_QueryUserInfo_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
c->status = s->queryuser.out.result;
|
||||
@ -782,7 +782,7 @@ static void continue_usermod_user_changed(struct rpc_request *req)
|
||||
s = talloc_get_type(c->private_data, struct usermod_state);
|
||||
|
||||
/* receive samr_SetUserInfo result */
|
||||
c->status = dcerpc_ndr_request_recv(req);
|
||||
c->status = dcerpc_samr_SetUserInfo_recv(req);
|
||||
if (!composite_is_ok(c)) return;
|
||||
|
||||
/* return the actual function call status */
|
||||
|
Loading…
Reference in New Issue
Block a user