diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-10-10 07:55:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:22 -0500 |
commit | 416466a16f58ac644baacaa2522c4e98176d0e70 (patch) | |
tree | f52cfe13bb2fc2fe7a34be66985d63704b02cd9c /source/librpc/gen_ndr/srv_dfs.c | |
parent | 21c08e7ef460ae7eaf1f441e8aadcfe0502fa1ad (diff) | |
download | samba-416466a16f58ac644baacaa2522c4e98176d0e70.tar.gz samba-416466a16f58ac644baacaa2522c4e98176d0e70.tar.xz samba-416466a16f58ac644baacaa2522c4e98176d0e70.zip |
r19221: Monster-Checkin after "make idl"
Diffstat (limited to 'source/librpc/gen_ndr/srv_dfs.c')
-rw-r--r-- | source/librpc/gen_ndr/srv_dfs.c | 276 |
1 files changed, 230 insertions, 46 deletions
diff --git a/source/librpc/gen_ndr/srv_dfs.c b/source/librpc/gen_ndr/srv_dfs.c index 4c16201e9f3..fe34b6e323a 100644 --- a/source/librpc/gen_ndr/srv_dfs.c +++ b/source/librpc/gen_ndr/srv_dfs.c @@ -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; } |