diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-08 13:23:20 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-08 13:23:20 +0000 |
commit | 668c938678fd7f08ca1ad3412d090f487295211f (patch) | |
tree | 702bd71917f7889f0ef0bc34ea6a1abaf7b7872a /source4/librpc/ndr | |
parent | 7d212460a5c00b4039440c2db0dde56e7d519d66 (diff) | |
download | samba-668c938678fd7f08ca1ad3412d090f487295211f.tar.gz samba-668c938678fd7f08ca1ad3412d090f487295211f.tar.bz2 samba-668c938678fd7f08ca1ad3412d090f487295211f.zip |
- more generation fixes
- added auto-generation from the Makefile. Only called when you run "make idl"
(This used to be commit 47a17e5a08dcb5ef2880f75a59bf417e161a71d3)
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r-- | source4/librpc/ndr/ndr_basic.c | 2 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_lsa.c | 114 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_lsa.h | 27 |
3 files changed, 25 insertions, 118 deletions
diff --git a/source4/librpc/ndr/ndr_basic.c b/source4/librpc/ndr/ndr_basic.c index 0597bcab00..21bd36963c 100644 --- a/source4/librpc/ndr/ndr_basic.c +++ b/source4/librpc/ndr/ndr_basic.c @@ -83,7 +83,7 @@ NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, uint32 *v) /* pull a NTSTATUS */ -NTSTATUS ndr_pull_status(struct ndr_pull *ndr, NTSTATUS *status) +NTSTATUS ndr_pull_NTSTATUS(struct ndr_pull *ndr, NTSTATUS *status) { uint32 v; NDR_CHECK(ndr_pull_uint32(ndr, &v)); 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; } diff --git a/source4/librpc/ndr/ndr_lsa.h b/source4/librpc/ndr/ndr_lsa.h index ab9b0ea164..c19a884536 100644 --- a/source4/librpc/ndr/ndr_lsa.h +++ b/source4/librpc/ndr/ndr_lsa.h @@ -1,25 +1,3 @@ -/* - Unix SMB/CIFS implementation. - - definitions for marshalling/unmarshalling the 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. -*/ - /* header auto-generated by pidl */ struct lsa_QosInfo { @@ -76,16 +54,15 @@ struct lsa_SidArray { struct lsa_EnumSids { struct { struct policy_handle *handle; - uint32 resume_handle; + uint32 *resume_handle; uint32 num_entries; } in; struct { - uint32 resume_handle; + uint32 *resume_handle; struct lsa_SidArray *sids; NTSTATUS result; } out; }; - |