summaryrefslogtreecommitdiff
path: root/librpc/ndr
AgeCommit message (Collapse)AuthorFilesLines
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
2011-06-01librpc/ndr: add new LIBNDR_FLAG_STR_RAW8 for ndr_pull_stringSean Finney2-8/+39
Introduce a new flag, LIBNDR_FLAG_STR_RAW8, which indicates that libndr should not attempt to convert the corresponding byte sequence, and place the responsibility on the caller to do so later. This is needed in cases where the string is known to be 8-bit and either NULL terminated or of known length, but in an unspecified character set. For example, when pulling PT_STRING8 properties from an exchange server via libmapi + libndr, the codepage is neither known nor in the control of the caller, and is determined by subsequent properties requested from the server. Therefore the client would like to fetch all properties in one large batch, and convert the resulting strings locally. This commit also includes some (basic) tests of each of the flags' respective behaviors with the ndr push/pull string functions, in a new source4 torture test suite ndr.ndr_string. Signed-off-by: Sean Finney <seanius@seanius.net>
2011-06-01librpc/ndr: consolidate string conversion logic in ndr_pull_stringSean Finney1-171/+44
Reduce the amount of duplicate code in ndr_pull_string by moving the almost duplicate conversion calls and their corresponding NDR pulls and checks to a single location. In the place of the removed calls is logic allowing the conversion to be generalized, and and any specific pulls/checks that do not apply to the general case. This is similar to what has already been done in the switch statement for ndr_push_string. Signed-off-by: Sean Finney <seanius@seanius.net>
2011-05-18librpc/ndr Merge ndr_print_sockaddr_storage() into common codeAndrew Bartlett2-0/+34
There is no longer a reason to leave this source3 specific, and this brings it into a library (avoiding duplicate symbols). Andrew Bartlett
2011-04-05auth: Move auth_session_info into IDLAndrew Bartlett2-0/+76
This changes auth_session_info_transport to just be a wrapper, rather than a copy that has to be kept in sync. As auth_session_info was already wrapped in python, this required changes to the existing pyauth wrapper and it's users. Andrew Bartlett
2011-03-30Fix convert_string() to take a *converted_size arg. and return a bool.Jeremy Allison1-6/+6
Makes these interfaces much harder to misuse and easier to ensure error checking. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
2011-03-30This doesn't look like it has anything to do with character set conversion, ↵Jeremy Allison1-7/+10
but it does :-). Turns out one of the *really* significant differences between convert_string() in source4 and source3, is that the one in source3 will return 0 for byte length converted when called with dest_len = 0 whereas the one in source4 returns (size_t)-1 and sets errno to E2BIG. Allow the ndr_string code to cope with the (arguably correct) way that the source4 implementation works. This code only gets excercised in the print spooler tests, which aren't run in source4, which is why this bug has lasted for so long. You don't want to know how long it took me to find this :-). Jeremy.
2011-03-29Ensure convert_string_XXX is always called with a valid converted_size pointer.Jeremy Allison1-1/+2
Preparation for cleaning up this API. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104
2011-03-24charcnv: removed the allow_badcharcnv and allow_bad_conv options to ↵Andrew Tridgell2-11/+11
convert_string*() we shouldn't accept bad multi-byte strings, it just hides problems Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-10librpc/ndr: add ndr_push_pipe_chunk_trailer() and ndr_check_pipe_chunk_trailer()Stefan Metzmacher2-0/+36
metze
2011-03-10librpc/ndr: add ndr_interface_call_pipeStefan Metzmacher1-0/+16
metze
2011-03-09librpc/ndr use hyper for uid_t/gid_t rather than udlongAndrew Bartlett1-4/+4
This has 8 byte alignment, which is what was specified in pidl for these types. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Mar 9 09:03:09 CET 2011 on sn-devel-104
2011-03-02librpc/rpc: let ndr_pull_spoolss_EnumPrinterDataEx() use a subcontextStefan Metzmacher1-1/+4
This is not strictly needed, but it's good to have the logic in common with the other Enum* calls. This also allows us to play with the NDR_RELATIVE_REVERSE flag. metze
2011-03-01librpc/ndr: handle NOALIGN flag for relative pointers and alignment DATA_BLOBsStefan Metzmacher2-5/+14
metze Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue Mar 1 17:11:03 CET 2011 on sn-devel-104
2011-03-01pidl Add support for uid_t and gid_t typesAndrew Bartlett2-0/+62
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-02-28spoolss.idl: align spoolss_PrinterEnumValues 'data' based on the typeStefan Metzmacher2-0/+33
metze
2011-02-28TODO test/review librpc/ndr: remove align2 hack for relative pointersStefan Metzmacher1-5/+1
metze
2011-02-28librpc/ndr: ndr align relative pointers based on the given flagsStefan Metzmacher1-0/+26
We used to do this only for the reverse relative pointers and now we always do it. metze
2011-02-28TODO test/review librpc/ndr: let ndr_push/pull_DATA_BLOB() look at ↵Stefan Metzmacher1-4/+5
LIBNDR_FLAG_REMAINING before LIBNDR_ALIGN_FLAGS metze
2011-02-17idl: naming a structure 'VERSION' is not a good idea!Andrew Tridgell1-1/+1
this renames it to ntlmssp_VERSION Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-17libndr: remove prototype for nonexisting function ndr_print_ipv4_addr().Günther Deschner1-1/+0
Guenther
2011-02-10librpc: move preg.idl to main directory.Günther Deschner2-0/+92
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Feb 10 13:56:49 CET 2011 on sn-devel-104
2011-02-08libndr: apply some const and make is_valid_policy_hnd a callback to ↵Günther Deschner2-5/+3
policy_handle_empty. Guenther
2011-02-08libndr: share some uuid helpers.Günther Deschner2-0/+20
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Feb 8 09:52:56 CET 2011 on sn-devel-104
2011-02-08ndr: merge ndr_map_error2string and ndr_errstr.Günther Deschner1-0/+1
Guenther
2011-02-08ndr: move null_ndr_syntax_id to the common libndr location.Günther Deschner2-0/+6
Guenther
2011-02-08ndr: merge duplicate ndr_map_error2ntstatus() functions.Günther Deschner1-0/+25
Guenther
2011-01-25libndr: move ndr_print_bool to ndr_basic.cGünther Deschner2-0/+7
Guenther