X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=bin%2Fdefault%2Flibrpc%2Fgen_ndr%2Fs3compat_fsrvp.c;h=28859fe2d34b2351215b82c4471a096ab2fccf31;hb=refs%2Fheads%2Fmaster4-dcerpc-new;hp=a5c364a3ef76a8ad1adcd61063379807716ecad1;hpb=32820a52388fb9ffbd3e1950870232ce005abfe8;p=metze%2Fsamba%2Fwip.git diff --git a/bin/default/librpc/gen_ndr/s3compat_fsrvp.c b/bin/default/librpc/gen_ndr/s3compat_fsrvp.c index a5c364a3ef76..28859fe2d34b 100644 --- a/bin/default/librpc/gen_ndr/s3compat_fsrvp.c +++ b/bin/default/librpc/gen_ndr/s3compat_fsrvp.c @@ -1,5 +1,7 @@ #include "includes.h" #include "ntdomain.h" +#include "lib/util/tevent_ntstatus.h" +#include "librpc/rpc/dcerpc_connection.h" #include "bin/default/librpc/gen_ndr/s3compat_fsrvp.h" struct _s3_compat_fss_GetSupportedVersion_state { @@ -9,11 +11,11 @@ struct _s3_compat_fss_GetSupportedVersion_state { }; static struct tevent_req *_s3_compat_fss_GetSupportedVersion_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_GetSupportedVersion *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_GetSupportedVersion *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_GetSupportedVersion_state *state; struct pipes_struct *p; @@ -27,6 +29,10 @@ static struct tevent_req *_s3_compat_fss_GetSupportedVersion_send(TALLOC_CTX *me state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } ZERO_STRUCT(r->out); r->out.MinVersion = talloc_zero(r, uint32_t); @@ -43,7 +49,7 @@ static struct tevent_req *_s3_compat_fss_GetSupportedVersion_send(TALLOC_CTX *me if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -63,11 +69,11 @@ struct _s3_compat_fss_SetContext_state { }; static struct tevent_req *_s3_compat_fss_SetContext_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_SetContext *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_SetContext *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_SetContext_state *state; struct pipes_struct *p; @@ -81,12 +87,16 @@ static struct tevent_req *_s3_compat_fss_SetContext_send(TALLOC_CTX *mem_ctx, state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } r->out.result = _fss_SetContext(p, r); if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -106,11 +116,11 @@ struct _s3_compat_fss_StartShadowCopySet_state { }; static struct tevent_req *_s3_compat_fss_StartShadowCopySet_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_StartShadowCopySet *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_StartShadowCopySet *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_StartShadowCopySet_state *state; struct pipes_struct *p; @@ -124,6 +134,10 @@ static struct tevent_req *_s3_compat_fss_StartShadowCopySet_send(TALLOC_CTX *mem state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } ZERO_STRUCT(r->out); r->out.pShadowCopySetId = talloc_zero(r, struct GUID); @@ -135,7 +149,7 @@ static struct tevent_req *_s3_compat_fss_StartShadowCopySet_send(TALLOC_CTX *mem if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -155,11 +169,11 @@ struct _s3_compat_fss_AddToShadowCopySet_state { }; static struct tevent_req *_s3_compat_fss_AddToShadowCopySet_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_AddToShadowCopySet *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_AddToShadowCopySet *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_AddToShadowCopySet_state *state; struct pipes_struct *p; @@ -173,6 +187,10 @@ static struct tevent_req *_s3_compat_fss_AddToShadowCopySet_send(TALLOC_CTX *mem state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } ZERO_STRUCT(r->out); r->out.pShadowCopyId = talloc_zero(r, struct GUID); @@ -184,7 +202,7 @@ static struct tevent_req *_s3_compat_fss_AddToShadowCopySet_send(TALLOC_CTX *mem if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -204,11 +222,11 @@ struct _s3_compat_fss_CommitShadowCopySet_state { }; static struct tevent_req *_s3_compat_fss_CommitShadowCopySet_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_CommitShadowCopySet *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_CommitShadowCopySet *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_CommitShadowCopySet_state *state; struct pipes_struct *p; @@ -222,12 +240,16 @@ static struct tevent_req *_s3_compat_fss_CommitShadowCopySet_send(TALLOC_CTX *me state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } r->out.result = _fss_CommitShadowCopySet(p, r); if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -247,11 +269,11 @@ struct _s3_compat_fss_ExposeShadowCopySet_state { }; static struct tevent_req *_s3_compat_fss_ExposeShadowCopySet_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_ExposeShadowCopySet *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_ExposeShadowCopySet *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_ExposeShadowCopySet_state *state; struct pipes_struct *p; @@ -265,12 +287,16 @@ static struct tevent_req *_s3_compat_fss_ExposeShadowCopySet_send(TALLOC_CTX *me state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } r->out.result = _fss_ExposeShadowCopySet(p, r); if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -290,11 +316,11 @@ struct _s3_compat_fss_RecoveryCompleteShadowCopySet_state { }; static struct tevent_req *_s3_compat_fss_RecoveryCompleteShadowCopySet_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_RecoveryCompleteShadowCopySet *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_RecoveryCompleteShadowCopySet *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_RecoveryCompleteShadowCopySet_state *state; struct pipes_struct *p; @@ -308,12 +334,16 @@ static struct tevent_req *_s3_compat_fss_RecoveryCompleteShadowCopySet_send(TALL state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } r->out.result = _fss_RecoveryCompleteShadowCopySet(p, r); if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -333,11 +363,11 @@ struct _s3_compat_fss_AbortShadowCopySet_state { }; static struct tevent_req *_s3_compat_fss_AbortShadowCopySet_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_AbortShadowCopySet *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_AbortShadowCopySet *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_AbortShadowCopySet_state *state; struct pipes_struct *p; @@ -351,12 +381,16 @@ static struct tevent_req *_s3_compat_fss_AbortShadowCopySet_send(TALLOC_CTX *mem state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } r->out.result = _fss_AbortShadowCopySet(p, r); if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -376,11 +410,11 @@ struct _s3_compat_fss_IsPathSupported_state { }; static struct tevent_req *_s3_compat_fss_IsPathSupported_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_IsPathSupported *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_IsPathSupported *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_IsPathSupported_state *state; struct pipes_struct *p; @@ -394,6 +428,10 @@ static struct tevent_req *_s3_compat_fss_IsPathSupported_send(TALLOC_CTX *mem_ct state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } ZERO_STRUCT(r->out); r->out.SupportedByThisProvider = talloc_zero(r, uint32_t); @@ -410,7 +448,7 @@ static struct tevent_req *_s3_compat_fss_IsPathSupported_send(TALLOC_CTX *mem_ct if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -430,11 +468,11 @@ struct _s3_compat_fss_IsPathShadowCopied_state { }; static struct tevent_req *_s3_compat_fss_IsPathShadowCopied_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_IsPathShadowCopied *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_IsPathShadowCopied *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_IsPathShadowCopied_state *state; struct pipes_struct *p; @@ -448,6 +486,10 @@ static struct tevent_req *_s3_compat_fss_IsPathShadowCopied_send(TALLOC_CTX *mem state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } ZERO_STRUCT(r->out); r->out.ShadowCopyPresent = talloc_zero(r, uint32_t); @@ -464,7 +506,7 @@ static struct tevent_req *_s3_compat_fss_IsPathShadowCopied_send(TALLOC_CTX *mem if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -484,11 +526,11 @@ struct _s3_compat_fss_GetShareMapping_state { }; static struct tevent_req *_s3_compat_fss_GetShareMapping_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_GetShareMapping *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_GetShareMapping *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_GetShareMapping_state *state; struct pipes_struct *p; @@ -502,6 +544,10 @@ static struct tevent_req *_s3_compat_fss_GetShareMapping_send(TALLOC_CTX *mem_ct state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } ZERO_STRUCT(r->out); r->out.ShareMapping = talloc_zero(r, union fssagent_share_mapping); @@ -513,7 +559,7 @@ static struct tevent_req *_s3_compat_fss_GetShareMapping_send(TALLOC_CTX *mem_ct if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -533,11 +579,11 @@ struct _s3_compat_fss_DeleteShareMapping_state { }; static struct tevent_req *_s3_compat_fss_DeleteShareMapping_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_DeleteShareMapping *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_DeleteShareMapping *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_DeleteShareMapping_state *state; struct pipes_struct *p; @@ -551,12 +597,16 @@ static struct tevent_req *_s3_compat_fss_DeleteShareMapping_send(TALLOC_CTX *mem state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } r->out.result = _fss_DeleteShareMapping(p, r); if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -576,11 +626,11 @@ struct _s3_compat_fss_PrepareShadowCopySet_state { }; static struct tevent_req *_s3_compat_fss_PrepareShadowCopySet_send(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, - struct dcerpc_call_handle *call, - struct fss_PrepareShadowCopySet *r) + struct tevent_context *ev, + struct dcerpc_call_handle *call, + struct fss_PrepareShadowCopySet *r) { - struct tevent_req *req + struct tevent_req *req; struct _s3_compat_fss_PrepareShadowCopySet_state *state; struct pipes_struct *p; @@ -594,12 +644,16 @@ static struct tevent_req *_s3_compat_fss_PrepareShadowCopySet_send(TALLOC_CTX *m state->r = r; p = dcerpc_call_handle_get_pipes_struct(call); + if (p == NULL) { + tevent_req_nterror(req, NT_STATUS_NO_MEMORY); + return tevent_req_post(req, ev); + } r->out.result = _fss_PrepareShadowCopySet(p, r); if (p->fault_state) { NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state); - tevent_req_nterror(status); + tevent_req_nterror(req, status); return tevent_req_post(req, ev); } @@ -613,7 +667,7 @@ static NTSTATUS _s3_compat_fss_PrepareShadowCopySet_recv(struct tevent_req *req) } -static const struct dcerpc_call_entry_point_fns struct _s3_compat_FileServerVssAgent_fns[] = { +static const struct dcerpc_call_entry_point_fns _s3_compat_FileServerVssAgent_fns[] = { { .send_fn = (dcerpc_call_entry_point_send_fn_t) _s3_compat_fss_GetSupportedVersion_send, @@ -699,10 +753,12 @@ static const struct dcerpc_call_entry_point_fns struct _s3_compat_FileServerVssA }; static const struct dcerpc_call_entry_point_vector _s3_compat_FileServerVssAgent_epv[] = { + { .name = "_s3_compat_FileServerVssAgent", .table = &ndr_table_FileServerVssAgent, .num_fns = 13, .fns = _s3_compat_FileServerVssAgent_fns, + }, }; NTSTATUS dcerpc_server_setup_s3compat_FileServerVssAgent(struct dcerpc_server *server)