/* parser auto-generated by pidl */ #include "includes.h" NTSTATUS ndr_push_samr_Connect(struct ndr_push *ndr, struct samr_Connect *r) { NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name)); if (r->in.system_name) { NDR_CHECK(ndr_push_uint16(ndr, *r->in.system_name)); } NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_Close(struct ndr_push *ndr, struct samr_Close *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_SetSecurity(struct ndr_push *ndr, struct samr_SetSecurity *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QuerySecurity(struct ndr_push *ndr, struct samr_QuerySecurity *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_Shutdown(struct ndr_push *ndr, struct samr_Shutdown *r) { return NT_STATUS_OK; } static NTSTATUS ndr_push_samr_Name(struct ndr_push *ndr, int ndr_flags, struct samr_Name *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint16(ndr, 2*strlen_m(r->name))); NDR_CHECK(ndr_push_uint16(ndr, 2*strlen_m(r->name))); NDR_CHECK(ndr_push_ptr(ndr, r->name)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; if (r->name) { NDR_CHECK(ndr_push_unistr_noterm(ndr, r->name)); } done: return NT_STATUS_OK; } NTSTATUS ndr_push_samr_LookupDomain(struct ndr_push *ndr, struct samr_LookupDomain *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_EnumDomains(struct ndr_push *ndr, struct samr_EnumDomains *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.buf_size)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_OpenDomain(struct ndr_push *ndr, struct samr_OpenDomain *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); NDR_CHECK(ndr_push_dom_sid2(ndr, r->in.sid)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, struct samr_QueryDomainInfo *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_SET_DOMAIN_INFO(struct ndr_push *ndr, struct samr_SET_DOMAIN_INFO *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_CREATE_DOM_GROUP(struct ndr_push *ndr, struct samr_CREATE_DOM_GROUP *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_EnumDomainGroups(struct ndr_push *ndr, struct samr_EnumDomainGroups *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.max_size)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_CREATE_USER_IN_DOMAIN(struct ndr_push *ndr, struct samr_CREATE_USER_IN_DOMAIN *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, struct samr_EnumDomainUsers *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.acct_flags)); NDR_CHECK(ndr_push_uint32(ndr, r->in.max_size)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_CREATE_DOM_ALIAS(struct ndr_push *ndr, struct samr_CREATE_DOM_ALIAS *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, struct samr_EnumDomainAliases *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.max_size)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_GET_ALIAS_MEMBERSHIP(struct ndr_push *ndr, struct samr_GET_ALIAS_MEMBERSHIP *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_LOOKUP_NAMES(struct ndr_push *ndr, struct samr_LOOKUP_NAMES *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_LOOKUP_RIDS(struct ndr_push *ndr, struct samr_LOOKUP_RIDS *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_OpenGroup(struct ndr_push *ndr, struct samr_OpenGroup *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); NDR_CHECK(ndr_push_uint32(ndr, r->in.rid)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QueryGroupInfo(struct ndr_push *ndr, struct samr_QueryGroupInfo *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_SET_GROUPINFO(struct ndr_push *ndr, struct samr_SET_GROUPINFO *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_ADD_GROUPMEM(struct ndr_push *ndr, struct samr_ADD_GROUPMEM *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_DELETE_DOM_GROUP(struct ndr_push *ndr, struct samr_DELETE_DOM_GROUP *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_DEL_GROUPMEM(struct ndr_push *ndr, struct samr_DEL_GROUPMEM *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QUERY_GROUPMEM(struct ndr_push *ndr, struct samr_QUERY_GROUPMEM *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_SET_MEMBER_ATTRIBUTES_OF_GROUP(struct ndr_push *ndr, struct samr_SET_MEMBER_ATTRIBUTES_OF_GROUP *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_OpenAlias(struct ndr_push *ndr, struct samr_OpenAlias *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); NDR_CHECK(ndr_push_uint32(ndr, r->in.rid)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QueryAliasInfo(struct ndr_push *ndr, struct samr_QueryAliasInfo *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_SET_ALIASINFO(struct ndr_push *ndr, struct samr_SET_ALIASINFO *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_DELETE_DOM_ALIAS(struct ndr_push *ndr, struct samr_DELETE_DOM_ALIAS *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_ADD_ALIASMEM(struct ndr_push *ndr, struct samr_ADD_ALIASMEM *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_DEL_ALIASMEM(struct ndr_push *ndr, struct samr_DEL_ALIASMEM *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_GET_MEMBERS_IN_ALIAS(struct ndr_push *ndr, struct samr_GET_MEMBERS_IN_ALIAS *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_OpenUser(struct ndr_push *ndr, struct samr_OpenUser *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); NDR_CHECK(ndr_push_uint32(ndr, r->in.rid)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_DELETE_DOM_USER(struct ndr_push *ndr, struct samr_DELETE_DOM_USER *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, struct samr_QueryUserInfo *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_SET_USERINFO(struct ndr_push *ndr, struct samr_SET_USERINFO *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_CHANGE_PASSWORD_USER(struct ndr_push *ndr, struct samr_CHANGE_PASSWORD_USER *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_GET_GROUPS_FOR_USER(struct ndr_push *ndr, struct samr_GET_GROUPS_FOR_USER *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QUERY_DISPINFO(struct ndr_push *ndr, struct samr_QUERY_DISPINFO *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_GET_DISPLAY_ENUMERATION_INDEX(struct ndr_push *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_TEST_PRIVATE_FUNCTIONS_DOMAIN(struct ndr_push *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_DOMAIN *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_TEST_PRIVATE_FUNCTIONS_USER(struct ndr_push *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_USER *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_GET_USRDOM_PWINFO(struct ndr_push *ndr, struct samr_GET_USRDOM_PWINFO *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN(struct ndr_push *ndr, struct samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QUERY_INFORMATION_DOMAIN2(struct ndr_push *ndr, struct samr_QUERY_INFORMATION_DOMAIN2 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QUERY_INFORMATION_USER2(struct ndr_push *ndr, struct samr_QUERY_INFORMATION_USER2 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QUERY_DISPINFO2(struct ndr_push *ndr, struct samr_QUERY_DISPINFO2 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_GET_DISPLAY_ENUMERATION_INDEX2(struct ndr_push *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX2 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_CREATE_USER2_IN_DOMAIN(struct ndr_push *ndr, struct samr_CREATE_USER2_IN_DOMAIN *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_QUERY_DISPINFO3(struct ndr_push *ndr, struct samr_QUERY_DISPINFO3 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS(struct ndr_push *ndr, struct samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS(struct ndr_push *ndr, struct samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_OEM_CHANGE_PASSWORD_USER2(struct ndr_push *ndr, struct samr_OEM_CHANGE_PASSWORD_USER2 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_UNICODE_CHANGE_PASSWORD_USER2(struct ndr_push *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER2 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_GET_DOM_PWINFO(struct ndr_push *ndr, struct samr_GET_DOM_PWINFO *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_CONNECT2(struct ndr_push *ndr, struct samr_CONNECT2 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_SET_USERINFO2(struct ndr_push *ndr, struct samr_SET_USERINFO2 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_SET_BOOT_KEY_INFORMATION(struct ndr_push *ndr, struct samr_SET_BOOT_KEY_INFORMATION *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_GET_BOOT_KEY_INFORMATION(struct ndr_push *ndr, struct samr_GET_BOOT_KEY_INFORMATION *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_CONNECT3(struct ndr_push *ndr, struct samr_CONNECT3 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_Connect4(struct ndr_push *ndr, struct samr_Connect4 *r) { NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name)); if (r->in.system_name) { NDR_CHECK(ndr_push_unistr(ndr, r->in.system_name)); } NDR_CHECK(ndr_push_uint32(ndr, r->in.unknown)); NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); return NT_STATUS_OK; } NTSTATUS ndr_push_samr_UNICODE_CHANGE_PASSWORD_USER3(struct ndr_push *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER3 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_CONNECT5(struct ndr_push *ndr, struct samr_CONNECT5 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_RID_TO_SID(struct ndr_push *ndr, struct samr_RID_TO_SID *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_SET_DSRM_PASSWORD(struct ndr_push *ndr, struct samr_SET_DSRM_PASSWORD *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_samr_VALIDATE_PASSWORD(struct ndr_push *ndr, struct samr_VALIDATE_PASSWORD *r) { return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_Connect(struct ndr_pull *ndr, struct samr_Connect *r) { NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_Close(struct ndr_pull *ndr, struct samr_Close *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_SetSecurity(struct ndr_pull *ndr, struct samr_SetSecurity *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, struct samr_QuerySecurity *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_Shutdown(struct ndr_pull *ndr, struct samr_Shutdown *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_Name(struct ndr_pull *ndr, int ndr_flags, struct samr_Name *r) { uint32 _ptr_name; if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint16(ndr, &r->name_len)); NDR_CHECK(ndr_pull_uint16(ndr, &r->name_size)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name)); if (_ptr_name) { NDR_ALLOC(ndr, r->name); } else { r->name = NULL; } buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; if (r->name) { NDR_CHECK(ndr_pull_unistr_noterm(ndr, &r->name)); } done: return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, struct samr_LookupDomain *r) { uint32 _ptr_sid; NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid)); if (_ptr_sid) { NDR_ALLOC(ndr, r->out.sid); } else { r->out.sid = NULL; } if (r->out.sid) { NDR_CHECK(ndr_pull_dom_sid2(ndr, r->out.sid)); } NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_SamEntry(struct ndr_pull *ndr, int ndr_flags, struct samr_SamEntry *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->idx)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->name)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r) { uint32 _ptr_entries; if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->count)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_entries)); if (_ptr_entries) { NDR_ALLOC(ndr, r->entries); } else { r->entries = NULL; } buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; if (r->entries) { { uint32 _array_size; NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); if (r->count > _array_size) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count); } } NDR_ALLOC_N_SIZE(ndr, r->entries, r->count, sizeof(r->entries[0])); NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->entries, sizeof(r->entries[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_samr_SamEntry)); } done: return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, struct samr_EnumDomains *r) { uint32 _ptr_sam; NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam)); if (_ptr_sam) { NDR_ALLOC(ndr, r->out.sam); } else { r->out.sam = NULL; } if (r->out.sam) { NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); } NDR_CHECK(ndr_pull_uint32(ndr, r->out.num_entries)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, struct samr_OpenDomain *r) { NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.domain_handle)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo1 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint16(ndr, &r->min_length_password)); NDR_CHECK(ndr_pull_uint16(ndr, &r->password_history)); NDR_CHECK(ndr_pull_uint32(ndr, &r->flag)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->expire)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->min_passwordage)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo2 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->force_logoff_time)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown1)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->domain)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->primary)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown2)); NDR_CHECK(ndr_pull_uint32(ndr, &r->role)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown3)); NDR_CHECK(ndr_pull_uint32(ndr, &r->num_users)); NDR_CHECK(ndr_pull_uint32(ndr, &r->num_groups)); NDR_CHECK(ndr_pull_uint32(ndr, &r->num_aliases)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown1)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo3 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->force_logoff_time)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo4 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo5 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->domain)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo6 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->primary)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo7 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->role)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo8 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_xxx_time)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo9 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo11 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->force_logoff_time)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown1)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->domain)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->primary)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown2)); NDR_CHECK(ndr_pull_uint32(ndr, &r->role)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown3)); NDR_CHECK(ndr_pull_uint32(ndr, &r->num_users)); NDR_CHECK(ndr_pull_uint32(ndr, &r->num_groups)); NDR_CHECK(ndr_pull_uint32(ndr, &r->num_aliases)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_duration)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_window)); NDR_CHECK(ndr_pull_uint16(ndr, &r->lockout_threshold)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown1)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo12 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_duration)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_window)); NDR_CHECK(ndr_pull_uint16(ndr, &r->lockout_threshold)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo13 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 8)); NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_xxx_time)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown2)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union samr_DomainInfo *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_uint16(ndr, level)); switch (*level) { case 1: { NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1)); break; } case 2: { NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2)); break; } case 3: { NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3)); break; } case 4: { NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4)); break; } case 5: { NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5)); break; } case 6: { NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6)); break; } case 7: { NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7)); break; } case 8: { NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8)); break; } case 9: { NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9)); break; } case 11: { NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11)); break; } case 12: { NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12)); break; } case 13: { NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13)); break; } default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; switch (*level) { case 1: NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_BUFFERS, &r->info1)); break; case 2: NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2)); break; case 3: NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_BUFFERS, &r->info3)); break; case 4: NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_BUFFERS, &r->info4)); break; case 5: NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5)); break; case 6: NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6)); break; case 7: NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_BUFFERS, &r->info7)); break; case 8: NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_BUFFERS, &r->info8)); break; case 9: NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_BUFFERS, &r->info9)); break; case 11: NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11)); break; case 12: NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_BUFFERS, &r->info12)); break; case 13: NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_BUFFERS, &r->info13)); break; default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } done: return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, struct samr_QueryDomainInfo *r) { uint32 _ptr_info; NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); if (_ptr_info) { NDR_ALLOC(ndr, r->out.info); } else { r->out.info = NULL; } if (r->out.info) { { uint16 _level; NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &_level, r->out.info)); if (((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) && (_level != r->in.level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); } } NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_SET_DOMAIN_INFO(struct ndr_pull *ndr, struct samr_SET_DOMAIN_INFO *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_CREATE_DOM_GROUP(struct ndr_pull *ndr, struct samr_CREATE_DOM_GROUP *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_EnumDomainGroups(struct ndr_pull *ndr, struct samr_EnumDomainGroups *r) { uint32 _ptr_sam; NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam)); if (_ptr_sam) { NDR_ALLOC(ndr, r->out.sam); } else { r->out.sam = NULL; } if (r->out.sam) { NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); } NDR_CHECK(ndr_pull_uint32(ndr, &r->out.num_entries)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_CREATE_USER_IN_DOMAIN(struct ndr_pull *ndr, struct samr_CREATE_USER_IN_DOMAIN *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, struct samr_EnumDomainUsers *r) { uint32 _ptr_sam; NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam)); if (_ptr_sam) { NDR_ALLOC(ndr, r->out.sam); } else { r->out.sam = NULL; } if (r->out.sam) { NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); } NDR_CHECK(ndr_pull_uint32(ndr, &r->out.num_entries)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_CREATE_DOM_ALIAS(struct ndr_pull *ndr, struct samr_CREATE_DOM_ALIAS *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, struct samr_EnumDomainAliases *r) { uint32 _ptr_sam; NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam)); if (_ptr_sam) { NDR_ALLOC(ndr, r->out.sam); } else { r->out.sam = NULL; } if (r->out.sam) { NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam)); } NDR_CHECK(ndr_pull_uint32(ndr, &r->out.num_entries)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_GET_ALIAS_MEMBERSHIP(struct ndr_pull *ndr, struct samr_GET_ALIAS_MEMBERSHIP *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_LOOKUP_NAMES(struct ndr_pull *ndr, struct samr_LOOKUP_NAMES *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_LOOKUP_RIDS(struct ndr_pull *ndr, struct samr_LOOKUP_RIDS *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_OpenGroup(struct ndr_pull *ndr, struct samr_OpenGroup *r) { NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_GroupInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAll *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); NDR_CHECK(ndr_pull_uint32(ndr, &r->num_members)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_GroupInfoName(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoName *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->Name)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->Name)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_GroupInfoX(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoX *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_GroupInfoDesciption(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoDesciption *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_GroupInfo(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union samr_GroupInfo *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_uint16(ndr, level)); switch (*level) { case 1: { NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_SCALARS, &r->all)); break; } case 2: { NDR_CHECK(ndr_pull_samr_GroupInfoName(ndr, NDR_SCALARS, &r->name)); break; } case 3: { NDR_CHECK(ndr_pull_samr_GroupInfoX(ndr, NDR_SCALARS, &r->unknown)); break; } case 4: { NDR_CHECK(ndr_pull_samr_GroupInfoDesciption(ndr, NDR_SCALARS, &r->description)); break; } default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; switch (*level) { case 1: NDR_CHECK(ndr_pull_samr_GroupInfoAll(ndr, NDR_BUFFERS, &r->all)); break; case 2: NDR_CHECK(ndr_pull_samr_GroupInfoName(ndr, NDR_BUFFERS, &r->name)); break; case 3: NDR_CHECK(ndr_pull_samr_GroupInfoX(ndr, NDR_BUFFERS, &r->unknown)); break; case 4: NDR_CHECK(ndr_pull_samr_GroupInfoDesciption(ndr, NDR_BUFFERS, &r->description)); break; default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } done: return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QueryGroupInfo(struct ndr_pull *ndr, struct samr_QueryGroupInfo *r) { uint32 _ptr_info; NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); if (_ptr_info) { NDR_ALLOC(ndr, r->out.info); } else { r->out.info = NULL; } if (r->out.info) { { uint16 _level; NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &_level, r->out.info)); if (((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) && (_level != r->in.level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); } } NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_SET_GROUPINFO(struct ndr_pull *ndr, struct samr_SET_GROUPINFO *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_ADD_GROUPMEM(struct ndr_pull *ndr, struct samr_ADD_GROUPMEM *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_DELETE_DOM_GROUP(struct ndr_pull *ndr, struct samr_DELETE_DOM_GROUP *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_DEL_GROUPMEM(struct ndr_pull *ndr, struct samr_DEL_GROUPMEM *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QUERY_GROUPMEM(struct ndr_pull *ndr, struct samr_QUERY_GROUPMEM *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_SET_MEMBER_ATTRIBUTES_OF_GROUP(struct ndr_pull *ndr, struct samr_SET_MEMBER_ATTRIBUTES_OF_GROUP *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_OpenAlias(struct ndr_pull *ndr, struct samr_OpenAlias *r) { NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_AliasInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoAll *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->name)); NDR_CHECK(ndr_pull_uint32(ndr, &r->num_members)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_AliasInfoName(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoName *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->name)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_AliasInfoDescription(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoDescription *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_AliasInfo(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union samr_AliasInfo *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_uint16(ndr, level)); switch (*level) { case 1: { NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_SCALARS, &r->all)); break; } case 2: { NDR_CHECK(ndr_pull_samr_AliasInfoName(ndr, NDR_SCALARS, &r->name)); break; } case 3: { NDR_CHECK(ndr_pull_samr_AliasInfoDescription(ndr, NDR_SCALARS, &r->description)); break; } default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; switch (*level) { case 1: NDR_CHECK(ndr_pull_samr_AliasInfoAll(ndr, NDR_BUFFERS, &r->all)); break; case 2: NDR_CHECK(ndr_pull_samr_AliasInfoName(ndr, NDR_BUFFERS, &r->name)); break; case 3: NDR_CHECK(ndr_pull_samr_AliasInfoDescription(ndr, NDR_BUFFERS, &r->description)); break; default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } done: return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QueryAliasInfo(struct ndr_pull *ndr, struct samr_QueryAliasInfo *r) { uint32 _ptr_info; NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); if (_ptr_info) { NDR_ALLOC(ndr, r->out.info); } else { r->out.info = NULL; } if (r->out.info) { { uint16 _level; NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &_level, r->out.info)); if (((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) && (_level != r->in.level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); } } NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_SET_ALIASINFO(struct ndr_pull *ndr, struct samr_SET_ALIASINFO *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_DELETE_DOM_ALIAS(struct ndr_pull *ndr, struct samr_DELETE_DOM_ALIAS *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_ADD_ALIASMEM(struct ndr_pull *ndr, struct samr_ADD_ALIASMEM *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_DEL_ALIASMEM(struct ndr_pull *ndr, struct samr_DEL_ALIASMEM *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_GET_MEMBERS_IN_ALIAS(struct ndr_pull *ndr, struct samr_GET_MEMBERS_IN_ALIAS *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_OpenUser(struct ndr_pull *ndr, struct samr_OpenUser *r) { NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_DELETE_DOM_USER(struct ndr_pull *ndr, struct samr_DELETE_DOM_USER *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo1 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_group_rid)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->comment)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->comment)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo2 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->comment)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown1)); NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown2)); NDR_CHECK(ndr_pull_uint16(ndr, &r->country_code)); NDR_CHECK(ndr_pull_uint16(ndr, &r->code_page)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->comment)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo3 *r) { uint32 _ptr_logon_hours; if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); NDR_CHECK(ndr_pull_uint32(ndr, &r->Rid)); NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_group_rid)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_directory)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->profile)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->workstations)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logon)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logoff)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_pwd_change)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->allow_pwd_change)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->force_pwd_change)); NDR_CHECK(ndr_pull_uint32(ndr, &r->units_per_week)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_logon_hours)); if (_ptr_logon_hours) { NDR_ALLOC(ndr, r->logon_hours); } else { r->logon_hours = NULL; } NDR_CHECK(ndr_pull_uint16(ndr, &r->bad_pwd_count)); NDR_CHECK(ndr_pull_uint16(ndr, &r->num_logons)); NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_directory)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); if (r->logon_hours) { { uint32 _array_size; NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); if (1260 > _array_size) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, 1260); } } NDR_ALLOC_N_SIZE(ndr, r->logon_hours, 1260, sizeof(r->logon_hours[0])); uint32 _offset, _length; NDR_CHECK(ndr_pull_uint32(ndr, &_offset)); NDR_CHECK(ndr_pull_uint32(ndr, &_length)); if (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, "Bad array offset 0x%08x", _offset); if (_length > 1260 || _length != r->units_per_week/8) return ndr_pull_error(ndr, NDR_ERR_LENGTH, "Bad array length 0x%08x > size 0x%08x", _offset, 1260); NDR_CHECK(ndr_pull_array_uint8(ndr, r->logon_hours, _length)); } done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo4 *r) { uint32 _ptr_logon_hours; if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->units_per_week)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_logon_hours)); if (_ptr_logon_hours) { NDR_ALLOC(ndr, r->logon_hours); } else { r->logon_hours = NULL; } buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; if (r->logon_hours) { { uint32 _array_size; NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); if (1260 > _array_size) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, 1260); } } NDR_ALLOC_N_SIZE(ndr, r->logon_hours, 1260, sizeof(r->logon_hours[0])); uint32 _offset, _length; NDR_CHECK(ndr_pull_uint32(ndr, &_offset)); NDR_CHECK(ndr_pull_uint32(ndr, &_length)); if (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, "Bad array offset 0x%08x", _offset); if (_length > 1260 || _length != r->units_per_week/8) return ndr_pull_error(ndr, NDR_ERR_LENGTH, "Bad array length 0x%08x > size 0x%08x", _offset, 1260); NDR_CHECK(ndr_pull_array_uint8(ndr, r->logon_hours, _length)); } done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo5 *r) { uint32 _ptr_logon_hours; if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); NDR_CHECK(ndr_pull_uint32(ndr, &r->rid)); NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_group_rid)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_directory)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->profile)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->descriptiom)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->workstations)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logon)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logoff)); NDR_CHECK(ndr_pull_uint32(ndr, &r->units_per_week)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_logon_hours)); if (_ptr_logon_hours) { NDR_ALLOC(ndr, r->logon_hours); } else { r->logon_hours = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_pwd_change)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->acct_expiry)); NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_directory)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->descriptiom)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); if (r->logon_hours) { { uint32 _array_size; NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); if (1260 > _array_size) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, 1260); } } NDR_ALLOC_N_SIZE(ndr, r->logon_hours, 1260, sizeof(r->logon_hours[0])); uint32 _offset, _length; NDR_CHECK(ndr_pull_uint32(ndr, &_offset)); NDR_CHECK(ndr_pull_uint32(ndr, &_length)); if (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, "Bad array offset 0x%08x", _offset); if (_length > 1260 || _length != r->units_per_week/8) return ndr_pull_error(ndr, NDR_ERR_LENGTH, "Bad array length 0x%08x > size 0x%08x", _offset, 1260); NDR_CHECK(ndr_pull_array_uint8(ndr, r->logon_hours, _length)); } done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo6 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo7 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo8 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo9 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->PrimaryGroupRid)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo10(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo10 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_dir)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_dir)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo11 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo12 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->profile)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo13 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->descriptiom)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->descriptiom)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo14(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo14 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->workstations)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo16(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo16 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo17(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo17 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->acct_expiry)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo20(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo20 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->callback)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->callback)); done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo21 *r) { uint32 _ptr_buffer; uint32 _ptr_logon_hours; if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logon)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logoff)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_pwd_change)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->acct_expiry)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->allow_pwd_change)); NDR_CHECK(ndr_pull_NTTIME(ndr, &r->force_pwd_change)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_dir)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->profile)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->workstations)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->comment)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->callback)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown1)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown2)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown3)); NDR_CHECK(ndr_pull_uint32(ndr, &r->buf_count)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_buffer)); if (_ptr_buffer) { NDR_ALLOC(ndr, r->buffer); } else { r->buffer = NULL; } NDR_CHECK(ndr_pull_uint32(ndr, &r->rid)); NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_group_rid)); NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags)); NDR_CHECK(ndr_pull_uint32(ndr, &r->fields_present)); NDR_CHECK(ndr_pull_uint32(ndr, &r->units_per_week)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_logon_hours)); if (_ptr_logon_hours) { NDR_ALLOC(ndr, r->logon_hours); } else { r->logon_hours = NULL; } NDR_CHECK(ndr_pull_uint16(ndr, &r->bad_pwd_count)); NDR_CHECK(ndr_pull_uint16(ndr, &r->num_logons)); NDR_CHECK(ndr_pull_uint16(ndr, &r->country_code)); NDR_CHECK(ndr_pull_uint16(ndr, &r->code_page)); NDR_CHECK(ndr_pull_uint8(ndr, &r->nt_pwd_set)); NDR_CHECK(ndr_pull_uint8(ndr, &r->lm_pwd_set)); NDR_CHECK(ndr_pull_uint8(ndr, &r->expired_flag)); NDR_CHECK(ndr_pull_uint8(ndr, &r->unknown4)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_dir)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->comment)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->callback)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown1)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown2)); NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown3)); if (r->buffer) { { uint32 _array_size; NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); if (r->buf_count > _array_size) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->buf_count); } } NDR_ALLOC_N_SIZE(ndr, r->buffer, r->buf_count, sizeof(r->buffer[0])); NDR_CHECK(ndr_pull_array_uint8(ndr, r->buffer, r->buf_count)); } if (r->logon_hours) { { uint32 _array_size; NDR_CHECK(ndr_pull_uint32(ndr, &_array_size)); if (1260 > _array_size) { return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, 1260); } } NDR_ALLOC_N_SIZE(ndr, r->logon_hours, 1260, sizeof(r->logon_hours[0])); uint32 _offset, _length; NDR_CHECK(ndr_pull_uint32(ndr, &_offset)); NDR_CHECK(ndr_pull_uint32(ndr, &_length)); if (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, "Bad array offset 0x%08x", _offset); if (_length > 1260 || _length != r->units_per_week/8) return ndr_pull_error(ndr, NDR_ERR_LENGTH, "Bad array length 0x%08x > size 0x%08x", _offset, 1260); NDR_CHECK(ndr_pull_array_uint8(ndr, r->logon_hours, _length)); } done: return NT_STATUS_OK; } static NTSTATUS ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union samr_UserInfo *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_uint16(ndr, level)); switch (*level) { case 1: { NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1)); break; } case 2: { NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2)); break; } case 3: { NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3)); break; } case 4: { NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4)); break; } case 5: { NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5)); break; } case 6: { NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6)); break; } case 7: { NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7)); break; } case 8: { NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8)); break; } case 9: { NDR_CHECK(ndr_pull_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9)); break; } case 10: { NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10)); break; } case 11: { NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11)); break; } case 12: { NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12)); break; } case 13: { NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13)); break; } case 14: { NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14)); break; } case 16: { NDR_CHECK(ndr_pull_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16)); break; } case 17: { NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17)); break; } case 20: { NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20)); break; } case 21: { NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21)); break; } default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; switch (*level) { case 1: NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1)); break; case 2: NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2)); break; case 3: NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3)); break; case 4: NDR_CHECK(ndr_pull_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4)); break; case 5: NDR_CHECK(ndr_pull_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5)); break; case 6: NDR_CHECK(ndr_pull_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6)); break; case 7: NDR_CHECK(ndr_pull_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7)); break; case 8: NDR_CHECK(ndr_pull_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8)); break; case 9: NDR_CHECK(ndr_pull_samr_UserInfo9(ndr, NDR_BUFFERS, &r->info9)); break; case 10: NDR_CHECK(ndr_pull_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10)); break; case 11: NDR_CHECK(ndr_pull_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11)); break; case 12: NDR_CHECK(ndr_pull_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12)); break; case 13: NDR_CHECK(ndr_pull_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13)); break; case 14: NDR_CHECK(ndr_pull_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14)); break; case 16: NDR_CHECK(ndr_pull_samr_UserInfo16(ndr, NDR_BUFFERS, &r->info16)); break; case 17: NDR_CHECK(ndr_pull_samr_UserInfo17(ndr, NDR_BUFFERS, &r->info17)); break; case 20: NDR_CHECK(ndr_pull_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20)); break; case 21: NDR_CHECK(ndr_pull_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21)); break; default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } done: return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, struct samr_QueryUserInfo *r) { uint32 _ptr_info; NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info)); if (_ptr_info) { NDR_ALLOC(ndr, r->out.info); } else { r->out.info = NULL; } if (r->out.info) { { uint16 _level; NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &_level, r->out.info)); if (((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) && (_level != r->in.level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); } } NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_SET_USERINFO(struct ndr_pull *ndr, struct samr_SET_USERINFO *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_CHANGE_PASSWORD_USER(struct ndr_pull *ndr, struct samr_CHANGE_PASSWORD_USER *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_GET_GROUPS_FOR_USER(struct ndr_pull *ndr, struct samr_GET_GROUPS_FOR_USER *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QUERY_DISPINFO(struct ndr_pull *ndr, struct samr_QUERY_DISPINFO *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_GET_DISPLAY_ENUMERATION_INDEX(struct ndr_pull *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_TEST_PRIVATE_FUNCTIONS_DOMAIN(struct ndr_pull *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_DOMAIN *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_TEST_PRIVATE_FUNCTIONS_USER(struct ndr_pull *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_USER *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_GET_USRDOM_PWINFO(struct ndr_pull *ndr, struct samr_GET_USRDOM_PWINFO *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN(struct ndr_pull *ndr, struct samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QUERY_INFORMATION_DOMAIN2(struct ndr_pull *ndr, struct samr_QUERY_INFORMATION_DOMAIN2 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QUERY_INFORMATION_USER2(struct ndr_pull *ndr, struct samr_QUERY_INFORMATION_USER2 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QUERY_DISPINFO2(struct ndr_pull *ndr, struct samr_QUERY_DISPINFO2 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_GET_DISPLAY_ENUMERATION_INDEX2(struct ndr_pull *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX2 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_CREATE_USER2_IN_DOMAIN(struct ndr_pull *ndr, struct samr_CREATE_USER2_IN_DOMAIN *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_QUERY_DISPINFO3(struct ndr_pull *ndr, struct samr_QUERY_DISPINFO3 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS(struct ndr_pull *ndr, struct samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS(struct ndr_pull *ndr, struct samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_OEM_CHANGE_PASSWORD_USER2(struct ndr_pull *ndr, struct samr_OEM_CHANGE_PASSWORD_USER2 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_UNICODE_CHANGE_PASSWORD_USER2(struct ndr_pull *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER2 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_GET_DOM_PWINFO(struct ndr_pull *ndr, struct samr_GET_DOM_PWINFO *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_CONNECT2(struct ndr_pull *ndr, struct samr_CONNECT2 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_SET_USERINFO2(struct ndr_pull *ndr, struct samr_SET_USERINFO2 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_SET_BOOT_KEY_INFORMATION(struct ndr_pull *ndr, struct samr_SET_BOOT_KEY_INFORMATION *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_GET_BOOT_KEY_INFORMATION(struct ndr_pull *ndr, struct samr_GET_BOOT_KEY_INFORMATION *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_CONNECT3(struct ndr_pull *ndr, struct samr_CONNECT3 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_Connect4(struct ndr_pull *ndr, struct samr_Connect4 *r) { NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_UNICODE_CHANGE_PASSWORD_USER3(struct ndr_pull *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER3 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_CONNECT5(struct ndr_pull *ndr, struct samr_CONNECT5 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_RID_TO_SID(struct ndr_pull *ndr, struct samr_RID_TO_SID *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_SET_DSRM_PASSWORD(struct ndr_pull *ndr, struct samr_SET_DSRM_PASSWORD *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_samr_VALIDATE_PASSWORD(struct ndr_pull *ndr, struct samr_VALIDATE_PASSWORD *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } void ndr_print_samr_Name(struct ndr_print *ndr, const char *name, struct samr_Name *r) { ndr_print_struct(ndr, name, "samr_Name"); ndr->depth++; ndr_print_uint16(ndr, "name_len", r->name_len); ndr_print_uint16(ndr, "name_size", r->name_size); ndr_print_ptr(ndr, "name", r->name); ndr->depth++; if (r->name) { ndr_print_unistr_noterm(ndr, "name", r->name); } ndr->depth--; ndr->depth--; } void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, struct samr_SamEntry *r) { ndr_print_struct(ndr, name, "samr_SamEntry"); ndr->depth++; ndr_print_uint32(ndr, "idx", r->idx); ndr_print_samr_Name(ndr, "name", &r->name); ndr->depth--; } void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, struct samr_SamArray *r) { ndr_print_struct(ndr, name, "samr_SamArray"); ndr->depth++; ndr_print_uint32(ndr, "count", r->count); ndr_print_ptr(ndr, "entries", r->entries); ndr->depth++; if (r->entries) { ndr_print_array(ndr, "entries", r->entries, sizeof(r->entries[0]), r->count, (ndr_print_fn_t)ndr_print_samr_SamEntry); } ndr->depth--; ndr->depth--; } void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, struct samr_DomInfo1 *r) { ndr_print_struct(ndr, name, "samr_DomInfo1"); ndr->depth++; ndr_print_uint16(ndr, "min_length_password", r->min_length_password); ndr_print_uint16(ndr, "password_history", r->password_history); ndr_print_uint32(ndr, "flag", r->flag); ndr_print_NTTIME(ndr, "expire", r->expire); ndr_print_NTTIME(ndr, "min_passwordage", r->min_passwordage); ndr->depth--; } void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, struct samr_DomInfo2 *r) { ndr_print_struct(ndr, name, "samr_DomInfo2"); ndr->depth++; ndr_print_HYPER_T(ndr, "force_logoff_time", r->force_logoff_time); ndr_print_samr_Name(ndr, "unknown1", &r->unknown1); ndr_print_samr_Name(ndr, "domain", &r->domain); ndr_print_samr_Name(ndr, "primary", &r->primary); ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); ndr_print_uint32(ndr, "unknown2", r->unknown2); ndr_print_uint32(ndr, "role", r->role); ndr_print_uint32(ndr, "unknown3", r->unknown3); ndr_print_uint32(ndr, "num_users", r->num_users); ndr_print_uint32(ndr, "num_groups", r->num_groups); ndr_print_uint32(ndr, "num_aliases", r->num_aliases); ndr->depth--; } void ndr_print_samr_DomInfo3(struct ndr_print *ndr, const char *name, struct samr_DomInfo3 *r) { ndr_print_struct(ndr, name, "samr_DomInfo3"); ndr->depth++; ndr_print_HYPER_T(ndr, "force_logoff_time", r->force_logoff_time); ndr->depth--; } void ndr_print_samr_DomInfo4(struct ndr_print *ndr, const char *name, struct samr_DomInfo4 *r) { ndr_print_struct(ndr, name, "samr_DomInfo4"); ndr->depth++; ndr_print_samr_Name(ndr, "unknown", &r->unknown); ndr->depth--; } void ndr_print_samr_DomInfo5(struct ndr_print *ndr, const char *name, struct samr_DomInfo5 *r) { ndr_print_struct(ndr, name, "samr_DomInfo5"); ndr->depth++; ndr_print_samr_Name(ndr, "domain", &r->domain); ndr->depth--; } void ndr_print_samr_DomInfo6(struct ndr_print *ndr, const char *name, struct samr_DomInfo6 *r) { ndr_print_struct(ndr, name, "samr_DomInfo6"); ndr->depth++; ndr_print_samr_Name(ndr, "primary", &r->primary); ndr->depth--; } void ndr_print_samr_DomInfo7(struct ndr_print *ndr, const char *name, struct samr_DomInfo7 *r) { ndr_print_struct(ndr, name, "samr_DomInfo7"); ndr->depth++; ndr_print_uint32(ndr, "role", r->role); ndr->depth--; } void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, struct samr_DomInfo8 *r) { ndr_print_struct(ndr, name, "samr_DomInfo8"); ndr->depth++; ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); ndr_print_NTTIME(ndr, "last_xxx_time", r->last_xxx_time); ndr->depth--; } void ndr_print_samr_DomInfo9(struct ndr_print *ndr, const char *name, struct samr_DomInfo9 *r) { ndr_print_struct(ndr, name, "samr_DomInfo9"); ndr->depth++; ndr_print_uint32(ndr, "unknown", r->unknown); ndr->depth--; } void ndr_print_samr_DomInfo11(struct ndr_print *ndr, const char *name, struct samr_DomInfo11 *r) { ndr_print_struct(ndr, name, "samr_DomInfo11"); ndr->depth++; ndr_print_HYPER_T(ndr, "force_logoff_time", r->force_logoff_time); ndr_print_samr_Name(ndr, "unknown1", &r->unknown1); ndr_print_samr_Name(ndr, "domain", &r->domain); ndr_print_samr_Name(ndr, "primary", &r->primary); ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); ndr_print_uint32(ndr, "unknown2", r->unknown2); ndr_print_uint32(ndr, "role", r->role); ndr_print_uint32(ndr, "unknown3", r->unknown3); ndr_print_uint32(ndr, "num_users", r->num_users); ndr_print_uint32(ndr, "num_groups", r->num_groups); ndr_print_uint32(ndr, "num_aliases", r->num_aliases); ndr_print_HYPER_T(ndr, "lockout_duration", r->lockout_duration); ndr_print_HYPER_T(ndr, "lockout_window", r->lockout_window); ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold); ndr->depth--; } void ndr_print_samr_DomInfo12(struct ndr_print *ndr, const char *name, struct samr_DomInfo12 *r) { ndr_print_struct(ndr, name, "samr_DomInfo12"); ndr->depth++; ndr_print_HYPER_T(ndr, "lockout_duration", r->lockout_duration); ndr_print_HYPER_T(ndr, "lockout_window", r->lockout_window); ndr_print_uint16(ndr, "lockout_threshold", r->lockout_threshold); ndr->depth--; } void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, struct samr_DomInfo13 *r) { ndr_print_struct(ndr, name, "samr_DomInfo13"); ndr->depth++; ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); ndr_print_NTTIME(ndr, "last_xxx_time", r->last_xxx_time); ndr_print_uint32(ndr, "unknown1", r->unknown1); ndr_print_uint32(ndr, "unknown2", r->unknown2); ndr->depth--; } void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, uint16 level, union samr_DomainInfo *r) { ndr_print_union(ndr, name, level, "samr_DomainInfo"); switch (level) { case 1: ndr_print_samr_DomInfo1(ndr, "info1", &r->info1); break; case 2: ndr_print_samr_DomInfo2(ndr, "info2", &r->info2); break; case 3: ndr_print_samr_DomInfo3(ndr, "info3", &r->info3); break; case 4: ndr_print_samr_DomInfo4(ndr, "info4", &r->info4); break; case 5: ndr_print_samr_DomInfo5(ndr, "info5", &r->info5); break; case 6: ndr_print_samr_DomInfo6(ndr, "info6", &r->info6); break; case 7: ndr_print_samr_DomInfo7(ndr, "info7", &r->info7); break; case 8: ndr_print_samr_DomInfo8(ndr, "info8", &r->info8); break; case 9: ndr_print_samr_DomInfo9(ndr, "info9", &r->info9); break; case 11: ndr_print_samr_DomInfo11(ndr, "info11", &r->info11); break; case 12: ndr_print_samr_DomInfo12(ndr, "info12", &r->info12); break; case 13: ndr_print_samr_DomInfo13(ndr, "info13", &r->info13); break; default: ndr_print_bad_level(ndr, name, level); } } void ndr_print_samr_GroupInfoAll(struct ndr_print *ndr, const char *name, struct samr_GroupInfoAll *r) { ndr_print_struct(ndr, name, "samr_GroupInfoAll"); ndr->depth++; ndr_print_samr_Name(ndr, "name", &r->name); ndr_print_uint32(ndr, "unknown", r->unknown); ndr_print_uint32(ndr, "num_members", r->num_members); ndr_print_samr_Name(ndr, "description", &r->description); ndr->depth--; } void ndr_print_samr_GroupInfoName(struct ndr_print *ndr, const char *name, struct samr_GroupInfoName *r) { ndr_print_struct(ndr, name, "samr_GroupInfoName"); ndr->depth++; ndr_print_samr_Name(ndr, "Name", &r->Name); ndr->depth--; } void ndr_print_samr_GroupInfoX(struct ndr_print *ndr, const char *name, struct samr_GroupInfoX *r) { ndr_print_struct(ndr, name, "samr_GroupInfoX"); ndr->depth++; ndr_print_uint32(ndr, "unknown", r->unknown); ndr->depth--; } void ndr_print_samr_GroupInfoDesciption(struct ndr_print *ndr, const char *name, struct samr_GroupInfoDesciption *r) { ndr_print_struct(ndr, name, "samr_GroupInfoDesciption"); ndr->depth++; ndr_print_samr_Name(ndr, "description", &r->description); ndr->depth--; } void ndr_print_samr_GroupInfo(struct ndr_print *ndr, const char *name, uint16 level, union samr_GroupInfo *r) { ndr_print_union(ndr, name, level, "samr_GroupInfo"); switch (level) { case 1: ndr_print_samr_GroupInfoAll(ndr, "all", &r->all); break; case 2: ndr_print_samr_GroupInfoName(ndr, "name", &r->name); break; case 3: ndr_print_samr_GroupInfoX(ndr, "unknown", &r->unknown); break; case 4: ndr_print_samr_GroupInfoDesciption(ndr, "description", &r->description); break; default: ndr_print_bad_level(ndr, name, level); } } void ndr_print_samr_AliasInfoAll(struct ndr_print *ndr, const char *name, struct samr_AliasInfoAll *r) { ndr_print_struct(ndr, name, "samr_AliasInfoAll"); ndr->depth++; ndr_print_samr_Name(ndr, "name", &r->name); ndr_print_uint32(ndr, "num_members", r->num_members); ndr_print_samr_Name(ndr, "description", &r->description); ndr->depth--; } void ndr_print_samr_AliasInfoName(struct ndr_print *ndr, const char *name, struct samr_AliasInfoName *r) { ndr_print_struct(ndr, name, "samr_AliasInfoName"); ndr->depth++; ndr_print_samr_Name(ndr, "name", &r->name); ndr->depth--; } void ndr_print_samr_AliasInfoDescription(struct ndr_print *ndr, const char *name, struct samr_AliasInfoDescription *r) { ndr_print_struct(ndr, name, "samr_AliasInfoDescription"); ndr->depth++; ndr_print_samr_Name(ndr, "description", &r->description); ndr->depth--; } void ndr_print_samr_AliasInfo(struct ndr_print *ndr, const char *name, uint16 level, union samr_AliasInfo *r) { ndr_print_union(ndr, name, level, "samr_AliasInfo"); switch (level) { case 1: ndr_print_samr_AliasInfoAll(ndr, "all", &r->all); break; case 2: ndr_print_samr_AliasInfoName(ndr, "name", &r->name); break; case 3: ndr_print_samr_AliasInfoDescription(ndr, "description", &r->description); break; default: ndr_print_bad_level(ndr, name, level); } } void ndr_print_samr_UserInfo1(struct ndr_print *ndr, const char *name, struct samr_UserInfo1 *r) { ndr_print_struct(ndr, name, "samr_UserInfo1"); ndr->depth++; ndr_print_samr_Name(ndr, "username", &r->username); ndr_print_samr_Name(ndr, "full_name", &r->full_name); ndr_print_uint32(ndr, "primary_group_rid", r->primary_group_rid); ndr_print_samr_Name(ndr, "description", &r->description); ndr_print_samr_Name(ndr, "comment", &r->comment); ndr->depth--; } void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, struct samr_UserInfo2 *r) { ndr_print_struct(ndr, name, "samr_UserInfo2"); ndr->depth++; ndr_print_samr_Name(ndr, "comment", &r->comment); ndr_print_uint32(ndr, "unknown1", r->unknown1); ndr_print_uint32(ndr, "unknown2", r->unknown2); ndr_print_uint16(ndr, "country_code", r->country_code); ndr_print_uint16(ndr, "code_page", r->code_page); ndr->depth--; } void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, struct samr_UserInfo3 *r) { ndr_print_struct(ndr, name, "samr_UserInfo3"); ndr->depth++; ndr_print_samr_Name(ndr, "username", &r->username); ndr_print_samr_Name(ndr, "full_name", &r->full_name); ndr_print_uint32(ndr, "Rid", r->Rid); ndr_print_uint32(ndr, "primary_group_rid", r->primary_group_rid); ndr_print_samr_Name(ndr, "home_directory", &r->home_directory); ndr_print_samr_Name(ndr, "home_drive", &r->home_drive); ndr_print_samr_Name(ndr, "logon_script", &r->logon_script); ndr_print_samr_Name(ndr, "profile", &r->profile); ndr_print_samr_Name(ndr, "workstations", &r->workstations); ndr_print_NTTIME(ndr, "last_logon", r->last_logon); ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff); ndr_print_NTTIME(ndr, "last_pwd_change", r->last_pwd_change); ndr_print_NTTIME(ndr, "allow_pwd_change", r->allow_pwd_change); ndr_print_NTTIME(ndr, "force_pwd_change", r->force_pwd_change); ndr_print_uint32(ndr, "units_per_week", r->units_per_week); ndr_print_ptr(ndr, "logon_hours", r->logon_hours); ndr->depth++; if (r->logon_hours) { ndr_print_array_uint8(ndr, "logon_hours", r->logon_hours, r->units_per_week/8); } ndr->depth--; ndr_print_uint16(ndr, "bad_pwd_count", r->bad_pwd_count); ndr_print_uint16(ndr, "num_logons", r->num_logons); ndr_print_uint32(ndr, "acct_flags", r->acct_flags); ndr->depth--; } void ndr_print_samr_UserInfo4(struct ndr_print *ndr, const char *name, struct samr_UserInfo4 *r) { ndr_print_struct(ndr, name, "samr_UserInfo4"); ndr->depth++; ndr_print_uint32(ndr, "units_per_week", r->units_per_week); ndr_print_ptr(ndr, "logon_hours", r->logon_hours); ndr->depth++; if (r->logon_hours) { ndr_print_array_uint8(ndr, "logon_hours", r->logon_hours, r->units_per_week/8); } ndr->depth--; ndr->depth--; } void ndr_print_samr_UserInfo5(struct ndr_print *ndr, const char *name, struct samr_UserInfo5 *r) { ndr_print_struct(ndr, name, "samr_UserInfo5"); ndr->depth++; ndr_print_samr_Name(ndr, "username", &r->username); ndr_print_samr_Name(ndr, "full_name", &r->full_name); ndr_print_uint32(ndr, "rid", r->rid); ndr_print_uint32(ndr, "primary_group_rid", r->primary_group_rid); ndr_print_samr_Name(ndr, "home_directory", &r->home_directory); ndr_print_samr_Name(ndr, "home_drive", &r->home_drive); ndr_print_samr_Name(ndr, "logon_script", &r->logon_script); ndr_print_samr_Name(ndr, "profile", &r->profile); ndr_print_samr_Name(ndr, "descriptiom", &r->descriptiom); ndr_print_samr_Name(ndr, "workstations", &r->workstations); ndr_print_NTTIME(ndr, "last_logon", r->last_logon); ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff); ndr_print_uint32(ndr, "units_per_week", r->units_per_week); ndr_print_ptr(ndr, "logon_hours", r->logon_hours); ndr->depth++; if (r->logon_hours) { ndr_print_array_uint8(ndr, "logon_hours", r->logon_hours, r->units_per_week/8); } ndr->depth--; ndr_print_uint32(ndr, "unknown", r->unknown); ndr_print_NTTIME(ndr, "last_pwd_change", r->last_pwd_change); ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry); ndr_print_uint32(ndr, "acct_flags", r->acct_flags); ndr->depth--; } void ndr_print_samr_UserInfo6(struct ndr_print *ndr, const char *name, struct samr_UserInfo6 *r) { ndr_print_struct(ndr, name, "samr_UserInfo6"); ndr->depth++; ndr_print_samr_Name(ndr, "username", &r->username); ndr_print_samr_Name(ndr, "full_name", &r->full_name); ndr->depth--; } void ndr_print_samr_UserInfo7(struct ndr_print *ndr, const char *name, struct samr_UserInfo7 *r) { ndr_print_struct(ndr, name, "samr_UserInfo7"); ndr->depth++; ndr_print_samr_Name(ndr, "username", &r->username); ndr->depth--; } void ndr_print_samr_UserInfo8(struct ndr_print *ndr, const char *name, struct samr_UserInfo8 *r) { ndr_print_struct(ndr, name, "samr_UserInfo8"); ndr->depth++; ndr_print_samr_Name(ndr, "full_name", &r->full_name); ndr->depth--; } void ndr_print_samr_UserInfo9(struct ndr_print *ndr, const char *name, struct samr_UserInfo9 *r) { ndr_print_struct(ndr, name, "samr_UserInfo9"); ndr->depth++; ndr_print_uint32(ndr, "PrimaryGroupRid", r->PrimaryGroupRid); ndr->depth--; } void ndr_print_samr_UserInfo10(struct ndr_print *ndr, const char *name, struct samr_UserInfo10 *r) { ndr_print_struct(ndr, name, "samr_UserInfo10"); ndr->depth++; ndr_print_samr_Name(ndr, "home_dir", &r->home_dir); ndr_print_samr_Name(ndr, "home_drive", &r->home_drive); ndr->depth--; } void ndr_print_samr_UserInfo11(struct ndr_print *ndr, const char *name, struct samr_UserInfo11 *r) { ndr_print_struct(ndr, name, "samr_UserInfo11"); ndr->depth++; ndr_print_samr_Name(ndr, "logon_script", &r->logon_script); ndr->depth--; } void ndr_print_samr_UserInfo12(struct ndr_print *ndr, const char *name, struct samr_UserInfo12 *r) { ndr_print_struct(ndr, name, "samr_UserInfo12"); ndr->depth++; ndr_print_samr_Name(ndr, "profile", &r->profile); ndr->depth--; } void ndr_print_samr_UserInfo13(struct ndr_print *ndr, const char *name, struct samr_UserInfo13 *r) { ndr_print_struct(ndr, name, "samr_UserInfo13"); ndr->depth++; ndr_print_samr_Name(ndr, "descriptiom", &r->descriptiom); ndr->depth--; } void ndr_print_samr_UserInfo14(struct ndr_print *ndr, const char *name, struct samr_UserInfo14 *r) { ndr_print_struct(ndr, name, "samr_UserInfo14"); ndr->depth++; ndr_print_samr_Name(ndr, "workstations", &r->workstations); ndr->depth--; } void ndr_print_samr_UserInfo16(struct ndr_print *ndr, const char *name, struct samr_UserInfo16 *r) { ndr_print_struct(ndr, name, "samr_UserInfo16"); ndr->depth++; ndr_print_uint32(ndr, "acct_flags", r->acct_flags); ndr->depth--; } void ndr_print_samr_UserInfo17(struct ndr_print *ndr, const char *name, struct samr_UserInfo17 *r) { ndr_print_struct(ndr, name, "samr_UserInfo17"); ndr->depth++; ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry); ndr->depth--; } void ndr_print_samr_UserInfo20(struct ndr_print *ndr, const char *name, struct samr_UserInfo20 *r) { ndr_print_struct(ndr, name, "samr_UserInfo20"); ndr->depth++; ndr_print_samr_Name(ndr, "callback", &r->callback); ndr->depth--; } void ndr_print_samr_UserInfo21(struct ndr_print *ndr, const char *name, struct samr_UserInfo21 *r) { ndr_print_struct(ndr, name, "samr_UserInfo21"); ndr->depth++; ndr_print_NTTIME(ndr, "last_logon", r->last_logon); ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff); ndr_print_NTTIME(ndr, "last_pwd_change", r->last_pwd_change); ndr_print_NTTIME(ndr, "acct_expiry", r->acct_expiry); ndr_print_NTTIME(ndr, "allow_pwd_change", r->allow_pwd_change); ndr_print_NTTIME(ndr, "force_pwd_change", r->force_pwd_change); ndr_print_samr_Name(ndr, "username", &r->username); ndr_print_samr_Name(ndr, "full_name", &r->full_name); ndr_print_samr_Name(ndr, "home_dir", &r->home_dir); ndr_print_samr_Name(ndr, "home_drive", &r->home_drive); ndr_print_samr_Name(ndr, "logon_script", &r->logon_script); ndr_print_samr_Name(ndr, "profile", &r->profile); ndr_print_samr_Name(ndr, "description", &r->description); ndr_print_samr_Name(ndr, "workstations", &r->workstations); ndr_print_samr_Name(ndr, "comment", &r->comment); ndr_print_samr_Name(ndr, "callback", &r->callback); ndr_print_samr_Name(ndr, "unknown1", &r->unknown1); ndr_print_samr_Name(ndr, "unknown2", &r->unknown2); ndr_print_samr_Name(ndr, "unknown3", &r->unknown3); ndr_print_uint32(ndr, "buf_count", r->buf_count); ndr_print_ptr(ndr, "buffer", r->buffer); ndr->depth++; if (r->buffer) { ndr_print_array_uint8(ndr, "buffer", r->buffer, r->buf_count); } ndr->depth--; ndr_print_uint32(ndr, "rid", r->rid); ndr_print_uint32(ndr, "primary_group_rid", r->primary_group_rid); ndr_print_uint32(ndr, "acct_flags", r->acct_flags); ndr_print_uint32(ndr, "fields_present", r->fields_present); ndr_print_uint32(ndr, "units_per_week", r->units_per_week); ndr_print_ptr(ndr, "logon_hours", r->logon_hours); ndr->depth++; if (r->logon_hours) { ndr_print_array_uint8(ndr, "logon_hours", r->logon_hours, r->units_per_week/8); } ndr->depth--; ndr_print_uint16(ndr, "bad_pwd_count", r->bad_pwd_count); ndr_print_uint16(ndr, "num_logons", r->num_logons); ndr_print_uint16(ndr, "country_code", r->country_code); ndr_print_uint16(ndr, "code_page", r->code_page); ndr_print_uint8(ndr, "nt_pwd_set", r->nt_pwd_set); ndr_print_uint8(ndr, "lm_pwd_set", r->lm_pwd_set); ndr_print_uint8(ndr, "expired_flag", r->expired_flag); ndr_print_uint8(ndr, "unknown4", r->unknown4); ndr->depth--; } void ndr_print_samr_UserInfo(struct ndr_print *ndr, const char *name, uint16 level, union samr_UserInfo *r) { ndr_print_union(ndr, name, level, "samr_UserInfo"); switch (level) { case 1: ndr_print_samr_UserInfo1(ndr, "info1", &r->info1); break; case 2: ndr_print_samr_UserInfo2(ndr, "info2", &r->info2); break; case 3: ndr_print_samr_UserInfo3(ndr, "info3", &r->info3); break; case 4: ndr_print_samr_UserInfo4(ndr, "info4", &r->info4); break; case 5: ndr_print_samr_UserInfo5(ndr, "info5", &r->info5); break; case 6: ndr_print_samr_UserInfo6(ndr, "info6", &r->info6); break; case 7: ndr_print_samr_UserInfo7(ndr, "info7", &r->info7); break; case 8: ndr_print_samr_UserInfo8(ndr, "info8", &r->info8); break; case 9: ndr_print_samr_UserInfo9(ndr, "info9", &r->info9); break; case 10: ndr_print_samr_UserInfo10(ndr, "info10", &r->info10); break; case 11: ndr_print_samr_UserInfo11(ndr, "info11", &r->info11); break; case 12: ndr_print_samr_UserInfo12(ndr, "info12", &r->info12); break; case 13: ndr_print_samr_UserInfo13(ndr, "info13", &r->info13); break; case 14: ndr_print_samr_UserInfo14(ndr, "info14", &r->info14); break; case 16: ndr_print_samr_UserInfo16(ndr, "info16", &r->info16); break; case 17: ndr_print_samr_UserInfo17(ndr, "info17", &r->info17); break; case 20: ndr_print_samr_UserInfo20(ndr, "info20", &r->info20); break; case 21: ndr_print_samr_UserInfo21(ndr, "info21", &r->info21); break; default: ndr_print_bad_level(ndr, name, level); } }