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

622 Commits

Author SHA1 Message Date
Stefan Metzmacher
1ee0c0f828 pidl:Python: replace pytalloc_CObject_FromTallocPtr() with pytalloc_GenericObject_reference_ex()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-02-25 02:39:11 +01:00
Stefan Metzmacher
d62eb3cc9f pidl:Python: make sure print HASH references for STRUCT types
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-02-25 02:39:11 +01:00
Günther Deschner
d30b008a64 pidl: use ndr_push_charset_to_null() when [to_null] keyword is used in IDL
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-01-24 10:53:17 +01:00
Andrew Bartlett
ffb8b50e3c s4-rpc_server: Allow each interface to declare if it uses handles
This will allow the NETLOGON server in the AD DC to declare that it does not use
handles, and so allow some more flexibility with association groups

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-20 01:11:23 +01:00
Andrew Bartlett
31d625bcd2 s4-rpc_server: Add back support for lsa over \\pipe\\netlogon optionally
The idea here is that perhaps some real client relies on this (and not just Samba torture
commands), so we need a way to support it for the 4.6 release.

If no such client emerges, it can be deprecated and removed in the normal way.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-12-15 08:21:12 +01:00
Andrew Bartlett
50dff7e094 pidl: Make dcesrv\_$name\_interface "static const"
This moves it out of the global namespace

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Dec  8 13:25:57 CET 2016 on sn-devel-144
2016-12-08 13:25:57 +01:00
Andrew Bartlett
c6c1463852 pidl: Make static struct api_struct also const
This moves the table to read-only memory

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:22 +01:00
Andrew Bartlett
d368ee2298 pidl: Change *_get_pipe_fns() to return const struct api_struct *
This will allow the table to be made static const in the next commit

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:22 +01:00
Andrew Bartlett
778fc58eb2 pidl: Use a static const initialised struct in dcerpc_server_$name_init(void)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:22 +01:00
Alexis La Goutte
3c9d703d45 Fix typo
Fix (minor) typo found in wireshark with lintian tools
https://code.wireshark.org/review/#/c/18485/

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-12-01 05:54:21 +01:00
Stefan Metzmacher
57539c8441 pidl:Python: add PyTypeObject objects for function structs
They provide get/set methods for the in_* and out_* elements
and the magic __ndr_{push,pull,print}_{in,out}__ hooks to enable
the marshalling via ndr_{push,pull,print}_{in,out}().

This provides an easy way to generate and parse the payload of
DCERPC requests and responses, which is very useful for writing
tests.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:19 +02:00
Stefan Metzmacher
a546124f10 pidl:Python: split out a PythonElementGetSet() helper function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:19 +02:00
Stefan Metzmacher
d5e4707e98 pidl:NDR: add ReturnTypeElement() helper function
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:19 +02:00
Stefan Metzmacher
4017561351 pidl:Python: the py_{import,export}_*() functions can be static now.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:19 +02:00
Stefan Metzmacher
f7707c04a5 pidl:Python: make use of the pyrpc_{import,export}_union() functions
This avoids the linking problems at C shared object level.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:19 +02:00
Stefan Metzmacher
e0324c0cf7 pidl:Python: provide a PyTypeObject with METH_CLASS __import__() and __export__() hooks
These are wrappers around the currently public C functions
'py_import_*() and 'py_export_*().

In order to let other python module use these function, we should
resolve the needed type object and call the __import__() or __export__()
hooks instead of linking to the other shared module at C level.

We already do the same for structs.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:19 +02:00
Stefan Metzmacher
3a0ce3e41d pidl:Python: provide the abstract syntax as <module>.<interface>_abstract_syntax
The <module>.abstract_syntax alias is only kept as legacy for
the first interface in a module.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:18 +02:00
Stefan Metzmacher
1bebccaeb9 pidl:Python: prettify names of constants
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:18 +02:00
Stefan Metzmacher
7423d8106e pidl:NDR: keep interface->{ORIGINAL}
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:18 +02:00
Stefan Metzmacher
a560116aa5 pidl:Python: improve the .doc string for the get/set elements
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:18 +02:00
Stefan Metzmacher
47b40ac96a pidl:Python: make use of NDR_ERR_CODE_IS_SUCCESS()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:18 +02:00
Stefan Metzmacher
d4660e8697 pidl:Python: __ndr_print__ functions don't get arguments and need METH_NOARGS
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:18 +02:00
Stefan Metzmacher
b728c63bcb pidl:Python: check the return values of talloc_ptrtype()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-10-26 11:20:18 +02:00
Günther Deschner
45748aeb59 pidl: in s3 server templates, support default HRESULT error returns.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-11 19:57:25 +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
Günther Deschner
0ee5c9997e pidl: Keep case from fieldnames.
Change-Id: I5626cfa0487cc88eb65cc349c05ae1762bc953f4
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-on: https://code.wireshark.org/review/16720
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-07 12:09:17 +02:00
Günther Deschner
d569bda1e5 pidl: support HRESULT as return code in wireshark autogenerated dissectors.
Guenther

Change-Id: I68b7c579c5a519e429d2f4c2b3f63247e02f24e3
Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-on: https://code.wireshark.org/review/16718
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-06 23:17:21 +02:00
Aurelien Aptel
2d348bdb8d pidl/ws: fix missing $name when generating MAPI dissector
Port Wireshark commit 0e80176

Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
Date:   Fri Mar 4 19:28:26 2016 +0100

    PIDL (NDR): fix missing $name when regenerate MAPI dissector

    Issue coming from ge41f08858b

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jun 20 16:20:00 CEST 2016 on sn-devel-144
2016-06-20 16:20:00 +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
Aurelien Aptel
8a691e5aff pidl/s4/python: typo in comment
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
Aurelien Aptel
deabf7ab07 pidl/ws: directly use di param instead of casting private_data member.
As in Wireshark repo.

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
Aurelien Aptel
97eda222d0 pidl/ws: Document CODE_START and HEADER_START
Port Wireshark commit 833d315

Author: Guy Harris <guy@alum.mit.edu>
Date:   Mon Jan 13 21:18:29 2014 +0000

    Document {CODE,HEADER} {START,END}.

    Clean up indentation.

    svn path=/trunk/; revision=54721

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
Aurelien Aptel
b18d075e5c pidl/ws: whitespace cleanup
Imported from the WS repo.

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
Aurelien Aptel
372b41eede pidl/ws: Add HEADER START/HEADER END in ws dissector
Port Wireshark commit a297950

Author: Guy Harris <guy@alum.mit.edu>
Date:   Mon Jan 13 21:05:44 2014 +0000

    Add HEADER START and HEADER END, similar to CODE START and CODE END, to
    allow stuff to be put into the .h file; that way, if you put helper
    functions into the .c file, for use by dissectors other than the one
    being generated, you can put declarations for them into the .h file.

    Do some checks for mis-nesting of CODE and HEADER blocks.

    Clean up the "this is generated code" header.

    svn path=/trunk/; revision=54720

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
Aurelien Aptel
0d209ea24b pidl/ws: dereference pointers when passing name param.
Port parts of Wireshark commit a58c986f to the samba repo.

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
Aurelien Aptel
57bc1ced67 pidl/ws: Remove pinfo->private_data from DCERPC dissectors.
Sort of re-apply Wireshark commit 79cd356 which was never sync with
samba. It was reverted then reintroduced in the WS repo (yes this is
quite convulted).

Original commit message:

Author: Michael Mann <mmann78@netscape.net>
Date:   Wed Nov 6 12:36:09 2013 +0000

    Remove pinfo->private_data from DCERPC dissectors.  Bug 9387 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9387)

    This is the PIDL input file changes necessary to support removing pinfo->private_data from the DCERPC dissectors in favor of passing it through function parameters.  I didn't regenerate the dissector source, so this is just a "good faith" effort to mimic the manual changes.

    svn path=/trunk/; revision=53098

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
Aurelien Aptel
498189087b pidl/ws: remove any starting _ in WS field names
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
Aurelien Aptel
cafb68fdc4 pidl/ws: avoid trailing tabs
Port Wireshark commit 4f04a3c

Author: Stefan Metzmacher <metze@samba.org>
Date:   Thu Oct 29 08:32:52 2015 +0100

    tools/pidl: avoid trailing tabs

    Change-Id: I293dd6f2d7ff3b0e27bc3cc49e69977604f12260
    Signed-off-by: Stefan Metzmacher <metze@samba.org>
    Reviewed-on: https://code.wireshark.org/review/11433
    Reviewed-by: Anders Broman <a.broman58@gmail.com>

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:20 +02:00
Aurelien Aptel
bce85437b6 pidl: use https urls and update dead msdn link
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:20 +02:00
Aurelien Aptel
ad99cfb9c5 pidl/ws: Eliminate e_uuid_t in favor of e_guid_t
Port Wireshark commit 499d959

Author: Guy Harris <guy@alum.mit.edu>
Date:   Tue Mar 3 02:47:53 2015 -0800

    Eliminate e_uuid_t in favor of e_guid_t.

    That eliminates a redundant and confusing data type, and avoids issues
    with one piece of code using e_uuid_t but wanting to use routines
    expecting an e_guid_t.

    Change-Id: I95e172d46d342ab40f6254300ecbd2a0530cde60
    Reviewed-on: https://code.wireshark.org/review/7506
    Reviewed-by: Guy Harris <guy@alum.mit.edu>

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:20 +02:00
Aurelien Aptel
fda6c784fd pidl/ws: Remove #pragma warning (MSVC)
Port Wireshark commit ceda0f9

Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
Date:   Sun Oct 5 19:34:46 2014 +0200

    Remove #pragma warning (MSVC) for PIDL generate dissector

    Change-Id: I1e4c7944a2cd877f5c707703dcff44fe9f955a2c
    Reviewed-on: https://code.wireshark.org/review/4479
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>

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:20 +02:00
Aurelien Aptel
e3d15db030 pidl/ws: fix Assigned value is garbage or undefined found by Clang Analyzer
Port Wireshark commit 683d657

Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
Date:   Sun Oct 5 19:27:15 2014 +0200

    PIDL (DCERPC): fix Assigned value is garbage or undefined found by Clang Analyzer

    packet-dcerpc-dnsserver.c:1002:12: warning: Assigned value is garbage or undefined
    packet-dcerpc-frstrans.c:1137:12: warning: Assigned value is garbage or undefined
    packet-dcerpc-lsa.c:6345:12: warning: Assigned value is garbage or undefined
    packet-dcerpc-nspi.c:7805:12: warning: Assigned value is garbage or undefined
    packet-dcerpc-dfs.c:3245:11: warning: Function call argument is an uninitialized value
    packet-dcerpc-dfs.c:3245:9: warning: 'level' may be used uninitialized in this function [-Wmaybe-uninitialized]

    Change-Id: Ife6a2f565ae215535d0e3d72ef50800114240e3f
    Reviewed-on: https://code.wireshark.org/review/4478
    Reviewed-by: Evan Huus <eapache@gmail.com>

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:20 +02:00
Aurelien Aptel
82f3f25b3a pidl/ws: fix indent (use 4 tabs) and remove trailing whitespace
Port Wireshark commit 4110bde

Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
Date:   Fri Sep 26 19:51:34 2014 +0200

    PIDL: fix indent (use 4 tabs) and remove trailing whitespace

    Change-Id: I0ee63a040867b44ac9915704f5e581483ed6f7e2
    Reviewed-on: https://code.wireshark.org/review/4310
    Reviewed-by: Anders Broman <a.broman58@gmail.com>

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:20 +02:00
Aurelien Aptel
30e7be511e pidl/ws: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Port Wireshark commit f6b9e7a

Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
Date:   Sun Sep 28 20:57:13 2014 +0200

    PIDL: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang

    Change-Id: Ibae478771b30d6e9ae07315985f1e71bc6b65423
    Reviewed-on: https://code.wireshark.org/review/4350
    Reviewed-by: Michael Mann <mmann78@netscape.net>

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:20 +02:00
Aurelien Aptel
54898557d8 pidl/ws: enhance dissector
Port Wireshark commit 28ec9c2

Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
Date:   Fri Sep 26 23:29:43 2014 +0200

    PIDL (DCERPC winreg): enhance dissector

    * Fix PIDL generator for NOEMIT Element (fix -Wunused-function for DCERPC winreg dissector)
    * Fix indent (use tabs)
    * Remove DCERPC winreg dissector from DIRTY list

    Change-Id: I5d16cbfe8481a5e5f7e5df9b51735c93ae4375a7
    Reviewed-on: https://code.wireshark.org/review/4322
    Reviewed-by: Michael Mann <mmann78@netscape.net>

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:20 +02:00
Aurelien Aptel
c5b598d383 pidl/ws: fix -Wmissing-prototype
Port Wireshark commit e759d82

Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
Date:   Fri Sep 26 18:47:53 2014 +0200

    PIDL: fix -Wmissing-prototype

    Change-Id: I4cae47450e8026b10bd373828f235184560e0a99
    Reviewed-on: https://code.wireshark.org/review/4308
    Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
    Reviewed-by: Michael Mann <mmann78@netscape.net>

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:19 +02:00
Aurelien Aptel
33baf1cccb pidl/ws: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Port Wireshark commit f0b5fb7

Author: Alexis La Goutte <alexis.lagoutte@gmail.com>
Date:   Fri Sep 26 21:31:32 2014 +0200

    PIDL: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang

    Change-Id: I7f6f974732b7905f4ea4686e1a79ca6fbef78fa8
    Reviewed-on: https://code.wireshark.org/review/4319
    Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>

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:19 +02:00
Douglas Bagnall
ed11ce8f12 Python pidl: avoid segfault with "del obj->attr"
Deleting an attribute in Python (using the "del" statement) is (at
some stages along a winding path, for C objects) converted into
setting the attribute to NULL. Not None, actual NULL. The way we
handled this NULL was to dereference it. This changes the behaviour to
raising an AttributeError, which is more or less what Python does in
similar situations with builtin objects.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-05-10 01:43:15 +02:00
Andrew Bartlett
f6c79072ca pidl: Correct string handling to use talloc and be in common
The previous string handling assumed the python variables referenced
by PyString_AS_STRING had infinite life.  When they were re-used
the C structure started to point at unexpected things.

We now check correctly for Unicode in every case, and we always
duplicate the string with talloc_strdup()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2016-05-10 01:43:15 +02:00
Douglas Bagnall
59d530c0b6 ndr: Use ndr_steal to avoid long lists
When pulling complex structures like nt-acls, a long list of tokens may
be produced. By removing tokens along the way with ndr_token_steal,
future calls to retrieve from the token list are not as expensive.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-22 08:00:31 +01:00
Douglas Bagnall
9af628a488 ndr: avoid unnecessary searches of token list
When pulling complex structures like nt-acls, a long list of tokens
may be produced. This change means the token list won't be walked in the
buffers case if the switch value is not needed.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-22 08:00:31 +01:00
Andrew Bartlett
90bf114f63 pidl: Use a tmp_ctx helper variable
This is so we free the ndr_push_struct_blob() return value after
we make it into a string

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:26 +01:00
Andrew Bartlett
dffa2dbfab pidl: Use the $mem_ctx helper variable
This is already set to pytalloc_get_mem_ctx(py_obj)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:26 +01:00
Andrew Bartlett
9e07f3a13b pidl: Fix our python reference handling
The new talloc.BaseObject allow us to hold a talloc context per
python object (there may be many referring to the same C object)
and the talloc context that the actual object pointer is under.

Another advantage is that talloc.BaseObject(), has less of
an ABI surface.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-03-08 01:58:26 +01:00
Andrew Bartlett
a2d49fa74f pidl: Change PyGetSetDef in generated python bindings to use C99 initialisers
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
2016-01-18 04:42:21 +01:00
Andrew Bartlett
638c611796 pidl: Use PY_SSIZE_T_CLEAN
This changes the type used for # arguments to PyArg_ParseTupleAndKeywords

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2016-01-07 23:33:10 +01:00
Thomas Nagy
2666d06f29 build:wafsamba: removed most import * statements
The 'import *' statements make it more difficult to reason about
the modules and tends to conceal bugs. These changes enable running
pyflakes against most of the build scripts.

Signed-off-by: Thomas Nagy <tnagy@waf.io>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Oct 28 12:52:17 CET 2015 on sn-devel-104
2015-10-28 12:52:17 +01:00
Stefan Metzmacher
e6fbeb8606 pidl/python: also add a ndr_PyLong_FromLongLong() for symnetric reasons
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11429

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-09-01 14:01:23 +02:00
Andrew Bartlett
d1416d65a3 pidl/python: Provide static inline helper function ndr_PyLong_FromUnsignedLongLong
This should isolate any coverity warnings on 64-bit platforms
(where LONG_MAX is larger than any possible 32 bit value) to
a single spot, or possibly eliminate it.

This is needed for the unsigned 64 bit case, and on 32 bit
systems, as PyInt_FromLong is limited to a signed "long" int.

The compiler should be able to eliminate many of these calls
with the embedded type knowlege.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-09-01 14:01:23 +02:00
Andrew Bartlett
c2f4e324d9 pidl/python: Calculate maximum integer values using a lookup table
This avoids a << of 64 bits in the unused end of the conditional expression.

This was flagged by Coverity and the fix was suggested by metze.

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

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-09-01 14:01:23 +02:00
Andrew Bartlett
e3cf25bdc0 pidl: Assert that python arrays will not overflow the C array
We do not write network services in Python, so this is not a security issue, but would cause
a crash or other odd behaviour if the length was changed

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-08-24 23:46:22 +02:00
Andrew Bartlett
5206ccd002 pidl: Change PIDL to correctly use and validate python integer types
In particular, it is critical that we use unsigned integers of
sufficient size in python for unsigned C integers, and it is
critical that we check for overflow at both the python and C
level.

Otherwise, we may both represent and sort these incorrectly,
in particular when sorting attributeID values from DRSUAPI
which are represented as an signed enum in C and a uint32_t in IDL,
but which often has the high bit set (in schema extensions).

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-08-24 23:46:22 +02:00
Günther Deschner
adbd6d3253 pidl: merge multiple 'genpad' implementations into one.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Jul 24 16:44:16 CEST 2015 on sn-devel-104
2015-07-24 16:44:16 +02:00
Stefan Metzmacher
9f62c4e47b pidl:Samba4/NDR/Parser: always initialize _mem_save_ pointers to NULL
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-07 14:05:28 +02:00
Stefan Metzmacher
856c9aa503 pidl:Samba3/ServerNDR: add pidl_reset() and pidl_return() helper functions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-07 14:05:28 +02:00
Stefan Metzmacher
16952dc7a4 pidl:Samba3/ServerNDR: make CallWithStruct() more flexible
We now pass multiple callbacks $check, $cleanup, $return
down to AllocOutVar().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-07 14:05:28 +02:00
Stefan Metzmacher
b3de334938 pidl:Samba3/ServerNDR: simplify CallWithStruct()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-07-07 14:05:28 +02:00
Douglas Bagnall
bba177100c Treat uid_t, git_t as 64 bit in Pidl Python bindings
This follows their treatment in librpc/ndr/ndr_basic.c.

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

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jul  7 07:19:49 CEST 2015 on sn-devel-104
2015-07-07 07:19:49 +02:00
Douglas Bagnall
8a3d548ee7 remove trailing whitespace in Pidl/Samba4/Python.pm
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 06:04:10 +02:00
Douglas Bagnall
3c9f7957c9 Treat unsigned 64 bit IDL values as unsigned long long in Python
This caused a compilation error on i386:

default/librpc/gen_ndr/py_server_id.c:216:75: error: overflow in implicit constant conversion [-Werror=overflow]
  PyModule_AddObject(m, "SERVERID_UNIQUE_ID_NOT_TO_VERIFY", PyInt_FromLong(0xFFFFFFFFFFFFFFFFULL));

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-24 06:04:10 +02:00
Stefan Metzmacher
cf7e1c7597 pidl:NDR/Parser: check [ref] pointers before pushing anything else
This was reported by Coverity as
CID 1288527:  Null pointer dereferences  (REVERSE_INULL)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-12 17:08:20 +02:00
Stefan Metzmacher
3c97bfe9de pidl:NDR/Parser: protect for loops against $length being an expression instead of a scalar variable
This changes

for (value_cntr_1 = 0; value_cntr_1 < r->out.length?*r->out.length:0; value_cntr_1++) {

into:

for (value_cntr_1 = 0; value_cntr_1 < (r->out.length?*r->out.length:0); value_cntr_1++) {

it fixes a possible endless loop resulting in a crash.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-12 17:08:19 +02:00
Stefan Metzmacher
781cc3d50f pidl:Python: protect for loops against $length being an expression instead of a scalar variable
This changes

for (value_cntr_1 = 0; value_cntr_1 < r->out.length?*r->out.length:0; value_cntr_1++) {

into:

for (value_cntr_1 = 0; value_cntr_1 < (r->out.length?*r->out.length:0); value_cntr_1++) {

it fixes a possible endless loop resulting in a crash.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-12 17:08:19 +02:00
Stefan Metzmacher
ad7148fec6 pidl:Python: use discard_const() to pass a possible const pointer to talloc_unlink()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-06-12 17:08:19 +02:00
Stefan Metzmacher
d1278f081b pidl:Samba3/ServerNDR: normalize {RETURN_TYPE} by using mapTypeName()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri May 15 22:19:38 CEST 2015 on sn-devel-104
2015-05-15 22:19:38 +02:00
Günther Deschner
b14a6d3580 pidl/python: add prototypes into header section of generated c-files.
This stops emmiting hundreds of warnings when compiling with
-Wmissing-prototypes.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Mar 25 20:45:01 CET 2015 on sn-devel-104
2015-03-25 20:45:01 +01:00
Jelmer Vernooij
e67130c606 Explicitly include util/debug.h from server stubs generated by pidl.
This is necessary since Server.pm generates calls to DEBUG().

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 24 02:40:00 CET 2015 on sn-devel-104
2015-03-24 02:40:00 +01:00
Günther Deschner
210f1e6a21 pidl: align s4 dcesrv template generation with coding standards.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-03-13 23:58:09 +01:00
Günther Deschner
c686e34dc6 pidl: add --template3 option to generate s3 server stubs.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-03-13 23:58:09 +01:00
Günther Deschner
87054a5355 pidl/python: support HRESULT errors in generated python bindings.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-03-13 23:58:07 +01:00
Günther Deschner
9564a1f295 pidl: support HRESULT in pidl.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-03-13 23:58:07 +01:00
Petr Viktorin
02980268e8 Remove use of the "staticforward" macro
This macro was used for compatibility with broken compilers.
Since Python 2.3, it is always defined as `static`, and only exists
"for source compatibility with old C extensions".

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-01-22 10:51:07 +01: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
Guy Harris
082f88709a pidl: White space cleanups in Conformance.pm and NDR.pm
Change-Id: Ibf106d023c50a7f3caf8f416e9927ac4a040f2c0
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10842
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Wed Nov 19 05:06:33 CET 2014 on sn-devel-104
2014-11-19 05:06:33 +01:00
Matthieu Patou
4b09df8978 pidl-wireshark: SWITCH_TYPE is not always defined, SwitchType() will try to find a fallback
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Oct 24 01:39:16 CEST 2014 on sn-devel-104
2014-10-24 01:39:16 +02:00
Matthieu Patou
93f262ee6d pidl-wireshark: generate ALIGN_TO_x_BYTES instructions if the element has the align_x flag
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-23 23:12:05 +02:00
Matthieu Patou
3f6ca430b0 pidl-wireshark: if the structure has the flag no_align then set also no_align in the dceprc_info structure
Some dissection function will try to do alignment if the no_align flag
is not set.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-10-23 23:12:05 +02:00
Matthieu Patou
f0a6043fb2 pidl-wireshark: handle 8 bits enum and change the signature of enum function to pass the exact type
Instead of passing a uint32 in all cases we pass the exact type

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Change-Id: Ib79f1fa56d5aeb30c6e57eea8f0a48db60f6484d
Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-10-23 23:12:05 +02:00
Matthieu Patou
49e0dc7ad0 pidl-wireshark: add definition for IPV4/IPV6 types
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-23 23:12:05 +02:00
Matthieu Patou
725500fc28 pidl-wireshark: adapt to the new comments in the headers of wireshark dissectors
Change-Id: I4fc398c4d50230d1f0a083827493c1b193c045b9

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-23 23:12:05 +02:00
Matthieu Patou
fa331f64d1 pidl-wireshark: insure that we have an entire match for the variable name
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Oct 10 00:32:40 CEST 2014 on sn-devel-104
2014-10-10 00:32:40 +02:00
Matthieu Patou
5d0d45c9a7 pidl-wireshark: generate an error for the new Pipe type in typedef
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-10-09 22:06:47 +02:00
Matthieu Patou
87fb54b77f pidl-wireshark: add the type dom_sid28 and call ad-hoc dissector
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-09 22:06:47 +02:00
Matthieu Patou
755bc4ed29 pidl-wireshark: add a function to change the type of a hf_field
We can use this to change the type FT_BYTE when we realize that the
object dissected is an array of bytes

Change-Id: I2d09c557fd050d0c279b8fff0a27db53403366ca
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-09 22:06:47 +02:00
Matthieu Patou
7e5048d28e pidl-wireshark: cosmetic reformat
Change-Id: I86a0d4f13575e5ef7c6968b93ce126e5df981873
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-09 22:06:47 +02:00
Matthieu Patou
343db5326b pidl-wireshark: Handle the case when the DATA_TYPE is not a simple type
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Change-Id: If78f241333c1372c60c7d00211c1e6aeb22c9719
Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-10-09 22:06:46 +02:00
Matthieu Patou
5740a06b32 pidl: Improve string delection in function ContainsString
Change-Id: I037e8b5f54fca8b512fd14edbefa34e59cb7f953
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-09 22:06:46 +02:00
Matthieu Patou
4986359816 pidl: Make the compilation of PIDL producing the same results if the content hasn't change
Newer perl versions don't generate stable results anymore.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Change-Id: I2fb1e12da392ca85bfd0fb8b50b69851076144ee
Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-10-09 22:06:46 +02:00
Guy Harris
775d1f8c41 pidl: Strip trailing whitespace from pidl, for easier exchange of patches with wireshark.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10843

Change-Id: I7f1c1d9dd03acd35e59f2d16cc94ee0e8f3f1271
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sun Sep 28 03:59:35 CEST 2014 on sn-devel-104
2014-09-28 03:59:35 +02:00
Stefan Metzmacher
ee2148754e pidl/wscript: remove --with-perl-* options
These are not needed anymore as we have useful defaults now.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-09 00:39:07 +02:00
Michael Adam
fac24e1165 pidl: remove superfluous "use lib ...".
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Signed-off-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
b537c5a340 pidl: fix the perl module search path (use lib ...) when installing pidl.
This way, pidl can also run with modules installed under the $prefix.

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

Signed-off-by: Michael Adam <obnox@samba.org>
2014-09-05 19:47:06 +02:00
Michael Adam
191fc0e541 pidl/wscript: don't check for perl again.
This is done at the toplevel now.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-09-05 19:47:06 +02:00
Jelmer Vernooij
bfdc874e8b Various updates to the pidl README file.
Remove samba3/samba4-specific comments, add comments about backends and files.

Change-Id: Id2253ce85eab7a684b2c50d25f6f2604dc146a8e
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Sun Aug 31 23:47:49 CEST 2014 on sn-devel-104
2014-08-31 23:47:49 +02:00
Jelmer Vernooij
6824f1aa67 Remove trailing whitespace.
Change-Id: I1e0948da34bac278edc62cd63dedd08112426e7a
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-08-31 21:21:13 +02:00
Stefan Metzmacher
cf75ef9f73 pidl/lib/wscript_build: make use of PERL_LIB_INSTALL_DIR
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10472

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat May 10 01:37:33 CEST 2014 on sn-devel-104
2014-05-10 01:37:33 +02:00
Stefan Metzmacher
d29c143fae pidl:Samba4/Python: add interface.abstract_syntax() to each interface
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:25 +01:00
Andreas Schneider
ee8f98f26a pidl-waf: Only install Yapp::Driver if it is not available.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Mar  6 23:30:47 CET 2014 on sn-devel-104
2014-03-06 23:30:47 +01:00
Andreas Schneider
9e591e3d61 pidl-waf: Check for system perl(Parse::Yapp::Driver).
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:46 +01:00
Andreas Schneider
410ada45b7 pidl-waf: Add a function to check for a system perl module.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:45 +01:00
Andreas Schneider
b7b0ca1ba9 pidl-waf: Do not glob to install pidl modules.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:45 +01:00
Andreas Schneider
17244ef750 pidl-waf: Install pidl modules to the perl vendorlib directory.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:45 +01:00
Andreas Schneider
0bb6b0102f pidl-waf: Remove unused variable pidl_src.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:44 +01:00
Andreas Schneider
87976b4e45 Revert "pidl: Install pidl files corrently."
This reverts commit cee11cfa45.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:42 +01:00
Andreas Schneider
c2d58c3c20 Revert "waf: Add option to specify perl vendor dir."
This reverts commit 9b200555fe.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:42 +01:00
Andreas Schneider
c46aaf1102 Revert "pidl: Make perl(Parse:Yapp:Driver) installation optional."
This reverts commit f0030c619b.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-03-06 09:59:41 +01:00
Andreas Schneider
f0030c619b pidl: Make perl(Parse:Yapp:Driver) installation optional.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb 27 18:47:03 CET 2014 on sn-devel-104
2014-02-27 18:47:03 +01:00
Andreas Schneider
9b200555fe waf: Add option to specify perl vendor dir.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10472

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Feb 27 11:48:54 CET 2014 on sn-devel-104
2014-02-27 11:48:54 +01:00
Andreas Schneider
cee11cfa45 pidl: Install pidl files corrently.
Globbing is a really bad idea in installtion system. One of them is if
you use patch -b to create a backup, you will end up installing the
backup file too!

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
2014-02-26 13:10:58 +01:00
Stefan Metzmacher
2ba9453e9f pidl:NDR/Client: avoid useless memcpy()
If the src and dest pointer of memcpy would be the same
we should avoid it in order to avoid valgrind warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:38 +01:00
Stefan Metzmacher
f50b561336 pidl:NDR/Client: fix dcerpc_function() with [out,ref] pointers
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:37 +01:00
Stefan Metzmacher
662fc2de8c pidl:NDR/Client: simplify tevent_req_nterror() usage
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:37 +01:00
Stefan Metzmacher
02c34fe4e5 pidl:NDR/Client: add missing TALLOC_FREE(subreq) after dcerpc_binding_handle_call_recv()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:37 +01:00
Stefan Metzmacher
3a0fa3605b pidl:Samba3/ServerNDR: skip DCERPC pipe elements and leave NULL pointers.
We don't support them anyway, but this lets us adding them to the idl
file and only ignore it on the server.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 08:37:37 +01:00
Volker Lendecke
13b4dab31c pidl: fix an error message typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-10-11 16:11:56 +02:00
Matthieu Patou
52416175db pidl-wireshark: fix the trailling white space in the generated headers
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct  9 10:31:25 CEST 2013 on sn-devel-104
2013-10-09 10:31:25 +02: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
Matthieu Patou
51c612e4de Remove check_col from generated DCE/RPC dissectors.
This is a backport of
http://anonsvn.wireshark.org/viewvc?view=revision&revision=52313

Bug 8804 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8804).

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlett@samba.org>

Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Mon Oct  7 08:09:51 CEST 2013 on sn-devel-104
2013-10-07 08:09:51 +02:00
Matthieu Patou
167e2f2b55 pidl: Generate wireshark that conforms to the rules of Wireshark project
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep 24 02:04:05 CEST 2013 on sn-devel-104
2013-09-24 02:04:05 +02:00
Matthieu Patou
00dc30a9ff pidl: Generate NDR64/NDR32 aware code for the wireshark dissectors
Signed-off-by: Matthieu Patou <mat@matws.net>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-24 00:12:20 +02:00
Vadim Zhukov
92254d09e0 pidl: Recent Perl warns about "defined(@var)" constructs.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sat May 25 18:10:53 CEST 2013 on sn-devel-104
2013-05-25 18:10:53 +02:00
Karolin Seeger
618fd8e4de Wireshark/Conformance.pm: Fix typo.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-15 21:04:41 -07:00
Karolin Seeger
6175c277ec pidl/TODO: Fix typo.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-15 21:04:41 -07:00
Stefan Metzmacher
41f1c3969a pidl:NDR/Parser: correctly set $ndr->[relative_highest_]offset for relative_short pointers
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May  8 20:49:55 CEST 2013 on sn-devel-104
2013-05-08 20:49:55 +02:00
Stefan Metzmacher
5732c68403 Revert "Remove a bunch of "unused variable _relative_save_offset" warnings."
This reverts commit fa5898b6de.

This is the wrong fix for the warnings, the correct fix will follow.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2013-05-08 09:36:49 -07:00
Jeremy Allison
fa5898b6de Remove a bunch of "unused variable _relative_save_offset" warnings.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>

Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Wed May  8 07:47:45 CEST 2013 on sn-devel-104
2013-05-08 07:47:45 +02:00
Andreas Schneider
a42527e51b pidl: Add skip option to elements.
This option allows to skip struct elements in pull and push function.
This can be used to pass flags to the structure e.g. for string values.

Reviewed-by: Günther Deschner <gd@samba.org>
2013-03-15 12:11:02 +01:00
Andrew Bartlett
1da22ab994 build: Do not force a specific perl from ${PERL} when running pod2man
pod2man should have the right #!/usr/bin/perl line already, and forcing it may
cause us to use the wrong perl.

Essentially treat this like any other system binary, rather than forcing
it to use the first perl we found.

This essentially reverts e80f576db6.
Current SLES11 does not seem to have the issue this was added to
address.

Andrew Bartlett

Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Feb 28 02:14:25 CET 2013 on sn-devel-104
2013-02-28 02:14:25 +01:00
Alexander Bokovoy
6ba7ab5c14 PIDL: fix parsing linemarkers in preprocessor output
When PIDL calls out to C preprocessor to expand IDL files
and parse the output, it filters out linemarkers and line control
information as described in http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
and http://gcc.gnu.org/onlinedocs/cpp/Line-Control.html#Line-Control

With gcc 4.8 stdc-predef.h is included automatically and linemarker for the
file has extended flags that PIDL couldn't parse ('system header that needs to
be extern "C" protected for C++')

Thanks to Jakub Jelinek <jakub@redhat.com> for explanation of the linemarker format.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=906517

Reviewed-by: Andreas Schneider <asn@samba.org>
2013-02-06 11:51:11 +01:00
Michael Adam
cbc6a2f5e4 pidl: change strange spelling __donnot_use_enum_* to __do_not_use_enum_*
Signed-off-by: Michael Adam <obnox@samba.org>
2012-12-10 22:15:24 +01:00
Andrew Bartlett
d5a8e58bfb pidl: Add mode_t as an alias so we can marshall posix ACL structures 2012-08-15 11:44:44 +10:00
Andreas Schneider
fae6091f1d s3-rpc_server: Make it possible to use more rpc exceptions. 2012-07-06 10:00:56 +02:00
Michael Adam
d93d04124c pidl/tests: fix use of a non-existent word (existant) 2012-06-12 07:21:41 +02:00
Guy Harris
a66865dd28 Use ENC_ values for proto_tree_add_item() calls.
It appears that the integral value containing the bits in a bitmap should be
dissected according to the data representation, as the individual fields are
fetched by dissect_ndr_XXX, which is passed the data representation and
extracts the value appropriately for the data representation, so the patch
replaces TRUE (which meant "always little-endian" when the last argument to
proto_tree_add_item() was a byte-order Boolean) with DREP_ENC_INTEGER(drep)
(which means "ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN, depending on the data
representation").

For structures, I'm just using ENC_NA.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8942
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue May 15 12:07:06 CEST 2012 on sn-devel-104
2012-05-15 12:07:06 +02:00
Stefan Metzmacher
224379ba70 pidl/NDR/Parser: also do range checks on the array size
metze

Autobuild-User: Karolin Seeger <kseeger@samba.org>
Autobuild-Date: Tue Apr 10 18:21:59 CEST 2012 on sn-devel-104
2012-04-10 18:21:59 +02:00
Stefan Metzmacher
ab5560309a pidl/NDR/Parser: do array range validation in ParseArrayPullGetLength()
metze
2012-04-10 16:48:07 +02:00
Stefan Metzmacher
46123de7b7 pidl/NDR/Parser: use helper variables for array size and length
metze
2012-04-10 16:48:07 +02:00
Stefan Metzmacher
6e53b2db41 pidl/NDR/Parser: remember if we already know the array length
metze
2012-04-10 16:48:07 +02:00
Stefan Metzmacher
37313598af pidl/NDR/Parser: use ParseArrayPullGetLength() to get the number of array elements (bug #8815 / CVE-2012-1182)
An anonymous researcher and Brian Gorenc (HP DVLabs) working
with HP's Zero Day Initiative program have found this and notified us.

metze
2012-04-10 16:48:07 +02:00
Stefan Metzmacher
b6e74db293 pidl/NDR/Parser: split off ParseArrayPullGetSize() and ParseArrayPullGetLength()
metze
2012-04-10 16:48:07 +02:00
Stefan Metzmacher
2de81df668 pidl/NDR/Parser: simplify logic in DeclareArrayVariables*()
metze
2012-04-10 16:48:07 +02:00
Stefan Metzmacher
aad9449e56 pidl/NDR/Parser: declare all union helper variables in ParseUnionPull()
metze
2012-04-10 16:48:06 +02:00
Andrew Tridgell
75628e693a pidl: add more mapped types
when we #define one type to another, we need special handling in the
python generator

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Feb  8 04:50:06 CET 2012 on sn-devel-104
2012-02-08 04:50:06 +01:00
David Disseldorp
b8a8870d27 idl: add to_null property
to_null specifies that character conversion should only occur until the
null pointer in an array based string.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Jan 14 00:51:54 CET 2012 on sn-devel-104
2012-01-14 00:51:54 +01:00
David Disseldorp
6501b8bc6f idl: add parser for the to_null property
Compile into a ndr_pull_charset_to_null call.

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-13 09:37:37 -08:00
Stefan Metzmacher
1be5e58958 pidl:Samba4/Python: add an optional 'allow_remaining' argument to __ndr_unpack__() hooks
Thanks to Amitay Isaacs <amitay@gmail.com> for the help with this.

metze
2012-01-09 08:55:51 +01:00
Stefan Metzmacher
12123e751e pidl:Samba4/NDR/Parser: don't generate code for [ignore] pointers
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Nov 24 12:31:04 CET 2011 on sn-devel-104
2011-11-24 12:31:04 +01:00
Andrew Tridgell
dd80fc60fd pidl: adjust expected output for new flag checking 2011-09-08 03:35:28 +02:00
Andrew Tridgell
3d5dd91f59 pidl: added checking of NDR flags in generated code
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 03:35:27 +02:00
Jelmer Vernooij
f8ec7f6cb1 pytalloc: Use consistent prefix for functions, add ABI file. 2011-08-10 15:36:21 +02:00
Stefan Metzmacher
604b380203 pidl:Samba4/Python: PyArg_ParseTuple with "s#" returns 'int' instead of 'size_t'
If we pass variable references we don't get implicit casting!

metze
2011-08-08 16:45:27 +02:00
Matthieu Patou
987b25d7e0 pidl: for wireshark use only the major of the version 2011-08-06 01:33:08 +04:00
Matthieu Patou
403f064744 pidl: For wireshark check also LIBNDR_FLAG_NOALIGN for not aligning 2011-08-06 01:33:07 +04:00
Matthieu Patou
0912979341 pidl: handle union when the switch variable is outside of the union for wireshark dissector 2011-08-06 01:33:07 +04:00
Matthieu Patou
da02b56572 pidl: add subcontext handling for wireshark 2011-08-06 01:33:07 +04:00
Matthieu Patou
aea446ba79 pidl: If STR_NULLTERM we concider it's a string as well 2011-08-06 01:33:07 +04:00
Matthieu Patou
5a5f6845db pidl: handle hyper attribute for wireshark 2011-08-06 01:33:07 +04:00
Matthieu Patou
dc829a438a pidl: handle datablob for wireshark generator 2011-08-06 01:33:06 +04:00
Matthieu Patou
ba882bfd90 pidl: rpc version is a 32 bit 2011-08-06 01:33:06 +04:00
Matthieu Patou
5ff63e2dcf pidl: generate code for dissecting null terminated strings 2011-08-06 01:33:06 +04:00
Matthieu Patou
7170cfaaf3 pidl: don't expect to have quote when creating import headers
Currently the $_ didn't contains the quote anymore, in order to avoid
any further regression the cleanup of quote is done before so that if
$_ still have quotes we clean them in anycase.
2011-08-06 01:33:06 +04:00
Stefan Metzmacher
0ea3760cae pidl:NDR/Parser: allow [string,size_of()] together
metze
2011-08-01 15:46:11 +02:00
Stefan Metzmacher
98cc4c8419 pidl:NDR/Server: use interface->{UUID} and {NAME} instead of the raw {PROPERTIES}
metze
2011-08-01 13:44:26 +02:00
Stefan Metzmacher
e7a7a2451f pidl:NDR/Parser: use interface->{UUID} and {NAME} instead of the raw {PROPERTIES}
metze
2011-08-01 13:44:26 +02:00
Stefan Metzmacher
7ae14ed666 pidl:NDR/Parser: use '0' instead of 'NULL' for an uint32_t value
metze
2011-08-01 13:44:26 +02:00
Andrew Bartlett
1c34842db4 pidl: Add support for the [ignore] property
This is implemented to simply never push this pointer, but to push a
NULL in it's place.  Likewise a pull will simply return a NULL.

Andrew Bartlett
2011-04-05 23:46:04 +02:00
Günther Deschner
9115615663 pidl: add an include for "ntdomain.h" for s3 server stubs.
Guenther
2011-03-30 01:13:09 +02:00
Jelmer Vernooij
98e4ef09f4 pidl: Fix prototype for server init functions.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Mar 19 04:07:40 CET 2011 on sn-devel-104
2011-03-19 04:07:40 +01:00
Stefan Metzmacher
6771ade5e7 pidl:Samba4/NDR/Client: fix arguments to warning()
We want the file:line: information displayed.

metze
2011-03-11 11:02:23 +01:00
Stefan Metzmacher
f3465da072 pidl:Samba4/NDR/Parser: fix compiler warnings in 'pipe' related code
metze
2011-03-11 11:02:22 +01:00
Stefan Metzmacher
d79fb9098b pidl: add support for 'pipe' at the NDR layer
metze
2011-03-10 14:31:19 +01:00
Stefan Metzmacher
f43e757096 pidl/idl.yp: fill 'pipe' elements with array and count
metze
2011-03-10 14:31:19 +01:00
Stefan Metzmacher
91ef694351 pidl:NDR/Client: skip all functions if pipe elements are used
We don't support pipe at the dcerpc level yet.

metze
2011-03-10 14:31:18 +01:00
Stefan Metzmacher
f383497436 pidl:NDR/Client: skip sync functions if pipe elements are used
metze
2011-03-10 14:31:18 +01:00
Stefan Metzmacher
7537f9c9bb pidl:Python: don't generate functions with pipe elements
metze
2011-03-10 14:31:17 +01:00
Stefan Metzmacher
29bd658634 pidl:Samba3/ClientNDR: don't generate stubs for functions with pipe elements
metze
2011-03-10 14:31:17 +01:00
Stefan Metzmacher
eaa7ecdda7 pidl/NDR: add ContainsPipe() function
metze
2011-03-10 14:31:16 +01:00
Stefan Metzmacher
6e4e3f57e4 pidl/Typelist: add is_fixed_size_scalar()
metze
2011-03-10 14:31:14 +01:00
Stefan Metzmacher
6ef40f3199 pidl/Typelist: dnsp_name and dnsp_string are scalar references
metze
2011-03-10 14:31:13 +01:00
Andrew Bartlett
646aefd998 pidl Add support for uid_t and gid_t types
These are mapped to uint64_t, which should be big enough.  This is
proposed to be used for internal Samba representations, where it would
be more painful to convert all the callers to an uint64_t calling
convention.

Andrew Bartlett
2011-03-01 06:29:03 +01:00
Stefan Metzmacher
bd2b0076b4 Revert "Fix alignment issues in SPOOLSS "BUFFER" marshalling."
This reverts commit 187f695469.

This is the wrong fix.

metze
2011-02-28 15:54:13 -08:00
Jeremy Allison
187f695469 Fix alignment issues in SPOOLSS "BUFFER" marshalling.
Guenther and Metze please check !

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Feb 18 18:49:55 CET 2011 on sn-devel-104
2011-02-18 18:49:55 +01:00
Andrew Tridgell
431b25e895 pidl: support using pidl from top level directory
pidl needs to know if it is being used within the samba tree or not,
to get the names of some include files right. This adds support for
using pidl in the top level directory of a Samba build

This change also makes it clear that is_intree() is a boolean
function. Previously it returned different values for Samba3 and
Samba4, but there is nothing that depends on that

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-07 13:22:00 +11:00
Stefan Metzmacher
34b7b552e8 pidl:Samba4/NDR/Parser: fix ndr_pull/ndr_push mismatch
metze
2011-02-01 18:35:22 +01:00
Stefan Metzmacher
9fe4b695fe pidl:Samba4/NDR/Parser: add support for 'ms_union' style aligment
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Feb  1 12:13:45 CET 2011 on sn-devel-104
2011-02-01 12:13:45 +01:00
Stefan Metzmacher
6124148d66 pidl:Samba4/NDR/Parser: only do the switch type alignment when we have a switch type
This doesn't change the logic, it just doesn't call the same aligment function
twice.

metze
2011-02-01 11:21:43 +01:00
Stefan Metzmacher
76f2ddf5a9 pidl:NDR: add support for 'ms_union' property.
metze
2011-02-01 11:21:42 +01:00
Stefan Metzmacher
34664338f3 pidl:Typelist: fix perl warnings about recursiv function calls
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan 26 10:59:04 CET 2011 on sn-devel-104
2011-01-26 10:59:04 +01:00
Stefan Metzmacher
4b068bb919 pidl:Samba3/ServerNDR: correctly initialise ndr_push struct
We need to copy the ptr_count from the ndr_pull struct to the ndr_push struct,
otherwise we'll reuse full pointer ids, which will cause the client to
fail in the ndr unmarshalling.

metze
2011-01-26 08:51:46 +01:00
Stefan Metzmacher
1a96ec2109 pidl:Samba4/NDR/Client: remove compat mode for dcerpc_pipe based bindings
The only consumer "openchange" uses the dcerpc_binding_handle based
functions now.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Jan 21 08:16:25 CET 2011 on sn-devel-104
2011-01-21 08:16:25 +01:00