1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-25 06:04:04 +03:00
Andrew Tridgell e92419e2d3 added samr_UserInfo2 and samr_UserInfo3
(This used to be commit 5e852f694c039ae8bde3490be9e0c4959c1e93f0)
2003-11-15 10:58:29 +00:00

1816 lines
50 KiB
C

/* parser auto-generated by pidl */
#include "includes.h"
NTSTATUS ndr_push_samr_Connect(struct ndr_push *ndr, struct samr_Connect *r)
{
NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name));
if (r->in.system_name) {
NDR_CHECK(ndr_push_uint16(ndr, *r->in.system_name));
}
NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_Close(struct ndr_push *ndr, struct samr_Close *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_SetSecurity(struct ndr_push *ndr, struct samr_SetSecurity *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QuerySecurity(struct ndr_push *ndr, struct samr_QuerySecurity *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_Shutdown(struct ndr_push *ndr, struct samr_Shutdown *r)
{
return NT_STATUS_OK;
}
static NTSTATUS ndr_push_samr_Name(struct ndr_push *ndr, int ndr_flags, struct samr_Name *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_push_align(ndr, 4));
NDR_CHECK(ndr_push_uint16(ndr, 2*strlen_m(r->name)));
NDR_CHECK(ndr_push_uint16(ndr, 2*strlen_m(r->name)));
NDR_CHECK(ndr_push_ptr(ndr, r->name));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
if (r->name) {
NDR_CHECK(ndr_push_unistr_noterm(ndr, r->name));
}
done:
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_LookupDomain(struct ndr_push *ndr, struct samr_LookupDomain *r)
{
NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
NDR_CHECK(ndr_push_samr_Name(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.domain));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_EnumDomains(struct ndr_push *ndr, struct samr_EnumDomains *r)
{
NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle));
NDR_CHECK(ndr_push_uint32(ndr, r->in.buf_size));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_OpenDomain(struct ndr_push *ndr, struct samr_OpenDomain *r)
{
NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask));
NDR_CHECK(ndr_push_dom_sid2(ndr, r->in.sid));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QueryDomainInfo(struct ndr_push *ndr, struct samr_QueryDomainInfo *r)
{
NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
NDR_CHECK(ndr_push_uint16(ndr, r->in.level));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_SET_DOMAIN_INFO(struct ndr_push *ndr, struct samr_SET_DOMAIN_INFO *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_CREATE_DOM_GROUP(struct ndr_push *ndr, struct samr_CREATE_DOM_GROUP *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_EnumDomainGroups(struct ndr_push *ndr, struct samr_EnumDomainGroups *r)
{
NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle));
NDR_CHECK(ndr_push_uint32(ndr, r->in.max_size));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_CREATE_USER_IN_DOMAIN(struct ndr_push *ndr, struct samr_CREATE_USER_IN_DOMAIN *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_EnumDomainUsers(struct ndr_push *ndr, struct samr_EnumDomainUsers *r)
{
NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle));
NDR_CHECK(ndr_push_uint32(ndr, r->in.acct_flags));
NDR_CHECK(ndr_push_uint32(ndr, r->in.max_size));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_CREATE_DOM_ALIAS(struct ndr_push *ndr, struct samr_CREATE_DOM_ALIAS *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_EnumDomainAliases(struct ndr_push *ndr, struct samr_EnumDomainAliases *r)
{
NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, *r->in.resume_handle));
NDR_CHECK(ndr_push_uint32(ndr, r->in.max_size));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_GET_ALIAS_MEMBERSHIP(struct ndr_push *ndr, struct samr_GET_ALIAS_MEMBERSHIP *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_LOOKUP_NAMES(struct ndr_push *ndr, struct samr_LOOKUP_NAMES *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_LOOKUP_RIDS(struct ndr_push *ndr, struct samr_LOOKUP_RIDS *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_OPEN_GROUP(struct ndr_push *ndr, struct samr_OPEN_GROUP *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QUERY_GROUPINFO(struct ndr_push *ndr, struct samr_QUERY_GROUPINFO *r)
{
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_OPEN_ALIAS(struct ndr_push *ndr, struct samr_OPEN_ALIAS *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QUERY_ALIASINFO(struct ndr_push *ndr, struct samr_QUERY_ALIASINFO *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_SET_ALIASINFO(struct ndr_push *ndr, struct samr_SET_ALIASINFO *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_DELETE_DOM_ALIAS(struct ndr_push *ndr, struct samr_DELETE_DOM_ALIAS *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_ADD_ALIASMEM(struct ndr_push *ndr, struct samr_ADD_ALIASMEM *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_DEL_ALIASMEM(struct ndr_push *ndr, struct samr_DEL_ALIASMEM *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_GET_MEMBERS_IN_ALIAS(struct ndr_push *ndr, struct samr_GET_MEMBERS_IN_ALIAS *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_OpenUser(struct ndr_push *ndr, struct samr_OpenUser *r)
{
NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask));
NDR_CHECK(ndr_push_uint32(ndr, r->in.rid));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_DELETE_DOM_USER(struct ndr_push *ndr, struct samr_DELETE_DOM_USER *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QueryUserInfo(struct ndr_push *ndr, struct samr_QueryUserInfo *r)
{
NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle));
NDR_CHECK(ndr_push_uint16(ndr, r->in.level));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_SET_USERINFO(struct ndr_push *ndr, struct samr_SET_USERINFO *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_CHANGE_PASSWORD_USER(struct ndr_push *ndr, struct samr_CHANGE_PASSWORD_USER *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_GET_GROUPS_FOR_USER(struct ndr_push *ndr, struct samr_GET_GROUPS_FOR_USER *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QUERY_DISPINFO(struct ndr_push *ndr, struct samr_QUERY_DISPINFO *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_GET_DISPLAY_ENUMERATION_INDEX(struct ndr_push *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_TEST_PRIVATE_FUNCTIONS_DOMAIN(struct ndr_push *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_DOMAIN *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_TEST_PRIVATE_FUNCTIONS_USER(struct ndr_push *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_USER *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_GET_USRDOM_PWINFO(struct ndr_push *ndr, struct samr_GET_USRDOM_PWINFO *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN(struct ndr_push *ndr, struct samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QUERY_INFORMATION_DOMAIN2(struct ndr_push *ndr, struct samr_QUERY_INFORMATION_DOMAIN2 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QUERY_INFORMATION_USER2(struct ndr_push *ndr, struct samr_QUERY_INFORMATION_USER2 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QUERY_DISPINFO2(struct ndr_push *ndr, struct samr_QUERY_DISPINFO2 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_GET_DISPLAY_ENUMERATION_INDEX2(struct ndr_push *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX2 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_CREATE_USER2_IN_DOMAIN(struct ndr_push *ndr, struct samr_CREATE_USER2_IN_DOMAIN *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_QUERY_DISPINFO3(struct ndr_push *ndr, struct samr_QUERY_DISPINFO3 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS(struct ndr_push *ndr, struct samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS(struct ndr_push *ndr, struct samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_OEM_CHANGE_PASSWORD_USER2(struct ndr_push *ndr, struct samr_OEM_CHANGE_PASSWORD_USER2 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_UNICODE_CHANGE_PASSWORD_USER2(struct ndr_push *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER2 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_GET_DOM_PWINFO(struct ndr_push *ndr, struct samr_GET_DOM_PWINFO *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_CONNECT2(struct ndr_push *ndr, struct samr_CONNECT2 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_SET_USERINFO2(struct ndr_push *ndr, struct samr_SET_USERINFO2 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_SET_BOOT_KEY_INFORMATION(struct ndr_push *ndr, struct samr_SET_BOOT_KEY_INFORMATION *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_GET_BOOT_KEY_INFORMATION(struct ndr_push *ndr, struct samr_GET_BOOT_KEY_INFORMATION *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_CONNECT3(struct ndr_push *ndr, struct samr_CONNECT3 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_Connect4(struct ndr_push *ndr, struct samr_Connect4 *r)
{
NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name));
if (r->in.system_name) {
NDR_CHECK(ndr_push_unistr(ndr, r->in.system_name));
}
NDR_CHECK(ndr_push_uint32(ndr, r->in.unknown));
NDR_CHECK(ndr_push_uint32(ndr, r->in.access_mask));
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_UNICODE_CHANGE_PASSWORD_USER3(struct ndr_push *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER3 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_CONNECT5(struct ndr_push *ndr, struct samr_CONNECT5 *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_RID_TO_SID(struct ndr_push *ndr, struct samr_RID_TO_SID *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_SET_DSRM_PASSWORD(struct ndr_push *ndr, struct samr_SET_DSRM_PASSWORD *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_push_samr_VALIDATE_PASSWORD(struct ndr_push *ndr, struct samr_VALIDATE_PASSWORD *r)
{
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_Connect(struct ndr_pull *ndr, struct samr_Connect *r)
{
NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_Close(struct ndr_pull *ndr, struct samr_Close *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_SetSecurity(struct ndr_pull *ndr, struct samr_SetSecurity *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QuerySecurity(struct ndr_pull *ndr, struct samr_QuerySecurity *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_Shutdown(struct ndr_pull *ndr, struct samr_Shutdown *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_Name(struct ndr_pull *ndr, int ndr_flags, struct samr_Name *r)
{
uint32 _ptr_name;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint16(ndr, &r->name_len));
NDR_CHECK(ndr_pull_uint16(ndr, &r->name_size));
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_name));
if (_ptr_name) {
NDR_ALLOC(ndr, r->name);
} else {
r->name = NULL;
}
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
if (r->name) {
NDR_CHECK(ndr_pull_unistr_noterm(ndr, &r->name));
}
done:
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_LookupDomain(struct ndr_pull *ndr, struct samr_LookupDomain *r)
{
uint32 _ptr_sid;
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sid));
if (_ptr_sid) {
NDR_ALLOC(ndr, r->out.sid);
} else {
r->out.sid = NULL;
}
if (r->out.sid) {
NDR_CHECK(ndr_pull_dom_sid2(ndr, r->out.sid));
}
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_SamEntry(struct ndr_pull *ndr, int ndr_flags, struct samr_SamEntry *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, &r->idx));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->name));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->name));
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r)
{
uint32 _ptr_entries;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, &r->count));
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_entries));
if (_ptr_entries) {
NDR_ALLOC(ndr, r->entries);
} else {
r->entries = NULL;
}
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
if (r->entries) {
{
uint32 _array_size;
NDR_CHECK(ndr_pull_uint32(ndr, &_array_size));
if (r->count > _array_size) {
return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, r->count);
}
}
NDR_ALLOC_N_SIZE(ndr, r->entries, r->count, sizeof(r->entries[0]));
NDR_CHECK(ndr_pull_array(ndr, NDR_SCALARS|NDR_BUFFERS, (void **)r->entries, sizeof(r->entries[0]), r->count, (ndr_pull_flags_fn_t)ndr_pull_samr_SamEntry));
}
done:
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, struct samr_EnumDomains *r)
{
uint32 _ptr_sam;
NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle));
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam));
if (_ptr_sam) {
NDR_ALLOC(ndr, r->out.sam);
} else {
r->out.sam = NULL;
}
if (r->out.sam) {
NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
}
NDR_CHECK(ndr_pull_uint32(ndr, r->out.num_entries));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_OpenDomain(struct ndr_pull *ndr, struct samr_OpenDomain *r)
{
NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.domain_handle));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo1 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint16(ndr, &r->min_length_password));
NDR_CHECK(ndr_pull_uint16(ndr, &r->password_history));
NDR_CHECK(ndr_pull_uint32(ndr, &r->flag));
NDR_CHECK(ndr_pull_NTTIME(ndr, &r->expire));
NDR_CHECK(ndr_pull_NTTIME(ndr, &r->min_passwordage));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo2 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->force_logoff_time));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown_name));
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->unknown_2));
NDR_CHECK(ndr_pull_uint32(ndr, &r->role));
NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown_3));
NDR_CHECK(ndr_pull_uint32(ndr, &r->num_users));
NDR_CHECK(ndr_pull_uint32(ndr, &r->num_groups));
NDR_CHECK(ndr_pull_uint32(ndr, &r->num_aliases));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown_name));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary));
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo3 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->force_logoff_time));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo4(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo4 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown_name));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown_name));
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo5(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo5 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->domain));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain));
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo6(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo6 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->primary));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary));
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo7(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo7 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, &r->role));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo8 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num));
NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_xxx_time));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo9(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo9 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo11(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo11 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->force_logoff_time));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->unknown_name));
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->unknown_2));
NDR_CHECK(ndr_pull_uint32(ndr, &r->role));
NDR_CHECK(ndr_pull_uint32(ndr, &r->unknown_3));
NDR_CHECK(ndr_pull_uint32(ndr, &r->num_users));
NDR_CHECK(ndr_pull_uint32(ndr, &r->num_groups));
NDR_CHECK(ndr_pull_uint32(ndr, &r->num_aliases));
NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_duration));
NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_window));
NDR_CHECK(ndr_pull_uint16(ndr, &r->lockout_threshold));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->unknown_name));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->domain));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->primary));
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo12(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo12 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_duration));
NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->lockout_window));
NDR_CHECK(ndr_pull_uint16(ndr, &r->lockout_threshold));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, struct samr_DomInfo13 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 8));
NDR_CHECK(ndr_pull_HYPER_T(ndr, &r->sequence_num));
NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_xxx_time));
NDR_CHECK(ndr_pull_uint32(ndr, &r->foo7));
NDR_CHECK(ndr_pull_uint32(ndr, &r->foo8));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union samr_DomainInfo *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_uint16(ndr, level));
switch (*level) {
case 1: {
NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, &r->info1));
break; }
case 2: {
NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_SCALARS, &r->info2));
break; }
case 3: {
NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_SCALARS, &r->info3));
break; }
case 4: {
NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_SCALARS, &r->info4));
break; }
case 5: {
NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_SCALARS, &r->info5));
break; }
case 6: {
NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_SCALARS, &r->info6));
break; }
case 7: {
NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_SCALARS, &r->info7));
break; }
case 8: {
NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_SCALARS, &r->info8));
break; }
case 9: {
NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9));
break; }
case 11: {
NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11));
break; }
case 12: {
NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_SCALARS, &r->info12));
break; }
case 13: {
NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_SCALARS, &r->info13));
break; }
default:
return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level);
}
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
switch (*level) {
case 1:
NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_BUFFERS, &r->info1));
break;
case 2:
NDR_CHECK(ndr_pull_samr_DomInfo2(ndr, NDR_BUFFERS, &r->info2));
break;
case 3:
NDR_CHECK(ndr_pull_samr_DomInfo3(ndr, NDR_BUFFERS, &r->info3));
break;
case 4:
NDR_CHECK(ndr_pull_samr_DomInfo4(ndr, NDR_BUFFERS, &r->info4));
break;
case 5:
NDR_CHECK(ndr_pull_samr_DomInfo5(ndr, NDR_BUFFERS, &r->info5));
break;
case 6:
NDR_CHECK(ndr_pull_samr_DomInfo6(ndr, NDR_BUFFERS, &r->info6));
break;
case 7:
NDR_CHECK(ndr_pull_samr_DomInfo7(ndr, NDR_BUFFERS, &r->info7));
break;
case 8:
NDR_CHECK(ndr_pull_samr_DomInfo8(ndr, NDR_BUFFERS, &r->info8));
break;
case 9:
NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_BUFFERS, &r->info9));
break;
case 11:
NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11));
break;
case 12:
NDR_CHECK(ndr_pull_samr_DomInfo12(ndr, NDR_BUFFERS, &r->info12));
break;
case 13:
NDR_CHECK(ndr_pull_samr_DomInfo13(ndr, NDR_BUFFERS, &r->info13));
break;
default:
return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level);
}
done:
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QueryDomainInfo(struct ndr_pull *ndr, struct samr_QueryDomainInfo *r)
{
uint32 _ptr_info;
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info));
if (_ptr_info) {
NDR_ALLOC(ndr, r->out.info);
} else {
r->out.info = NULL;
}
if (r->out.info) {
{ uint16 _level;
NDR_CHECK(ndr_pull_samr_DomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &_level, r->out.info));
if (((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) && (_level != r->in.level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info");
}
}
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_SET_DOMAIN_INFO(struct ndr_pull *ndr, struct samr_SET_DOMAIN_INFO *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_CREATE_DOM_GROUP(struct ndr_pull *ndr, struct samr_CREATE_DOM_GROUP *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_EnumDomainGroups(struct ndr_pull *ndr, struct samr_EnumDomainGroups *r)
{
uint32 _ptr_sam;
NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle));
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam));
if (_ptr_sam) {
NDR_ALLOC(ndr, r->out.sam);
} else {
r->out.sam = NULL;
}
if (r->out.sam) {
NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
}
NDR_CHECK(ndr_pull_uint32(ndr, &r->out.num_entries));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_CREATE_USER_IN_DOMAIN(struct ndr_pull *ndr, struct samr_CREATE_USER_IN_DOMAIN *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_EnumDomainUsers(struct ndr_pull *ndr, struct samr_EnumDomainUsers *r)
{
uint32 _ptr_sam;
NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle));
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam));
if (_ptr_sam) {
NDR_ALLOC(ndr, r->out.sam);
} else {
r->out.sam = NULL;
}
if (r->out.sam) {
NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
}
NDR_CHECK(ndr_pull_uint32(ndr, &r->out.num_entries));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_CREATE_DOM_ALIAS(struct ndr_pull *ndr, struct samr_CREATE_DOM_ALIAS *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_EnumDomainAliases(struct ndr_pull *ndr, struct samr_EnumDomainAliases *r)
{
uint32 _ptr_sam;
NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle));
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_sam));
if (_ptr_sam) {
NDR_ALLOC(ndr, r->out.sam);
} else {
r->out.sam = NULL;
}
if (r->out.sam) {
NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
}
NDR_CHECK(ndr_pull_uint32(ndr, &r->out.num_entries));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_GET_ALIAS_MEMBERSHIP(struct ndr_pull *ndr, struct samr_GET_ALIAS_MEMBERSHIP *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_LOOKUP_NAMES(struct ndr_pull *ndr, struct samr_LOOKUP_NAMES *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_LOOKUP_RIDS(struct ndr_pull *ndr, struct samr_LOOKUP_RIDS *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_OPEN_GROUP(struct ndr_pull *ndr, struct samr_OPEN_GROUP *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QUERY_GROUPINFO(struct ndr_pull *ndr, struct samr_QUERY_GROUPINFO *r)
{
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_OPEN_ALIAS(struct ndr_pull *ndr, struct samr_OPEN_ALIAS *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QUERY_ALIASINFO(struct ndr_pull *ndr, struct samr_QUERY_ALIASINFO *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_SET_ALIASINFO(struct ndr_pull *ndr, struct samr_SET_ALIASINFO *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_DELETE_DOM_ALIAS(struct ndr_pull *ndr, struct samr_DELETE_DOM_ALIAS *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_ADD_ALIASMEM(struct ndr_pull *ndr, struct samr_ADD_ALIASMEM *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_DEL_ALIASMEM(struct ndr_pull *ndr, struct samr_DEL_ALIASMEM *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_GET_MEMBERS_IN_ALIAS(struct ndr_pull *ndr, struct samr_GET_MEMBERS_IN_ALIAS *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_OpenUser(struct ndr_pull *ndr, struct samr_OpenUser *r)
{
NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.acct_handle));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_DELETE_DOM_USER(struct ndr_pull *ndr, struct samr_DELETE_DOM_USER *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_UserInfo1(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo1 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name));
NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_group_rid));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->description));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->comment));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->description));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->comment));
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_UserInfo2(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo2 *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->comment));
NDR_CHECK(ndr_pull_uint32(ndr, &r->foo1));
NDR_CHECK(ndr_pull_uint32(ndr, &r->foo2));
NDR_CHECK(ndr_pull_uint16(ndr, &r->country_code));
NDR_CHECK(ndr_pull_uint16(ndr, &r->code_page));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->comment));
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_UserInfo3(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo3 *r)
{
uint32 _ptr_logon_hours;
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_align(ndr, 4));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->username));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->full_name));
NDR_CHECK(ndr_pull_uint32(ndr, &r->Rid));
NDR_CHECK(ndr_pull_uint32(ndr, &r->primary_group_rid));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_directory));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->home_drive));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->logon_script));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->profile));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_SCALARS, &r->workstations));
NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logon));
NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_logoff));
NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_pwd_change));
NDR_CHECK(ndr_pull_NTTIME(ndr, &r->allow_pwd_change));
NDR_CHECK(ndr_pull_NTTIME(ndr, &r->max_storage));
NDR_CHECK(ndr_pull_uint32(ndr, &r->units_per_week));
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_logon_hours));
if (_ptr_logon_hours) {
NDR_ALLOC(ndr, r->logon_hours);
} else {
r->logon_hours = NULL;
}
NDR_CHECK(ndr_pull_uint16(ndr, &r->bad_pwd_count));
NDR_CHECK(ndr_pull_uint16(ndr, &r->num_logons));
NDR_CHECK(ndr_pull_uint32(ndr, &r->acct_flags));
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->username));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->full_name));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_directory));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->home_drive));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->logon_script));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->profile));
NDR_CHECK(ndr_pull_samr_Name(ndr, NDR_BUFFERS, &r->workstations));
if (r->logon_hours) {
{
uint32 _array_size;
NDR_CHECK(ndr_pull_uint32(ndr, &_array_size));
if (1260 > _array_size) {
return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should be %u", _array_size, 1260);
}
}
NDR_ALLOC_N_SIZE(ndr, r->logon_hours, 1260, sizeof(r->logon_hours[0]));
uint32 _offset, _length;
NDR_CHECK(ndr_pull_uint32(ndr, &_offset));
NDR_CHECK(ndr_pull_uint32(ndr, &_length));
if (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, "Bad array offset 0x%08x", _offset);
if (_length > 1260 || _length != r->units_per_week/8) return ndr_pull_error(ndr, NDR_ERR_LENGTH, "Bad array length 0x%08x > size 0x%08x", _offset, 1260);
NDR_CHECK(ndr_pull_array_uint8(ndr, r->logon_hours, _length));
}
done:
return NT_STATUS_OK;
}
static NTSTATUS ndr_pull_samr_UserInfo(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union samr_UserInfo *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
NDR_CHECK(ndr_pull_uint16(ndr, level));
switch (*level) {
case 1: {
NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_SCALARS, &r->info1));
break; }
case 2: {
NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_SCALARS, &r->info2));
break; }
case 3: {
NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_SCALARS, &r->info3));
break; }
default:
return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level);
}
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
switch (*level) {
case 1:
NDR_CHECK(ndr_pull_samr_UserInfo1(ndr, NDR_BUFFERS, &r->info1));
break;
case 2:
NDR_CHECK(ndr_pull_samr_UserInfo2(ndr, NDR_BUFFERS, &r->info2));
break;
case 3:
NDR_CHECK(ndr_pull_samr_UserInfo3(ndr, NDR_BUFFERS, &r->info3));
break;
default:
return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level);
}
done:
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QueryUserInfo(struct ndr_pull *ndr, struct samr_QueryUserInfo *r)
{
uint32 _ptr_info;
NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_info));
if (_ptr_info) {
NDR_ALLOC(ndr, r->out.info);
} else {
r->out.info = NULL;
}
if (r->out.info) {
{ uint16 _level;
NDR_CHECK(ndr_pull_samr_UserInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &_level, r->out.info));
if (((NDR_SCALARS|NDR_BUFFERS) & NDR_SCALARS) && (_level != r->in.level)) return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u in info");
}
}
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_SET_USERINFO(struct ndr_pull *ndr, struct samr_SET_USERINFO *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_CHANGE_PASSWORD_USER(struct ndr_pull *ndr, struct samr_CHANGE_PASSWORD_USER *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_GET_GROUPS_FOR_USER(struct ndr_pull *ndr, struct samr_GET_GROUPS_FOR_USER *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QUERY_DISPINFO(struct ndr_pull *ndr, struct samr_QUERY_DISPINFO *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_GET_DISPLAY_ENUMERATION_INDEX(struct ndr_pull *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_TEST_PRIVATE_FUNCTIONS_DOMAIN(struct ndr_pull *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_DOMAIN *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_TEST_PRIVATE_FUNCTIONS_USER(struct ndr_pull *ndr, struct samr_TEST_PRIVATE_FUNCTIONS_USER *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_GET_USRDOM_PWINFO(struct ndr_pull *ndr, struct samr_GET_USRDOM_PWINFO *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN(struct ndr_pull *ndr, struct samr_REMOVE_MEMBER_FROM_FOREIGN_DOMAIN *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QUERY_INFORMATION_DOMAIN2(struct ndr_pull *ndr, struct samr_QUERY_INFORMATION_DOMAIN2 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QUERY_INFORMATION_USER2(struct ndr_pull *ndr, struct samr_QUERY_INFORMATION_USER2 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QUERY_DISPINFO2(struct ndr_pull *ndr, struct samr_QUERY_DISPINFO2 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_GET_DISPLAY_ENUMERATION_INDEX2(struct ndr_pull *ndr, struct samr_GET_DISPLAY_ENUMERATION_INDEX2 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_CREATE_USER2_IN_DOMAIN(struct ndr_pull *ndr, struct samr_CREATE_USER2_IN_DOMAIN *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_QUERY_DISPINFO3(struct ndr_pull *ndr, struct samr_QUERY_DISPINFO3 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS(struct ndr_pull *ndr, struct samr_ADD_MULTIPLE_MEMBERS_TO_ALIAS *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS(struct ndr_pull *ndr, struct samr_REMOVE_MULTIPLE_MEMBERS_FROM_ALIAS *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_OEM_CHANGE_PASSWORD_USER2(struct ndr_pull *ndr, struct samr_OEM_CHANGE_PASSWORD_USER2 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_UNICODE_CHANGE_PASSWORD_USER2(struct ndr_pull *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER2 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_GET_DOM_PWINFO(struct ndr_pull *ndr, struct samr_GET_DOM_PWINFO *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_CONNECT2(struct ndr_pull *ndr, struct samr_CONNECT2 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_SET_USERINFO2(struct ndr_pull *ndr, struct samr_SET_USERINFO2 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_SET_BOOT_KEY_INFORMATION(struct ndr_pull *ndr, struct samr_SET_BOOT_KEY_INFORMATION *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_GET_BOOT_KEY_INFORMATION(struct ndr_pull *ndr, struct samr_GET_BOOT_KEY_INFORMATION *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_CONNECT3(struct ndr_pull *ndr, struct samr_CONNECT3 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_Connect4(struct ndr_pull *ndr, struct samr_Connect4 *r)
{
NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_UNICODE_CHANGE_PASSWORD_USER3(struct ndr_pull *ndr, struct samr_UNICODE_CHANGE_PASSWORD_USER3 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_CONNECT5(struct ndr_pull *ndr, struct samr_CONNECT5 *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_RID_TO_SID(struct ndr_pull *ndr, struct samr_RID_TO_SID *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_SET_DSRM_PASSWORD(struct ndr_pull *ndr, struct samr_SET_DSRM_PASSWORD *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
NTSTATUS ndr_pull_samr_VALIDATE_PASSWORD(struct ndr_pull *ndr, struct samr_VALIDATE_PASSWORD *r)
{
NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
return NT_STATUS_OK;
}
void ndr_print_samr_Name(struct ndr_print *ndr, const char *name, struct samr_Name *r)
{
ndr_print_struct(ndr, name, "samr_Name");
ndr->depth++;
ndr_print_uint16(ndr, "name_len", r->name_len);
ndr_print_uint16(ndr, "name_size", r->name_size);
ndr_print_ptr(ndr, "name", r->name);
ndr->depth++;
if (r->name) {
ndr_print_unistr_noterm(ndr, "name", r->name);
}
ndr->depth--;
ndr->depth--;
}
void ndr_print_samr_SamEntry(struct ndr_print *ndr, const char *name, struct samr_SamEntry *r)
{
ndr_print_struct(ndr, name, "samr_SamEntry");
ndr->depth++;
ndr_print_uint32(ndr, "idx", r->idx);
ndr_print_samr_Name(ndr, "name", &r->name);
ndr->depth--;
}
void ndr_print_samr_SamArray(struct ndr_print *ndr, const char *name, struct samr_SamArray *r)
{
ndr_print_struct(ndr, name, "samr_SamArray");
ndr->depth++;
ndr_print_uint32(ndr, "count", r->count);
ndr_print_ptr(ndr, "entries", r->entries);
ndr->depth++;
if (r->entries) {
ndr_print_array(ndr, "entries", r->entries, sizeof(r->entries[0]), r->count, (ndr_print_fn_t)ndr_print_samr_SamEntry);
}
ndr->depth--;
ndr->depth--;
}
void ndr_print_samr_DomInfo1(struct ndr_print *ndr, const char *name, struct samr_DomInfo1 *r)
{
ndr_print_struct(ndr, name, "samr_DomInfo1");
ndr->depth++;
ndr_print_uint16(ndr, "min_length_password", r->min_length_password);
ndr_print_uint16(ndr, "password_history", r->password_history);
ndr_print_uint32(ndr, "flag", r->flag);
ndr_print_NTTIME(ndr, "expire", r->expire);
ndr_print_NTTIME(ndr, "min_passwordage", r->min_passwordage);
ndr->depth--;
}
void ndr_print_samr_DomInfo2(struct ndr_print *ndr, const char *name, struct samr_DomInfo2 *r)
{
ndr_print_struct(ndr, name, "samr_DomInfo2");
ndr->depth++;
ndr_print_HYPER_T(ndr, "force_logoff_time", r->force_logoff_time);
ndr_print_samr_Name(ndr, "unknown_name", &r->unknown_name);
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, "unknown_2", r->unknown_2);
ndr_print_uint32(ndr, "role", r->role);
ndr_print_uint32(ndr, "unknown_3", r->unknown_3);
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_name", &r->unknown_name);
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, "unknown_name", &r->unknown_name);
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, "unknown_2", r->unknown_2);
ndr_print_uint32(ndr, "role", r->role);
ndr_print_uint32(ndr, "unknown_3", r->unknown_3);
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, "foo7", r->foo7);
ndr_print_uint32(ndr, "foo8", r->foo8);
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_UserInfo1(struct ndr_print *ndr, const char *name, struct samr_UserInfo1 *r)
{
ndr_print_struct(ndr, name, "samr_UserInfo1");
ndr->depth++;
ndr_print_samr_Name(ndr, "username", &r->username);
ndr_print_samr_Name(ndr, "full_name", &r->full_name);
ndr_print_uint32(ndr, "primary_group_rid", r->primary_group_rid);
ndr_print_samr_Name(ndr, "description", &r->description);
ndr_print_samr_Name(ndr, "comment", &r->comment);
ndr->depth--;
}
void ndr_print_samr_UserInfo2(struct ndr_print *ndr, const char *name, struct samr_UserInfo2 *r)
{
ndr_print_struct(ndr, name, "samr_UserInfo2");
ndr->depth++;
ndr_print_samr_Name(ndr, "comment", &r->comment);
ndr_print_uint32(ndr, "foo1", r->foo1);
ndr_print_uint32(ndr, "foo2", r->foo2);
ndr_print_uint16(ndr, "country_code", r->country_code);
ndr_print_uint16(ndr, "code_page", r->code_page);
ndr->depth--;
}
void ndr_print_samr_UserInfo3(struct ndr_print *ndr, const char *name, struct samr_UserInfo3 *r)
{
ndr_print_struct(ndr, name, "samr_UserInfo3");
ndr->depth++;
ndr_print_samr_Name(ndr, "username", &r->username);
ndr_print_samr_Name(ndr, "full_name", &r->full_name);
ndr_print_uint32(ndr, "Rid", r->Rid);
ndr_print_uint32(ndr, "primary_group_rid", r->primary_group_rid);
ndr_print_samr_Name(ndr, "home_directory", &r->home_directory);
ndr_print_samr_Name(ndr, "home_drive", &r->home_drive);
ndr_print_samr_Name(ndr, "logon_script", &r->logon_script);
ndr_print_samr_Name(ndr, "profile", &r->profile);
ndr_print_samr_Name(ndr, "workstations", &r->workstations);
ndr_print_NTTIME(ndr, "last_logon", r->last_logon);
ndr_print_NTTIME(ndr, "last_logoff", r->last_logoff);
ndr_print_NTTIME(ndr, "last_pwd_change", r->last_pwd_change);
ndr_print_NTTIME(ndr, "allow_pwd_change", r->allow_pwd_change);
ndr_print_NTTIME(ndr, "max_storage", r->max_storage);
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_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;
default:
ndr_print_bad_level(ndr, name, level);
}
}