1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

1504 Commits

Author SHA1 Message Date
Matthieu Patou
7f242d0357 idl: declare frstrans_VersionVector public so that we can dump it to blob and vice versa
Change-Id: Ica8dbe899eb257603ce6f7b2ea224c6533bdea46
Reviewed-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Thu Oct  2 14:27:02 CEST 2014 on sn-devel-104
2014-10-02 14:27:02 +02:00
Matthieu Patou
c76843361b idl: frstrans.idl add frstrans_RdcClose
Change-Id: I32e88f542da7df21e253cfbf8c2b3cc17043c6c7

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 12:02:02 +02:00
Matthieu Patou
c67468d43b idl: improve frsrpc by adding missing flag, fixing typo (W -> VV) and making needed structure public
Change-Id: Ia507b5f627464ab78a145e54b276fc8d64ee3c14
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 12:02:02 +02:00
Matthieu Patou
c396660f06 idl: Add frs blobs for dumping of frs related blobs with ndrdump
Change-Id: I5f8375fee663e452c26f264d73f637beffb1f209
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 12:02:01 +02:00
Matthieu Patou
a5701c298f idl: Add compression_guid
Change-Id: I3cfe3c8f4a405fcf9a54092b03e87f00e7abd2fb
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 12:02:01 +02:00
Matthieu Patou
51e7f769e2 idl: frsrpc depends on bkupblobs.idl and fscc.idl
Change-Id: I6ce1f4b28752765e7bc59c9eb7474ebd68d9b399
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 12:02:01 +02:00
Matthieu Patou
4cc86bb505 idl: add fscc needed by frsrpc
Change-Id: Ib44a57b38a194e727242267a4821c88a15219eab
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-10-02 12:02:01 +02:00
Matthieu Patou
f1d03e7837 idl: add nt backup blobs format
Change-Id: I4a43e1fe5fcebf2a4647ea2fbc9985663c0d7af2
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Matthieu Patou <mat@matws.net>
2014-10-02 12:02:01 +02:00
Matthieu Patou
7bc3b372ca idl: frsrpc we don't need NDR_REMAINING as size of the blob is one the wire
Change-Id: Ia3f1a16668e97ae7b45a8d9ee4d0539c2652eb82
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Matthieu Patou <mat@matws.net>
2014-10-02 12:02:01 +02:00
Matthieu Patou
15ab764f91 idl: frsrpc cleaning, opnum 4->10 didn't exists
Change-Id: I6b45ffdead170e9f83deb8d16082cc9bb0366d47
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Matthieu Patou <mat@matws.net>
2014-10-02 12:02:01 +02:00
Volker Lendecke
072bf227a7 lib: Use GUID_buf_string in GUID_string
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
2014-10-02 12:02:01 +02:00
Matthieu Patou
82c7ab2266 Create talloc-less functions for formating GUID
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Change-Id: I84adc45d2476dd225315bfc7dbb313f1b36b31e7
2014-10-02 12:02:01 +02:00
Andrew Bartlett
a3ecad4237 idl: Merge NETR_TRUST and LSA_TRUST definitions into one set only in lsa.idl
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-27 01:35:36 +02:00
Matthieu Patou
1ac96a416d librpc/ndr_drsuapi: Allow ndrdump to dump dsinfo52 blobs
Change-Id: I6968b25c67587296b928b2193a9d48093c69c01a
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-09-27 01:35:36 +02:00
Stefan Metzmacher
3b18dea131 librpc/idl: specify ncacn_http endpoint mapper endpoint
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-22 23:09:08 +02:00
David Disseldorp
de2164bb3d idl: define sparse file fsctl structures
As documented in MS-FSCC 2.3.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allson <jra@samba.org>
2014-08-29 19:40:13 +02:00
Stefan Metzmacher
f56bfffa51 security.idl: add SMB_SUPPORTED_SECINFO_FLAGS
A SMB server should only care about specific SECINFO flags
and ignore others e.g. SECINFO_PROTECTED_DACL.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-08-22 00:28:08 +02:00
Anubhav Rakshit
09fb44d122 librpc: Add NETWORK_INTERFACE_INFO IDL data structure
This is in preparation for adding NETWORK_INTERFACE_INFO Ioctl smbtorture test
case. This data structure is described in MS-SMB2 Sec. 2.2.32.5

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Anubhav Rakshit <anubhav.rakshit@gmail.com>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-07-24 19:07:06 +02:00
Samuel Cabrero
d747372d28 idl:drsuapi: Manage all possible lengths of drsuapi_DsBindInfo
Signed-off-by: Samuel Cabrero <scabrero@zentyal.com>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-07-07 05:22:33 +02:00
Volker Lendecke
b0f5fa42ff smb2: Fix smb2_lease_state
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Thu Jun 26 17:30:00 CEST 2014 on sn-devel-104
2014-06-26 17:29:59 +02:00
Volker Lendecke
00573880e5 leases: Fix uint32->hyper
Thanks to Noel Power <noel.power@suse.com> for finding this!

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
[ddiss@samba.org: changed Noel's address, as requested]
Reviewed-by: David Disseldorp <ddiss@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Thu Jun 12 16:01:10 CEST 2014 on sn-devel-104
2014-06-12 16:01:10 +02:00
Volker Lendecke
1dda098401 libsmb: Put the "smb2_lease" struct into idl
This will make it easier in the future to NDR_PRINT a lease and
a lease key

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jun 12 03:34:41 CEST 2014 on sn-devel-104
2014-06-12 03:34:41 +02:00
Andrew Bartlett
f4ab082d2b librpc/idl: Merge wbint.idl with winbind.idl so we can forward IRPC requests to internal winbind calls
Change-Id: Iba3913d5a1c7f851b93f37e9beb6dbb20fbf7e55
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-06-11 10:18:26 +02:00
Volker Lendecke
e22a0675c2 libndr: Use GUID_compare in GUID_equal
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-10 19:19:13 +02:00
Noel Power
57a4319baa Allow FSRVP access generic HRESULT error message descriptions
FSRVP can possibly return any HRESULT error in addition to it's own
specific errors. This change searches the HRESULT errors for a description
if the error doesn't match any of the known FSRVP ones.
Also removed some errors defined in fsrvp.idl (now that they are defined
in hresult.h)

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-02 20:25:07 +02:00
Stefan Metzmacher
0b757c9bcf librpc/idl: remove unused [gensize] from DNS_RPC_RECORD_STRING
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:42 +02:00
Stefan Metzmacher
eabdbc8860 dcerpc.idl: hide (ndr->flags & LIBNDR_FLAG_OBJECT_PRESENT) logic behind a define
This way we can alter the define depending on the generated code.

E.g python bindings won't have an 'ndr' struct available.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:25 +01:00
Stefan Metzmacher
f73ef3028c dcerpc.idl: fix dcerpc_bind_nack definition
The version array is always present.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:25 +01:00
Stefan Metzmacher
97302100d0 dcerpc.idl: fix typo s/ist/int
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:24 +01:00
Stefan Metzmacher
a496c18997 dcerpc.idl: make use of DCERPC_NCA_S_* constants for the legacy DCERPC_FAULT_* codes
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:24 +01:00
Stefan Metzmacher
34d45a3a51 librpc/rpc: try to use DCERPC_NCA_S_* constants for error mappings
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-28 08:34:24 +01:00
Stefan Metzmacher
c25b5b3579 librpc/rpc: finally maintain only the object guid
This has nothing to do with ndr_syntax_id...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25 00:45:29 +01:00
Stefan Metzmacher
5f402dcdf7 librpc/rpc: maintain "abstract_syntax" as string option of dcerpc_binding
This should not be mixed with the object guid! They are different things!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25 00:45:29 +01:00
Stefan Metzmacher
4c98f1651d librpc/rpc: handle ipv6 addresses without transport in dcerpc_parse_binding()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25 00:45:28 +01:00
Stefan Metzmacher
9f5bf79341 librpc/rpc: add "schannel" => DCERPC_SCHANNEL as ncacn_option
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25 00:45:28 +01:00
Stefan Metzmacher
002a0fb86e librpc/rpc: use dcerpc_binding_set_string_option(b, "endpoint", NULL) to reset the endpoint
We should always go through just one code path to [re]set a value.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25 00:45:28 +01:00
Stefan Metzmacher
7782fbe12b librpc/rpc: let dcerpc_binding_set_transport() also reset the assoc_group_id
This is transport/endpoint specific.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-25 00:45:28 +01:00
David Disseldorp
95d9f16362 librpc: inline CHECK_SYNTAX macro logic
The CHECK_SYNTAX macro is currently used to compare ndr_syntax_ids and
return false on mismatch. Macros affecting control flow are evil!

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Mar 24 21:46:39 CET 2014 on sn-devel-104
2014-03-24 21:46:39 +01:00
David Disseldorp
5ccecec3ca librpc: inline VT CHECK macro logic
The CHECK macro is currently used to dump error and return false on
VT condition check failure. Macros affecting control flow are evil!

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-24 19:45:12 +01:00
David Disseldorp
ba2db53097 librpc: split type specific VT checks into helpers
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-24 19:45:12 +01:00
David Disseldorp
11054a699a librpc: dump correct ndr_syntax_id on VT check failure
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-24 19:45:12 +01:00
Alexander Bokovoy
59767911bd lsa.idl: define lsa.ForestTrustCollisionInfo and ForestTrustCollisionRecord as public structs
For Python bindings PIDL wants the struct to be defined as public if we
want to use __ndr_print/pack/unpack.

Define the [public] attribute to ForestTrustCollisionInfo/Record to
allow easier debugging when there is collision in establishing a trust.

This change does not affect C code as NDR functions are always
generated, only not exposed in Python bindings.

https://bugzilla.samba.org/show_bug.cgi?id=10504

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Mon Mar 24 12:44:50 CET 2014 on sn-devel-104
2014-03-24 12:44:50 +01:00
Noel Power
05daf6a25e Add missing FSRVP_E_UNSUPPORTED_CONTEXT constant
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-07 16:36:47 -08:00
Günther Deschner
4e05bad0d1 librpc/nbt: increase MAX_COMPONENTS limit for nbt_names.
domains with more then 10 subdomains are not so uncommon.

https://bugzilla.samba.org/show_bug.cgi?id=10439

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Feb 13 16:30:50 CET 2014 on sn-devel-104
2014-02-13 16:30:49 +01:00
Stefan Metzmacher
e4997ea8a7 librpc/rpc: finaly make struct dcerpc_binding private
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Feb 13 13:55:47 CET 2014 on sn-devel-104
2014-02-13 13:55:47 +01:00
Stefan Metzmacher
aa8b2d39a2 librpc/rpc: make use of dcerpc_binding_set*() in dcerpc_binding_from_tower()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
c11224225d librpc/rpc: use dcerpc_binding_get_*() in dcerpc_default_transport_endpoint()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
f2c058bf2a librpc/rpc: avoid loosing data with dcerpc_binding_string() -> dcerpc_parse_binding()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
ebc18694a1 librpc/rpc: add dcerpc_binding_[g|s]et_abstract_syntax()
For now this is just an alternate wrapper to
access binding->object.

Currently callers are reusing binding->object to store the
abstract syntax id instead of just the object uuid.

Some services on Windows use the same GUID for the
'object' and the 'abstract syntax', but they are completely
different things!

Most services use a null object guid, some reuse the
guid of the abstract syntax and use it like a 'class' object.

But the object guid is only really used by DCOM,
in order to call functions relative to an object instance,
which a dynamically allocated object guid.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
43800553bb librpc/rpc: allow "assoc_group_id" in dcerpc_binding_[g|s]et_string()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
5ba5430538 librpc/rpc: add dcerpc_binding_[g|s]et_assoc_group_id()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
6ce8d761dc librpc/rpc: add dcerpc_binding_[g|s]et_transport()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
f066bd7b33 librpc/rpc: add dcerpc_binding_[g|s]et_object()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:15 +01:00
Stefan Metzmacher
8dac96728a librpc/rpc: add dcerpc_binding_[g|s]et_flags()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
77d0098984 librpc/rpc: add dcerpc_binding_get_auth_info()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
9f5a59eb53 librpc/rpc: simplify dcerpc_parse_binding()
We now make a copy of the given string, so that we can mark chunks
inline. Then we call dcerpc_binding_set_string_option() in order
to set the elements.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
ed8adc2920 librpc/rpc: handle ncacn_options in dcerpc_binding_[s|g]et_string_option()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
017338a180 librpc/rpc: set more things via dcerpc_binding_set_string_option()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
05b54f5a33 librpc/rpc: add ncacn_option_by_name()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
afcd5506c9 librpc/rpc: remove dcerpc_binding->localaddress and store it in the options array
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
c327a60a02 librpc/rpc: let derpc_binding_string() add ncacn_options before key=value options
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
e4b246a968 librpc/rpc: handle "localaddress" in dcerpc_binding_[s|g]et_string_option()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
5d22127118 librpc/rpc: keep talloc hierachie sane in dcerpc_parse_binding()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
7c0985bb35 librpc/rpc: add dcerpc_binding_copy_string_option()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
8dfba57c33 librpc/rpc: add dcerpc_binding_set_string_option()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
6557b429ef librpc/rpc: add dcerpc_binding_get_string_option()
This allows get value string of a [key=value] option
of the dcerpc_binding.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
3f40cde3ea librpc/rpc: only interpret the first option as endpoint if there's no '=' in it.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
33fa75c615 librpc/rpc: remove the options array in dcerpc_parse_binding() if not needed
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
09c5bd99b1 librpc/rpc: add some talloc checks to dcerpc_binding_string()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-13 11:54:14 +01:00
Stefan Metzmacher
9a084b4ab2 librpc/rpc: add dcerpc_transport_by_name()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:31 +01:00
Stefan Metzmacher
98b08dfb6d librpc/rpc: simplify dcerpc_binding_build_tower()
dcerpc_floor_set_rhs_data() handles the special cases now
and we keep the 'host' part unmodified except
EPM_PROTOCOL_IP addresses. No special '\\' handling anymore.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:31 +01:00
Stefan Metzmacher
d89ff8575d librpc/rpc: fix dcerpc_floor_set_rhs_data() with NULL data.
For EPM_PROTOCOL_IP we can only marshal ipv4 addresses,
everything else gets '0.0.0.0' (4 zero bytes on the wire).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:31 +01:00
Stefan Metzmacher
b5eb5d97c2 librpc/rpc: handle dcerpc_binding->host == NULL in dcerpc_floor_get_rhs_data()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:31 +01:00
Stefan Metzmacher
6ab76219cd librpc/rpc: let dcerpc_floor_get_rhs_data() return 'char *'
We don't return any "const char *" values here, so give the caller
a chance to talloc_free() the result.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:28 +01:00
Stefan Metzmacher
d6c91502c0 librpc/ndr: add ndr_table_by_syntax()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:20:28 +01:00
Stefan Metzmacher
c6774989e0 librpc/idl: add witness.idl
See [MS-SWN] for the details.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Gregor Beck
1fd4842701 librpc/rpc: add dcerpc_sec_verification_trailer_check()
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Gregor Beck
9c5664f58d librpc/rpc: add dcerpc_sec_vt_header2_[from_ncacn_packet|equal]()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Stefan Metzmacher
3b2b0aa4d4 librpc/ndr: add ndr_syntax_id_[from|to]_string()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Stefan Metzmacher
7b5717058a librpc/ndr: add ndr_pull_append/pop()
They can be used to parse a fragmented NDR byte stream.

ndr_pull_append() appends more data that can be processed
and ndr_pull_pop() removed already processed data.

This will be used to implement dcerpc pipes, where we can get
a verify large amount of pipe chunks, once we processed a chunk
we can forget about the related data, but we may need to keep some
bytes in order to get the alignment right.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Stefan Metzmacher
53e0ceddff librpc/ndr: add support for a shallow copy to ndr_pull_subcontext_start/end
This will be usefull to try parsing DCERPC pipe chunks for
LIBNDR_FLAG_INCOMPLETE_BUFFER.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Stefan Metzmacher
ef5e0b7339 librpc/ndr: remember INCOMPLETE_BUFFER missing bytes in relative_highest_offset
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:14 +01:00
Stefan Metzmacher
e2a621466e librpc/ndr: add NDR_ERR_INCOMPLETE_BUFFER and LIBNDR_FLAG_INCOMPLETE_BUFFER
If we pull a pipe chunk we need a way to check if we
have enough bytes to parse the complete chunk.

Setting ndr_pull->flags |= LIBNDR_FLAG_INCOMPLETE_BUFFER
would change NDR_ERR_BUFSIZE (and later maybe others)
into NDR_ERR_INCOMPLETE_BUFFER.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:13 +01:00
Gregor Beck
91b3e415d5 librpc/ndr: fix headers in ndr_dcerpc.c
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-02-11 16:02:13 +01:00
Stefan Metzmacher
dc561b7e2d dcerpc.idl: make use of union dcerpc_bind_ack_reason and fix all callers.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Jan 16 18:21:40 CET 2014 on sn-devel-104
2014-01-16 18:21:40 +01:00
Stefan Metzmacher
572ea36c79 dcerpc.idl: make use of dcerpc_bind_nak_reason
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:53 +01:00
Stefan Metzmacher
3d4a2be29f dcerpc.idl: make use of dcerpc_bind_ack_result
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:53 +01:00
Stefan Metzmacher
2019e41d53 dcerpc.idl: add enums and bitmaps for dcerpc_bind_ack_result, dcerpc_bind_[ack|nak]_reason
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:53 +01:00
Stefan Metzmacher
e6fc98989a dcerpc.idl: add a bitmap for dcerpc_pfc_flags
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:53 +01:00
David Disseldorp
e891652339 dcerpc.idl: use logical dcerpc_object ordering
This IDL code:
typedef [nodiscriminant] union {
	[default] dcerpc_empty empty;
	[case(LIBNDR_FLAG_OBJECT_PRESENT)] GUID object;
} dcerpc_object;

Compiles into the following default-before-case marshalling code:
switch (level) {
	default: {
		NDR_CHECK(ndr_push_dcerpc_empty(ndr, NDR_SCALARS, &r->empty));
	break; }

	case LIBNDR_FLAG_OBJECT_PRESENT: {
		NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->object));
	break; }

}

The default entry before case does not change the flow of execution but
is more logical when present at the end of the switch statement.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-01-16 16:22:53 +01:00
Gregor Beck
410c30f123 ndrdump: dump verification trailer
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-08 14:35:03 +01:00
Gregor Beck
0f3848a863 librpc/ndr: add ndr_pop_dcerpc_sec_verification_trailer()
This extracts the dcerpc_sec_verification_trailer from the end
of an ndr_pull structure, it found it reduces ndr->data_size.

NDR_ERR_ALLOC is the only possible error, all other errors
are ignored and a trailer with command count = 0 is returned.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-08 14:34:49 +01:00
Stefan Metzmacher
b7a53803f3 librpc/rpc: simplify tevent_req_nterror() usage in binding_handle.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-08 14:34:36 +01:00
Günther Deschner
f1685427ed libgpo: when running in verbose mode, printout the parsed PReg file.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2014-01-07 16:59:39 +01:00
Stefan Metzmacher
ef568f425c librpc/rpc: read the full header in dcerpc_read_ncacn_packet_next_vector()
This helps wireshark reassamble the PDUs generated by socket_wrapper.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-07 08:37:36 +01:00
Stefan Metzmacher
cd46437305 dcerpc.idl: add DCERPC_NCACN_PAYLOAD_OFFSET
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-07 08:37:35 +01:00
Gregor Beck
4289750211 librpc: fix possible memory leak
Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-07 08:37:35 +01:00
Stefan Metzmacher
70d8ac63eb librpc/ndrdump: free some temporary memory while parsing dcerpc pipe chunks
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-01-07 08:37:35 +01:00
Stefan Metzmacher
c0dc2fb7e1 dcerpc.idl: add dcerpc_sec_verification_trailer
See [MS-RPCE] 2.2.2.13 Verification Trailer for details.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:12 +01:00
Stefan Metzmacher
66c39420e2 dcerpc.idl: add documentation references
To [C706 - DCE 1.1: Remote Procedure Call] and [MS-RPCE].

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:12 +01:00