summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_lsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/librpc/ndr/ndr_lsa.c')
-rw-r--r--source4/librpc/ndr/ndr_lsa.c114
1 files changed, 22 insertions, 92 deletions
diff --git a/source4/librpc/ndr/ndr_lsa.c b/source4/librpc/ndr/ndr_lsa.c
index ff395f5699..533e895006 100644
--- a/source4/librpc/ndr/ndr_lsa.c
+++ b/source4/librpc/ndr/ndr_lsa.c
@@ -1,30 +1,7 @@
-/*
- Unix SMB/CIFS implementation.
-
- routines for marshalling/unmarshalling lsa pipe
-
- Copyright (C) Andrew Tridgell 2003
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
+/* parser auto-generated by pidl */
#include "includes.h"
-/* parser auto-generated by pidl */
-
static NTSTATUS ndr_push_lsa_QosInfo(struct ndr_push *ndr, int ndr_flags, struct lsa_QosInfo *r)
{
struct ndr_push_save _save1, _save2, _save3;
@@ -169,6 +146,14 @@ NTSTATUS ndr_push_lsa_OpenPolicy(struct ndr_push *ndr, struct lsa_OpenPolicy *r)
return NT_STATUS_OK;
}
+NTSTATUS ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr, struct lsa_OpenPolicy *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_push_lsa_OpenPolicy2(struct ndr_push *ndr, struct lsa_OpenPolicy2 *r)
{
NDR_CHECK(ndr_push_ptr(ndr, r->in.system_name));
@@ -181,6 +166,14 @@ NTSTATUS ndr_push_lsa_OpenPolicy2(struct ndr_push *ndr, struct lsa_OpenPolicy2 *
return NT_STATUS_OK;
}
+NTSTATUS ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr, struct lsa_OpenPolicy2 *r)
+{
+ NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
+
+ return NT_STATUS_OK;
+}
+
static NTSTATUS ndr_push_lsa_SidPtr(struct ndr_push *ndr, int ndr_flags, struct lsa_SidPtr *r)
{
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
@@ -250,81 +243,18 @@ done:
NTSTATUS ndr_push_lsa_EnumSids(struct ndr_push *ndr, struct lsa_EnumSids *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.resume_handle));
NDR_CHECK(ndr_push_uint32(ndr, r->in.num_entries));
return NT_STATUS_OK;
}
-/*
- parse a openpolicy
-*/
-NTSTATUS ndr_pull_lsa_OpenPolicy(struct ndr_pull *ndr,
- struct lsa_OpenPolicy *r)
-{
- NDR_ALLOC(ndr, r->out.handle);
- NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
- NDR_CHECK(ndr_pull_status(ndr, &r->out.result));
- return NT_STATUS_OK;
-}
-
-/*
- parse a openpolicy2
-*/
-NTSTATUS ndr_pull_lsa_OpenPolicy2(struct ndr_pull *ndr,
- struct lsa_OpenPolicy2 *r)
-{
- NDR_ALLOC(ndr, r->out.handle);
- NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle));
- NDR_CHECK(ndr_pull_status(ndr, &r->out.result));
- return NT_STATUS_OK;
-}
-
-#if 0
-/*
- pull a lsa_SidArray
-*/
-static NTSTATUS ndr_pull_lsa_SidArray(struct ndr_pull *ndr,
- struct lsa_SidArray *r)
+NTSTATUS ndr_pull_lsa_EnumSids(struct ndr_pull *ndr, struct lsa_EnumSids *r)
{
- uint32 ptr;
-
- NDR_CHECK(ndr_pull_uint32(ndr, &r->num_sids));
- NDR_CHECK(ndr_pull_uint32(ndr, &ptr));
- if (ptr) {
- uint32 asize, i;
-
- NDR_CHECK(ndr_pull_uint32(ndr, &asize));
- NDR_ALLOC_N(ndr, r->sids, asize);
- for (i=0;i<asize;i++) {
- NDR_CHECK(ndr_pull_uint32(ndr, &ptr));
- if (ptr) {
- NDR_ALLOC(ndr, r->sids[i]);
- } else {
- r->sids[i] = NULL;
- }
- }
-
- for (i=0;i<asize;i++) {
- if (r->sids[i]) {
- NDR_CHECK(ndr_pull_dom_sid2(ndr, r->sids[i]));
- }
- }
- }
- return NT_STATUS_OK;
-}
-#endif
-
-/*
- pull a EnumSids
-*/
-NTSTATUS ndr_pull_lsa_EnumSids(struct ndr_pull *ndr,
- struct lsa_EnumSids *r)
-{
- NDR_CHECK(ndr_pull_uint32(ndr, &r->out.resume_handle));
- NDR_ALLOC(ndr, r->out.sids);
+ NDR_CHECK(ndr_pull_uint32(ndr, r->out.resume_handle));
NDR_CHECK(ndr_pull_lsa_SidArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sids));
- NDR_CHECK(ndr_pull_status(ndr, &r->out.result));
+ NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result));
+
return NT_STATUS_OK;
}