diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-15 09:39:48 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-15 09:39:48 +0000 |
commit | 4063fd08d4be4b9c91db092b0028f91941700d86 (patch) | |
tree | 771dde8a6f0bba358a5292a722186b30cf0b3c36 /source4/librpc/ndr | |
parent | 4cadb043d7a99f835a5893283b63bbe13281e665 (diff) | |
download | samba-4063fd08d4be4b9c91db092b0028f91941700d86.tar.gz samba-4063fd08d4be4b9c91db092b0028f91941700d86.tar.bz2 samba-4063fd08d4be4b9c91db092b0028f91941700d86.zip |
added samr_EnumDomainGroups and samr_EnumDomainUsers
(This used to be commit f8d690fb2bc0afcc8267caa4edcbeed9463594e5)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r-- | source4/librpc/ndr/ndr_samr.c | 59 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_samr.h | 26 |
2 files changed, 58 insertions, 27 deletions
diff --git a/source4/librpc/ndr/ndr_samr.c b/source4/librpc/ndr/ndr_samr.c index fb6f19d3e6..b7a515d62c 100644 --- a/source4/librpc/ndr/ndr_samr.c +++ b/source4/librpc/ndr/ndr_samr.c @@ -99,8 +99,11 @@ NTSTATUS ndr_push_samr_CREATE_DOM_GROUP(struct ndr_push *ndr, struct samr_CREATE return NT_STATUS_OK; } -NTSTATUS ndr_push_samr_ENUM_DOM_GROUPS(struct ndr_push *ndr, struct samr_ENUM_DOM_GROUPS *r) +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; } @@ -111,8 +114,12 @@ NTSTATUS ndr_push_samr_CREATE_USER_IN_DOMAIN(struct ndr_push *ndr, struct samr_C return NT_STATUS_OK; } -NTSTATUS ndr_push_samr_ENUM_DOM_USERS(struct ndr_push *ndr, struct samr_ENUM_DOM_USERS *r) +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; } @@ -693,7 +700,7 @@ static NTSTATUS ndr_pull_samr_DomInfo8(struct ndr_pull *ndr, int ndr_flags, stru 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_modify_time)); + NDR_CHECK(ndr_pull_NTTIME(ndr, &r->last_xxx_time)); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: @@ -756,7 +763,7 @@ static NTSTATUS ndr_pull_samr_DomInfo13(struct ndr_pull *ndr, int ndr_flags, str 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_modify_time)); + 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: @@ -806,10 +813,6 @@ static NTSTATUS ndr_pull_samr_DomainInfo(struct ndr_pull *ndr, int ndr_flags, ui NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_SCALARS, &r->info9)); break; } - case 10: { - NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_SCALARS, &r->info10)); - break; } - case 11: { NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_SCALARS, &r->info11)); break; } @@ -864,10 +867,6 @@ buffers: NDR_CHECK(ndr_pull_samr_DomInfo9(ndr, NDR_BUFFERS, &r->info9)); break; - case 10: - NDR_CHECK(ndr_pull_samr_DomInfo1(ndr, NDR_BUFFERS, &r->info10)); - break; - case 11: NDR_CHECK(ndr_pull_samr_DomInfo11(ndr, NDR_BUFFERS, &r->info11)); break; @@ -921,8 +920,20 @@ NTSTATUS ndr_pull_samr_CREATE_DOM_GROUP(struct ndr_pull *ndr, struct samr_CREATE return NT_STATUS_OK; } -NTSTATUS ndr_pull_samr_ENUM_DOM_GROUPS(struct ndr_pull *ndr, struct samr_ENUM_DOM_GROUPS *r) +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; @@ -935,8 +946,20 @@ NTSTATUS ndr_pull_samr_CREATE_USER_IN_DOMAIN(struct ndr_pull *ndr, struct samr_C return NT_STATUS_OK; } -NTSTATUS ndr_pull_samr_ENUM_DOM_USERS(struct ndr_pull *ndr, struct samr_ENUM_DOM_USERS *r) +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; @@ -1434,7 +1457,7 @@ void ndr_print_samr_DomInfo8(struct ndr_print *ndr, const char *name, struct sam ndr_print_struct(ndr, name, "samr_DomInfo8"); ndr->depth++; ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); - ndr_print_NTTIME(ndr, "last_modify_time", r->last_modify_time); + ndr_print_NTTIME(ndr, "last_xxx_time", r->last_xxx_time); ndr->depth--; } @@ -1482,7 +1505,7 @@ void ndr_print_samr_DomInfo13(struct ndr_print *ndr, const char *name, struct sa ndr_print_struct(ndr, name, "samr_DomInfo13"); ndr->depth++; ndr_print_HYPER_T(ndr, "sequence_num", r->sequence_num); - ndr_print_NTTIME(ndr, "last_modify_time", r->last_modify_time); + 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--; @@ -1528,10 +1551,6 @@ void ndr_print_samr_DomainInfo(struct ndr_print *ndr, const char *name, uint16 l ndr_print_samr_DomInfo9(ndr, "info9", &r->info9); break; - case 10: - ndr_print_samr_DomInfo1(ndr, "info10", &r->info10); - break; - case 11: ndr_print_samr_DomInfo11(ndr, "info11", &r->info11); break; diff --git a/source4/librpc/ndr/ndr_samr.h b/source4/librpc/ndr/ndr_samr.h index 8b68da5caa..bd2feac860 100644 --- a/source4/librpc/ndr/ndr_samr.h +++ b/source4/librpc/ndr/ndr_samr.h @@ -156,7 +156,7 @@ struct samr_DomInfo7 { struct samr_DomInfo8 { HYPER_T sequence_num; - NTTIME last_modify_time; + NTTIME last_xxx_time; }; struct samr_DomInfo9 { @@ -188,7 +188,7 @@ struct samr_DomInfo12 { struct samr_DomInfo13 { HYPER_T sequence_num; - NTTIME last_modify_time; + NTTIME last_xxx_time; uint32 foo7; uint32 foo8; }; @@ -203,7 +203,6 @@ union samr_DomainInfo { /* [case(7)] */ struct samr_DomInfo7 info7; /* [case(8)] */ struct samr_DomInfo8 info8; /* [case(9)] */ struct samr_DomInfo9 info9; -/* [case(10)] */ struct samr_DomInfo1 info10; /* [case(11)] */ struct samr_DomInfo11 info11; /* [case(12)] */ struct samr_DomInfo12 info12; /* [case(13)] */ struct samr_DomInfo13 info13; @@ -242,11 +241,17 @@ struct samr_CREATE_DOM_GROUP { }; -struct samr_ENUM_DOM_GROUPS { +struct samr_EnumDomainGroups { struct { + struct policy_handle *handle; + uint32 *resume_handle; + uint32 max_size; } in; struct { + uint32 *resume_handle; + struct samr_SamArray *sam; + uint32 num_entries; NTSTATUS result; } out; @@ -262,11 +267,18 @@ struct samr_CREATE_USER_IN_DOMAIN { }; -struct samr_ENUM_DOM_USERS { +struct samr_EnumDomainUsers { struct { + struct policy_handle *handle; + uint32 *resume_handle; + uint32 acct_flags; + uint32 max_size; } in; struct { + uint32 *resume_handle; + struct samr_SamArray *sam; + uint32 num_entries; NTSTATUS result; } out; @@ -827,9 +839,9 @@ struct samr_VALIDATE_PASSWORD { #define DCERPC_SAMR_QUERYDOMAININFO 8 #define DCERPC_SAMR_SET_DOMAIN_INFO 9 #define DCERPC_SAMR_CREATE_DOM_GROUP 10 -#define DCERPC_SAMR_ENUM_DOM_GROUPS 11 +#define DCERPC_SAMR_ENUMDOMAINGROUPS 11 #define DCERPC_SAMR_CREATE_USER_IN_DOMAIN 12 -#define DCERPC_SAMR_ENUM_DOM_USERS 13 +#define DCERPC_SAMR_ENUMDOMAINUSERS 13 #define DCERPC_SAMR_CREATE_DOM_ALIAS 14 #define DCERPC_SAMR_ENUM_DOM_ALIASES 15 #define DCERPC_SAMR_GET_ALIAS_MEMBERSHIP 16 |