summaryrefslogtreecommitdiffstats
path: root/librpc/ndr
Commit message (Collapse)AuthorAgeFilesLines
* libndr: Avoid ommitting display of unset bitmap flags.Günther Deschner2013-10-091-4/+4
| | | | | | | | | | | | | | In 816e68f94fe500b9d68fd29021d432b84d3139b7 the display of unset bits has been effectively disabled while only the check for 0 bits was supposed to be avoided (because it creates the infite loop). Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Oct 9 19:56:39 CEST 2013 on sn-devel-104
* librpc: Fix blank line endingsVolker Lendecke2013-10-021-8/+8
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Oct 2 15:02:07 CEST 2013 on sn-devel-104
* libndr: Fix ndr_print_bitmap_flag for value=0Volker Lendecke2013-10-021-0/+4
| | | | | | | Don't endlessly loop Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* librpc: return a ndr_pull_error instead of just NDR_ERR_NDR64 when upper ↵Matthieu Patou2013-10-021-1/+2
| | | | | | | bits of 64 bit value are not 0 Signed-off-by: Matthieu Patou <mat@matws.net> Signed-off-by: Stefan Metzmacher <metze@samba.org>
* librpc/ndr: make use of ndr_dump_data() in ndr_print_array_uint8()Stefan Metzmacher2013-09-241-2/+11
| | | | | | | | It's much easier to look at hexdump -C style output than a few thousand lines with 1 byte each. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Matthieu Patou <mat@matws.net>
* librpc/ndr: make ndr_pull/push_DATA_BLOB NDR64 awareStefan Metzmacher2013-09-241-4/+4
| | | | | | | Pair-Programmed-With: Matthieu Patou <mat@matws.net> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Matthieu Patou <mat@matws.net>
* librpc/ndr: make sure ndr_table_list() always calls ndr_init_table() first.Günther Deschner2013-09-201-0/+1
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* librpc/ndr: call ndr_table_list() from all ndr_X functions.Günther Deschner2013-09-201-3/+3
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* librpc: Fix some "ignored asprint result" warningsVolker Lendecke2013-06-111-18/+9
| | | | | | | While there, it removes some alloc/free calls Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* librpc: Add NDR_PRINT_DEBUGC to ndr print to a debug classKai Blin2013-05-182-0/+54
| | | | | Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* ndr: Pass down string_flags in ndr_pull_ntprinting_printer().Andreas Schneider2013-03-151-0/+2
| | | | Reviewed-by: Günther Deschner <gd@samba.org>
* ndr: Add ndr_ntprinting_string_flags() function.Andreas Schneider2013-03-152-0/+17
| | | | | | It defaults to utf8string. Reviewed-by: Günther Deschner <gd@samba.org>
* ndr: Comparing an array to null is always true.Andreas Schneider2013-02-221-1/+1
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* krb5pac: make sure to correctly store the highest relative pointer offset.Günther Deschner2013-02-011-0/+3
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Feb 1 21:19:28 CET 2013 on sn-devel-104
* ndr: Check return code of ndr_pull_advance().Andreas Schneider2012-12-211-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* ntprinting: mark the final 4 byte null pointer for printer data in ↵Günther Deschner2012-07-061-0/+1
| | | | | | ndr_pull_ntprinting_printer as read. Guenther
* ndr: fix push/pull DATA_BLOB with NDR_NOALIGNDavid Disseldorp2012-07-061-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change addresses bug 9026. There are 3 use cases for DATA_BLOB marshalling/unmarshalling: 1) ndr_push_DATA_BLOB and ndr_pull_DATA_BLOB when called with LIBNDR_FLAG_ALIGN* alignment flags set, are used to push/pull padding bytes _only_. The length is determined by the alignment required and the current ndr offset. e.g. dcerpc.idl: typedef struct { ... [flag(NDR_ALIGN8)] DATA_BLOB _pad; } dcerpc_request; 2) When called with the LIBNDR_FLAG_REMAINING flag, all remaining bytes in the ndr buffer are pushed/pulled. e.g. dcerpc.idl: typedef struct { ... [flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier; } dcerpc_request; 3) When called without alignment flags, push/pull a uint32 length _and_ a corresponding byte array to/from the ndr buffer. e.g. drsblobs.idl typedef [public] struct { ... DATA_BLOB data; } DsCompressedChunk; The fix for bug 8373 changed the definition of "alignment flags", such that when called with LIBNDR_FLAG_NOALIGN ndr_push/pull_DATA_BLOB behaves as (1: padding bytes) rather than (3: uint32 length + byte array). This breaks marshalling/unmarshalling for the following structures. eventlog.idl: typedef [flag(NDR_NOALIGN|NDR_PAHEX),public] struct { ... DATA_BLOB sid; ... } eventlog_Record_tdb; ntprinting.idl: typedef [flag(NDR_NOALIGN),public] struct { ... DATA_BLOB *nt_dev_private; } ntprinting_devicemode; typedef [flag(NDR_NOALIGN),public] struct { ... DATA_BLOB data; } ntprinting_printer_data; Signed-off-by: Günther Deschner <gd@samba.org>
* librpc/ndr: Initilaise the remainder of struct dom_sid after a pullAndrew Bartlett2012-06-281-0/+1
| | | | | | | | This copes with the fact that r->sub_auths is a fixed-size array, not an allocated pointer, and so will still have some bytes no filled in if the sid did not have a MAX_SUB_AUTHS sub-authorities. Andrew Bartlett
* Revert "s3: Fix bug 8371"Stefan Metzmacher2012-06-031-2/+0
| | | | | | | | | | This reverts commit 2642f385887fbd3aecd4286a4d6223a21d981714. This is not needed anymore, as 035342c11719d1daa647c0b2ae7cec27a969f83a "Fix bug #8373 - Can't join XP Pro workstations to 3.6.1 DC." is the more generic fix for the problem. metze
* librpc: Fix an incompatible pointer type warningVolker Lendecke2012-05-301-2/+4
| | | | Signed-off-by: Amitay Isaacs <amitay@gmail.com>
* librpc: Fix some typosVolker Lendecke2012-05-301-3/+3
| | | | Signed-off-by: Kai Blin <kai@samba.org>
* Fix bug #8373 - Can't join XP Pro workstations to 3.6.1 DC.Jeremy Allison2012-05-252-5/+11
| | | | | | | Treat LIBNDR_FLAG_NOALIGN and LIBNDR_FLAG_REMAINING the same as the other align flags - make them mutually exclusive. Combined work from Metze, Günther and Jeremy.
* Move NS_GUID_string and NS_GUID_from_string to dsdb-common.Jelmer Vernooij2012-03-202-54/+0
|
* libndr: Define trivial is_valid_policy_hnd as macro.Jelmer Vernooij2012-03-202-6/+1
| | | This makes the NDR namespace a bit clearer, in preparation of ABI checking.
* libndr: Rename policy_handle_empty to ndr_policy_handle_empty.Jelmer Vernooij2012-03-202-3/+3
| | | This makes the NDR namespace a bit clearer, in preparation of ABI checking.
* libndr: Rename policy_handle_equal to ndr_policy_handle_equal.Jelmer Vernooij2012-03-202-2/+2
| | | This makes the NDR namespace a bit clearer, in preparation of ABI checking.
* libndr: Rename ndr64_transfer_syntax and null_ndr_syntax_id so they have a ↵Jelmer Vernooij2012-03-202-10/+11
| | | | | ndr_ prefix. This makes the NDR namespace a bit clearer, in preparation of ABI checking.
* ndr: dnsserver: Add pull and push functions for DNS_RPC_RECORD_STRINGAmitay Isaacs2012-03-021-0/+37
|
* ndr: Add NDR pull, push, print functions for dnsp_string_listAmitay Isaacs2012-03-021-0/+53
|
* ndr: Fix NDR push function for dnsp_stringAmitay Isaacs2012-03-021-3/+2
| | | | Push the actual length of the string not including null-termination.
* ndr: Fix the error messages, add correct data type nameAmitay Isaacs2012-03-021-6/+6
|
* libndr: Add ndr_map_error2errnoVolker Lendecke2012-02-132-0/+26
| | | | | Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Feb 13 15:06:29 CET 2012 on sn-devel-104
* ndr: add ndr_pull_charset_to_null()David Disseldorp2012-01-132-0/+32
| | | | | | | The same as ndr_pull_charset(), however only perform character conversion on bytes prior to and including the null terminator. Signed-off-by: Jeremy Allison <jra@samba.org>
* librpc: Add support for struct timevalVolker Lendecke2011-12-022-0/+41
|
* librpc: Add support for struct timespecVolker Lendecke2011-12-022-0/+41
|
* s3: Fix bug 8371Volker Lendecke2011-11-181-0/+2
| | | | | | | | | ndr_set_flag or's in the given flag (ALIGN4). At this point, ndr->flags contains NOALIGN, which will persist. In ndr_push_DATA_BLOB NOALIGN overrides everything else, so that the ALIGN4 is not respected. Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Fri Nov 18 09:33:37 CET 2011 on sn-devel-104
* dns: Fix offset check in ndr_pull_componentKai Blin2011-11-041-1/+1
| | | | | Autobuild-User: Kai Blin <kai@samba.org> Autobuild-Date: Fri Nov 4 17:25:16 CET 2011 on sn-devel-104
* nbt: Fix offset check in ndr_pull_componentKai Blin2011-11-041-1/+1
|
* nbt: create standard ndr_pull/push interface for common netlogon samlogon ↵Günther Deschner2011-11-032-1/+61
| | | | | | replies. Guenther
* nbt: move netlogon_samlogon_response into librpc/ndr/ndr_nbt.h.Günther Deschner2011-11-031-0/+11
| | | | Guenther
* nbt: move nbt_string ndr functions to ndr/ndr_nbt.c helper.Günther Deschner2011-11-032-0/+186
| | | | Guenther
* nbt: merge in LIBCLI_NDR_NETLOGON helper into NDR_NBT.Günther Deschner2011-11-032-0/+242
| | | | Guenther
* s4-dns: Added support for multiple DNS_RPC_RECORDS structuresAmitay Isaacs2011-10-202-0/+88
| | | | | | | | | | Windows returns multiple DNS_RPC_RECORDS structures, but there is no well defined structure in [MS-DNSP] doc. Added hand-written code to parse ndr. Pair-Programmed-With: Andrew Tridgell <tridge@samba.org> Signed-off-by: Andrew Tridgell <tridge@samba.org>
* build: avoid util.h as a public header name due to conflict with MacOSAndrew Bartlett2011-09-231-1/+1
|
* libndr: add checking to all pull/push functions of base typesAndrew Tridgell2011-09-081-0/+34
| | | | | | this checks that the passed in ndr_flags are valid Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* libndr: moved the NDR_* flags to have less overlapAndrew Tridgell2011-09-081-8/+36
| | | | | | | | | | | | | | | | | | | | We have 3 different types of flags values in our NDR layer. We've recently found bugs where these types of flags have been mixed up, especially by people adding hand written ndr code for tricky structures. We previously got away with this because (for example) NDR_SCALARS and NDR_IN had the same value, so mixing up the two concepts sometimes worked. Unfortunately it also led to bugs where we didn't do what was expected, such as in our smbtorture ndr test suite, where passing a ndr_flags value of zero led to only checking that two empty structures were equal. This changes the values of the NDR_IN|NDR_OUT and NDR_SCALARS|NDR_BUFFERS values to be in different bit ranges, and adds macros for checking the validity of passed in flags. A followup patch modifies the ndr calls to use these macros, and pidl to generate them. This should catch misuse of the APIs. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* ndr: range check on push of dom_sid blobAndrew Tridgell2011-09-051-1/+4
| | | | | | | this ensures we get an error if we try to push a dom_sid with too many sub_auths Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* drsblobs: fixed alignment of drs blobs authentication informationAndrew Tridgell2011-09-051-5/+5
| | | | | | | the two types of ndr flags were being mixed up, so NDR_BUFFERS was being interpreted as LIBNDR_FLAG_NOALIGN Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* ndr_drsuapi: fix compiler warningStefan Metzmacher2011-08-091-2/+3
| | | | metze
* librpc/ndr remove _SAMBA_BUILD_ conditionalsAndrew Bartlett2011-07-063-8/+0
|