diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-12 05:34:21 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-12 05:34:21 +0000 |
commit | 6714815f014ae1b31d0675214d023e3afe2389f0 (patch) | |
tree | 386065e7ba271b3fad572d0fab4605bdd7878fca /source4/librpc/ndr/ndr_basic.c | |
parent | 6735b72a8d0a8e0be274208c84b65db2fa33d2a0 (diff) | |
download | samba-6714815f014ae1b31d0675214d023e3afe2389f0.tar.gz samba-6714815f014ae1b31d0675214d023e3afe2389f0.tar.bz2 samba-6714815f014ae1b31d0675214d023e3afe2389f0.zip |
lsa_PrivilegeSet seems to be a very strange beast indeed. It has a
constant sized array of size 1 at the end?
(This used to be commit 2cc354bd82456cb5598eb4acb40a5ada1459d08d)
Diffstat (limited to 'source4/librpc/ndr/ndr_basic.c')
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index a906e0c05b..f1996b55f7 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -151,19 +151,28 @@ NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, uint16 *data, uint32 n) } /* + pull a const array of uint32 +*/ +NTSTATUS ndr_pull_const_array_uint32(struct ndr_pull *ndr, uint32 *data, uint32 n) +{ + uint32 i; + for (i=0;i<n;i++) { + NDR_CHECK(ndr_pull_uint32(ndr, &data[i])); + } + return NT_STATUS_OK; +} + +/* pull an array of uint32 */ NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, uint32 *data, uint32 n) { - uint32 len, i; + uint32 len; NDR_CHECK(ndr_pull_uint32(ndr, &len)); if (len != n) { return NT_STATUS_INVALID_PARAMETER; } - for (i=0;i<n;i++) { - NDR_CHECK(ndr_pull_uint32(ndr, &data[i])); - } - return NT_STATUS_OK; + return ndr_pull_const_array_uint32(ndr, data, n); } |