#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 {
};
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;
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);
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);
}
};
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;
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);
}
};
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;
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);
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);
}
};
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;
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);
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);
}
};
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;
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);
}
};
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;
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);
}
};
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;
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);
}
};
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;
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);
}
};
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;
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);
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);
}
};
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;
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);
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);
}
};
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;
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);
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);
}
};
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;
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);
}
};
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;
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);
}
}
-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,
};
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)