1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

r19221: Monster-Checkin after "make idl"

(This used to be commit 416466a16f58ac644baacaa2522c4e98176d0e70)
This commit is contained in:
Volker Lendecke 2006-10-10 07:55:46 +00:00 committed by Gerald (Jerry) Carter
parent b71a0be998
commit 6b0b563fa4
11 changed files with 3580 additions and 716 deletions

View File

@ -21,8 +21,10 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_GetManagerVersion(pull, NDR_IN, &r);
@ -43,6 +45,12 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p)
_dfs_GetManagerVersion(p, r.out.exist_flag);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &r);
@ -59,7 +67,7 @@ static BOOL api_dfs_GetManagerVersion(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -84,8 +92,10 @@ static BOOL api_dfs_Add(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_Add(pull, NDR_IN, &r);
@ -99,6 +109,12 @@ static BOOL api_dfs_Add(pipes_struct *p)
r.out.result = _dfs_Add(p, r.in.path, r.in.server, r.in.share, r.in.comment, r.in.flags);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_Add, &r);
@ -115,7 +131,7 @@ static BOOL api_dfs_Add(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -140,8 +156,10 @@ static BOOL api_dfs_Remove(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_Remove(pull, NDR_IN, &r);
@ -155,6 +173,12 @@ static BOOL api_dfs_Remove(pipes_struct *p)
r.out.result = _dfs_Remove(p, r.in.path, r.in.server, r.in.share);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_Remove, &r);
@ -171,7 +195,7 @@ static BOOL api_dfs_Remove(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -196,8 +220,10 @@ static BOOL api_dfs_SetInfo(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_SetInfo(pull, NDR_IN, &r);
@ -211,6 +237,12 @@ static BOOL api_dfs_SetInfo(pipes_struct *p)
r.out.result = _dfs_SetInfo(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &r);
@ -227,7 +259,7 @@ static BOOL api_dfs_SetInfo(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -252,8 +284,10 @@ static BOOL api_dfs_GetInfo(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_GetInfo(pull, NDR_IN, &r);
@ -274,6 +308,12 @@ static BOOL api_dfs_GetInfo(pipes_struct *p)
r.out.result = _dfs_GetInfo(p, r.in.path, r.in.server, r.in.share, r.in.level, r.out.info);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_GetInfo, &r);
@ -290,7 +330,7 @@ static BOOL api_dfs_GetInfo(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -315,8 +355,10 @@ static BOOL api_dfs_Enum(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_Enum(pull, NDR_IN, &r);
@ -333,6 +375,12 @@ static BOOL api_dfs_Enum(pipes_struct *p)
r.out.total = r.in.total;
r.out.result = _dfs_Enum(p, r.in.level, r.in.bufsize, r.in.info, r.in.unknown, r.in.total);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_Enum, &r);
@ -349,7 +397,7 @@ static BOOL api_dfs_Enum(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -374,8 +422,10 @@ static BOOL api_dfs_Rename(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_Rename(pull, NDR_IN, &r);
@ -389,6 +439,12 @@ static BOOL api_dfs_Rename(pipes_struct *p)
r.out.result = _dfs_Rename(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_Rename, &r);
@ -405,7 +461,7 @@ static BOOL api_dfs_Rename(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -430,8 +486,10 @@ static BOOL api_dfs_Move(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_Move(pull, NDR_IN, &r);
@ -445,6 +503,12 @@ static BOOL api_dfs_Move(pipes_struct *p)
r.out.result = _dfs_Move(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_Move, &r);
@ -461,7 +525,7 @@ static BOOL api_dfs_Move(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -486,8 +550,10 @@ static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_ManagerGetConfigInfo(pull, NDR_IN, &r);
@ -501,6 +567,12 @@ static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p)
r.out.result = _dfs_ManagerGetConfigInfo(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &r);
@ -517,7 +589,7 @@ static BOOL api_dfs_ManagerGetConfigInfo(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -542,8 +614,10 @@ static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_ManagerSendSiteInfo(pull, NDR_IN, &r);
@ -557,6 +631,12 @@ static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p)
r.out.result = _dfs_ManagerSendSiteInfo(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &r);
@ -573,7 +653,7 @@ static BOOL api_dfs_ManagerSendSiteInfo(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -598,8 +678,10 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_AddFtRoot(pull, NDR_IN, &r);
@ -613,6 +695,12 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p)
r.out.result = _dfs_AddFtRoot(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r);
@ -629,7 +717,7 @@ static BOOL api_dfs_AddFtRoot(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -654,8 +742,10 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_RemoveFtRoot(pull, NDR_IN, &r);
@ -669,6 +759,12 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p)
r.out.result = _dfs_RemoveFtRoot(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r);
@ -685,7 +781,7 @@ static BOOL api_dfs_RemoveFtRoot(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -710,8 +806,10 @@ static BOOL api_dfs_AddStdRoot(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_AddStdRoot(pull, NDR_IN, &r);
@ -725,6 +823,12 @@ static BOOL api_dfs_AddStdRoot(pipes_struct *p)
r.out.result = _dfs_AddStdRoot(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r);
@ -741,7 +845,7 @@ static BOOL api_dfs_AddStdRoot(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -766,8 +870,10 @@ static BOOL api_dfs_RemoveStdRoot(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_RemoveStdRoot(pull, NDR_IN, &r);
@ -781,6 +887,12 @@ static BOOL api_dfs_RemoveStdRoot(pipes_struct *p)
r.out.result = _dfs_RemoveStdRoot(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r);
@ -797,7 +909,7 @@ static BOOL api_dfs_RemoveStdRoot(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -822,8 +934,10 @@ static BOOL api_dfs_ManagerInitialize(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_ManagerInitialize(pull, NDR_IN, &r);
@ -837,6 +951,12 @@ static BOOL api_dfs_ManagerInitialize(pipes_struct *p)
r.out.result = _dfs_ManagerInitialize(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r);
@ -853,7 +973,7 @@ static BOOL api_dfs_ManagerInitialize(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -878,8 +998,10 @@ static BOOL api_dfs_AddStdRootForced(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_AddStdRootForced(pull, NDR_IN, &r);
@ -893,6 +1015,12 @@ static BOOL api_dfs_AddStdRootForced(pipes_struct *p)
r.out.result = _dfs_AddStdRootForced(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r);
@ -909,7 +1037,7 @@ static BOOL api_dfs_AddStdRootForced(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -934,8 +1062,10 @@ static BOOL api_dfs_GetDcAddress(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_GetDcAddress(pull, NDR_IN, &r);
@ -949,6 +1079,12 @@ static BOOL api_dfs_GetDcAddress(pipes_struct *p)
r.out.result = _dfs_GetDcAddress(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r);
@ -965,7 +1101,7 @@ static BOOL api_dfs_GetDcAddress(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -990,8 +1126,10 @@ static BOOL api_dfs_SetDcAddress(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_SetDcAddress(pull, NDR_IN, &r);
@ -1005,6 +1143,12 @@ static BOOL api_dfs_SetDcAddress(pipes_struct *p)
r.out.result = _dfs_SetDcAddress(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r);
@ -1021,7 +1165,7 @@ static BOOL api_dfs_SetDcAddress(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1046,8 +1190,10 @@ static BOOL api_dfs_FlushFtTable(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_FlushFtTable(pull, NDR_IN, &r);
@ -1061,6 +1207,12 @@ static BOOL api_dfs_FlushFtTable(pipes_struct *p)
r.out.result = _dfs_FlushFtTable(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r);
@ -1077,7 +1229,7 @@ static BOOL api_dfs_FlushFtTable(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1102,8 +1254,10 @@ static BOOL api_dfs_Add2(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_Add2(pull, NDR_IN, &r);
@ -1117,6 +1271,12 @@ static BOOL api_dfs_Add2(pipes_struct *p)
r.out.result = _dfs_Add2(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_Add2, &r);
@ -1133,7 +1293,7 @@ static BOOL api_dfs_Add2(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1158,8 +1318,10 @@ static BOOL api_dfs_Remove2(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_Remove2(pull, NDR_IN, &r);
@ -1173,6 +1335,12 @@ static BOOL api_dfs_Remove2(pipes_struct *p)
r.out.result = _dfs_Remove2(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r);
@ -1189,7 +1357,7 @@ static BOOL api_dfs_Remove2(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1214,8 +1382,10 @@ static BOOL api_dfs_EnumEx(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_EnumEx(pull, NDR_IN, &r);
@ -1232,6 +1402,12 @@ static BOOL api_dfs_EnumEx(pipes_struct *p)
r.out.total = r.in.total;
r.out.result = _dfs_EnumEx(p, r.in.name, r.in.level, r.in.bufsize, r.in.info, r.in.total);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r);
@ -1248,7 +1424,7 @@ static BOOL api_dfs_EnumEx(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1273,8 +1449,10 @@ static BOOL api_dfs_SetInfo2(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_dfs_SetInfo2(pull, NDR_IN, &r);
@ -1288,6 +1466,12 @@ static BOOL api_dfs_SetInfo2(pipes_struct *p)
r.out.result = _dfs_SetInfo2(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r);
@ -1304,7 +1488,7 @@ static BOOL api_dfs_SetInfo2(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}

View File

@ -21,8 +21,10 @@ static BOOL api_echo_AddOne(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_AddOne(pull, NDR_IN, &r);
@ -43,6 +45,12 @@ static BOOL api_echo_AddOne(pipes_struct *p)
_echo_AddOne(p, r.in.in_data, r.out.out_data);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_AddOne, &r);
@ -59,7 +67,7 @@ static BOOL api_echo_AddOne(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -84,8 +92,10 @@ static BOOL api_echo_EchoData(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_EchoData(pull, NDR_IN, &r);
@ -106,6 +116,12 @@ static BOOL api_echo_EchoData(pipes_struct *p)
_echo_EchoData(p, r.in.len, r.in.in_data, r.out.out_data);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_EchoData, &r);
@ -122,7 +138,7 @@ static BOOL api_echo_EchoData(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -147,8 +163,10 @@ static BOOL api_echo_SinkData(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_SinkData(pull, NDR_IN, &r);
@ -162,6 +180,12 @@ static BOOL api_echo_SinkData(pipes_struct *p)
_echo_SinkData(p, r.in.len, r.in.data);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_SinkData, &r);
@ -178,7 +202,7 @@ static BOOL api_echo_SinkData(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -203,8 +227,10 @@ static BOOL api_echo_SourceData(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_SourceData(pull, NDR_IN, &r);
@ -225,6 +251,12 @@ static BOOL api_echo_SourceData(pipes_struct *p)
_echo_SourceData(p, r.in.len, r.out.data);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_SourceData, &r);
@ -241,7 +273,7 @@ static BOOL api_echo_SourceData(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -266,8 +298,10 @@ static BOOL api_echo_TestCall(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_TestCall(pull, NDR_IN, &r);
@ -288,6 +322,12 @@ static BOOL api_echo_TestCall(pipes_struct *p)
_echo_TestCall(p, r.in.s1, r.out.s2);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_TestCall, &r);
@ -304,7 +344,7 @@ static BOOL api_echo_TestCall(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -329,8 +369,10 @@ static BOOL api_echo_TestCall2(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_TestCall2(pull, NDR_IN, &r);
@ -351,6 +393,12 @@ static BOOL api_echo_TestCall2(pipes_struct *p)
r.out.result = _echo_TestCall2(p, r.in.level, r.out.info);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_TestCall2, &r);
@ -367,7 +415,7 @@ static BOOL api_echo_TestCall2(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -392,8 +440,10 @@ static BOOL api_echo_TestSleep(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_TestSleep(pull, NDR_IN, &r);
@ -407,6 +457,12 @@ static BOOL api_echo_TestSleep(pipes_struct *p)
r.out.result = _echo_TestSleep(p, r.in.seconds);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_TestSleep, &r);
@ -423,7 +479,7 @@ static BOOL api_echo_TestSleep(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -448,8 +504,10 @@ static BOOL api_echo_TestEnum(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_TestEnum(pull, NDR_IN, &r);
@ -467,6 +525,12 @@ static BOOL api_echo_TestEnum(pipes_struct *p)
r.out.foo3 = r.in.foo3;
_echo_TestEnum(p, r.in.foo1, r.in.foo2, r.in.foo3);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_TestEnum, &r);
@ -483,7 +547,7 @@ static BOOL api_echo_TestEnum(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -508,8 +572,10 @@ static BOOL api_echo_TestSurrounding(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_TestSurrounding(pull, NDR_IN, &r);
@ -525,6 +591,12 @@ static BOOL api_echo_TestSurrounding(pipes_struct *p)
r.out.data = r.in.data;
_echo_TestSurrounding(p, r.in.data);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_TestSurrounding, &r);
@ -541,7 +613,7 @@ static BOOL api_echo_TestSurrounding(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -566,8 +638,10 @@ static BOOL api_echo_TestDoublePointer(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_echo_TestDoublePointer(pull, NDR_IN, &r);
@ -581,6 +655,12 @@ static BOOL api_echo_TestDoublePointer(pipes_struct *p)
r.out.result = _echo_TestDoublePointer(p, r.in.data);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(echo_TestDoublePointer, &r);
@ -597,7 +677,7 @@ static BOOL api_echo_TestDoublePointer(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}

View File

@ -21,8 +21,10 @@ static BOOL api_eventlog_ClearEventLogW(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_ClearEventLogW(pull, NDR_IN, &r);
@ -36,6 +38,12 @@ static BOOL api_eventlog_ClearEventLogW(pipes_struct *p)
r.out.result = _eventlog_ClearEventLogW(p, r.in.handle, r.in.unknown);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW, &r);
@ -52,7 +60,7 @@ static BOOL api_eventlog_ClearEventLogW(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -77,8 +85,10 @@ static BOOL api_eventlog_BackupEventLogW(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_BackupEventLogW(pull, NDR_IN, &r);
@ -92,6 +102,12 @@ static BOOL api_eventlog_BackupEventLogW(pipes_struct *p)
r.out.result = _eventlog_BackupEventLogW(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW, &r);
@ -108,7 +124,7 @@ static BOOL api_eventlog_BackupEventLogW(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -133,8 +149,10 @@ static BOOL api_eventlog_CloseEventLog(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_CloseEventLog(pull, NDR_IN, &r);
@ -150,6 +168,12 @@ static BOOL api_eventlog_CloseEventLog(pipes_struct *p)
r.out.handle = r.in.handle;
r.out.result = _eventlog_CloseEventLog(p, r.in.handle);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog, &r);
@ -166,7 +190,7 @@ static BOOL api_eventlog_CloseEventLog(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -191,8 +215,10 @@ static BOOL api_eventlog_DeregisterEventSource(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_DeregisterEventSource(pull, NDR_IN, &r);
@ -206,6 +232,12 @@ static BOOL api_eventlog_DeregisterEventSource(pipes_struct *p)
r.out.result = _eventlog_DeregisterEventSource(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource, &r);
@ -222,7 +254,7 @@ static BOOL api_eventlog_DeregisterEventSource(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -247,8 +279,10 @@ static BOOL api_eventlog_GetNumRecords(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_GetNumRecords(pull, NDR_IN, &r);
@ -269,6 +303,12 @@ static BOOL api_eventlog_GetNumRecords(pipes_struct *p)
r.out.result = _eventlog_GetNumRecords(p, r.in.handle, r.out.number);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords, &r);
@ -285,7 +325,7 @@ static BOOL api_eventlog_GetNumRecords(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -310,8 +350,10 @@ static BOOL api_eventlog_GetOldestRecord(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_GetOldestRecord(pull, NDR_IN, &r);
@ -325,6 +367,12 @@ static BOOL api_eventlog_GetOldestRecord(pipes_struct *p)
r.out.result = _eventlog_GetOldestRecord(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord, &r);
@ -341,7 +389,7 @@ static BOOL api_eventlog_GetOldestRecord(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -366,8 +414,10 @@ static BOOL api_eventlog_ChangeNotify(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_ChangeNotify(pull, NDR_IN, &r);
@ -381,6 +431,12 @@ static BOOL api_eventlog_ChangeNotify(pipes_struct *p)
r.out.result = _eventlog_ChangeNotify(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify, &r);
@ -397,7 +453,7 @@ static BOOL api_eventlog_ChangeNotify(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -422,8 +478,10 @@ static BOOL api_eventlog_OpenEventLogW(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_OpenEventLogW(pull, NDR_IN, &r);
@ -444,6 +502,12 @@ static BOOL api_eventlog_OpenEventLogW(pipes_struct *p)
r.out.result = _eventlog_OpenEventLogW(p, r.in.unknown0, r.in.logname, r.in.servername, r.in.unknown2, r.in.unknown3, r.out.handle);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW, &r);
@ -460,7 +524,7 @@ static BOOL api_eventlog_OpenEventLogW(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -485,8 +549,10 @@ static BOOL api_eventlog_RegisterEventSourceW(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_RegisterEventSourceW(pull, NDR_IN, &r);
@ -500,6 +566,12 @@ static BOOL api_eventlog_RegisterEventSourceW(pipes_struct *p)
r.out.result = _eventlog_RegisterEventSourceW(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW, &r);
@ -516,7 +588,7 @@ static BOOL api_eventlog_RegisterEventSourceW(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -541,8 +613,10 @@ static BOOL api_eventlog_OpenBackupEventLogW(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_OpenBackupEventLogW(pull, NDR_IN, &r);
@ -556,6 +630,12 @@ static BOOL api_eventlog_OpenBackupEventLogW(pipes_struct *p)
r.out.result = _eventlog_OpenBackupEventLogW(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW, &r);
@ -572,7 +652,7 @@ static BOOL api_eventlog_OpenBackupEventLogW(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -597,8 +677,10 @@ static BOOL api_eventlog_ReadEventLogW(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_ReadEventLogW(pull, NDR_IN, &r);
@ -631,6 +713,12 @@ static BOOL api_eventlog_ReadEventLogW(pipes_struct *p)
r.out.result = _eventlog_ReadEventLogW(p, r.in.handle, r.in.flags, r.in.offset, r.in.number_of_bytes, r.out.data, r.out.sent_size, r.out.real_size);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW, &r);
@ -647,7 +735,7 @@ static BOOL api_eventlog_ReadEventLogW(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -672,8 +760,10 @@ static BOOL api_eventlog_ReportEventW(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_ReportEventW(pull, NDR_IN, &r);
@ -687,6 +777,12 @@ static BOOL api_eventlog_ReportEventW(pipes_struct *p)
r.out.result = _eventlog_ReportEventW(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW, &r);
@ -703,7 +799,7 @@ static BOOL api_eventlog_ReportEventW(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -728,8 +824,10 @@ static BOOL api_eventlog_ClearEventLogA(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_ClearEventLogA(pull, NDR_IN, &r);
@ -743,6 +841,12 @@ static BOOL api_eventlog_ClearEventLogA(pipes_struct *p)
r.out.result = _eventlog_ClearEventLogA(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA, &r);
@ -759,7 +863,7 @@ static BOOL api_eventlog_ClearEventLogA(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -784,8 +888,10 @@ static BOOL api_eventlog_BackupEventLogA(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_BackupEventLogA(pull, NDR_IN, &r);
@ -799,6 +905,12 @@ static BOOL api_eventlog_BackupEventLogA(pipes_struct *p)
r.out.result = _eventlog_BackupEventLogA(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA, &r);
@ -815,7 +927,7 @@ static BOOL api_eventlog_BackupEventLogA(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -840,8 +952,10 @@ static BOOL api_eventlog_OpenEventLogA(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_OpenEventLogA(pull, NDR_IN, &r);
@ -855,6 +969,12 @@ static BOOL api_eventlog_OpenEventLogA(pipes_struct *p)
r.out.result = _eventlog_OpenEventLogA(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA, &r);
@ -871,7 +991,7 @@ static BOOL api_eventlog_OpenEventLogA(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -896,8 +1016,10 @@ static BOOL api_eventlog_RegisterEventSourceA(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_RegisterEventSourceA(pull, NDR_IN, &r);
@ -911,6 +1033,12 @@ static BOOL api_eventlog_RegisterEventSourceA(pipes_struct *p)
r.out.result = _eventlog_RegisterEventSourceA(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA, &r);
@ -927,7 +1055,7 @@ static BOOL api_eventlog_RegisterEventSourceA(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -952,8 +1080,10 @@ static BOOL api_eventlog_OpenBackupEventLogA(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_OpenBackupEventLogA(pull, NDR_IN, &r);
@ -967,6 +1097,12 @@ static BOOL api_eventlog_OpenBackupEventLogA(pipes_struct *p)
r.out.result = _eventlog_OpenBackupEventLogA(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA, &r);
@ -983,7 +1119,7 @@ static BOOL api_eventlog_OpenBackupEventLogA(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1008,8 +1144,10 @@ static BOOL api_eventlog_ReadEventLogA(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_ReadEventLogA(pull, NDR_IN, &r);
@ -1023,6 +1161,12 @@ static BOOL api_eventlog_ReadEventLogA(pipes_struct *p)
r.out.result = _eventlog_ReadEventLogA(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA, &r);
@ -1039,7 +1183,7 @@ static BOOL api_eventlog_ReadEventLogA(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1064,8 +1208,10 @@ static BOOL api_eventlog_ReportEventA(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_ReportEventA(pull, NDR_IN, &r);
@ -1079,6 +1225,12 @@ static BOOL api_eventlog_ReportEventA(pipes_struct *p)
r.out.result = _eventlog_ReportEventA(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA, &r);
@ -1095,7 +1247,7 @@ static BOOL api_eventlog_ReportEventA(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1120,8 +1272,10 @@ static BOOL api_eventlog_RegisterClusterSvc(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_RegisterClusterSvc(pull, NDR_IN, &r);
@ -1135,6 +1289,12 @@ static BOOL api_eventlog_RegisterClusterSvc(pipes_struct *p)
r.out.result = _eventlog_RegisterClusterSvc(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc, &r);
@ -1151,7 +1311,7 @@ static BOOL api_eventlog_RegisterClusterSvc(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1176,8 +1336,10 @@ static BOOL api_eventlog_DeregisterClusterSvc(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_DeregisterClusterSvc(pull, NDR_IN, &r);
@ -1191,6 +1353,12 @@ static BOOL api_eventlog_DeregisterClusterSvc(pipes_struct *p)
r.out.result = _eventlog_DeregisterClusterSvc(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc, &r);
@ -1207,7 +1375,7 @@ static BOOL api_eventlog_DeregisterClusterSvc(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1232,8 +1400,10 @@ static BOOL api_eventlog_WriteClusterEvents(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_WriteClusterEvents(pull, NDR_IN, &r);
@ -1247,6 +1417,12 @@ static BOOL api_eventlog_WriteClusterEvents(pipes_struct *p)
r.out.result = _eventlog_WriteClusterEvents(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents, &r);
@ -1263,7 +1439,7 @@ static BOOL api_eventlog_WriteClusterEvents(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1288,8 +1464,10 @@ static BOOL api_eventlog_GetLogIntormation(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_GetLogIntormation(pull, NDR_IN, &r);
@ -1303,6 +1481,12 @@ static BOOL api_eventlog_GetLogIntormation(pipes_struct *p)
r.out.result = _eventlog_GetLogIntormation(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_GetLogIntormation, &r);
@ -1319,7 +1503,7 @@ static BOOL api_eventlog_GetLogIntormation(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1344,8 +1528,10 @@ static BOOL api_eventlog_FlushEventLog(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_eventlog_FlushEventLog(pull, NDR_IN, &r);
@ -1359,6 +1545,12 @@ static BOOL api_eventlog_FlushEventLog(pipes_struct *p)
r.out.result = _eventlog_FlushEventLog(p, r.in.handle);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog, &r);
@ -1375,7 +1567,7 @@ static BOOL api_eventlog_FlushEventLog(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}

View File

@ -21,8 +21,10 @@ static BOOL api_initshutdown_Init(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_initshutdown_Init(pull, NDR_IN, &r);
@ -36,6 +38,12 @@ static BOOL api_initshutdown_Init(pipes_struct *p)
r.out.result = _initshutdown_Init(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(initshutdown_Init, &r);
@ -52,7 +60,7 @@ static BOOL api_initshutdown_Init(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -77,8 +85,10 @@ static BOOL api_initshutdown_Abort(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_initshutdown_Abort(pull, NDR_IN, &r);
@ -92,6 +102,12 @@ static BOOL api_initshutdown_Abort(pipes_struct *p)
r.out.result = _initshutdown_Abort(p, r.in.server);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(initshutdown_Abort, &r);
@ -108,7 +124,7 @@ static BOOL api_initshutdown_Abort(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -133,8 +149,10 @@ static BOOL api_initshutdown_InitEx(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_initshutdown_InitEx(pull, NDR_IN, &r);
@ -148,6 +166,12 @@ static BOOL api_initshutdown_InitEx(pipes_struct *p)
r.out.result = _initshutdown_InitEx(p, r.in.hostname, r.in.message, r.in.timeout, r.in.force_apps, r.in.reboot, r.in.reason);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, &r);
@ -164,7 +188,7 @@ static BOOL api_initshutdown_InitEx(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -21,8 +21,10 @@ static BOOL api_unixinfo_SidToUid(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_unixinfo_SidToUid(pull, NDR_IN, &r);
@ -43,6 +45,12 @@ static BOOL api_unixinfo_SidToUid(pipes_struct *p)
r.out.result = _unixinfo_SidToUid(p, r.in.sid, r.out.uid);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(unixinfo_SidToUid, &r);
@ -59,7 +67,7 @@ static BOOL api_unixinfo_SidToUid(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -84,8 +92,10 @@ static BOOL api_unixinfo_UidToSid(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_unixinfo_UidToSid(pull, NDR_IN, &r);
@ -106,6 +116,12 @@ static BOOL api_unixinfo_UidToSid(pipes_struct *p)
r.out.result = _unixinfo_UidToSid(p, r.in.uid, r.out.sid);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, &r);
@ -122,7 +138,7 @@ static BOOL api_unixinfo_UidToSid(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -147,8 +163,10 @@ static BOOL api_unixinfo_SidToGid(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_unixinfo_SidToGid(pull, NDR_IN, &r);
@ -169,6 +187,12 @@ static BOOL api_unixinfo_SidToGid(pipes_struct *p)
r.out.result = _unixinfo_SidToGid(p, r.in.sid, r.out.gid);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, &r);
@ -185,7 +209,7 @@ static BOOL api_unixinfo_SidToGid(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -210,8 +234,10 @@ static BOOL api_unixinfo_GidToSid(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_unixinfo_GidToSid(pull, NDR_IN, &r);
@ -232,6 +258,12 @@ static BOOL api_unixinfo_GidToSid(pipes_struct *p)
r.out.result = _unixinfo_GidToSid(p, r.in.gid, r.out.sid);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, &r);
@ -248,7 +280,7 @@ static BOOL api_unixinfo_GidToSid(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -273,8 +305,10 @@ static BOOL api_unixinfo_GetPWUid(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_unixinfo_GetPWUid(pull, NDR_IN, &r);
@ -296,6 +330,12 @@ static BOOL api_unixinfo_GetPWUid(pipes_struct *p)
r.out.result = _unixinfo_GetPWUid(p, r.in.count, r.in.uids, r.out.infos);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, &r);
@ -312,7 +352,7 @@ static BOOL api_unixinfo_GetPWUid(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}

File diff suppressed because it is too large Load Diff

View File

@ -21,8 +21,10 @@ static BOOL api_wkssvc_NetWkstaGetInfo(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_wkssvc_NetWkstaGetInfo(pull, NDR_IN, &r);
@ -43,6 +45,12 @@ static BOOL api_wkssvc_NetWkstaGetInfo(pipes_struct *p)
r.out.result = _wkssvc_NetWkstaGetInfo(p, r.in.server_name, r.in.level, r.out.info);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo, &r);
@ -59,7 +67,7 @@ static BOOL api_wkssvc_NetWkstaGetInfo(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -84,8 +92,10 @@ static BOOL api_wkssvc_NetWkstaSetInfo(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_wkssvc_NetWkstaSetInfo(pull, NDR_IN, &r);
@ -101,6 +111,12 @@ static BOOL api_wkssvc_NetWkstaSetInfo(pipes_struct *p)
r.out.parm_error = r.in.parm_error;
r.out.result = _wkssvc_NetWkstaSetInfo(p, r.in.server_name, r.in.level, r.in.info, r.in.parm_error);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo, &r);
@ -117,7 +133,7 @@ static BOOL api_wkssvc_NetWkstaSetInfo(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -142,8 +158,10 @@ static BOOL api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_wkssvc_NetWkstaEnumUsers(pull, NDR_IN, &r);
@ -172,6 +190,12 @@ static BOOL api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
r.out.resumehandle = r.in.resumehandle;
r.out.result = _wkssvc_NetWkstaEnumUsers(p, r.in.server_name, r.in.level, r.in.users, r.in.prefmaxlen, r.out.entriesread, r.out.totalentries, r.in.resumehandle);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers, &r);
@ -188,7 +212,7 @@ static BOOL api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -213,8 +237,10 @@ static BOOL api_WKSSVC_NETRWKSTAUSERGETINFO(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO(pull, NDR_IN, &r);
@ -228,6 +254,12 @@ static BOOL api_WKSSVC_NETRWKSTAUSERGETINFO(pipes_struct *p)
r.out.result = _WKSSVC_NETRWKSTAUSERGETINFO(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTAUSERGETINFO, &r);
@ -244,7 +276,7 @@ static BOOL api_WKSSVC_NETRWKSTAUSERGETINFO(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -269,8 +301,10 @@ static BOOL api_WKSSVC_NETRWKSTAUSERSETINFO(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO(pull, NDR_IN, &r);
@ -284,6 +318,12 @@ static BOOL api_WKSSVC_NETRWKSTAUSERSETINFO(pipes_struct *p)
r.out.result = _WKSSVC_NETRWKSTAUSERSETINFO(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTAUSERSETINFO, &r);
@ -300,7 +340,7 @@ static BOOL api_WKSSVC_NETRWKSTAUSERSETINFO(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -325,8 +365,10 @@ static BOOL api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_wkssvc_NetWkstaTransportEnum(pull, NDR_IN, &r);
@ -350,6 +392,12 @@ static BOOL api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
r.out.resume_handle = r.in.resume_handle;
r.out.result = _wkssvc_NetWkstaTransportEnum(p, r.in.server_name, r.in.level, r.in.ctr, r.in.max_buffer, r.out.totalentries, r.in.resume_handle);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum, &r);
@ -366,7 +414,7 @@ static BOOL api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -391,8 +439,10 @@ static BOOL api_WKSSVC_NETRWKSTATRANSPORTADD(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD(pull, NDR_IN, &r);
@ -406,6 +456,12 @@ static BOOL api_WKSSVC_NETRWKSTATRANSPORTADD(pipes_struct *p)
r.out.result = _WKSSVC_NETRWKSTATRANSPORTADD(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTATRANSPORTADD, &r);
@ -422,7 +478,7 @@ static BOOL api_WKSSVC_NETRWKSTATRANSPORTADD(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -447,8 +503,10 @@ static BOOL api_WKSSVC_NETRWKSTATRANSPORTDEL(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL(pull, NDR_IN, &r);
@ -462,6 +520,12 @@ static BOOL api_WKSSVC_NETRWKSTATRANSPORTDEL(pipes_struct *p)
r.out.result = _WKSSVC_NETRWKSTATRANSPORTDEL(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTATRANSPORTDEL, &r);
@ -478,7 +542,7 @@ static BOOL api_WKSSVC_NETRWKSTATRANSPORTDEL(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -503,8 +567,10 @@ static BOOL api_WKSSVC_NETRUSEADD(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRUSEADD(pull, NDR_IN, &r);
@ -518,6 +584,12 @@ static BOOL api_WKSSVC_NETRUSEADD(pipes_struct *p)
r.out.result = _WKSSVC_NETRUSEADD(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEADD, &r);
@ -534,7 +606,7 @@ static BOOL api_WKSSVC_NETRUSEADD(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -559,8 +631,10 @@ static BOOL api_WKSSVC_NETRUSEGETINFO(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRUSEGETINFO(pull, NDR_IN, &r);
@ -574,6 +648,12 @@ static BOOL api_WKSSVC_NETRUSEGETINFO(pipes_struct *p)
r.out.result = _WKSSVC_NETRUSEGETINFO(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEGETINFO, &r);
@ -590,7 +670,7 @@ static BOOL api_WKSSVC_NETRUSEGETINFO(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -615,8 +695,10 @@ static BOOL api_WKSSVC_NETRUSEDEL(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRUSEDEL(pull, NDR_IN, &r);
@ -630,6 +712,12 @@ static BOOL api_WKSSVC_NETRUSEDEL(pipes_struct *p)
r.out.result = _WKSSVC_NETRUSEDEL(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEDEL, &r);
@ -646,7 +734,7 @@ static BOOL api_WKSSVC_NETRUSEDEL(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -671,8 +759,10 @@ static BOOL api_WKSSVC_NETRUSEENUM(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRUSEENUM(pull, NDR_IN, &r);
@ -686,6 +776,12 @@ static BOOL api_WKSSVC_NETRUSEENUM(pipes_struct *p)
r.out.result = _WKSSVC_NETRUSEENUM(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEENUM, &r);
@ -702,7 +798,7 @@ static BOOL api_WKSSVC_NETRUSEENUM(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -727,8 +823,10 @@ static BOOL api_WKSSVC_NETRMESSAGEBUFFERSEND(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND(pull, NDR_IN, &r);
@ -742,6 +840,12 @@ static BOOL api_WKSSVC_NETRMESSAGEBUFFERSEND(pipes_struct *p)
r.out.result = _WKSSVC_NETRMESSAGEBUFFERSEND(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRMESSAGEBUFFERSEND, &r);
@ -758,7 +862,7 @@ static BOOL api_WKSSVC_NETRMESSAGEBUFFERSEND(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -783,8 +887,10 @@ static BOOL api_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pull, NDR_IN, &r);
@ -798,6 +904,12 @@ static BOOL api_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pipes_struct *p)
r.out.result = _WKSSVC_NETRWORKSTATIONSTATISTICSGET(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWORKSTATIONSTATISTICSGET, &r);
@ -814,7 +926,7 @@ static BOOL api_WKSSVC_NETRWORKSTATIONSTATISTICSGET(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -839,8 +951,10 @@ static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEADD(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD(pull, NDR_IN, &r);
@ -854,6 +968,12 @@ static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEADD(pipes_struct *p)
r.out.result = _WKSSVC_NETRLOGONDOMAINNAMEADD(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRLOGONDOMAINNAMEADD, &r);
@ -870,7 +990,7 @@ static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEADD(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -895,8 +1015,10 @@ static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEDEL(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL(pull, NDR_IN, &r);
@ -910,6 +1032,12 @@ static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEDEL(pipes_struct *p)
r.out.result = _WKSSVC_NETRLOGONDOMAINNAMEDEL(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRLOGONDOMAINNAMEDEL, &r);
@ -926,7 +1054,7 @@ static BOOL api_WKSSVC_NETRLOGONDOMAINNAMEDEL(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -951,8 +1079,10 @@ static BOOL api_WKSSVC_NETRJOINDOMAIN(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRJOINDOMAIN(pull, NDR_IN, &r);
@ -966,6 +1096,12 @@ static BOOL api_WKSSVC_NETRJOINDOMAIN(pipes_struct *p)
r.out.result = _WKSSVC_NETRJOINDOMAIN(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRJOINDOMAIN, &r);
@ -982,7 +1118,7 @@ static BOOL api_WKSSVC_NETRJOINDOMAIN(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1007,8 +1143,10 @@ static BOOL api_WKSSVC_NETRUNJOINDOMAIN(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRUNJOINDOMAIN(pull, NDR_IN, &r);
@ -1022,6 +1160,12 @@ static BOOL api_WKSSVC_NETRUNJOINDOMAIN(pipes_struct *p)
r.out.result = _WKSSVC_NETRUNJOINDOMAIN(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUNJOINDOMAIN, &r);
@ -1038,7 +1182,7 @@ static BOOL api_WKSSVC_NETRUNJOINDOMAIN(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1063,8 +1207,10 @@ static BOOL api_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pull, NDR_IN, &r);
@ -1078,6 +1224,12 @@ static BOOL api_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pipes_struct *p)
r.out.result = _WKSSVC_NETRRENAMEMACHINEINDOMAIN(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRRENAMEMACHINEINDOMAIN, &r);
@ -1094,7 +1246,7 @@ static BOOL api_WKSSVC_NETRRENAMEMACHINEINDOMAIN(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1119,8 +1271,10 @@ static BOOL api_WKSSVC_NETRVALIDATENAME(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRVALIDATENAME(pull, NDR_IN, &r);
@ -1134,6 +1288,12 @@ static BOOL api_WKSSVC_NETRVALIDATENAME(pipes_struct *p)
r.out.result = _WKSSVC_NETRVALIDATENAME(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRVALIDATENAME, &r);
@ -1150,7 +1310,7 @@ static BOOL api_WKSSVC_NETRVALIDATENAME(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1175,8 +1335,10 @@ static BOOL api_WKSSVC_NETRGETJOININFORMATION(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRGETJOININFORMATION(pull, NDR_IN, &r);
@ -1190,6 +1352,12 @@ static BOOL api_WKSSVC_NETRGETJOININFORMATION(pipes_struct *p)
r.out.result = _WKSSVC_NETRGETJOININFORMATION(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRGETJOININFORMATION, &r);
@ -1206,7 +1374,7 @@ static BOOL api_WKSSVC_NETRGETJOININFORMATION(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1231,8 +1399,10 @@ static BOOL api_WKSSVC_NETRGETJOINABLEOUS(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRGETJOINABLEOUS(pull, NDR_IN, &r);
@ -1246,6 +1416,12 @@ static BOOL api_WKSSVC_NETRGETJOINABLEOUS(pipes_struct *p)
r.out.result = _WKSSVC_NETRGETJOINABLEOUS(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRGETJOINABLEOUS, &r);
@ -1262,7 +1438,7 @@ static BOOL api_WKSSVC_NETRGETJOINABLEOUS(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1287,8 +1463,10 @@ static BOOL api_wkssvc_NetrJoinDomain2(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_wkssvc_NetrJoinDomain2(pull, NDR_IN, &r);
@ -1302,6 +1480,12 @@ static BOOL api_wkssvc_NetrJoinDomain2(pipes_struct *p)
r.out.result = _wkssvc_NetrJoinDomain2(p, r.in.server_name, r.in.domain_name, r.in.account_name, r.in.admin_account, r.in.encrypted_password, r.in.join_flags);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2, &r);
@ -1318,7 +1502,7 @@ static BOOL api_wkssvc_NetrJoinDomain2(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1343,8 +1527,10 @@ static BOOL api_wkssvc_NetrUnjoinDomain2(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_wkssvc_NetrUnjoinDomain2(pull, NDR_IN, &r);
@ -1358,6 +1544,12 @@ static BOOL api_wkssvc_NetrUnjoinDomain2(pipes_struct *p)
r.out.result = _wkssvc_NetrUnjoinDomain2(p, r.in.server_name, r.in.account, r.in.encrypted_password, r.in.unjoin_flags);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2, &r);
@ -1374,7 +1566,7 @@ static BOOL api_wkssvc_NetrUnjoinDomain2(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1399,8 +1591,10 @@ static BOOL api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_wkssvc_NetrRenameMachineInDomain2(pull, NDR_IN, &r);
@ -1414,6 +1608,12 @@ static BOOL api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p)
r.out.result = _wkssvc_NetrRenameMachineInDomain2(p, r.in.server_name, r.in.NewMachineName, r.in.Account, r.in.EncryptedPassword, r.in.RenameOptions);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2, &r);
@ -1430,7 +1630,7 @@ static BOOL api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1455,8 +1655,10 @@ static BOOL api_WKSSVC_NETRVALIDATENAME2(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRVALIDATENAME2(pull, NDR_IN, &r);
@ -1470,6 +1672,12 @@ static BOOL api_WKSSVC_NETRVALIDATENAME2(pipes_struct *p)
r.out.result = _WKSSVC_NETRVALIDATENAME2(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRVALIDATENAME2, &r);
@ -1486,7 +1694,7 @@ static BOOL api_WKSSVC_NETRVALIDATENAME2(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1511,8 +1719,10 @@ static BOOL api_WKSSVC_NETRGETJOINABLEOUS2(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRGETJOINABLEOUS2(pull, NDR_IN, &r);
@ -1526,6 +1736,12 @@ static BOOL api_WKSSVC_NETRGETJOINABLEOUS2(pipes_struct *p)
r.out.result = _WKSSVC_NETRGETJOINABLEOUS2(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRGETJOINABLEOUS2, &r);
@ -1542,7 +1758,7 @@ static BOOL api_WKSSVC_NETRGETJOINABLEOUS2(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1567,8 +1783,10 @@ static BOOL api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_wkssvc_NetrAddAlternateComputerName(pull, NDR_IN, &r);
@ -1582,6 +1800,12 @@ static BOOL api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p)
r.out.result = _wkssvc_NetrAddAlternateComputerName(p, r.in.server_name, r.in.NewAlternateMachineName, r.in.Account, r.in.EncryptedPassword, r.in.Reserved);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName, &r);
@ -1598,7 +1822,7 @@ static BOOL api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1623,8 +1847,10 @@ static BOOL api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_wkssvc_NetrRemoveAlternateComputerName(pull, NDR_IN, &r);
@ -1638,6 +1864,12 @@ static BOOL api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p)
r.out.result = _wkssvc_NetrRemoveAlternateComputerName(p, r.in.server_name, r.in.AlternateMachineNameToRemove, r.in.Account, r.in.EncryptedPassword, r.in.Reserved);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &r);
@ -1654,7 +1886,7 @@ static BOOL api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1679,8 +1911,10 @@ static BOOL api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pull, NDR_IN, &r);
@ -1694,6 +1928,12 @@ static BOOL api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pipes_struct *p)
r.out.result = _WKSSVC_NETRSETPRIMARYCOMPUTERNAME(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRSETPRIMARYCOMPUTERNAME, &r);
@ -1710,7 +1950,7 @@ static BOOL api_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}
@ -1735,8 +1975,10 @@ static BOOL api_WKSSVC_NETRENUMERATECOMPUTERNAMES(pipes_struct *p)
}
pull = ndr_pull_init_blob(&blob, mem_ctx);
if (pull == NULL)
if (pull == NULL) {
talloc_free(mem_ctx);
return False;
}
pull->flags |= LIBNDR_FLAG_REF_ALLOC;
status = ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES(pull, NDR_IN, &r);
@ -1750,6 +1992,12 @@ static BOOL api_WKSSVC_NETRENUMERATECOMPUTERNAMES(pipes_struct *p)
r.out.result = _WKSSVC_NETRENUMERATECOMPUTERNAMES(p);
if (p->rng_fault_state) {
talloc_free(mem_ctx);
/* Return True here, srv_pipe_hnd.c will take care */
return True;
}
if (DEBUGLEVEL >= 10)
NDR_PRINT_OUT_DEBUG(WKSSVC_NETRENUMERATECOMPUTERNAMES, &r);
@ -1766,7 +2014,7 @@ static BOOL api_WKSSVC_NETRENUMERATECOMPUTERNAMES(pipes_struct *p)
}
blob = ndr_push_blob(push);
if (!prs_init_data_blob(&p->out_data.rdata, &blob, p->mem_ctx)) {
if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) {
talloc_free(mem_ctx);
return False;
}