diff options
Diffstat (limited to 'source4/librpc/ndr/ndr_samr.c')
-rw-r--r-- | source4/librpc/ndr/ndr_samr.c | 5257 |
1 files changed, 0 insertions, 5257 deletions
diff --git a/source4/librpc/ndr/ndr_samr.c b/source4/librpc/ndr/ndr_samr.c deleted file mode 100644 index 7d8bebeab4..0000000000 --- a/source4/librpc/ndr/ndr_samr.c +++ /dev/null @@ -1,5257 +0,0 @@ -/* 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) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - 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) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.sec_info)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_Shutdown(struct ndr_push *ndr, struct samr_Shutdown *r) -{ - - return NT_STATUS_OK; -} - -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_struct_start(ndr)); - 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)); - ndr_push_struct_end(ndr); -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, NDR_SCALARS|NDR_BUFFERS, 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_CreateUser(struct ndr_push *ndr, struct samr_CreateUser *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.username)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask)); - - 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_Sids(struct ndr_push *ndr, int ndr_flags, struct samr_Sids *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_ptr(ndr, r->sids)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sids) { - NDR_CHECK(ndr_push_uint32(ndr, r->count)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->sids, sizeof(r->sids[0]), r->count, (ndr_push_flags_fn_t)ndr_push_dom_sid2)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_GetAliasMembership(struct ndr_push *ndr, struct samr_GetAliasMembership *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_ptr(ndr, r->in.sids)); - if (r->in.sids) { - NDR_CHECK(ndr_push_samr_Sids(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sids)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_LookupNames(struct ndr_push *ndr, struct samr_LookupNames *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_names)); - if (r->in.names) { - NDR_CHECK(ndr_push_uint32(ndr, 1000)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_names)); - NDR_CHECK(ndr_push_array(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.names, sizeof(r->in.names[0]), r->in.num_names, (ndr_push_flags_fn_t)ndr_push_samr_Name)); - } - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_LookupRids(struct ndr_push *ndr, struct samr_LookupRids *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_rids)); - if (r->in.rids) { - NDR_CHECK(ndr_push_uint32(ndr, 1000)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->in.num_rids)); - NDR_CHECK(ndr_push_array_uint32(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.rids, r->in.num_rids)); - } - - 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_DeleteUser(struct ndr_push *ndr, struct samr_DeleteUser *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo1(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo1 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->comment)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->comment)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo2(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo2 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->comment)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->unknown)); - NDR_CHECK(ndr_push_uint16(ndr, r->country_code)); - NDR_CHECK(ndr_push_uint16(ndr, r->code_page)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->comment)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->unknown)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo3(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo3 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_push_uint32(ndr, r->Rid)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_directory)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logon)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logoff)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->allow_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->force_pwd_change)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week)); - NDR_CHECK(ndr_push_ptr(ndr, r->logon_hours)); - NDR_CHECK(ndr_push_uint16(ndr, r->bad_pwd_count)); - NDR_CHECK(ndr_push_uint16(ndr, r->num_logons)); - NDR_CHECK(ndr_push_uint32(ndr, r->acct_flags)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_directory)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); - if (r->logon_hours) { - NDR_CHECK(ndr_push_uint32(ndr, 1260)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week/8)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, r->units_per_week/8)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo4(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo4 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week)); - NDR_CHECK(ndr_push_ptr(ndr, r->logon_hours)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->logon_hours) { - NDR_CHECK(ndr_push_uint32(ndr, 1260)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week/8)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, r->units_per_week/8)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo5(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo5 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_push_uint32(ndr, r->rid)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_directory)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logon)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logoff)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week)); - NDR_CHECK(ndr_push_ptr(ndr, r->logon_hours)); - NDR_CHECK(ndr_push_uint16(ndr, r->bad_pwd_count)); - NDR_CHECK(ndr_push_uint16(ndr, r->num_logons)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->acct_expiry)); - NDR_CHECK(ndr_push_uint32(ndr, r->acct_flags)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_directory)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); - if (r->logon_hours) { - NDR_CHECK(ndr_push_uint32(ndr, 1260)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week/8)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, r->units_per_week/8)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo6(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo6 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo7(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo7 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo8(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo8 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo9(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo9 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo10(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo10 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_dir)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_dir)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo11(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo11 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo12(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo12 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->profile)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->profile)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo13(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo13 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->description)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo14(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo14 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo16(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo16 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint32(ndr, r->acct_flags)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo17(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo17 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->acct_expiry)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo20(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo20 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->callback)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->callback)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo21(struct ndr_push *ndr, int ndr_flags, struct samr_UserInfo21 *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logon)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_logoff)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->last_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->acct_expiry)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->allow_pwd_change)); - NDR_CHECK(ndr_push_NTTIME(ndr, r->force_pwd_change)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_dir)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->workstations)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->comment)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->callback)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->unknown1)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->unknown2)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS, &r->unknown3)); - NDR_CHECK(ndr_push_uint32(ndr, r->buf_count)); - NDR_CHECK(ndr_push_ptr(ndr, r->buffer)); - NDR_CHECK(ndr_push_uint32(ndr, r->rid)); - NDR_CHECK(ndr_push_uint32(ndr, r->primary_gid)); - NDR_CHECK(ndr_push_uint32(ndr, r->acct_flags)); - NDR_CHECK(ndr_push_uint32(ndr, r->fields_present)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week)); - NDR_CHECK(ndr_push_ptr(ndr, r->logon_hours)); - NDR_CHECK(ndr_push_uint16(ndr, r->bad_pwd_count)); - NDR_CHECK(ndr_push_uint16(ndr, r->num_logons)); - NDR_CHECK(ndr_push_uint16(ndr, r->country_code)); - NDR_CHECK(ndr_push_uint16(ndr, r->code_page)); - NDR_CHECK(ndr_push_uint8(ndr, r->nt_pwd_set)); - NDR_CHECK(ndr_push_uint8(ndr, r->lm_pwd_set)); - NDR_CHECK(ndr_push_uint8(ndr, r->expired_flag)); - NDR_CHECK(ndr_push_uint8(ndr, r->unknown4)); - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->username)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->full_name)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_dir)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->home_drive)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->logon_script)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->profile)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->description)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->comment)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->callback)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->unknown1)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->unknown2)); - NDR_CHECK(ndr_push_samr_Name(ndr, NDR_BUFFERS, &r->unknown3)); - if (r->buffer) { - NDR_CHECK(ndr_push_uint32(ndr, r->buf_count)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->buffer, r->buf_count)); - } - if (r->logon_hours) { - NDR_CHECK(ndr_push_uint32(ndr, 1260)); - NDR_CHECK(ndr_push_uint32(ndr, 0)); - NDR_CHECK(ndr_push_uint32(ndr, r->units_per_week/8)); - NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, r->units_per_week/8)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_push_samr_UserInfo(struct ndr_push *ndr, int ndr_flags, uint16 level, union samr_UserInfo *r) -{ - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_push_struct_start(ndr)); - switch (level) { - case 1: - NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_SCALARS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_SCALARS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_SCALARS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_SCALARS, &r->info7)); - break; - - case 8: - NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_SCALARS, &r->info8)); - break; - - case 9: - NDR_CHECK(ndr_push_samr_UserInfo9(ndr, NDR_SCALARS, &r->info9)); - break; - - case 10: - NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_SCALARS, &r->info10)); - break; - - case 11: - NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_SCALARS, &r->info11)); - break; - - case 12: - NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_SCALARS, &r->info12)); - break; - - case 13: - NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_SCALARS, &r->info13)); - break; - - case 14: - NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_SCALARS, &r->info14)); - break; - - case 16: - NDR_CHECK(ndr_push_samr_UserInfo16(ndr, NDR_SCALARS, &r->info16)); - break; - - case 17: - NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_SCALARS, &r->info17)); - break; - - case 20: - NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_SCALARS, &r->info20)); - break; - - case 21: - NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_SCALARS, &r->info21)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } - ndr_push_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - switch (level) { - case 1: - NDR_CHECK(ndr_push_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1)); - break; - - case 2: - NDR_CHECK(ndr_push_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2)); - break; - - case 3: - NDR_CHECK(ndr_push_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3)); - break; - - case 4: - NDR_CHECK(ndr_push_samr_UserInfo4(ndr, NDR_BUFFERS, &r->info4)); - break; - - case 5: - NDR_CHECK(ndr_push_samr_UserInfo5(ndr, NDR_BUFFERS, &r->info5)); - break; - - case 6: - NDR_CHECK(ndr_push_samr_UserInfo6(ndr, NDR_BUFFERS, &r->info6)); - break; - - case 7: - NDR_CHECK(ndr_push_samr_UserInfo7(ndr, NDR_BUFFERS, &r->info7)); - break; - - case 8: - NDR_CHECK(ndr_push_samr_UserInfo8(ndr, NDR_BUFFERS, &r->info8)); - break; - - case 9: - NDR_CHECK(ndr_push_samr_UserInfo9(ndr, NDR_BUFFERS, &r->info9)); - break; - - case 10: - NDR_CHECK(ndr_push_samr_UserInfo10(ndr, NDR_BUFFERS, &r->info10)); - break; - - case 11: - NDR_CHECK(ndr_push_samr_UserInfo11(ndr, NDR_BUFFERS, &r->info11)); - break; - - case 12: - NDR_CHECK(ndr_push_samr_UserInfo12(ndr, NDR_BUFFERS, &r->info12)); - break; - - case 13: - NDR_CHECK(ndr_push_samr_UserInfo13(ndr, NDR_BUFFERS, &r->info13)); - break; - - case 14: - NDR_CHECK(ndr_push_samr_UserInfo14(ndr, NDR_BUFFERS, &r->info14)); - break; - - case 16: - NDR_CHECK(ndr_push_samr_UserInfo16(ndr, NDR_BUFFERS, &r->info16)); - break; - - case 17: - NDR_CHECK(ndr_push_samr_UserInfo17(ndr, NDR_BUFFERS, &r->info17)); - break; - - case 20: - NDR_CHECK(ndr_push_samr_UserInfo20(ndr, NDR_BUFFERS, &r->info20)); - break; - - case 21: - NDR_CHECK(ndr_push_samr_UserInfo21(ndr, NDR_BUFFERS, &r->info21)); - break; - - default: - return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); - } -done: - 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_SetUserInfo(struct ndr_push *ndr, struct samr_SetUserInfo *r) -{ - NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - NDR_CHECK(ndr_push_uint16(ndr, r->in.level)); - NDR_CHECK(ndr_push_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->in.info)); - - 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_policy_handle(ndr, r->out.handle)); - 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_SdBuf(struct ndr_pull *ndr, int ndr_flags, struct samr_SdBuf *r) -{ - uint32 _ptr_sd; - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->sd_size)); - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sd)); - if (_ptr_sd) { - NDR_ALLOC(ndr, r->sd); - } else { - r->sd = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->sd) { - NDR_CHECK(ndr_pull_subcontext_flags_fn(ndr, r->sd, (ndr_pull_flags_fn_t) ndr_pull_security_descriptor)); - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, struct samr_QuerySecurity *r) -{ - uint32 _ptr_sdbuf; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sdbuf)); - if (_ptr_sdbuf) { - NDR_ALLOC(ndr, r->out.sdbuf); - } else { - r->out.sdbuf = NULL; - } - if (r->out.sdbuf) { - NDR_CHECK(ndr_pull_samr_SdBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sdbuf)); - } - 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; -} - -NTSTATUS ndr_pull_samr_Name(struct ndr_pull *ndr, int ndr_flags, struct samr_Name *r) -{ - uint32 _ptr_name; - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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; - } - ndr_pull_struct_end(ndr); -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, NDR_SCALARS|NDR_BUFFERS, r->out.sid)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SamEntry(struct ndr_pull *ndr, int ndr_flags, struct samr_SamEntry *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r) -{ - uint32 _ptr_entries; - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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; - } - ndr_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo1 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo2 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo3 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo4 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo5 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo6 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo7 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->role)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo8 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo9 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo11 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo12 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo13 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -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_struct_start(ndr)); - 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); - } - ndr_pull_struct_end(ndr); -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) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.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_CreateUser(struct ndr_pull *ndr, struct samr_CreateUser *r) -{ - NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle)); - NDR_CHECK(ndr_pull_uint32(ndr, r->out.rid)); - 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_Ids(struct ndr_pull *ndr, int ndr_flags, struct samr_Ids *r) -{ - uint32 _ptr_ids; - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_ids)); - if (_ptr_ids) { - NDR_ALLOC(ndr, r->ids); - } else { - r->ids = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->ids) { - { - 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->ids, r->count, sizeof(r->ids[0])); - { - NDR_CHECK(ndr_pull_array_uint32(ndr, NDR_SCALARS|NDR_BUFFERS, r->ids, r->count)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GetAliasMembership(struct ndr_pull *ndr, struct samr_GetAliasMembership *r) -{ - uint32 _ptr_rids; - NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_rids)); - if (_ptr_rids) { - NDR_ALLOC(ndr, r->out.rids); - } else { - r->out.rids = NULL; - } - if (r->out.rids) { - NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.rids)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_LookupNames(struct ndr_pull *ndr, struct samr_LookupNames *r) -{ - NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.rids)); - NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.types)); - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_Names(struct ndr_pull *ndr, int ndr_flags, struct samr_Names *r) -{ - uint32 _ptr_names; - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_names)); - if (_ptr_names) { - NDR_ALLOC(ndr, r->names); - } else { - r->names = NULL; - } - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - if (r->names) { - { - 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->names, r->count, sizeof(r->names[0])); - { - NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->names, sizeof(r->names[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_samr_Name)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_LookupRids(struct ndr_pull *ndr, struct samr_LookupRids *r) -{ - NDR_CHECK(ndr_pull_samr_Names(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.names)); - NDR_CHECK(ndr_pull_samr_Ids(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.types)); - 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; -} - -NTSTATUS ndr_pull_samr_GroupInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoAll *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_GroupInfoName(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoName *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->Name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GroupInfoX(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoX *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_GroupInfoDesciption(struct ndr_pull *ndr, int ndr_flags, struct samr_GroupInfoDesciption *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -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_struct_start(ndr)); - 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); - } - ndr_pull_struct_end(ndr); -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) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_samr_GroupInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.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; -} - -NTSTATUS ndr_pull_samr_AliasInfoAll(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoAll *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_AliasInfoName(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoName *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_AliasInfoDescription(struct ndr_pull *ndr, int ndr_flags, struct samr_AliasInfoDescription *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -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_struct_start(ndr)); - 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); - } - ndr_pull_struct_end(ndr); -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) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_samr_AliasInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.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_DeleteUser(struct ndr_pull *ndr, struct samr_DeleteUser *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_UserInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo1 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_gid)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->comment)); - ndr_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo2 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_samr_Name(ndr, NDR_SCALARS, &r->unknown)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->country_code)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->code_page)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->comment)); - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo3 *r) -{ - uint32 _ptr_logon_hours; - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_gid)); - 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)); - ndr_pull_struct_end(ndr); -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, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, _length)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo4 *r) -{ - uint32 _ptr_logon_hours; - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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; - } - ndr_pull_struct_end(ndr); -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, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, _length)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo5 *r) -{ - uint32 _ptr_logon_hours; - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_gid)); - 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->description)); - 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_uint16(ndr, &r->bad_pwd_count)); - NDR_CHECK(ndr_pull_uint16(ndr, &r->num_logons)); - 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)); - ndr_pull_struct_end(ndr); -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->description)); - 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, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, _length)); - } - } -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo6 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_UserInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo7 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo8 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_UserInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo9 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_gid)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo10(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo10 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_UserInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo11 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -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; -} - -NTSTATUS ndr_pull_samr_UserInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo12 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo13 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo14(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo14 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo16(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo16 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo17(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo17 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - if (!(ndr_flags & NDR_SCALARS)) goto buffers; - NDR_CHECK(ndr_pull_align(ndr, 4)); - NDR_CHECK(ndr_pull_NTTIME(ndr, &r->acct_expiry)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo20(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo20 *r) -{ - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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)); - ndr_pull_struct_end(ndr); -buffers: - if (!(ndr_flags & NDR_BUFFERS)) goto done; - NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->callback)); -done: - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo21 *r) -{ - uint32 _ptr_buffer; - uint32 _ptr_logon_hours; - NDR_CHECK(ndr_pull_struct_start(ndr)); - 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_gid)); - 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)); - ndr_pull_struct_end(ndr); -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, NDR_SCALARS|NDR_BUFFERS, 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, NDR_SCALARS|NDR_BUFFERS, r->logon_hours, _length)); - } - } -done: - return NT_STATUS_OK; -} - -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_struct_start(ndr)); - 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); - } - ndr_pull_struct_end(ndr); -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) { - if ((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) { - uint16 _level; - NDR_CHECK(ndr_pull_uint16(ndr, &_level)); - if (_level != r->in.level) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info"); - } - NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, r->out.info)); - } - NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); - - return NT_STATUS_OK; -} - -NTSTATUS ndr_pull_samr_SetUserInfo(struct ndr_pull *ndr, struct samr_SetUserInfo *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_Connect(struct ndr_print *ndr, const char *name, int flags, struct samr_Connect *r) -{ - ndr_print_struct(ndr, name, "samr_Connect"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_Connect"); - ndr->depth++; - ndr_print_ptr(ndr, "system_name", r->in.system_name); - ndr->depth++; - if (r->in.system_name) { - ndr_print_uint16(ndr, "system_name", *r->in.system_name); - } - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_Connect"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Close(struct ndr_print *ndr, const char *name, int flags, struct samr_Close *r) -{ - ndr_print_struct(ndr, name, "samr_Close"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_Close"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_Close"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SetSecurity(struct ndr_print *ndr, const char *name, int flags, struct samr_SetSecurity *r) -{ - ndr_print_struct(ndr, name, "samr_SetSecurity"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SetSecurity"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SetSecurity"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SdBuf(struct ndr_print *ndr, const char *name, struct samr_SdBuf *r) -{ - ndr_print_struct(ndr, name, "samr_SdBuf"); - ndr->depth++; - ndr_print_uint32(ndr, "sd_size", r->sd_size); - ndr_print_ptr(ndr, "sd", r->sd); - ndr->depth++; - if (r->sd) { - ndr_print_security_descriptor(ndr, "sd", r->sd); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_QuerySecurity(struct ndr_print *ndr, const char *name, int flags, struct samr_QuerySecurity *r) -{ - ndr_print_struct(ndr, name, "samr_QuerySecurity"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QuerySecurity"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "sec_info", r->in.sec_info); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QuerySecurity"); - ndr->depth++; - ndr_print_ptr(ndr, "sdbuf", r->out.sdbuf); - ndr->depth++; - if (r->out.sdbuf) { - ndr_print_samr_SdBuf(ndr, "sdbuf", r->out.sdbuf); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Shutdown(struct ndr_print *ndr, const char *name, int flags, struct samr_Shutdown *r) -{ - ndr_print_struct(ndr, name, "samr_Shutdown"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_Shutdown"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_Shutdown"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -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_LookupDomain(struct ndr_print *ndr, const char *name, int flags, struct samr_LookupDomain *r) -{ - ndr_print_struct(ndr, name, "samr_LookupDomain"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_LookupDomain"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "domain", r->in.domain); - ndr->depth++; - ndr_print_samr_Name(ndr, "domain", r->in.domain); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_LookupDomain"); - ndr->depth++; - ndr_print_ptr(ndr, "sid", r->out.sid); - ndr->depth++; - if (r->out.sid) { - ndr_print_dom_sid2(ndr, "sid", r->out.sid); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - 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_EnumDomains(struct ndr_print *ndr, const char *name, int flags, struct samr_EnumDomains *r) -{ - ndr_print_struct(ndr, name, "samr_EnumDomains"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_EnumDomains"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "buf_size", r->in.buf_size); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_EnumDomains"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "sam", r->out.sam); - ndr->depth++; - if (r->out.sam) { - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); - } - ndr->depth--; - ndr_print_ptr(ndr, "num_entries", r->out.num_entries); - ndr->depth++; - ndr_print_uint32(ndr, "num_entries", *r->out.num_entries); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OpenDomain(struct ndr_print *ndr, const char *name, int flags, struct samr_OpenDomain *r) -{ - ndr_print_struct(ndr, name, "samr_OpenDomain"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OpenDomain"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr_print_ptr(ndr, "sid", r->in.sid); - ndr->depth++; - ndr_print_dom_sid2(ndr, "sid", r->in.sid); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OpenDomain"); - ndr->depth++; - ndr_print_ptr(ndr, "domain_handle", r->out.domain_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "domain_handle", r->out.domain_handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - 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_QueryDomainInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_QueryDomainInfo *r) -{ - ndr_print_struct(ndr, name, "samr_QueryDomainInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QueryDomainInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QueryDomainInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_samr_DomainInfo(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_DOMAIN_INFO(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_DOMAIN_INFO *r) -{ - ndr_print_struct(ndr, name, "samr_SET_DOMAIN_INFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_DOMAIN_INFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_DOMAIN_INFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CREATE_DOM_GROUP(struct ndr_print *ndr, const char *name, int flags, struct samr_CREATE_DOM_GROUP *r) -{ - ndr_print_struct(ndr, name, "samr_CREATE_DOM_GROUP"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CREATE_DOM_GROUP"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CREATE_DOM_GROUP"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_EnumDomainGroups(struct ndr_print *ndr, const char *name, int flags, struct samr_EnumDomainGroups *r) -{ - ndr_print_struct(ndr, name, "samr_EnumDomainGroups"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_EnumDomainGroups"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "max_size", r->in.max_size); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_EnumDomainGroups"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "sam", r->out.sam); - ndr->depth++; - if (r->out.sam) { - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); - } - ndr->depth--; - ndr_print_uint32(ndr, "num_entries", r->out.num_entries); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CreateUser(struct ndr_print *ndr, const char *name, int flags, struct samr_CreateUser *r) -{ - ndr_print_struct(ndr, name, "samr_CreateUser"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CreateUser"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "username", r->in.username); - ndr->depth++; - ndr_print_samr_Name(ndr, "username", r->in.username); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CreateUser"); - ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); - ndr->depth--; - ndr_print_ptr(ndr, "rid", r->out.rid); - ndr->depth++; - ndr_print_uint32(ndr, "rid", *r->out.rid); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_EnumDomainUsers(struct ndr_print *ndr, const char *name, int flags, struct samr_EnumDomainUsers *r) -{ - ndr_print_struct(ndr, name, "samr_EnumDomainUsers"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_EnumDomainUsers"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "acct_flags", r->in.acct_flags); - ndr_print_uint32(ndr, "max_size", r->in.max_size); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_EnumDomainUsers"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "sam", r->out.sam); - ndr->depth++; - if (r->out.sam) { - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); - } - ndr->depth--; - ndr_print_uint32(ndr, "num_entries", r->out.num_entries); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CREATE_DOM_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_CREATE_DOM_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_CREATE_DOM_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CREATE_DOM_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CREATE_DOM_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_EnumDomainAliases(struct ndr_print *ndr, const char *name, int flags, struct samr_EnumDomainAliases *r) -{ - ndr_print_struct(ndr, name, "samr_EnumDomainAliases"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_EnumDomainAliases"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle); - ndr->depth--; - ndr_print_uint32(ndr, "max_size", r->in.max_size); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_EnumDomainAliases"); - ndr->depth++; - ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle); - ndr->depth++; - ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle); - ndr->depth--; - ndr_print_ptr(ndr, "sam", r->out.sam); - ndr->depth++; - if (r->out.sam) { - ndr_print_samr_SamArray(ndr, "sam", r->out.sam); - } - ndr->depth--; - ndr_print_uint32(ndr, "num_entries", r->out.num_entries); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Sids(struct ndr_print *ndr, const char *name, struct samr_Sids *r) -{ - ndr_print_struct(ndr, name, "samr_Sids"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "sids", r->sids); - ndr->depth++; - if (r->sids) { - ndr_print_array(ndr, "sids", r->sids, sizeof(r->sids[0]), r->count, (ndr_print_fn_t)ndr_print_dom_sid2); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_Ids(struct ndr_print *ndr, const char *name, struct samr_Ids *r) -{ - ndr_print_struct(ndr, name, "samr_Ids"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "ids", r->ids); - ndr->depth++; - if (r->ids) { - ndr_print_array_uint32(ndr, "ids", r->ids, r->count); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_GetAliasMembership(struct ndr_print *ndr, const char *name, int flags, struct samr_GetAliasMembership *r) -{ - ndr_print_struct(ndr, name, "samr_GetAliasMembership"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GetAliasMembership"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_ptr(ndr, "sids", r->in.sids); - ndr->depth++; - if (r->in.sids) { - ndr_print_samr_Sids(ndr, "sids", r->in.sids); - } - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GetAliasMembership"); - ndr->depth++; - ndr_print_ptr(ndr, "rids", r->out.rids); - ndr->depth++; - if (r->out.rids) { - ndr_print_samr_Ids(ndr, "rids", r->out.rids); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_LookupNames(struct ndr_print *ndr, const char *name, int flags, struct samr_LookupNames *r) -{ - ndr_print_struct(ndr, name, "samr_LookupNames"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_LookupNames"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "num_names", r->in.num_names); - ndr_print_ptr(ndr, "names", r->in.names); - ndr->depth++; - ndr_print_array(ndr, "names", r->in.names, sizeof(r->in.names[0]), r->in.num_names, (ndr_print_fn_t)ndr_print_samr_Name); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_LookupNames"); - ndr->depth++; - ndr_print_samr_Ids(ndr, "rids", &r->out.rids); - ndr_print_samr_Ids(ndr, "types", &r->out.types); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Names(struct ndr_print *ndr, const char *name, struct samr_Names *r) -{ - ndr_print_struct(ndr, name, "samr_Names"); - ndr->depth++; - ndr_print_uint32(ndr, "count", r->count); - ndr_print_ptr(ndr, "names", r->names); - ndr->depth++; - if (r->names) { - ndr_print_array(ndr, "names", r->names, sizeof(r->names[0]), r->count, (ndr_print_fn_t)ndr_print_samr_Name); - } - ndr->depth--; - ndr->depth--; -} - -void ndr_print_samr_LookupRids(struct ndr_print *ndr, const char *name, int flags, struct samr_LookupRids *r) -{ - ndr_print_struct(ndr, name, "samr_LookupRids"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_LookupRids"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "num_rids", r->in.num_rids); - ndr_print_ptr(ndr, "rids", r->in.rids); - ndr->depth++; - ndr_print_array_uint32(ndr, "rids", r->in.rids, r->in.num_rids); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_LookupRids"); - ndr->depth++; - ndr_print_samr_Names(ndr, "names", &r->out.names); - ndr_print_samr_Ids(ndr, "types", &r->out.types); - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OpenGroup(struct ndr_print *ndr, const char *name, int flags, struct samr_OpenGroup *r) -{ - ndr_print_struct(ndr, name, "samr_OpenGroup"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OpenGroup"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr_print_uint32(ndr, "rid", r->in.rid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OpenGroup"); - ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -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_QueryGroupInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_QueryGroupInfo *r) -{ - ndr_print_struct(ndr, name, "samr_QueryGroupInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QueryGroupInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QueryGroupInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_samr_GroupInfo(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_GROUPINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_GROUPINFO *r) -{ - ndr_print_struct(ndr, name, "samr_SET_GROUPINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_GROUPINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_GROUPINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_ADD_GROUPMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_ADD_GROUPMEM *r) -{ - ndr_print_struct(ndr, name, "samr_ADD_GROUPMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_ADD_GROUPMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_ADD_GROUPMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DELETE_DOM_GROUP(struct ndr_print *ndr, const char *name, int flags, struct samr_DELETE_DOM_GROUP *r) -{ - ndr_print_struct(ndr, name, "samr_DELETE_DOM_GROUP"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DELETE_DOM_GROUP"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DELETE_DOM_GROUP"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DEL_GROUPMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_DEL_GROUPMEM *r) -{ - ndr_print_struct(ndr, name, "samr_DEL_GROUPMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DEL_GROUPMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DEL_GROUPMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_GROUPMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_GROUPMEM *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_GROUPMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_GROUPMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_GROUPMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_MEMBER_ATTRIBUTES_OF_GROUP(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_MEMBER_ATTRIBUTES_OF_GROUP *r) -{ - ndr_print_struct(ndr, name, "samr_SET_MEMBER_ATTRIBUTES_OF_GROUP"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_MEMBER_ATTRIBUTES_OF_GROUP"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_MEMBER_ATTRIBUTES_OF_GROUP"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OpenAlias(struct ndr_print *ndr, const char *name, int flags, struct samr_OpenAlias *r) -{ - ndr_print_struct(ndr, name, "samr_OpenAlias"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OpenAlias"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr_print_uint32(ndr, "rid", r->in.rid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OpenAlias"); - ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -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_QueryAliasInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_QueryAliasInfo *r) -{ - ndr_print_struct(ndr, name, "samr_QueryAliasInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QueryAliasInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QueryAliasInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_samr_AliasInfo(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_ALIASINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_ALIASINFO *r) -{ - ndr_print_struct(ndr, name, "samr_SET_ALIASINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_ALIASINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_ALIASINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DELETE_DOM_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_DELETE_DOM_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_DELETE_DOM_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DELETE_DOM_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DELETE_DOM_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_ADD_ALIASMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_ADD_ALIASMEM *r) -{ - ndr_print_struct(ndr, name, "samr_ADD_ALIASMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_ADD_ALIASMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_ADD_ALIASMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DEL_ALIASMEM(struct ndr_print *ndr, const char *name, int flags, struct samr_DEL_ALIASMEM *r) -{ - ndr_print_struct(ndr, name, "samr_DEL_ALIASMEM"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DEL_ALIASMEM"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DEL_ALIASMEM"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_MEMBERS_IN_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_MEMBERS_IN_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_GET_MEMBERS_IN_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_MEMBERS_IN_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_MEMBERS_IN_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OpenUser(struct ndr_print *ndr, const char *name, int flags, struct samr_OpenUser *r) -{ - ndr_print_struct(ndr, name, "samr_OpenUser"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OpenUser"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr_print_uint32(ndr, "rid", r->in.rid); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OpenUser"); - ndr->depth++; - ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_DeleteUser(struct ndr_print *ndr, const char *name, int flags, struct samr_DeleteUser *r) -{ - ndr_print_struct(ndr, name, "samr_DeleteUser"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_DeleteUser"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_DeleteUser"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -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_gid", r->primary_gid); - 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_samr_Name(ndr, "unknown", &r->unknown); - 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_gid", r->primary_gid); - 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_gid", r->primary_gid); - 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, "description", &r->description); - 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_uint16(ndr, "bad_pwd_count", r->bad_pwd_count); - ndr_print_uint16(ndr, "num_logons", r->num_logons); - 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, "primary_gid", r->primary_gid); - 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, "description", &r->description); - 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_gid", r->primary_gid); - 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); - } -} - -void ndr_print_samr_QueryUserInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_QueryUserInfo *r) -{ - ndr_print_struct(ndr, name, "samr_QueryUserInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QueryUserInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QueryUserInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - if (r->out.info) { - ndr_print_samr_UserInfo(ndr, "info", r->in.level, r->out.info); - } - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SetUserInfo(struct ndr_print *ndr, const char *name, int flags, struct samr_SetUserInfo *r) -{ - ndr_print_struct(ndr, name, "samr_SetUserInfo"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SetUserInfo"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->in.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->in.handle); - ndr->depth--; - ndr_print_uint16(ndr, "level", r->in.level); - ndr_print_ptr(ndr, "info", r->in.info); - ndr->depth++; - ndr_print_samr_UserInfo(ndr, "info", r->in.level, r->in.info); - ndr->depth--; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SetUserInfo"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CHANGE_PASSWORD_USER(struct ndr_print *ndr, const char *name, int flags, struct samr_CHANGE_PASSWORD_USER *r) -{ - ndr_print_struct(ndr, name, "samr_CHANGE_PASSWORD_USER"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CHANGE_PASSWORD_USER"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CHANGE_PASSWORD_USER"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_GROUPS_FOR_USER(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_GROUPS_FOR_USER *r) -{ - ndr_print_struct(ndr, name, "samr_GET_GROUPS_FOR_USER"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_GROUPS_FOR_USER"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_GROUPS_FOR_USER"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_DISPINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_DISPINFO *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_DISPINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_DISPINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_DISPINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_DISPLAY_ENUMERATION_INDEX(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_DISPLAY_ENUMERATION_INDEX *r) -{ - ndr_print_struct(ndr, name, "samr_GET_DISPLAY_ENUMERATION_INDEX"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_DISPLAY_ENUMERATION_INDEX"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_DISPLAY_ENUMERATION_INDEX"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_TEST_PRIVATE_FUNCTIONS_DOMAIN(struct ndr_print *ndr, const char *name, int flags, struct samr_TEST_PRIVATE_FUNCTIONS_DOMAIN *r) -{ - ndr_print_struct(ndr, name, "samr_TEST_PRIVATE_FUNCTIONS_DOMAIN"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_TEST_PRIVATE_FUNCTIONS_DOMAIN"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_TEST_PRIVATE_FUNCTIONS_DOMAIN"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_TEST_PRIVATE_FUNCTIONS_USER(struct ndr_print *ndr, const char *name, int flags, struct samr_TEST_PRIVATE_FUNCTIONS_USER *r) -{ - ndr_print_struct(ndr, name, "samr_TEST_PRIVATE_FUNCTIONS_USER"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_TEST_PRIVATE_FUNCTIONS_USER"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_TEST_PRIVATE_FUNCTIONS_USER"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_USRDOM_PWINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_USRDOM_PWINFO *r) -{ - ndr_print_struct(ndr, name, "samr_GET_USRDOM_PWINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_USRDOM_PWINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_USRDOM_PWINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN(struct ndr_print *ndr, const char *name, int flags, struct samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN *r) -{ - ndr_print_struct(ndr, name, "samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_INFORMATION_DOMAIN2(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_INFORMATION_DOMAIN2 *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_INFORMATION_DOMAIN2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_INFORMATION_DOMAIN2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_INFORMATION_DOMAIN2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_INFORMATION_USER2(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_INFORMATION_USER2 *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_INFORMATION_USER2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_INFORMATION_USER2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_INFORMATION_USER2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_DISPINFO2(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_DISPINFO2 *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_DISPINFO2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_DISPINFO2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_DISPINFO2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_DISPLAY_ENUMERATION_INDEX2(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_DISPLAY_ENUMERATION_INDEX2 *r) -{ - ndr_print_struct(ndr, name, "samr_GET_DISPLAY_ENUMERATION_INDEX2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_DISPLAY_ENUMERATION_INDEX2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_DISPLAY_ENUMERATION_INDEX2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CREATE_USER2_IN_DOMAIN(struct ndr_print *ndr, const char *name, int flags, struct samr_CREATE_USER2_IN_DOMAIN *r) -{ - ndr_print_struct(ndr, name, "samr_CREATE_USER2_IN_DOMAIN"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CREATE_USER2_IN_DOMAIN"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CREATE_USER2_IN_DOMAIN"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_QUERY_DISPINFO3(struct ndr_print *ndr, const char *name, int flags, struct samr_QUERY_DISPINFO3 *r) -{ - ndr_print_struct(ndr, name, "samr_QUERY_DISPINFO3"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_QUERY_DISPINFO3"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_QUERY_DISPINFO3"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS(struct ndr_print *ndr, const char *name, int flags, struct samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS *r) -{ - ndr_print_struct(ndr, name, "samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_OEM_CHANGE_PASSWORD_USER2(struct ndr_print *ndr, const char *name, int flags, struct samr_OEM_CHANGE_PASSWORD_USER2 *r) -{ - ndr_print_struct(ndr, name, "samr_OEM_CHANGE_PASSWORD_USER2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_OEM_CHANGE_PASSWORD_USER2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_OEM_CHANGE_PASSWORD_USER2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_UNICODE_CHANGE_PASSWORD_USER2(struct ndr_print *ndr, const char *name, int flags, struct samr_UNICODE_CHANGE_PASSWORD_USER2 *r) -{ - ndr_print_struct(ndr, name, "samr_UNICODE_CHANGE_PASSWORD_USER2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_UNICODE_CHANGE_PASSWORD_USER2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_UNICODE_CHANGE_PASSWORD_USER2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_DOM_PWINFO(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_DOM_PWINFO *r) -{ - ndr_print_struct(ndr, name, "samr_GET_DOM_PWINFO"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_DOM_PWINFO"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_DOM_PWINFO"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CONNECT2(struct ndr_print *ndr, const char *name, int flags, struct samr_CONNECT2 *r) -{ - ndr_print_struct(ndr, name, "samr_CONNECT2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CONNECT2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CONNECT2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_USERINFO2(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_USERINFO2 *r) -{ - ndr_print_struct(ndr, name, "samr_SET_USERINFO2"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_USERINFO2"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_USERINFO2"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_BOOT_KEY_INFORMATION(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_BOOT_KEY_INFORMATION *r) -{ - ndr_print_struct(ndr, name, "samr_SET_BOOT_KEY_INFORMATION"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_BOOT_KEY_INFORMATION"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_BOOT_KEY_INFORMATION"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_GET_BOOT_KEY_INFORMATION(struct ndr_print *ndr, const char *name, int flags, struct samr_GET_BOOT_KEY_INFORMATION *r) -{ - ndr_print_struct(ndr, name, "samr_GET_BOOT_KEY_INFORMATION"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_GET_BOOT_KEY_INFORMATION"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_GET_BOOT_KEY_INFORMATION"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CONNECT3(struct ndr_print *ndr, const char *name, int flags, struct samr_CONNECT3 *r) -{ - ndr_print_struct(ndr, name, "samr_CONNECT3"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CONNECT3"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CONNECT3"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_Connect4(struct ndr_print *ndr, const char *name, int flags, struct samr_Connect4 *r) -{ - ndr_print_struct(ndr, name, "samr_Connect4"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_Connect4"); - ndr->depth++; - ndr_print_ptr(ndr, "system_name", r->in.system_name); - ndr->depth++; - if (r->in.system_name) { - ndr_print_unistr(ndr, "system_name", r->in.system_name); - } - ndr->depth--; - ndr_print_uint32(ndr, "unknown", r->in.unknown); - ndr_print_uint32(ndr, "access_mask", r->in.access_mask); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_Connect4"); - ndr->depth++; - ndr_print_ptr(ndr, "handle", r->out.handle); - ndr->depth++; - ndr_print_policy_handle(ndr, "handle", r->out.handle); - ndr->depth--; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_UNICODE_CHANGE_PASSWORD_USER3(struct ndr_print *ndr, const char *name, int flags, struct samr_UNICODE_CHANGE_PASSWORD_USER3 *r) -{ - ndr_print_struct(ndr, name, "samr_UNICODE_CHANGE_PASSWORD_USER3"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_UNICODE_CHANGE_PASSWORD_USER3"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_UNICODE_CHANGE_PASSWORD_USER3"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_CONNECT5(struct ndr_print *ndr, const char *name, int flags, struct samr_CONNECT5 *r) -{ - ndr_print_struct(ndr, name, "samr_CONNECT5"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_CONNECT5"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_CONNECT5"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_RID_TO_SID(struct ndr_print *ndr, const char *name, int flags, struct samr_RID_TO_SID *r) -{ - ndr_print_struct(ndr, name, "samr_RID_TO_SID"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_RID_TO_SID"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_RID_TO_SID"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_SET_DSRM_PASSWORD(struct ndr_print *ndr, const char *name, int flags, struct samr_SET_DSRM_PASSWORD *r) -{ - ndr_print_struct(ndr, name, "samr_SET_DSRM_PASSWORD"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_SET_DSRM_PASSWORD"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_SET_DSRM_PASSWORD"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - -void ndr_print_samr_VALIDATE_PASSWORD(struct ndr_print *ndr, const char *name, int flags, struct samr_VALIDATE_PASSWORD *r) -{ - ndr_print_struct(ndr, name, "samr_VALIDATE_PASSWORD"); - ndr->depth++; - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "samr_VALIDATE_PASSWORD"); - ndr->depth++; - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "samr_VALIDATE_PASSWORD"); - ndr->depth++; - ndr_print_NTSTATUS(ndr, "result", &r->out.result); - ndr->depth--; - } - ndr->depth--; -} - |