summaryrefslogtreecommitdiff
path: root/librpc/ndr
AgeCommit message (Collapse)AuthorFilesLines
2013-05-18librpc: Add NDR_PRINT_DEBUGC to ndr print to a debug classKai Blin2-0/+54
Signed-off-by: Kai Blin <kai@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-03-15ndr: Pass down string_flags in ndr_pull_ntprinting_printer().Andreas Schneider1-0/+2
Reviewed-by: Günther Deschner <gd@samba.org>
2013-03-15ndr: Add ndr_ntprinting_string_flags() function.Andreas Schneider2-0/+17
It defaults to utf8string. Reviewed-by: Günther Deschner <gd@samba.org>
2013-02-22ndr: Comparing an array to null is always true.Andreas Schneider1-1/+1
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-01krb5pac: make sure to correctly store the highest relative pointer offset.Günther Deschner1-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
2012-12-21ndr: Check return code of ndr_pull_advance().Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
2012-07-06ntprinting: mark the final 4 byte null pointer for printer data in ↵Günther Deschner1-0/+1
ndr_pull_ntprinting_printer as read. Guenther
2012-07-06ndr: fix push/pull DATA_BLOB with NDR_NOALIGNDavid Disseldorp1-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>
2012-06-28librpc/ndr: Initilaise the remainder of struct dom_sid after a pullAndrew Bartlett1-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
2012-06-03Revert "s3: Fix bug 8371"Stefan Metzmacher1-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
2012-05-30librpc: Fix an incompatible pointer type warningVolker Lendecke1-2/+4
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
2012-05-30librpc: Fix some typosVolker Lendecke1-3/+3
Signed-off-by: Kai Blin <kai@samba.org>
2012-05-25Fix bug #8373 - Can't join XP Pro workstations to 3.6.1 DC.Jeremy Allison2-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.
2012-03-20Move NS_GUID_string and NS_GUID_from_string to dsdb-common.Jelmer Vernooij2-54/+0
2012-03-20libndr: Define trivial is_valid_policy_hnd as macro.Jelmer Vernooij2-6/+1
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20libndr: Rename policy_handle_empty to ndr_policy_handle_empty.Jelmer Vernooij2-3/+3
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20libndr: Rename policy_handle_equal to ndr_policy_handle_equal.Jelmer Vernooij2-2/+2
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20libndr: Rename ndr64_transfer_syntax and null_ndr_syntax_id so they have a ↵Jelmer Vernooij2-10/+11
ndr_ prefix. This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-02ndr: dnsserver: Add pull and push functions for DNS_RPC_RECORD_STRINGAmitay Isaacs1-0/+37
2012-03-02ndr: Add NDR pull, push, print functions for dnsp_string_listAmitay Isaacs1-0/+53
2012-03-02ndr: Fix NDR push function for dnsp_stringAmitay Isaacs1-3/+2
Push the actual length of the string not including null-termination.
2012-03-02ndr: Fix the error messages, add correct data type nameAmitay Isaacs1-6/+6
2012-02-13libndr: Add ndr_map_error2errnoVolker Lendecke2-0/+26
Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Mon Feb 13 15:06:29 CET 2012 on sn-devel-104
2012-01-13ndr: add ndr_pull_charset_to_null()David Disseldorp2-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>
2011-12-02librpc: Add support for struct timevalVolker Lendecke2-0/+41
2011-12-02librpc: Add support for struct timespecVolker Lendecke2-0/+41
2011-11-18s3: Fix bug 8371Volker Lendecke1-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
2011-11-04dns: Fix offset check in ndr_pull_componentKai Blin1-1/+1
Autobuild-User: Kai Blin <kai@samba.org> Autobuild-Date: Fri Nov 4 17:25:16 CET 2011 on sn-devel-104
2011-11-04nbt: Fix offset check in ndr_pull_componentKai Blin1-1/+1
2011-11-03nbt: create standard ndr_pull/push interface for common netlogon samlogon ↵Günther Deschner2-1/+61
replies. Guenther
2011-11-03nbt: move netlogon_samlogon_response into librpc/ndr/ndr_nbt.h.Günther Deschner1-0/+11
Guenther
2011-11-03nbt: move nbt_string ndr functions to ndr/ndr_nbt.c helper.Günther Deschner2-0/+186
Guenther
2011-11-03nbt: merge in LIBCLI_NDR_NETLOGON helper into NDR_NBT.Günther Deschner2-0/+242
Guenther
2011-10-20s4-dns: Added support for multiple DNS_RPC_RECORDS structuresAmitay Isaacs2-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>
2011-09-23build: avoid util.h as a public header name due to conflict with MacOSAndrew Bartlett1-1/+1
2011-09-08libndr: add checking to all pull/push functions of base typesAndrew Tridgell1-0/+34
this checks that the passed in ndr_flags are valid Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08libndr: moved the NDR_* flags to have less overlapAndrew Tridgell1-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>
2011-09-05ndr: range check on push of dom_sid blobAndrew Tridgell1-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>
2011-09-05drsblobs: fixed alignment of drs blobs authentication informationAndrew Tridgell1-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>
2011-08-09ndr_drsuapi: fix compiler warningStefan Metzmacher1-2/+3
metze
2011-07-06librpc/ndr remove _SAMBA_BUILD_ conditionalsAndrew Bartlett3-8/+0
2011-06-23lib/util/charset: Remove 'display charset'Andrew Bartlett1-1/+0
As discussed in 'CH_DISPLAY and gettext' on the samba-technical list: http://lists.samba.org/archive/samba-technical/2011-June/078190.html Setting this to a value other than 'unix charset' does not make sense, as any system where the filesytem charset does not equal the terminal charset will already have problems with programs as simple as 'ls'. It also means that our output could not be pasted as our input in interactive programs or onto our command line, as we never did translate in the DISPLAY -> UNIX direction. The d_printf() calls are retained in case we need to revisit this, and to support display_set_stderr(). Andrew Bartlett
2011-06-15librpc: fix buildwarning in NDR_WMI.Günther Deschner2-0/+25
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Jun 15 17:23:49 CEST 2011 on sn-devel-104
2011-06-10librpc/ndr/ndr_table.h: fix licence/copyrightGünther Deschner1-0/+22
Guenther
2011-06-10librpc/ndr/ndr_spoolss_buf.h: fix licence/copyrightGünther Deschner1-0/+23
Guenther
2011-06-10librpc/ndr/ndr_dns.h: fix licence/copyrightGünther Deschner1-0/+25
Guenther
2011-06-10librpc/ndr/ndr_compression.h: fix licence/copyrightGünther Deschner1-0/+22
Guenther
2011-06-10librpc/ndr/ndr_backupkey.h: fix licence/copyrightGünther Deschner1-0/+21
Guenther
2011-06-01Fix type mixing warnings.Jeremy Allison1-2/+2
2011-06-01librpc/ndr: Use converted_size to determine if NULL termination was sentAndrew Bartlett1-4/+10
This is better than doing a strlen() on the string, as that huristic only worked for ASCII strings. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Jun 1 01:42:22 CEST 2011 on sn-devel-104