summaryrefslogtreecommitdiff
path: root/pidl/lib
Commit message (Collapse)AuthorAgeFilesLines
* libndr: Return enum ndr_err_code from ndr_{pull,push}_steal_switch_value()Andrew Bartlett2019-12-121-4/+4
| | | | | | | | | | | | | | | | This breaks the ABI so we merge this into the unreleased libndr-1.0.0. The advantage of the new functions is there (except for print, which is unchanged) is an error raised when the token is not found, so we can be confident in the changes to the token behaviour. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Dec 12 03:56:23 UTC 2019 on sn-devel-184
* pidl: Mismatch between set and get of relative base pointersAndrew Bartlett2019-12-121-5/+5
| | | | | | | | | | | The set was within the switch, the get was before the switch. The difference is shown when there is an empty default element. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pidl: Add and use ndr_print_steal_switch_value(), removing ↵Andrew Bartlett2019-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | ndr_print_get_switch_value() This avoids really long token lists for switch values that will not be needed past this point. The function name is changed to clarify what exactly is being done here, and the old function is removed to ensure it is not being used anywhere else. Merge the removal of ndr_print_get_switch_value into just-tagged librpc/ABI/ndr-1.0.0.sigs as this has not been put into any release yet. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pidl: Generate and consume the switch level token for both NDR_SCALARS and ↵Andrew Bartlett2019-12-121-15/+36
| | | | | | | | | | | | | | | | | | | | NDR_BUFFERS in ndr_pull() This means what was previously a list becomes a single variable that could be passed as a function paraemter, but this is avoided for now because it would change the ABI and be more intrusive. Before this, a client could cause a NDR token containing the swith level to be allocated for each and every element in the array that they promised they were sending (without having to actually send them). Found by Michael Hanselmann using Honggfuzz and an fuzzer for Samba's NDR layer. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13876 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pidl:NDR/Server: Allow to define endpoint server shutdown functionsSamuel Cabrero2019-12-121-0/+10
| | | | | | | | | | | | | | The next commits will register legacy api_struct when the endpoint server is initialized. This commit adds a shutdown function which will be used to unregister the legacy api_struct. The shutdown function will be also used to replace the rpc_srv_callbacks struct shutdown member used, for example, by the spoolss service to cleanup before exiting. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc:core: Add public functions to initialize endpoint serversSamuel Cabrero2019-12-121-0/+3
| | | | | | | | | | | | | | | The dcesrv_init_registered_ep_servers() will be used by the S3 server to initialize all registered endpoint servers (for embedded services), and the dcesrv_init_ep_server() function will be used by the external daemons to initialize the required ones. As serveral S3 services may require to initialize another one before itself (svcctl and eventlog for example require winreg) a boolean flag is added to track the initialization status. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl:NDR/Parser: only include structs in ndr_interface_public_structAndrew Bartlett2019-12-101-4/+16
| | | | | | | | | | | | | We only have ndrdump and the fuzzers set up for structures, not BITMAPS, ENUMS etc. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Dec 10 17:45:46 UTC 2019 on sn-devel-184
* lib/fuzzing: add fuzz_ndr_XDouglas Bagnall2019-12-101-0/+25
| | | | | | | | | | | | | | | | | | This NDR fuzzer links with each "interface" in the IDL files to create avsingle binary. This tries to matches what the fuzzing engines desire. It started as a copy of ndrdump but very little of that remains in place. The fancy build rules try to avoid needing a lof of boilerplate in the wscript_build files and ensure new fuzzers are generated and run when new IDL is added automatically. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl s4::Python: silence warningsDouglas Bagnall2019-12-101-4/+3
| | | | | | | | - do not redeclare variables in the same scope. - use $1 instead of \1, which perl just prefers. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl Parse::Pidl::NDR: silence two warnings about undefined stringsDouglas Bagnall2019-12-101-2/+2
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl Parse::Pidl::NDR: add HRESULT alignmentDouglas Bagnall2019-12-101-1/+2
| | | | | | | this is a guess Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl Parse::Pidl::NDR: warn of unknown scalar alignmentsDouglas Bagnall2019-12-101-1/+6
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl s4::NDR::Parser: silence a warningDouglas Bagnall2019-12-101-1/+1
| | | | | | | At level 0 there is no previous level so $pl is undefined thus so is ->{TYPE} Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl s4::NDR::Parser: correct has_fast_array logicDouglas Bagnall2019-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Here we fix two bugs that cancelled each other out completely, so this patch leaves us with exactly the same functionally as before. Bug 1: In perl, return is *syntactically* a function. That means 'return X or Y' is read as 'return(X) or Y', as in the 'open(X) or die "..."' construct -- Y is only evaluated if return returns false. But return never returns, so Y is dead code. If in doubt, try these: perl -e "sub x {return 0 or die;} x" perl -e "sub x {return (0 or die);} x" What we *meant* here is 'return (X or Y)', BUT it turns out we were confused -- the Y case was bogus. Bug 2: string arrays never had "fast array logic" in the first place. The fast array logic is for arrays of bytes, and can be fast (i.e. memcpy) because there is no endianness to worry about. A string array is an array of pointers not bytes. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl s4::NDR::Parser: read hex numbers as numbers for rangesDouglas Bagnall2019-12-102-5/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hex numbers in IDL are not parsed as numbers, resulting in warnings like Argument 0x2000 isn't numeric in numeric lt (<) at /home/douglas/src/samba/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm line 981 not to mention problematic code. We add a utility function to convert these numbers to numbers. A typical difference this makes is: --- old/default/librpc/gen_ndr/ndr_dcerpc.c 2019-11-30 23:40:32.915816967 +1300 +++ new/default/librpc/gen_ndr/ndr_dcerpc.c 2019-11-30 17:00:09.055733660 +1300 @@ -1893,7 +1893,7 @@ if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ReceiveWindowSize)); - if (r->ReceiveWindowSize > 0x40000) { + if (r->ReceiveWindowSize < 8192 || r->ReceiveWindowSize > 262144) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_CHECK(ndr_pull_trailer_align(ndr, 4)); Where the minimum ("0x2000" == 8192) was read as a string, thus treated as zero. The treatment as zero was introduced in 142b2a61f8a77b3065ce4c78b459ab714d6d190a accidentially, which shows why warnings are important. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl: use perl warningsDouglas Bagnall2019-12-1026-1/+26
| | | | | | | | 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>
* pidl: Remove Parse/Yapp/Driver.pmAndreas Schneider2019-12-101-471/+0
| | | | | | | | | | | This file is provided by Parse::Yapp and on install we overwrite the orignal file. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Dec 10 01:54:02 UTC 2019 on sn-devel-184
* pidl: don't export parser class methodsDouglas Bagnall2019-12-044-15/+0
| | | | | | | | | | | | | | | | | | | 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
* pidl s4/TDR: use Parse::Pidl::BaseDouglas Bagnall2019-12-041-5/+3
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl s4/TDR: use conventional ->{res} nameDouglas Bagnall2019-12-041-5/+5
| | | | | | | 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>
* pidl: s4/NDR/Parser uses Pidl::BaseDouglas Bagnall2019-12-041-27/+2
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl s4/NDR/Client: use Pidl::BaseDouglas Bagnall2019-12-041-7/+3
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl s4/NDR/Client: fix pidl_both()Douglas Bagnall2019-12-041-1/+1
| | | | | | | | This function was clearly meant to be adding output to both the .c and .h files, but was only adding it to the .h due to a typo. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl s4::Python uses Pidl::BaseDouglas Bagnall2019-12-041-31/+3
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl:: adjust s4::Python pidl_hdr() to be the same as othersDouglas Bagnall2019-12-041-9/+8
| | | | | | | | The common case is for pidl_hdr() to add a "\n", which we can easily do here, allowing this to be merged into the Pidl::Base borg. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl Samba3::ClientNDR uses Pidl::BaseDouglas Bagnall2019-12-041-5/+3
| | | | | | | | We need to modify the '@ISA = ' line, because it overwrites the inheritance from Pidl::Base. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl: optionally annotate output for debug purposesDouglas Bagnall2019-12-041-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It can sometimes be hard to tell which bit of pidl generated which bit of C. This commit wants to help. If the PIDL_DEVELOPER environment variable is set (via waf --pidl-developer or some other means), pidl will annotate *most* C indicating which lines were generated by which bits of pidl. It looks something like this: _PUBLIC_ enum ndr_err_code ndr_push_auth_session_info(struct ndr_push *ndr, int ndr_flags, const struct auth_session_info *r) { //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseTypePushFunction lib/Parse/Pidl/Samba4/NDR/Parser.pm:3079 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseStructPush lib/Parse/Pidl/Samba4/NDR/Parser.pm:604 if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 5)); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseStructPushPrimitives lib/Parse/Pidl/Samba4/NDR/Parser.pm:1448 NDR_CHECK(ndr_push_unique_ptr(ndr, r->security_token)); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParsePtrPush lib/Parse/Pidl/Samba4/NDR/Parser.pm:604 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unix_token)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->info)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->unix_info)); NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); /* [ignore] 'torture' */ //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseElementPushLevel lib/Parse/Pidl/Samba4/NDR/Parser.pm:729 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->session_key)); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseDataPush lib/Parse/Pidl/Samba4/NDR/Parser.pm:604 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParsePtrPush lib/Parse/Pidl/Samba4/NDR/Parser.pm:604 /* [ignore] 'credentials' */ //:PIDL: Parse::Pidl::Samba4::NDR::Parser::ParseElementPushLevel lib/Parse/Pidl/Samba4/NDR/Parser.pm:729 The comments starting with '//:PIDL:' have the function name, the filename, and line number. The comment follows the ordinary output, and uses the '//' style so as not to interfere with multiline /* */ comments if they happen to exist. A '//:PIDL:' comment is added whenever the pidl function or indentation level changes, and very occasionally at other places if pidl runs for a while without either of these things happening. This does not affect pidl parsers that do not inherit from Parse::Pidl::Base, and is careful to have no performance impact on non-debug generation. This may help with semi-automated flow analysis. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl: add a base class for PIDL parsersDouglas Bagnall2019-12-041-0/+46
| | | | | | | | | | | | | | | | | | | | | There are about 5 object-oriented parsers, all with their own effectively identical but differently spelt versions of pidl(), pidl_hdr(), indent(), and deindent(). With this commit we add a base class that they can all use. The ultimate aim is to be able to add some debugging instrumentation that benefits all[1] the parsers. [1] The parsers (e.g. Samba::ServerNDR) which use global scope rather than objects will not be affected. The versions of the functions in this file follow the most sophisticated versions of the soon-to-be subclasses. For example, the pidl() function avoids spurious whitespace and puts #define at column 0, following the Python parser. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl: check the size of pulled arrays of arraysDouglas Bagnall2019-11-201-0/+4
| | | | | | | | | | | | | | | | | We were accidentally checking the memory just past the array instead of checking each member. This could have led to the size of some arrays not being checked. Found by Michael Hanselmann using Honggfuzz and an fuzzer for Samba's NDR layer. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13877 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc: Unify packet dumping on ndr_pull() failureAndrew Bartlett2019-11-202-15/+0
| | | | | | | | | | | | | | | | There were two duplicate implementations of packet dumping just for the s4 RPC server! This unifies them and makes them easier to find because they are not triggered from the generated server stub any more. The behaviour have unified on setting "dcesrv:stubs directory" and being compiled with --enable-developer. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Nov 20 02:14:56 UTC 2019 on sn-devel-184
* ndr: Include the caller location in ndr_{pull,push}_error() messagesAndrew Bartlett2019-11-191-2/+2
| | | | | | | | | | | | | This should aid in debugging NDR parse failures. Use the ABI bump to again exclude ndr_table_misc incorrectly added in ABI 0.2.1. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Nov 19 14:47:46 UTC 2019 on sn-devel-184
* pidl: Handle obtaining objects from a fixed-size arrayAndrew Bartlett2019-11-141-1/+5
| | | | | | | | | | | | | | | | | Previously we would assume the array head was the talloc context however this is not the case if the array is a fixed size inline array within the parent struct. In that case the overall object's talloc context is the correct context to reference. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Thu Nov 14 17:36:49 UTC 2019 on sn-devel-184
* pidl/python: allocate objects with ref pointersDouglas Bagnall2019-11-141-1/+56
| | | | | | | | | | Struct members that are marked as ref pointers need to have an object allocated for them. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-programmed-with: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <npower@samba.org>
* pidl: Generate compatability wrappers for ndr_print functionsAndrew Bartlett2019-11-131-1/+13
| | | | | | | | | | | | This creates wrappers that are compatible with the functions called by ndrdump which have an extra "int flags" parameter for NDR_IN and NDR_OUT. This will make ndrdump of public structures work again. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14191 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* pidl: Generate the trailing ndr_table even if the UUID is not setAndrew Bartlett2019-11-131-7/+16
| | | | | | | | | | | This allows ndrdump to dump many more public structures because most of these are not in files with a UUID as they are not RPC protocols. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14191 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* pidl: Allow the compilation of the ndr_table to be skipedAndrew Bartlett2019-11-131-0/+9
| | | | | | | | | | | | | | | libnetapi.idl defines a large number of functions a nopull,nopush and no replacement is provided. This will allow the ndr_table to be generated for all other IDL files that may have public structures that could usefully be dumped by ndrdump. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14191 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* pidl/ndr/python: avoid memory errors in getsettersDouglas Bagnall2019-08-061-0/+8
| | | | | | | | | | | | | | | | This: $ python3 -c'from samba.dcerpc import lsa; x = lsa.EnumAccounts(); x.in_handle' should not raise a MemoryError, which is very unfriendly given that 'x.in_handle' is just named, not called, as far as the user is concerned. Returning None is the proper thing. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Tue Aug 6 18:17:11 UTC 2019 on sn-devel-184
* pidl: Remove the need to always specify --client with --pythonAndrew Bartlett2019-06-261-1/+5
| | | | | | | | This allows us to avoid generating client code for NDR-only protocols that do not go over DCE/RPC Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* py3: Remove PyStr_FromString() compatability macroAndrew Bartlett2019-06-241-3/+3
| | | | | | | | We no longer need Samba to be py2/py3 compatible so we choose to return to the standard function names. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Noel Power <noel.power@suse.com>
* pidl: Allow ndrdump to print public structuresGary Lockyer2019-06-061-1/+40
| | | | | | | | Generate code to allow ndrdump to operate on public structures. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* pidl: Call PY_DISCARD_FUNC_SIG in generated code to avoid ugly warningNoel Power2019-05-161-12/+13
| | | | | Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* pidl: Call PyLong_FromUnsignedLongLong directly rather than via inline helperAndrew Bartlett2019-05-061-8/+3
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pidl: Call PyLong_FromLongLong() directly rather than via inline helperAndrew Bartlett2019-05-061-6/+1
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pidl: Always call PyLong_FromUnsignedLongLong() in ↵Andrew Bartlett2019-05-061-5/+1
| | | | | | | | | ndr_PyLong_FromUnsignedLongLong() The C type is "unsigned long long" so use that always, as the Python type is now always the same. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pidl: Always call PyLong_FromLongLong() in ndr_PyLong_FromLongLong()Andrew Bartlett2019-05-061-5/+1
| | | | | | | The C type is "long long" so use that always, as the Python type is now always the same. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* pidl: No longer use Python3 compat define: PyInt_FromLong -> PyLong_FromLongAndrew Bartlett2019-05-061-2/+2
| | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
* waf: install: Remove installation of PIDL and manpages.Lutz Justen2019-04-231-37/+0
| | | | | | | | | | | | It's not used outside of Samba other than wireshark who have their own vendor fork. Signed-off-by: Lutz Justen <ljusten@google.com> Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Apr 23 02:08:56 UTC 2019 on sn-devel-144
* pidl/s4/python: call export "export" in py exceptionsDouglas Bagnall2019-03-121-1/+1
| | | | | Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pidl/Python: initialise a datablobDouglas Bagnall2019-03-041-1/+1
| | | | | | | | 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): Mon Mar 4 22:41:01 UTC 2019 on sn-devel-144
* pidl: Use NDR_ZERO_STRUCT(P) macrosAndreas Schneider2019-02-144-8/+8
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13778 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>