1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

135 Commits

Author SHA1 Message Date
Günther Deschner
a049d75193 pidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Guenther
2010-02-18 13:43:59 +01:00
Matthias Dieter Wallnöfer
04cf9b81eb pidl - Remove "Py_RETURN_NONE" compatibility code
This was needed only by Python 2.3 which we no longer support.
2010-02-09 17:53:09 +01:00
Matt Kraai
3ee9d1a3d1 Change uint_t to unsigned int in pidl
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-02 07:18:17 +01:00
Jelmer Vernooij
4b11e0c67c pidl: Include Python.h first, to avoid warnings. 2010-01-21 16:15:10 +13:00
Matthieu Patou
678f2ca14b pidl: Introduce new dirrective: relative_short
relative_short is like relative but instead of having the offset coded on 4 bytes
it's coded on 2 bytes. Such things happen in GET_DFS_REFERAL messages.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-12-12 10:26:05 +01:00
Günther Deschner
79f82998b1 pidl: fix handling of output arguments in s3 client stubs.
a20e095 used (uint8_t) instead of (uint8_t *).

Guenther
2009-11-27 16:15:33 +01:00
Stefan Metzmacher
a20e095b1f pidl:Samba3/ClientNDR: $size can be 'foo / 2' so we need to add '(' and ')'
foo / 5 * sizeof(bar)' isn't the same as
'(foo / 2) * sizeof(bar)'.

metze
2009-11-26 11:47:42 +01:00
Stefan Metzmacher
ab1c92950f pidl:NDR/Parser: $size can be 'foo / 2' so we need to add '(' and ')'
foo / 5 * sizeof(bar)' isn't the same as
'(foo / 2) * sizeof(bar)'.

metze
2009-11-26 11:47:41 +01:00
Stefan Metzmacher
2cd88197f8 Revert "Work around ndr_unpack failing on structures with relative pointers."
This reverts commit c2cdb4ad5c.

It's not needed anymore.

metze
2009-11-20 13:48:36 +01:00
Stefan Metzmacher
05850d1894 pidl:NDR/Parser.pm: update ndr_pull->relative_highest_offset after handling relative pointers
metze
2009-11-20 13:48:36 +01:00
Volker Lendecke
e6df4c2bc2 pidl: Fix selftest after s3 code changed 2009-11-09 15:22:47 +01:00
Volker Lendecke
e181b88978 Revert "s3: Do not reference ndr_table_<pipe> in the cli_ routines directly"
This reverts commit daa964013b.
2009-11-08 19:43:47 +01:00
Volker Lendecke
47455b4d1a Revert "s3: Do not reference the ndr_tables in the server calls directly"
This reverts commit 98fb71782e.
2009-11-08 19:43:46 +01:00
Volker Lendecke
82c35e460e Revert "s3: Do not reference ndr_table when calling rpc_srv_register"
This reverts commit 494b2aff88.
2009-11-08 19:43:46 +01:00
Volker Lendecke
494b2aff88 s3: Do not reference ndr_table when calling rpc_srv_register 2009-11-08 13:12:15 +01:00
Volker Lendecke
98fb71782e s3: Do not reference the ndr_tables in the server calls directly
This involves storing the interface table in the pipes_struct
2009-11-08 13:12:14 +01:00
Volker Lendecke
daa964013b s3: Do not reference ndr_table_<pipe> in the cli_ routines directly 2009-11-08 13:12:13 +01:00
Volker Lendecke
5cdee7ae05 s3: Do the printing for DEBUGLEVEL>=10 centrally
12 insertions(+), 10651 deletions(-)

I think that says it all :-)
2009-11-07 11:07:37 +01:00
Andrew Tridgell
dfbaf79a1b pidl: don't warn for compatible scalar types in unions
When we have an enum that is used as a union discriminator, what
matters is that the scalar mappings are the same, not if the types are
the same (otherwise we get warnings about uint1632).

Thanks to gd for noticing this.
2009-10-13 10:03:27 +11:00
Andrew Tridgell
1d0fb1e0fb tdr: teach TDR about uint1632 enums
TDB doesn't have NDR64, but it needs to know how to map the new types
from pidl
2009-10-07 09:56:23 +11:00
Andrew Tridgell
7816f9d7ab pidl: update PIDL tests for uint1632 enums 2009-10-07 09:56:23 +11:00
Andrew Tridgell
2bf8a7485c pidl: get the alignment right for uint1632 enums (NDR64)
The default enum in NDR63 is 32 bits, not 16 bits. We need a uint1632
type to get the alignment right.
2009-10-07 09:56:22 +11:00
Ronnie Sahlberg
e9f126421d add trailer alignment to structures 2009-10-06 19:14:11 +11:00
ronnie sahlberg
d26016c198 PIDL fix for using external types with wireshark backend
List,

Please review this patch to pidl.

Basically,  we need to process the wireshark conformance file BEFORE
we process the idl file since this file may define external types
and set the alignment for them (using the TYPE directive).
Otherwise pidl will default all external types to use 4byte alignment
which breaks (much more often) on NDR64

regards
ronnie sahlberg

From 8f86903fc353d0906bd82e72ce19c5af09beb001 Mon Sep 17 00:00:00 2001
From: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Date: Mon, 5 Oct 2009 15:22:43 +1100
Subject: [PATCH] In the PIDL wireshark backend, we define external types in the conformance
 file using the TYPE directive.
 If we declare external types here, we must parse this file before we process
 the IDL file, or else these external types will all default to 4byte padding
 (pidl assumes all unknown types are 4byte aligned).

Make sure we read the conformance file and create these new types before
we parse the idl file.

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
2009-10-06 19:11:51 +11:00
Andrew Tridgell
f21fb4b395 pidl: added int3264 as a base type
This is the type used for a variable that is 32 bits for NDR32 and 64
bits for NDR64
2009-10-03 18:17:23 +10:00
Andrew Tridgell
084407fe20 pidl: fixed unit tests for trailer alignment 2009-10-02 17:14:15 +10:00
Andrew Tridgell
a01713d3dc pid: update ndr testsuite for new union alignment 2009-10-02 17:11:26 +10:00
Andrew Tridgell
9eb78be4a6 ndr64: added support for trailing gap alignment
NDR64 has a 'trailing gap' alignment, which aligns the end of a
structure on the overall structure alignment.

This explains the discrepancy we had with the RPC-SAMR test and NDR64
2009-10-02 12:05:59 +10:00
Andrew Tridgell
64e08fef16 pidl: added union padding for NDR64
This fixes the problem with samr UserInfo16 when NDR64 is enabled
2009-09-29 18:08:22 +10:00
Jelmer Vernooij
830adcd58d pidl: Avoid using talloc_free as function pointer, since it may be a
macro.
2009-09-28 15:03:17 +02:00
Jelmer Vernooij
390cd90c8f pidl(s4.python): Fix arguments to PyCObject_FromVoidPtr for string_array's.
Caught by Guenther.
2009-09-26 01:34:22 +02:00
Andrew Tridgell
d75653fb6b pidl: update expected output for NDR64 changes 2009-09-19 11:06:46 -07:00
Andrew Tridgell
1a1cb92583 ndr: split out ndr enum functions
This allows for easier implementation of the NDR32/NDR64 split
2009-09-17 15:19:30 -07:00
Andrew Tridgell
db5e7f3d05 s4-pidl: add support for NDR64
Added support for NDR64 to the samba4 pidl generator
2009-09-17 15:19:28 -07:00
Jeremy Allison
02dc4a1e4e Ensure we enclose the enum values in brackets to make the cast work.
Jeremy.
2009-09-17 11:27:51 -07:00
Jeremy Allison
95311a220e Fix the problem with pidl generating invalid C for enums. According
to the C standard an enum is guarenteed to be an (int), which means
for 4 byte ints specifying a type of 0x80000000 is an invalid value.
The Solaris compiler complains about this. Fix by adding an (int)
cast in front of the value generation.
Jeremy.
2009-09-17 11:11:06 -07:00
Jelmer Vernooij
fac9c35f99 Fix string-wchar-fixed-array-03 test (when libndr is available). 2009-09-13 02:01:38 +02:00
Jelmer Vernooij
27f54a77a6 Fix string-wchar-fixed-array-02 test (when libndr is available). 2009-09-13 02:01:38 +02:00
Jelmer Vernooij
4b5ca12f2c Fix string-wchar-fixed-array-01 test (when libndr is available). 2009-09-13 02:01:37 +02:00
Jelmer Vernooij
ac72076ef9 pidl: Remove unnecessary _GNU_SOURCE define. 2009-09-13 02:01:37 +02:00
Stefan Metzmacher
5796da6948 pidl: fix parse_idl test after idl.yp changes
We now generate 'FILE' and 'LINE' elements for each layer.

This change makes the expected PIDL trees human readable:-)

metze
2009-08-12 10:27:20 +02:00
Stefan Metzmacher
6392f14cd7 pidl: fix samba3-cli test after the async function were added
metze
2009-08-12 10:27:20 +02:00
Andrew Tridgell
011f103501 when we get an NDR error in the logs, it is useful to know where it happened 2009-08-12 15:33:37 +10:00
Stefan Metzmacher
558ff911df pidl: parse idl 'pipe' typedefs, but print out a not supported message for now
metze
2009-08-07 11:50:24 +02:00
Stefan Metzmacher
20a6fb5cdb pidl: fix formatting in expr.yp
metze
2009-08-07 11:50:24 +02:00
Stefan Metzmacher
bfa9624946 pidl: fix formatting in idl.yp
metze
2009-08-07 11:50:24 +02:00
Stefan Metzmacher
2ed71264e1 pidl:Samba3/ClientNDR: add support tevent_req based _send/recv() client functions
metze
2009-07-31 14:10:14 +02:00
Stefan Metzmacher
28a4656738 pidl:Samba3/ClientNDR: rename ParseFunction => ParseFunctionSync and add ParseFunction as glue
This prepares the following ParseFunctionAsync* commits.

metze
2009-07-31 12:49:47 +02:00
Stefan Metzmacher
6a1ff90708 pidl:Samba3/ClientNDR: allow passing optional variable prefixes to ParseOutputArgument()
metze
2009-07-31 12:49:46 +02:00
Stefan Metzmacher
9e4cf82b74 pidl/Samba4.pm: allow an optional prefix passed to DeclLong()
metze
2009-07-31 12:49:46 +02:00