summaryrefslogtreecommitdiff
path: root/librpc
Commit message (Collapse)AuthorAgeFilesLines
* librpc/rpc: fix regression in NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE error ↵Stefan Metzmacher2017-02-211-5/+3
| | | | | | | | | | | | | mapping Commit 1eef70872930fa4f9d3dedd23476b34cae638428 changed the mapping for DCERPC_NCA_S_FAULT_INVALID_TAG from NT_STATUS_RPC_ENUM_VALUE_OUT_OF_RANGE to NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12585 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* ndrdump: Add the option --hex-input for hexdump parsingCody Harrington2017-02-141-7/+15
| | | | | | | | This allows the user to input a hexdump that has been generated by the dump option. Signed-off-by: Cody Harrington <cody@harringtonca.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* drsuapi.idl: make drsuapi_DsGetNCChangesRequest10 [public]Stefan Metzmacher2017-02-081-1/+1
| | | | | | | This allows ndr_print to work. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* drsuapi.idl: add drsuapi_DrsMoreOptions with DRSUAPI_DRS_GET_TGTStefan Metzmacher2017-02-081-1/+5
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc/ndr: add [to_null] keyword to szPackageId in spoolss_CorePrinterDriver.Günther Deschner2017-01-241-1/+1
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org Reviewed-by: Stefan Metzmacher <metze@samba.org>
* librpc/ndr: add ndr_push_charset_to_null and increase library version (abi ↵Günther Deschner2017-01-244-1/+277
| | | | | | | | | | | | | | change) We were crashing earlier when calculating the length of NULL strings in fixed size arrays (noticed while replying with an empty spoolss_CorePrinterDriver struct within the spoolss_GetCorePrinterDrivers call). Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging.idl: add ringbuf message typesRalph Boehme2017-01-201-0/+3
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* spoolss: Fix PROCESSOR_AMD_X8664 value in IDLGünther Deschner2017-01-121-5/+5
| | | | | | | | | | | | | Microsoft got their docs wrong in MS-RPRN Section 2.2.1.10.1 (footnote 65): PROCESSOR_AMD_X8664 must be 0x000021D8 and not 0x000022A0. This is what recent windows versions report back from a spoolss getprinter level 0 RPC call. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* winbind: Remove wbint_QueryUserListVolker Lendecke2017-01-041-4/+0
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* winbind: Remove wbint_LookupUserGroupsVolker Lendecke2017-01-041-5/+0
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* winbind: Remove wbint_QueryUserVolker Lendecke2017-01-041-5/+0
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: Use "all_zero" where appropriateVolker Lendecke2017-01-031-10/+2
| | | | | | | ... Saves a few bytes of footprint Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* winbind: Add wbint_QueryUserRidListVolker Lendecke2017-01-021-0/+4
| | | | | | | | | | | This is an equivalent of QueryUserList with simpler output. The next commit will use it to go through wb_getpwsid for getent passwd, to make sure we get the same results. Eventually, this might get a simpler backend. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* winbind: Add a GetNssInfo parent/child callVolker Lendecke2017-01-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | This call will be done in the idmap child. It is not 100% the right place, but there is no better one available to me. It will become a replacement for the "winbind nss info" parameter: This global parameter is good for just one domain. It might be possible to have idmap backend AD for different domains, and the NSS info like primary gid, homedir and shell might be done with different policies per domain. As we already have a domain-specific idmap configuration, doing the NSS info configuration there also is the closest way to do it. The alternative, if we did not want to put this call into the idmap child would be to establish an equivalent engine like the whole "idmap config *" just for the nss info. But as I believe this is closely related, I'll just keep it in the idmap child. This also extends the wbint_userinfo structure with pretty much all user related fields. The idea is that the GetNssInfo call can do whatever it wants with it. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* idmap: Pass up the xid2sids unix-ids from the idmap childVolker Lendecke2016-12-271-1/+1
| | | | | | | | | | | | | When asking for gid2sid with an idmap backend that does ID_TYPE_BOTH and the sid in question is actually a user, the parent winbind needs to know about it. The next commit will prime the gencache also after xid2sid calls, and if we filled it with a ID_TYPE_GID entry, a later sid2uid call would fail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12484 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>
* idl: Fix a comment typoVolker Lendecke2016-12-271-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* CVE-2016-2123: Fix DNS vuln ZDI-CAN-3995Volker Lendecke2016-12-201-0/+9
| | | | | | | | Thanks to Trend Micro's Zero Day Initiative and Frederic Besler for finding this vulnerability with a PoC and a good analysis. Signed-off-by: Volker Lendecke <vl@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=12409
* idl: Do not listen for lsarpc on \\pipe\netlogonAndrew Bartlett2016-12-151-1/+1
| | | | | | | | | This prevents making the netlogon process multi-threaded. This works on Windows becuase NETLOGON is part of lsad Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* rpc_server:netlogon Move from memcache to a tdb cacheDouglas Bagnall2016-12-141-0/+7
| | | | | | | | | | | | | | | | This allows the netlogon server to be moved into a multi-process model while still supporting clients that use a challenge from a different network connection. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> 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): Wed Dec 14 20:12:14 CET 2016 on sn-devel-144
* librpc/ndr/uuid.c: improve speed and accuracy of GUID string parsingDouglas Bagnall2016-12-141-21/+111
| | | | | | | | | | | | | | GUID_from_data_blob() was relying on sscanf to parse strings, which was slow and quite accepting of invalid GUIDs. Instead we directly read a fixed number of hex bytes for each field. This now passes the samba4.local.ndr.*.guid_from_string_invalid tests. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Wed Dec 14 08:55:42 CET 2016 on sn-devel-144
* librpc: cab: Fix ndr_size_cab_file() to detect integer wrap.Jeremy Allison2016-12-011-5/+28
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Dec 1 05:53:43 CET 2016 on sn-devel-144
* librpc: cab: Integer wrap protection for ndr_count_cfdata().Jeremy Allison2016-12-011-0/+4
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: Add ndr_cab_get_compression() for Cabinet compression evaluationGünther Deschner2016-11-242-0/+10
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: Add autogenerated file offset calculation for Cabinet filesGünther Deschner2016-11-241-0/+6
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: Add autogenerated total cabinet size for Cabinet filesGünther Deschner2016-11-241-0/+29
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: Add autogenerated checksum calculation for Cabinet filesGünther Deschner2016-11-243-1/+51
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: Introduce cab.idlGünther Deschner2016-11-245-2/+326
| | | | | | | | | | This allows processing of Windows Cabinet files (required for the MS-PAR print protocol implementation) Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* spoolss: Use correct values for secdesc and devmode pointersGünther Deschner2016-11-111-10/+10
| | | | | | | | | | | | | | ULONG_PTR needs to be decoded as a uint3264 and not as a 'uint32 *'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11197 Guenther Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* idl: Remove unused DCERPC_FAULT_UNK_IFAndreas Schneider2016-10-261-1/+0
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Oct 26 15:06:44 CEST 2016 on sn-devel-144
* librpc/rpc: verify the passed table against the table on the handleStefan Metzmacher2016-10-261-2/+0
| | | | | | | Now that all callers of dcerpc_binding_handle_create() are fixed. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc/rpc: make sure we use the object from the handle in ↵Stefan Metzmacher2016-10-261-0/+16
| | | | | | | | | | | | dcerpc_binding_handle_raw_call_send() If there's an object set on the binding handle, we need to use that and disallow per request passing of object. The normal client code will always have the object on the binding handle. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc/rpc: no longer set FLAG_OBJECT_PRESENT and FLAG_BIGENDIAN for ↵Stefan Metzmacher2016-10-261-16/+0
| | | | | | | | | ndr_{pull,push}_ncacn_packet() This is no longer required, it's done inside. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dcerpc.idl: set LIBNDR_FLAG_* flags based on DCERPC_PFC_FLAG_OBJECT_UUID and ↵Stefan Metzmacher2016-10-262-4/+86
| | | | | | | DCERPC_DREP_LE Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: support "packet" for packet level authentication in binding stringsGünther Deschner2016-10-262-0/+5
| | | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: add dcerpc_ncacn_push_pkt_auth() helper functionStefan Metzmacher2016-10-262-0/+210
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc: add dcerpc_ncacn_pull_pkt_auth() helper functionStefan Metzmacher2016-10-263-1/+153
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc/rpc: make use of dcerpc_pull_ncacn_packet() in ↵Stefan Metzmacher2016-10-261-27/+5
| | | | | | | | dcerpc_read_ncacn_packet_done() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* librpc/rpc: move dcerpc_pull_ncacn_packet() from source3/librpc/rpc/ to the ↵Stefan Metzmacher2016-10-262-0/+48
| | | | | | | | toplevel Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dcerpc.idl: add DCERPC_FAULT_SERVER_UNAVAILABLEStefan Metzmacher2016-10-262-0/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dcerpc.idl: remove unused dcerpc_request._padStefan Metzmacher2016-10-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | typedef struct { uint32 alloc_hint; uint16 context_id; uint16 opnum; /* * NDR_DCERPC_REQUEST_OBJECT_PRESENT * is defined differently for ndr_dcerpc.c and py_dcerpc.c */ [switch_is(NDR_DCERPC_REQUEST_OBJECT_PRESENT)] dcerpc_object object; [flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier; } dcerpc_request; - the generic dcerpc header has a size of 16 bytes. - alloc_hint, context_id and opnum are 8 bytes together. - dcerpc_object is 0 or 16 bytes. That means stub_and_verifier is always aligned to 8 bytes (either at offset 24 or 40). Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dcerpc.idl: replace dcerpc_response._pad with a uint8 reservedStefan Metzmacher2016-10-261-1/+1
| | | | | | | | | | | | | | | | | | | typedef struct { uint32 alloc_hint; uint16 context_id; uint8 cancel_count; [value(0)] uint8 reserved; [flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier; } dcerpc_response; - the generic dcerpc header has a size of 16 bytes - alloc_hint, context_id, cancel_count and reserved are 8 bytes together So stub_and_verifier is 8 byte aligned at offset 24. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dcerpc.idl: add dcerpc_fault_flags bitmapStefan Metzmacher2016-10-261-1/+5
| | | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dcerpc.idl: split the padding from a possible fault buffer in dcerpc_faultStefan Metzmacher2016-10-261-1/+5
| | | | | | | | The 4 bytes of padding are always present and part of the header. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* dcerpc.idl: remove unused DCERPC_AUTH_LEVEL_DEFAULTStefan Metzmacher2016-10-261-2/+0
| | | | | | | | Also the default should not be DCERPC_AUTH_LEVEL_CONNECT Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* ntlmssp.idl: don't generate python bindings for ntlmssp_NTLM_RESPONSE and ↵Stefan Metzmacher2016-10-131-2/+2
| | | | | | | | | | | | | | | ntlmssp_LM_RESPONSE ntlmssp_NTLM_RESPONSE and NTLM_RESPONSE will both result in "ntlmssp.NTLM_RESPONSE". The same applies to ntlmssp_LM_RESPONSE and LM_RESPONSE. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Oct 13 21:56:27 CEST 2016 on sn-devel-144
* spoolss.idl: use access mask defines from security.idlStefan Metzmacher2016-10-131-3/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* nfs4acl.idl: rename interface to nfs4acl.idl to avoid naming clash in the ↵Stefan Metzmacher2016-10-131-1/+1
| | | | | | | python bindings Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
* lib: Annotate well known SID namesSteve French2016-09-291-0/+4
| | | | | | | | Add Samba specific well known SIDs for Unix UID and GID owner. Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Guenther Deschner <gd@samba.org>
* werror: replace WERR_INVALID_PARAM with WERR_INVALID_PARAMETER in librpc/idl/Günther Deschner2016-09-282-4/+4
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* librpc: fix some variable names in winspool protocol IDLGünther Deschner2016-09-261-4/+4
| | | | | | | | | never undestimate the power of sed... Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org>