uuid("12345778-1234-abcd-0000-00000000"),
version(0.0),
pointer_default(unique),
- helpstring("Active Directory KRB5 PAC")
+ helpstring("Active Directory KRB5 PAC"),
+ helper("../librpc/ndr/ndr_krb5pac.h")
]
interface krb5pac
{
[default] [subcontext(0)] DATA_BLOB_REM unknown;
} PAC_INFO;
- typedef [public,nopush,noprint] struct {
+ typedef [public,noprint] struct {
PAC_TYPE type;
[value(_ndr_size_PAC_INFO(info, type, 0))] uint32 _ndr_size;
[relative,switch_is(type),subcontext(0),subcontext_size(NDR_ROUND(_ndr_size,8)),flag(NDR_ALIGN8)] PAC_INFO *info;
#include "includes.h"
#include "librpc/gen_ndr/ndr_krb5pac.h"
-static size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
+size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags)
{
size_t s = ndr_size_PAC_INFO(r, level, flags);
switch (level) {
}
}
-enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r)
-{
- if (ndr_flags & NDR_SCALARS) {
- NDR_CHECK(ndr_push_align(ndr, 4));
- NDR_CHECK(ndr_push_PAC_TYPE(ndr, NDR_SCALARS, r->type));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_PAC_INFO(r->info,r->type,0)));
- {
- uint32_t _flags_save_PAC_INFO = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
- NDR_CHECK(ndr_push_relative_ptr1(ndr, r->info));
- ndr->flags = _flags_save_PAC_INFO;
- }
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
- }
- if (ndr_flags & NDR_BUFFERS) {
- {
- uint32_t _flags_save_PAC_INFO = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN8);
- if (r->info) {
- NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->info));
- {
- struct ndr_push *_ndr_info;
- NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 0, NDR_ROUND(r->_ndr_size, 8)));
- NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->info, r->type));
- NDR_CHECK(ndr_push_PAC_INFO(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->info));
- NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 0, NDR_ROUND(r->_ndr_size, 8)));
- }
- NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->info));
- }
- ndr->flags = _flags_save_PAC_INFO;
- }
- }
- return NDR_ERR_SUCCESS;
-}
-
void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r)
{
ndr_print_struct(ndr, name, "PAC_BUFFER");
--- /dev/null
+/*
+ Unix SMB/CIFS implementation.
+
+ routines for marshalling/unmarshalling spoolss subcontext buffer structures
+
+ Copyright (C) Stefan Metzmacher 2005
+
+ 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 3 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, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#include "librpc/gen_ndr/ndr_krb5pac.h"
+
+size_t _ndr_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, int flags);
+
bld.SAMBA_LIBRARY('ndr-krb5pac',
source='ndr/ndr_krb5pac.c gen_ndr/ndr_krb5pac.c',
public_deps='ndr ndr-standard NDR_SECURITY',
- public_headers='gen_ndr/krb5pac.h gen_ndr/ndr_krb5pac.h',
- header_path='gen_ndr',
+ public_headers='gen_ndr/krb5pac.h gen_ndr/ndr_krb5pac.h ndr/ndr_krb5pac.h',
+ header_path=[ ('gen_ndr*', 'gen_ndr'), ('ndr*', 'ndr')],
pc_files='ndr_krb5pac.pc',
vnum='0.0.1'
)