summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-04-17 18:29:48 +0200
committerGünther Deschner <gd@samba.org>2008-04-17 18:49:30 +0200
commit4f46c2d9268ffb418e4f43baf479c03384e2ddda (patch)
tree2c55ac27bd9dca6bc61a600d7cfb90ffcdec1fa0 /source3/librpc/gen_ndr
parent452789ca801867e3ad99101f81180a468902d90b (diff)
downloadsamba-4f46c2d9268ffb418e4f43baf479c03384e2ddda.tar.gz
samba-4f46c2d9268ffb418e4f43baf479c03384e2ddda.tar.bz2
samba-4f46c2d9268ffb418e4f43baf479c03384e2ddda.zip
IDL: Re-run make idl and hand merge some required functions from Samba 4.
Guenther (This used to be commit edb0092e4d66496181de4e21c91d398d54208e60)
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r--source3/librpc/gen_ndr/nbt.h10
-rw-r--r--source3/librpc/gen_ndr/ndr_nbt.c54
-rw-r--r--source3/librpc/gen_ndr/security.h1
3 files changed, 27 insertions, 38 deletions
diff --git a/source3/librpc/gen_ndr/nbt.h b/source3/librpc/gen_ndr/nbt.h
index 0e7447563b..151a94ba20 100644
--- a/source3/librpc/gen_ndr/nbt.h
+++ b/source3/librpc/gen_ndr/nbt.h
@@ -493,9 +493,8 @@ struct nbt_netlogon_announce_uas {
const char * unicode_domain;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
uint32_t db_count;
struct nbt_db_change *dbchange;
- uint32_t sid_size;/* [value(ndr_size_dom_sid(&sid,ndr->flags))] */
- DATA_BLOB _pad2;/* [flag(LIBNDR_FLAG_ALIGN4)] */
- struct dom_sid sid;
+ uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */
+ struct dom_sid0 sid;/* [subcontext_size(sid_size),subcontext(0)] */
uint32_t nt_version;
uint16_t lmnt_token;
uint16_t lm20_token;
@@ -607,9 +606,8 @@ struct nbt_ntlogon_sam_logon {
const char * user_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
const char * mailslot_name;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
uint32_t acct_control;
- uint32_t sid_size;/* [value(ndr_size_dom_sid(&sid,ndr->flags))] */
- DATA_BLOB _pad;/* [flag(LIBNDR_FLAG_ALIGN4)] */
- struct dom_sid sid;
+ uint32_t sid_size;/* [value(ndr_size_dom_sid0(&sid,ndr->flags))] */
+ struct dom_sid0 sid;/* [subcontext_size(sid_size),subcontext(0)] */
uint32_t nt_version;
uint16_t lmnt_token;
uint16_t lm20_token;
diff --git a/source3/librpc/gen_ndr/ndr_nbt.c b/source3/librpc/gen_ndr/ndr_nbt.c
index 1d36c4e005..c617641564 100644
--- a/source3/librpc/gen_ndr/ndr_nbt.c
+++ b/source3/librpc/gen_ndr/ndr_nbt.c
@@ -2075,20 +2075,18 @@ static enum ndr_err_code ndr_push_nbt_netlogon_announce_uas(struct ndr_push *ndr
for (cntr_dbchange_0 = 0; cntr_dbchange_0 < r->db_count; cntr_dbchange_0++) {
NDR_CHECK(ndr_push_nbt_db_change(ndr, NDR_SCALARS, &r->dbchange[cntr_dbchange_0]));
}
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid(&r->sid, ndr->flags)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags)));
{
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad2));
- ndr->flags = _flags_save_DATA_BLOB;
+ struct ndr_push *_ndr_sid;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
+ NDR_CHECK(ndr_push_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
}
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nt_version));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_BUFFERS, &r->sid));
}
return NDR_ERR_SUCCESS;
}
@@ -2143,18 +2141,16 @@ static enum ndr_err_code ndr_pull_nbt_netlogon_announce_uas(struct ndr_pull *ndr
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dbchange_0, 0);
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size));
{
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad2));
- ndr->flags = _flags_save_DATA_BLOB;
+ struct ndr_pull *_ndr_sid;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sid, 0, r->sid_size));
+ NDR_CHECK(ndr_pull_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, r->sid_size));
}
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sid));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nt_version));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_BUFFERS, &r->sid));
}
return NDR_ERR_SUCCESS;
}
@@ -2184,9 +2180,8 @@ _PUBLIC_ void ndr_print_nbt_netlogon_announce_uas(struct ndr_print *ndr, const c
}
}
ndr->depth--;
- ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid(&r->sid, ndr->flags):r->sid_size);
- ndr_print_DATA_BLOB(ndr, "_pad2", r->_pad2);
- ndr_print_dom_sid(ndr, "sid", &r->sid);
+ ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
+ ndr_print_dom_sid0(ndr, "sid", &r->sid);
ndr_print_uint32(ndr, "nt_version", r->nt_version);
ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
@@ -3024,20 +3019,18 @@ static enum ndr_err_code ndr_push_nbt_ntlogon_sam_logon(struct ndr_push *ndr, in
ndr->flags = _flags_save_string;
}
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acct_control));
- NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid(&r->sid, ndr->flags)));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->sid, ndr->flags)));
{
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->_pad));
- ndr->flags = _flags_save_DATA_BLOB;
+ struct ndr_push *_ndr_sid;
+ NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
+ NDR_CHECK(ndr_push_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
+ NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sid, 0, ndr_size_dom_sid0(&r->sid, ndr->flags)));
}
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->nt_version));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lmnt_token));
NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->lm20_token));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_push_dom_sid(ndr, NDR_BUFFERS, &r->sid));
}
return NDR_ERR_SUCCESS;
}
@@ -3068,18 +3061,16 @@ static enum ndr_err_code ndr_pull_nbt_ntlogon_sam_logon(struct ndr_pull *ndr, in
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acct_control));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_size));
{
- uint32_t _flags_save_DATA_BLOB = ndr->flags;
- ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
- NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->_pad));
- ndr->flags = _flags_save_DATA_BLOB;
+ struct ndr_pull *_ndr_sid;
+ NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sid, 0, r->sid_size));
+ NDR_CHECK(ndr_pull_dom_sid0(_ndr_sid, NDR_SCALARS|NDR_BUFFERS, &r->sid));
+ NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sid, 0, r->sid_size));
}
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sid));
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->nt_version));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lmnt_token));
NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->lm20_token));
}
if (ndr_flags & NDR_BUFFERS) {
- NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_BUFFERS, &r->sid));
}
return NDR_ERR_SUCCESS;
}
@@ -3093,9 +3084,8 @@ _PUBLIC_ void ndr_print_nbt_ntlogon_sam_logon(struct ndr_print *ndr, const char
ndr_print_string(ndr, "user_name", r->user_name);
ndr_print_string(ndr, "mailslot_name", r->mailslot_name);
ndr_print_uint32(ndr, "acct_control", r->acct_control);
- ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid(&r->sid, ndr->flags):r->sid_size);
- ndr_print_DATA_BLOB(ndr, "_pad", r->_pad);
- ndr_print_dom_sid(ndr, "sid", &r->sid);
+ ndr_print_uint32(ndr, "sid_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->sid, ndr->flags):r->sid_size);
+ ndr_print_dom_sid0(ndr, "sid", &r->sid);
ndr_print_uint32(ndr, "nt_version", r->nt_version);
ndr_print_uint16(ndr, "lmnt_token", r->lmnt_token);
ndr_print_uint16(ndr, "lm20_token", r->lm20_token);
diff --git a/source3/librpc/gen_ndr/security.h b/source3/librpc/gen_ndr/security.h
index a17fd512f7..04655b178e 100644
--- a/source3/librpc/gen_ndr/security.h
+++ b/source3/librpc/gen_ndr/security.h
@@ -5,6 +5,7 @@
#include "librpc/gen_ndr/misc.h"
#define dom_sid2 dom_sid
#define dom_sid28 dom_sid
+#define dom_sid0 dom_sid
#ifndef _HEADER_security
#define _HEADER_security