1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
Commit Graph

43 Commits

Author SHA1 Message Date
Joseph Sutton
f94b981e86 pidl: Add new ‘u16string’ type
This type represents a UTF‐16–encoded string. These strings are kept
UTF‐16–encoded rather than converted to the Unix charset to be stored in
memory; this avoids issues regarding NULL termination and conversion
between character sets. We want to be able to handle strings that are
not valid UTF‐16.

Not bumping the NDR ABI version, because there hasn’t been an NDR
release since commit c4f281e9ae.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-11-20 21:50:32 +00:00
Noel Power
d3f3c40141 pidl/tests: Add tests for hang with nested struct.
make sure hang test calls Parse::Pidl::Typelist::LoadIdl which triggers
part of the hang

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-09-05 21:18:32 +00:00
Joseph Sutton
402bb17693 librpc:ndr: Add ‘int64’ type
This type behaves like a signed variant of ‘hyper’. Unlike the existing
‘dlong’ type, which has four byte alignment, ‘int64’ is aligned to eight
bytes.

Bump the NDR version to 3.0.1.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15452

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2023-08-15 18:46:33 +00:00
Douglas Bagnall
ef5d79e24b pidl/tests/samba-ndr.pl: remove duplicate import
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Dec 10 04:16:31 UTC 2019 on sn-devel-184
2019-12-10 04:16:31 +00:00
Douglas Bagnall
efef4366f1 pidl: use perl warnings
Warnings are good. If we turn on warnings with 'use warnings', we will
see bugs that have lain latent for years.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-10 02:53:34 +00:00
Douglas Bagnall
eddd6c5267 pidl: don't export parser class methods
These methods are not used or usable as exported functions. The
correct (and actual) usage is along these lines;

    require Parse::Pidl::Samba3::ClientNDR;
    my $generator = new Parse::Pidl::Samba3::ClientNDR();
    my ($c_code,$h_code) = $generator->Parse($ndr, $header, $c_header);

where the methods are either explicitly referenced (new A::B::C),
or are called from the blessed object, neither of which need
exporting.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Dec  4 06:35:06 UTC 2019 on sn-devel-184
2019-12-04 06:35:05 +00:00
Douglas Bagnall
12f6698f76 pidl s4/TDR: use conventional ->{res} name
rather than ->{ret}, meaning this class can be moved to a Pidl::Base subclass

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-12-04 05:10:31 +00:00
Alexander Bokovoy
99d6237a63 pidl/tests: fix ndr_push_init_ctx() usage
The code in libndr got rid of the second argument quite some time ago
(2010): f9ca9e46ad

However, pidl tests did include a code that passed two arguments.
Recently GCC started to fail to compile such code.

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug 30 04:48:00 CEST 2018 on sn-devel-144
2018-08-30 04:48:00 +02:00
Günther Deschner
82778a6d04 pidl: fix field2name wireshark dissector test.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Sep  7 16:05:26 CEST 2016 on sn-devel-144
2016-09-07 16:05:26 +02:00
Aurelien Aptel
0757c57d99 pidl/ws: fix failing tests
This commit fixes 2 test failures in Pidl test suite.

- commit 02cd7808 changed the error the test was expecting
  => update expected output in the test
- commit c76b65e changed whitespaces in the output
  => revert to the old output in the generator

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2016-06-20 12:08:21 +02:00
Guy Harris
3949ed67fc Clean up more whitespace.
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Kamen Mazdrashki <kamenim@samba.org>
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
2014-11-22 02:23:10 +01:00
Matthieu Patou
cd871a6b8c pidl-wireshark: fix trailing white space in the HF definition
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-09 08:40:47 +02:00
Michael Adam
d93d04124c pidl/tests: fix use of a non-existent word (existant) 2012-06-12 07:21:41 +02:00
Andrew Tridgell
dd80fc60fd pidl: adjust expected output for new flag checking 2011-09-08 03:35:28 +02:00
Stefan Metzmacher
76f2ddf5a9 pidl:NDR: add support for 'ms_union' property.
metze
2011-02-01 11:21:42 +01:00
Stefan Metzmacher
fcee50b9c9 pidl: add support for pointers in typedefs
metze
2010-09-28 23:06:52 +02:00
Stefan Metzmacher
a701484230 pidl:Samba3/ClientNDR: remove unused ParseOutputArgument function
metze
2010-08-26 13:29:21 +02:00
Volker Lendecke
b3f9345d76 Fix a typo 2010-08-16 21:14:25 +02:00
Stefan Metzmacher
5130e664b9 pidl:Samba3/ClientNDR: implement rpccli_ stubs on top of dcerpc_ stubs
metze
2010-08-12 14:31:23 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Andrew Tridgell
55c45110e6 charset: fixed a problem with the global use of the iconv_convenience structure
We had a crash bug where a cached copy of a iconv convenience pointer
was used after being freed when loadparm asked for iconv to
reload. This could happen if a python module used a iconv based
function before loadparm was completed.

The fix is to ensure that any use of this pointer remains valid, by
reusing the pointer itself when it has already been initialised, but
filling in the child elements with the updated values.
2010-03-18 14:18:41 +11: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
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
Volker Lendecke
e6df4c2bc2 pidl: Fix selftest after s3 code changed 2009-11-09 15:22:47 +01:00
Andrew Tridgell
7816f9d7ab pidl: update PIDL tests for uint1632 enums 2009-10-07 09:56:23 +11: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
d75653fb6b pidl: update expected output for NDR64 changes 2009-09-19 11:06:46 -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
Stefan Metzmacher
7ccc9a6ef5 pidl: add support for [string] on fixed size arrays.
midl also supports this:

struct {
	long l1;
	[string] wchar_t str[16];
	long l2;
};

Where the wire size of str is encoded like a length_is() header:
4-byte offset == 0;
4-byte array length;

The strings are zero terminated.

metze
2009-07-27 17:51:32 +02:00
Jelmer Vernooij
b9cf441f82 pidl: Don't run compile tests inside the tree, won't work yet. 2009-07-03 00:58:48 +02:00
Andrew Bartlett
e53ee27091 pidl Fix samba4.pidl.typelist test after addition of 'double' 2009-06-05 10:29:46 +10:00
Brad Hards
00bfe9c286 Add support for double type in pidl.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-06-02 18:05:42 +02:00
Stefan Metzmacher
4b541c6f03 pidl: fix samba3-cli test after change to cli->dispatch()
metze
2009-01-30 13:24:26 +01:00
Jelmer Vernooij
619f320183 pidl: Fix typelist test after addition of type origin tracking. 2008-12-23 03:17:01 +01:00
Jelmer Vernooij
076479aac3 Remove EJS backend for PIDL, as we don't have EJS anymore. 2008-12-12 10:30:13 +01:00
Jelmer Vernooij
aa22ab1404 Fix executability of samba3-srv. 2008-10-10 15:00:30 +02:00
Jelmer Vernooij
79190992b3 Move pidl to top-level directory. 2008-09-17 17:12:27 +02:00