diff options
Diffstat (limited to 'source3/librpc/gen_ndr/srv_unixinfo.c')
-rw-r--r-- | source3/librpc/gen_ndr/srv_unixinfo.c | 300 |
1 files changed, 155 insertions, 145 deletions
diff --git a/source3/librpc/gen_ndr/srv_unixinfo.c b/source3/librpc/gen_ndr/srv_unixinfo.c index 19863d798f..36a6250ad0 100644 --- a/source3/librpc/gen_ndr/srv_unixinfo.c +++ b/source3/librpc/gen_ndr/srv_unixinfo.c @@ -14,74 +14,76 @@ static bool api_unixinfo_SidToUid(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct unixinfo_SidToUid *r; - + call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOUID]; - + r = talloc(NULL, struct unixinfo_SidToUid); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(unixinfo_SidToUid, r); - + } + ZERO_STRUCT(r->out); r->out.uid = talloc_zero(r, uint64_t); if (r->out.uid == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _unixinfo_SidToUid(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(unixinfo_SidToUid, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_unixinfo_UidToSid(pipes_struct *p) @@ -92,74 +94,76 @@ static bool api_unixinfo_UidToSid(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct unixinfo_UidToSid *r; - + call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_UIDTOSID]; - + r = talloc(NULL, struct unixinfo_UidToSid); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(unixinfo_UidToSid, r); - + } + ZERO_STRUCT(r->out); r->out.sid = talloc_zero(r, struct dom_sid); if (r->out.sid == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _unixinfo_UidToSid(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_unixinfo_SidToGid(pipes_struct *p) @@ -170,74 +174,76 @@ static bool api_unixinfo_SidToGid(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct unixinfo_SidToGid *r; - + call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_SIDTOGID]; - + r = talloc(NULL, struct unixinfo_SidToGid); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(unixinfo_SidToGid, r); - + } + ZERO_STRUCT(r->out); r->out.gid = talloc_zero(r, uint64_t); if (r->out.gid == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _unixinfo_SidToGid(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_unixinfo_GidToSid(pipes_struct *p) @@ -248,74 +254,76 @@ static bool api_unixinfo_GidToSid(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct unixinfo_GidToSid *r; - + call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GIDTOSID]; - + r = talloc(NULL, struct unixinfo_GidToSid); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(unixinfo_GidToSid, r); - + } + ZERO_STRUCT(r->out); r->out.sid = talloc_zero(r, struct dom_sid); if (r->out.sid == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _unixinfo_GidToSid(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } static bool api_unixinfo_GetPWUid(pipes_struct *p) @@ -326,75 +334,77 @@ static bool api_unixinfo_GetPWUid(pipes_struct *p) enum ndr_err_code ndr_err; DATA_BLOB blob; struct unixinfo_GetPWUid *r; - + call = &ndr_table_unixinfo.calls[NDR_UNIXINFO_GETPWUID]; - + r = talloc(NULL, struct unixinfo_GetPWUid); if (r == NULL) { - return False; + return false; } - + if (!prs_data_blob(&p->in_data.data, &blob, r)) { talloc_free(r); - return False; + return false; } - + pull = ndr_pull_init_blob(&blob, r); if (pull == NULL) { talloc_free(r); - return False; + return false; } - + pull->flags |= LIBNDR_FLAG_REF_ALLOC; ndr_err = call->ndr_pull(pull, NDR_IN, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_IN_DEBUG(unixinfo_GetPWUid, r); - + } + ZERO_STRUCT(r->out); r->out.count = r->in.count; r->out.infos = talloc_zero_array(r, struct unixinfo_GetPWUidInfo, *r->out.count); if (r->out.infos == NULL) { talloc_free(r); - return False; + return false; } - + r->out.result = _unixinfo_GetPWUid(p, r); - + if (p->rng_fault_state) { talloc_free(r); - /* Return True here, srv_pipe_hnd.c will take care */ - return True; + /* Return true here, srv_pipe_hnd.c will take care */ + return true; } - - if (DEBUGLEVEL >= 10) + + if (DEBUGLEVEL >= 10) { NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, r); - + } + push = ndr_push_init_ctx(r); if (push == NULL) { talloc_free(r); - return False; + return false; } - + ndr_err = call->ndr_push(push, NDR_OUT, r); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(r); - return False; + return false; } - + blob = ndr_push_blob(push); - if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32)blob.length)) { + if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) { talloc_free(r); - return False; + return false; } - + talloc_free(r); - - return True; + + return true; } |