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
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
Stefan Metzmacher
b62308ed99 librpc/ndr: add LIBNDR_FLAG_SUBCONTEXT_NO_UNREAD_BYTES
This lets ndr_pull_subcontext_end() make sure that all
subcontext bytes are consumed otherwise it returns NDR_ERR_UNREAD_BYTES.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
7db1dc13b0 s4:librpc: always try to negotiate DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
If the gensec backend supports it there's no reason not sign the header.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-01-07 00:27:11 +01:00
Stefan Metzmacher
dfd4fc1591 CVE-2013-4408:librpc: check for invalid frag_len within dcerpc_read_ncacn_packet_next_vector()
We should do this explicit instead of relying on
tstream_readv_pdu_ask_for_next_vector() to catch the overflow.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:45 +01:00
Stefan Metzmacher
2fb570abec CVE-2013-4408:librpc: check for invalid frag_len within dcerpc_read_ncacn_packet_done()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-09 07:05:45 +01:00
Hans Leidekker
ec9f4d5c9b svcctl: Fix IDL for svcctl_OpenServiceA().
Signed-off-by: Hans Leidekker <hans@meelstraat.net>
Reviewed-by: Guenther Deschner <gd@samba.org>
2013-11-19 19:22:05 +01:00
Matthieu Patou
8dc931bafc librpc-idl: change the drsuapi_DsBindInfoCtr so that it match what is on the wire both in NDR32 and NDR64.
Previous implementation had a problem with NDR64 with uint32 and
uint3264 being in the wrong order

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 30 10:16:02 CET 2013 on sn-devel-104
2013-10-30 10:16:02 +01:00
Stefan Metzmacher
1e2e421632 librpc-idl: replace int32 by uint32 as the values are always > 0
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-26 16:33:07 -07:00
Matthieu Patou
568bf16dfa librpc-idl: replace int32 by the enumeration as it's the type that we use in union's switch drsuapi_DsGetDCInfoCtrLevels
Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-26 16:33:07 -07:00
Stefan Metzmacher
a33b13bd61 librpc/rpc: add dcerpc_binding_handle_auth_info()
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-10-17 08:48:41 +13:00
Günther Deschner
b197de754f libndr: Avoid ommitting display of unset bitmap flags.
In 816e68f94f 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
2013-10-09 19:56:39 +02:00
Stefan Metzmacher
8b51eabf31 Revert "Support UPN_DNS_INFO in the PAC"
This reverts commit a6be8a97f7.

We fail (often) to parse a krb5pac type 12 buffer due to the incomplete change
which came in via a6be8a97f7. This change came
into master and has only been released in RCs so no regression to published
4.0.x releases. We should revert this for 4.1 for now until we can make it work
in all cases (see work on this in
https://git.samba.org/?p=gd/samba/.git;a=shortlog;h=refs/heads/master-krb5pac_type12).
Without this revert the entire PAC parsing may fail which can effect serious
implications (krb5 smb session setup not working).

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

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Oct  3 17:08:46 CEST 2013 on sn-devel-104
2013-10-03 17:08:45 +02:00
Volker Lendecke
7c0277c923 librpc: Fix blank line endings
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
2013-10-02 15:02:07 +02:00
Volker Lendecke
816e68f94f libndr: Fix ndr_print_bitmap_flag for value=0
Don't endlessly loop

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-10-02 13:08:01 +02:00
Matthieu Patou
9ac32866db librpc: return a ndr_pull_error instead of just NDR_ERR_NDR64 when upper bits of 64 bit value are not 0
Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2013-10-02 13:07:33 +02:00
Matthieu Patou
26c1c15da4 idl: fix frsrpc idl with NDR64 fields
Signed-off-by: Matthieu Patou <mat@matws.net>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-24 00:12:15 +02:00
Matthieu Patou
aa5b369734 idl: remove duplicate flag
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-24 00:12:10 +02:00
Stefan Metzmacher
fc11bab20b frstrans.idl: add flag(NDR_PAHEX) to frstrans_BytePipe
That way we get hexdump -C style output for the content of the pipe chunks.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
2013-09-24 00:11:55 +02:00
Stefan Metzmacher
51d8eba841 drsuapi.idl: change the range for attribute values to 26214400 bytes.
This matches the IDL from [MS-DRSR].

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
2013-09-24 00:11:15 +02:00
Stefan Metzmacher
c18c6c9fb5 librpc/ndr: make use of ndr_dump_data() in ndr_print_array_uint8()
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>
2013-09-24 00:11:07 +02:00
Stefan Metzmacher
3d3e8b53bf librpc/ndr: make ndr_pull/push_DATA_BLOB NDR64 aware
Pair-Programmed-With: Matthieu Patou <mat@matws.net>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
2013-09-24 00:10:57 +02:00
Günther Deschner
40ee3d8a5f librpc: add dcerpc_default_transport_endpoint() function.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-20 13:07:23 +02:00
Günther Deschner
21200b12dc librpc/ndr: make sure ndr_table_list() always calls ndr_init_table() first.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-20 13:07:01 +02:00
Günther Deschner
88c1dbf722 librpc/ndr: call ndr_table_list() from all ndr_X functions.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-09-20 13:06:50 +02:00
Günther Deschner
573b455de9 pkgconfig: Do not hardcode library version numbers in pc files.
We control version numbers via 'vnum' from the wscript_build files for all other
libraries.  In case of libndr we already reported a wrong 0.0.1 version via
pkgconfig while in fact the library is versioned as 0.0.2.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Thu Aug 22 20:48:44 CEST 2013 on sn-devel-104
2013-08-22 20:48:44 +02:00
Volker Lendecke
7701053806 librpc: Use tevent_req_simple_recv_ntstatus
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-12 14:00:07 -07:00
David Disseldorp
8fde65e199 lib: add FSCTL_[GET/SET]_COMPRESSION constants
Values taken from MS-FSCC.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-09 11:10:01 -07:00
Gregor Beck
148499cb62 security.idl: add new security_secinfo bits
[MS-DTYP].pdf 2.4.7

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-01 10:08:18 -07:00
Shekhar Amlekar
51c68c28b2 librpc: srvsvc.idl: define level 1005 share info flags
define level 1005 share info flags.

Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Jul 18 16:35:51 CEST 2013 on sn-devel-104
2013-07-18 16:35:51 +02:00
Volker Lendecke
9f25ad44a9 librpc: Shorten dcerpc_binding_handle_call a bit
... saves 200 bytes on 64 bit Linux with -O3

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): Fri Jun 14 22:27:43 CEST 2013 on sn-devel-104
2013-06-14 22:27:43 +02:00
Volker Lendecke
7982d2aff8 librpc: Use tevent_req_poll_ntstatus
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-06-14 20:30:33 +02:00
Partha Sarathi
3e66cb7d77 Fix bug #9932 - Currently the maximum number of aces in an SD is limited to 1000, but Microsoft supports around 1800.
Issue description: I was trying to add maximum number of aces on Microsoft
share, where I was able to add nearly 1800 aces on a file/folder SD. But Samba
does not support adding 1800 aces to SD instead it limited to 1000.

Expected behavior: Ideally SAMBA should also support as like Windows to compare
with Windows standard. Set to 2000 until we add EA limits in the server.

Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 12 02:52:36 CEST 2013 on sn-devel-104
2013-06-12 02:52:36 +02:00
Volker Lendecke
ecff2b2534 librpc: Fix some "ignored asprint result" warnings
While there, it removes some alloc/free calls

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-06-11 13:21:12 -07:00
Andrew Bartlett
87049bf32f build: Remove unused build_idl.sh
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-28 12:17:11 +10:00
Kai Blin
9c7015ecaa idl: Add DNS HINFO record support
Not sure if we need this, bug samba.org specifies it, so this can cause ANY queries
against samba.org to fail.

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sun May 26 20:05:38 CEST 2013 on sn-devel-104
2013-05-26 20:05:38 +02:00
Kai Blin
96ed585f09 idl: Add DNS RP record support as per RFC 1183
Not sure if we need this, but samba.org specifies it, so this could cause ANY
queries against samba.org to fail.

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-26 18:13:29 +02:00
Kai Blin
5bcebb54da idl: Add support for parsing OPT records
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-05-26 18:13:26 +02:00
Günther Deschner
9744bf519b spoolss: fill in IDL for spoolss_DeletePrintProcessor.
Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:01 +02:00
Günther Deschner
cc153fe86f s4-torture: add ndr test for spoolss_RpcSetJobNamedProperty.
Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
c568a2e5c5 s4-torture: add ndr test for spoolss_GetCorePrinterDrivers.
Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
3d567f6a96 spoolss: add spoolss_MonitorContainer IDL.
Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
1aafc844a7 spoolss: make RPC_PrintNamedProperty public
Signed-off-by: Günther Deschner <gd@samba.org>

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
cc38511903 spoolss: fill in IDL for JobNamedProperty calls.
Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
ec29957e88 spoolss: make more container objects public for iremotewinspool.
Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
5a5ed68d0a spoolss: add idl for spoolss_RpcSendRecvBidiData.
Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
69d9e3ef87 spoolss: add [ms_union] to spoolss.idl where appropriate.
Normally we would activate [ms_union] for the entire interface but given the
fact we use this IDL file also for custom-marshalled structures we would
generate union arm alignment also for the custom-marshalled unions where they
are inappropriate. Thus, only enable [ms_union] only for unions that are part of
the MS-RPRN IDL.

Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
229108e266 spoolss: fix string types in spoolss_JTEXP.
Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Günther Deschner
393ad20577 spoolss: Fix two size elements in the devmode private spoolss_JTEXP struct.
Guenther

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-05-20 18:50:00 +02:00
Kai Blin
0f5e9d29f6 librpc: Add NDR_PRINT_DEBUGC to ndr print to a debug class
Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-05-18 10:58:05 +02:00
Andrew Bartlett
7874a43154 librpc: Add special owner/group/other constants to nfs4acl.idl
As per nfs4acl-0.9/lib/nfs4acl.c (the package where this structure is originally defined)

Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:21 +02:00
Andrew Bartlett
d87b81fa30 build: Move nfs4acl to the top level
This is to create IDL-stored NFSv4 ACLs, just as we use for posix ACLs
to permit better testing.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:20 +02:00
Andreas Schneider
c8abc6f138 ndr: Pass down string_flags in ndr_pull_ntprinting_printer().
Reviewed-by: Günther Deschner <gd@samba.org>
2013-03-15 12:11:03 +01:00
Andreas Schneider
b6e276af30 idl: Add flags for strings in ntprinting idl.
Reviewed-by: Günther Deschner <gd@samba.org>
2013-03-15 12:11:02 +01:00
Andreas Schneider
cc09762cb8 ndr: Add ndr_ntprinting_string_flags() function.
It defaults to utf8string.

Reviewed-by: Günther Deschner <gd@samba.org>
2013-03-15 12:11:02 +01:00
Andreas Schneider
32a107cfcc ndrdump: Don't leak plugin handle on error.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:14 +01:00
Andreas Schneider
a9e6240441 ndrdump: Check return value of ndr_pull_init_blob().
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:12 +01:00
Andreas Schneider
e50874606f librpc: Add NULL check for ndr functions for epm bindings.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:12 +01:00
Andreas Schneider
8bfbb81bcd ndr: Comparing an array to null is always true.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:12 +01:00
Stefan Metzmacher
3d5bb24a7b librpc/rpc: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:45 +01:00
Andrew Bartlett
e650a5fd61 idl: Provide a common wrapper for the data to hash for a non-POSIX ACL
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2013-02-04 12:19:30 +01:00
Günther Deschner
4990080210 krb5pac: make sure to correctly store the highest relative pointer offset.
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
2013-02-01 21:19:28 +01:00
Günther Deschner
732e8ab64d ndrdump: make sure to deal with the highest relative pointer offset correctly.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-01 19:38:06 +01:00
Günther Deschner
0364658632 spoolss: add UNIVERSAL_FONT_ID_ctr for debugging.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-24 17:42:26 +01:00
Günther Deschner
d99b1ee79c spoolss: Add UNIVERSAL_FONT_ID.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-24 17:42:26 +01:00
Günther Deschner
a270e20b19 spoolss: fill in spoolss_PlayGDIScriptOnPrinterIC IDL.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-24 17:42:26 +01:00
Günther Deschner
11fba10208 spoolss: make spoolss deal with ndr64 StartDocPrinter by using proper container object.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-24 17:42:25 +01:00
Günther Deschner
6bcd3dda28 spoolss: add more spoolss_DriverAttributes values.
The level5 driver does return only one of these flags with a different value,
will get fixed later.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-24 17:42:20 +01:00
Günther Deschner
3b94b64481 spoolss: make spoolss deal with ndr64 SetForm by using proper container object.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17 17:11:37 +01:00
Günther Deschner
8304fe73f6 spoolss: make spoolss deal with ndr64 AddForm by using proper container object.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17 17:11:37 +01:00
Günther Deschner
be8c81bfa3 s4-torture: add ndr64 spoolss_SetPrinter ndr test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17 17:11:37 +01:00
Günther Deschner
e8feca012e spoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2013-01-17 17:11:37 +01:00
Günther Deschner
a4dcf7b94d spoolss: Make OpenPrinterEx work with NDR64 by using UserInfo Container.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-16 11:42:13 +01:00
Günther Deschner
6a5afa2442 spoolss: add stubs for new JobNamedProperty dcerpc calls.
Guenther

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

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jan  7 19:06:25 CET 2013 on sn-devel-104
2013-01-07 19:06:25 +01:00
Günther Deschner
638ed90620 spoolss: add SPOOLSS_DRIVER_VERSION_2012 (4) define to IDL.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-07 17:02:10 +01:00
Günther Deschner
22994ca92b spoolss: add Windows ARM architecture defines to IDL.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-01-07 17:01:42 +01:00
Andreas Schneider
426bcdb37c librpc: Check return codes of ndr functions.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-21 13:56:00 +01:00
Andreas Schneider
4d02e868f6 ndr: Check return code of ndr_pull_advance().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
2012-12-21 13:56:00 +01:00
Andreas Schneider
c83f9330a4 idl: Fix spoolss check for the size of the struct.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2012-12-12 09:42:32 +01:00
Karolin Seeger
83fdfe36ba docs: man ndrdump: Add missing meta data.
This avoids warnings during the waf build and removes "FIXME" entries from the
manpage.

Karolin

Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-29 13:41:53 +01:00
Stefan Metzmacher
1199ab1f84 librpc/idl: teach ndrdump about dumping security.idl structures
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2012-11-20 17:37:19 +01:00
Andrew Bartlett
76b7348299 pymessaging: Use the server_id IDL structure rather than a tuple
This will make it easier to pass this structure in and out.  The tuple is still
accepted as input.

Andrew Bartlett
2012-10-31 08:13:56 +11:00
Andrew Bartlett
aa411045a5 pidl: Remove depends_on=PIDL_MISC as it sets -I/ into CFLAGS
This in turn causes an include of <net/if.h> to hang on some systems, as
/net/ means to run the automounter!

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Oct 29 01:23:39 CET 2012 on sn-devel-104
2012-10-29 01:23:39 +01:00
Andrew Bartlett
bb99cf1f72 posixacls: Add IDL changes for vfs_acl_xattr using hash of the sys acl
This will isolate the hash of the ACL from any intermediate mapping that
the POSIX -> NT mapping subsystem might need to do, and which might
change if we need to correct that mapping.

Andrew Bartlett
2012-10-11 12:25:10 +11:00
Matthieu Patou
8bbb4d7b51 drsuapi-idl: Fix the encoding of the source_dsa_dns
astring is not aligned and is not conformant
2012-10-07 21:51:03 -07:00
Simo Sorce
a6be8a97f7 Support UPN_DNS_INFO in the PAC
Previously marked as UNKNOWN_12 the UPN_DNS_INFO is defined in MS-PAC

Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Fri Sep 28 01:13:44 CEST 2012 on sn-devel-104
2012-09-28 01:13:44 +02:00
Andrew Bartlett
6638d10366 smbd: Remove pre-allocation of ACL array in sys_acl_init()
Instead, this is just handled with realloc in sys_acl_create_entry()

This allows us to remove the size element from the SMB_ACL_T.

Andrew Bartlett
2012-09-12 05:26:16 +02:00
Andrew Bartlett
ac804f0d7f smbd-posix_acls: Use a IDL union to store the ACL entry
This is a clearer, long-term-stable structure we can hash without
risking it changing.

Andrew Bartlett
2012-09-12 05:26:16 +02:00
Kai Blin
22fda8cb15 s4 dns: Create IDL entry for TSIG-like record needed for signature check 2012-09-05 19:02:16 +02:00
Kai Blin
558fa4c45a s4 dns: Revert erroneous push from wrong branch
I've pushed the wrong branch for this, sorry about that.

Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Wed Sep  5 14:10:54 CEST 2012 on sn-devel-104
2012-09-05 14:10:54 +02:00
Kai Blin
fc9de26497 s4 dns: Handle GSS-TSIG signatures 2012-09-05 08:41:23 +02:00
Jeremy Allison
69d925d110 SEC_RIGHTS_DIR_PRIV_BACKUP and SEC_RIGHTS_DIR_PRIV_RESTORE aren't used anywhere. Remove (can re-add if needed).
Ensure the privilege rights are always specific rights, not generic.
By the time the privilege rights are examined, we've already mapped
from generic to specific in the access_mask.
2012-08-31 20:29:13 -07:00
Andrew Bartlett
1219eaffbe s4-python: Complete python bindings for idmap.idl
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Aug 22 03:08:51 CEST 2012 on sn-devel-104
2012-08-22 03:08:51 +02:00
Andrew Bartlett
10267f153c s4-python: complete python bindigns for smb_acls.idl 2012-08-22 01:31:57 +02:00
Andrew Bartlett
2129495319 librpc/idl: Fix acl array definition in smb_acl_t 2012-08-16 15:19:17 +10:00
Andrew Bartlett
fd42bc1846 librpc/idl: Make smb_acl_t public so we can pull/push it as a blob 2012-08-15 16:28:03 +02:00
Andrew Bartlett
0705391ed0 s3-smbd: Move smb_acl_t declaration to smb_acl.idl
This will allow us to marshall this into and from an NDR blob on disk, which will
allow us to fake up ACL support during make test, and to test the NT ACL emulation
using python bindings via the VFS.

Andrew Bartlett
2012-08-15 11:44:44 +10:00
Björn Jacke
13f8674a15 build: rename security → samba-security
there is a libsecurity on OSF1 which clasheѕ with our security lib. see bug #9023.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Aug 10 14:22:21 CEST 2012 on sn-devel-104
2012-08-10 14:22:20 +02:00
Stefan Metzmacher
780006db9d s4:librpc/rpc: add DCERPC_SCHANNEL_AES support
metze

Signed-off-by: Günther Deschner <gd@samba.org>
2012-07-17 10:58:39 +02:00
Günther Deschner
8835eab013 ntprinting: mark the final 4 byte null pointer for printer data in ndr_pull_ntprinting_printer as read.
Guenther
2012-07-06 19:03:19 +02:00
David Disseldorp
0d3249b927 ndr: fix push/pull DATA_BLOB with NDR_NOALIGN
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-07-06 19:03:19 +02:00
Günther Deschner
66514f8bbe ntprinting: make decode_ntprinting helpers public in idl.
Guenther
2012-07-06 19:03:19 +02:00