summaryrefslogtreecommitdiff
path: root/source4/librpc/ndr/ndr_lsa.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-19 07:31:17 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-19 07:31:17 +0000
commitde3f0b424f5c89b9c084c5b0d7af46585d1cbf0e (patch)
tree463d4442129c31a43d530c0388c8e5a08a7a596d /source4/librpc/ndr/ndr_lsa.c
parentd60fe829703e1a88858784425d8b670b2b007e5c (diff)
downloadsamba-de3f0b424f5c89b9c084c5b0d7af46585d1cbf0e.tar.gz
samba-de3f0b424f5c89b9c084c5b0d7af46585d1cbf0e.tar.bz2
samba-de3f0b424f5c89b9c084c5b0d7af46585d1cbf0e.zip
after discussions with lukeh, I think we found a alignment bug in old
versions of midl, as used to build LSA. Work around it here. (This used to be commit b3bd2bf10badd60d7c4952c6e1687568b413ee47)
Diffstat (limited to 'source4/librpc/ndr/ndr_lsa.c')
-rw-r--r--source4/librpc/ndr/ndr_lsa.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/source4/librpc/ndr/ndr_lsa.c b/source4/librpc/ndr/ndr_lsa.c
index d7fb5c45e2..3b540b3614 100644
--- a/source4/librpc/ndr/ndr_lsa.c
+++ b/source4/librpc/ndr/ndr_lsa.c
@@ -762,7 +762,8 @@ NTSTATUS ndr_pull_lsa_ServerRole(struct ndr_pull *ndr, int ndr_flags, struct lsa
{
NDR_CHECK(ndr_pull_struct_start(ndr));
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
- NDR_CHECK(ndr_pull_align(ndr, 4));
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, &r->unknown));
NDR_CHECK(ndr_pull_uint16(ndr, &r->role));
ndr_pull_struct_end(ndr);
buffers:
@@ -823,8 +824,8 @@ NTSTATUS ndr_pull_lsa_AuditFullSetInfo(struct ndr_pull *ndr, int ndr_flags, stru
{
NDR_CHECK(ndr_pull_struct_start(ndr));
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, &r->shutdown_on_full));
+ NDR_CHECK(ndr_pull_align(ndr, 1));
+ NDR_CHECK(ndr_pull_uint8(ndr, &r->shutdown_on_full));
ndr_pull_struct_end(ndr);
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
@@ -836,9 +837,10 @@ NTSTATUS ndr_pull_lsa_AuditFullQueryInfo(struct ndr_pull *ndr, int ndr_flags, st
{
NDR_CHECK(ndr_pull_struct_start(ndr));
if (!(ndr_flags & NDR_SCALARS)) goto buffers;
- NDR_CHECK(ndr_pull_align(ndr, 4));
- NDR_CHECK(ndr_pull_uint32(ndr, &r->shutdown_on_full));
- NDR_CHECK(ndr_pull_uint32(ndr, &r->log_is_full));
+ NDR_CHECK(ndr_pull_align(ndr, 2));
+ NDR_CHECK(ndr_pull_uint16(ndr, &r->unknown));
+ NDR_CHECK(ndr_pull_uint8(ndr, &r->shutdown_on_full));
+ NDR_CHECK(ndr_pull_uint8(ndr, &r->log_is_full));
ndr_pull_struct_end(ndr);
buffers:
if (!(ndr_flags & NDR_BUFFERS)) goto done;
@@ -2007,6 +2009,7 @@ void ndr_print_lsa_ServerRole(struct ndr_print *ndr, const char *name, struct ls
{
ndr_print_struct(ndr, name, "lsa_ServerRole");
ndr->depth++;
+ ndr_print_uint16(ndr, "unknown", r->unknown);
ndr_print_uint16(ndr, "role", r->role);
ndr->depth--;
}
@@ -2046,7 +2049,7 @@ void ndr_print_lsa_AuditFullSetInfo(struct ndr_print *ndr, const char *name, str
{
ndr_print_struct(ndr, name, "lsa_AuditFullSetInfo");
ndr->depth++;
- ndr_print_uint32(ndr, "shutdown_on_full", r->shutdown_on_full);
+ ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
ndr->depth--;
}
@@ -2054,8 +2057,9 @@ void ndr_print_lsa_AuditFullQueryInfo(struct ndr_print *ndr, const char *name, s
{
ndr_print_struct(ndr, name, "lsa_AuditFullQueryInfo");
ndr->depth++;
- ndr_print_uint32(ndr, "shutdown_on_full", r->shutdown_on_full);
- ndr_print_uint32(ndr, "log_is_full", r->log_is_full);
+ ndr_print_uint16(ndr, "unknown", r->unknown);
+ ndr_print_uint8(ndr, "shutdown_on_full", r->shutdown_on_full);
+ ndr_print_uint8(ndr, "log_is_full", r->log_is_full);
ndr->depth--;
}