samba.git
9 months agos4:rpc_server: SMB_ASSERT(auth->auth_finished); in order to get auth details
Stefan Metzmacher [Fri, 23 Nov 2018 12:24:05 +0000 (13:24 +0100)]
s4:rpc_server: SMB_ASSERT(auth->auth_finished); in order to get auth details

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: only pass context to op_bind() hooks
Stefan Metzmacher [Wed, 21 Nov 2018 19:06:21 +0000 (20:06 +0100)]
s4:rpc_server: only pass context to op_bind() hooks

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: only use context within op_bind() hooks and dcesrv_interface_bind_...
Stefan Metzmacher [Wed, 21 Nov 2018 19:06:21 +0000 (20:06 +0100)]
s4:rpc_server: only use context within op_bind() hooks and dcesrv_interface_bind_*() functions

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: remove unused dcesrv_connection_context->private_date
Stefan Metzmacher [Mon, 10 Dec 2018 22:51:09 +0000 (23:51 +0100)]
s4:rpc_server: remove unused dcesrv_connection_context->private_date

dcesrv_iface_state_{create,find}_{assoc,conn}() should be used instead.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: remove unused dcesrv_assoc_group->proxied_id
Stefan Metzmacher [Wed, 21 Nov 2018 22:38:25 +0000 (23:38 +0100)]
s4:rpc_server: remove unused dcesrv_assoc_group->proxied_id

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/winreg: don't cache an ldb connection per presentation context
Stefan Metzmacher [Wed, 21 Nov 2018 19:05:01 +0000 (20:05 +0100)]
s4:rpc_server/winreg: don't cache an ldb connection per presentation context

We should do this per context handle, as these are available on all
connections of the association group.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: make use dcesrv_iface_state_{store,find}_{assoc,conn}() helpers
Stefan Metzmacher [Wed, 21 Nov 2018 18:28:30 +0000 (19:28 +0100)]
s4:rpc_server/remote: make use dcesrv_iface_state_{store,find}_{assoc,conn}() helpers

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: introduce struct dcesrv_remote_call
Stefan Metzmacher [Fri, 23 Nov 2018 13:28:56 +0000 (14:28 +0100)]
s4:rpc_server/remote: introduce struct dcesrv_remote_call

This holds the state for async requests.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: defer the connect to the first client request
Stefan Metzmacher [Wed, 21 Nov 2018 18:19:15 +0000 (19:19 +0100)]
s4:rpc_server/remote: defer the connect to the first client request

This means we have a chance to use delegated credentials from the client
if available, as the authentication is already completed.

Before we only ever used the transport inherited credentials
via SMB or anonymous.

Note: most times we still fallback to anonymous...

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: fail the connection if the remote server don't support MPX
Stefan Metzmacher [Fri, 23 Nov 2018 13:21:45 +0000 (14:21 +0100)]
s4:rpc_server/remote: fail the connection if the remote server don't support MPX

If we already negotiated with our client to support concurent multiplexing (MPX),
we need a remote connection that also supports it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agoselftest: use "dcerpc_remote:allow_anonymous_fallback = yes" for rpc_proxy
Stefan Metzmacher [Fri, 23 Nov 2018 12:15:10 +0000 (13:15 +0100)]
selftest: use "dcerpc_remote:allow_anonymous_fallback = yes" for rpc_proxy

This already uses anonymous credentials as the remote connection is done
during the bind before the realm authentication has started.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: add dcerpc_remote:allow_anonymous_fallback option
Stefan Metzmacher [Fri, 23 Nov 2018 12:13:53 +0000 (13:13 +0100)]
s4:rpc_server/remote: add dcerpc_remote:allow_anonymous_fallback option

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: reformat code to get "dcerpc_remote:use_machine_account"
Stefan Metzmacher [Wed, 21 Nov 2018 18:14:59 +0000 (19:14 +0100)]
s4:rpc_server/remote: reformat code to get "dcerpc_remote:use_machine_account"

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: reformat code to get "dcerpc_remote:binding"
Stefan Metzmacher [Wed, 21 Nov 2018 18:13:50 +0000 (19:13 +0100)]
s4:rpc_server/remote: reformat code to get "dcerpc_remote:binding"

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: remote_op_bind already has the table available
Stefan Metzmacher [Wed, 21 Nov 2018 18:08:59 +0000 (19:08 +0100)]
s4:rpc_server/remote: remote_op_bind already has the table available

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: introduce remote_get_private()
Stefan Metzmacher [Wed, 21 Nov 2018 17:00:29 +0000 (18:00 +0100)]
s4:rpc_server/remote: introduce remote_get_private()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/dnsserver: make use of dcesrv_iface_state_{create,find}_conn()
Stefan Metzmacher [Mon, 10 Dec 2018 21:42:51 +0000 (22:42 +0100)]
s4:rpc_server/dnsserver: make use of dcesrv_iface_state_{create,find}_conn()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/netlogon: make use of dcesrv_iface_state_{create,find}_conn()
Stefan Metzmacher [Mon, 10 Dec 2018 21:42:51 +0000 (22:42 +0100)]
s4:rpc_server/netlogon: make use of dcesrv_iface_state_{create,find}_conn()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: add dcesrv_iface_state_{store,find}_{assoc,conn}() helpers
Stefan Metzmacher [Mon, 10 Dec 2018 21:41:31 +0000 (22:41 +0100)]
s4:rpc_server: add dcesrv_iface_state_{store,find}_{assoc,conn}() helpers

They can be used instead of
dcesrv_connection_context->private_data and
dcesrv_assoc_group->proxied_id.

This is the first step to hide internal details of
the core dcerpc server from the interface implementations.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: move bind_time_features to dcesrv_assoc_group
Stefan Metzmacher [Wed, 21 Nov 2018 22:39:11 +0000 (23:39 +0100)]
s4:rpc_server: move bind_time_features to dcesrv_assoc_group

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: add a min_auth_level to context handles
Stefan Metzmacher [Wed, 21 Nov 2018 22:27:50 +0000 (23:27 +0100)]
s4:rpc_server: add a min_auth_level to context handles

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: replace dce_conn->allow_request with auth->auth_finished
Stefan Metzmacher [Thu, 22 Nov 2018 09:30:47 +0000 (10:30 +0100)]
s4:rpc_server: replace dce_conn->allow_request with auth->auth_finished

They both had the same lifetime and the disconnect case is now
caught by auth->auth_invalid = true.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: replace dce_conn->allow_auth3 with auth->auth_started
Stefan Metzmacher [Thu, 22 Nov 2018 09:30:47 +0000 (10:30 +0100)]
s4:rpc_server: replace dce_conn->allow_auth3 with auth->auth_started

auth3 is allowed if auth_started is true and auth_finished is false.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: set auth_invalid = true on disconnect
Stefan Metzmacher [Thu, 6 Dec 2018 16:03:25 +0000 (17:03 +0100)]
s4:rpc_server: set auth_invalid = true on disconnect

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: split out log_successful_dcesrv_authz_event()
Stefan Metzmacher [Thu, 22 Nov 2018 12:26:21 +0000 (13:26 +0100)]
s4:rpc_server: split out log_successful_dcesrv_authz_event()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: add some protection checks to dcesrv_auth_prepare_gensec()
Stefan Metzmacher [Thu, 8 Nov 2018 15:36:52 +0000 (16:36 +0100)]
s4:rpc_server: add some protection checks to dcesrv_auth_prepare_gensec()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: split out dcesrv_auth_prepare_gensec()
Stefan Metzmacher [Thu, 8 Nov 2018 15:36:13 +0000 (16:36 +0100)]
s4:rpc_server: split out dcesrv_auth_prepare_gensec()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: allocate struct dcesrv_auth with talloc
Stefan Metzmacher [Thu, 8 Nov 2018 12:28:07 +0000 (13:28 +0100)]
s4:rpc_server: allocate struct dcesrv_auth with talloc

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: make use of dcesrv_call_state->auth_state in dcerpc_server.c
Stefan Metzmacher [Wed, 31 Oct 2018 13:44:33 +0000 (14:44 +0100)]
s4:rpc_server: make use of dcesrv_call_state->auth_state in dcerpc_server.c

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: make use of dcesrv_call_state->auth_state in common/reply.c
Stefan Metzmacher [Wed, 31 Oct 2018 13:44:33 +0000 (14:44 +0100)]
s4:rpc_server: make use of dcesrv_call_state->auth_state in common/reply.c

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: make use of dcesrv_call_state->auth_state in dcesrv_auth.c
Stefan Metzmacher [Wed, 31 Oct 2018 13:44:33 +0000 (14:44 +0100)]
s4:rpc_server: make use of dcesrv_call_state->auth_state in dcesrv_auth.c

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: introduce dcesrv_call_state->auth_state
Stefan Metzmacher [Wed, 31 Oct 2018 13:44:33 +0000 (14:44 +0100)]
s4:rpc_server: introduce dcesrv_call_state->auth_state

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: use helper variables to access 'struct dcesrv_auth' in dcerpc_server.c
Stefan Metzmacher [Wed, 31 Oct 2018 16:12:02 +0000 (17:12 +0100)]
s4:rpc_server: use helper variables to access 'struct dcesrv_auth' in dcerpc_server.c

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: use helper variables to access 'struct dcesrv_auth' in common/reply.c
Stefan Metzmacher [Wed, 31 Oct 2018 16:12:02 +0000 (17:12 +0100)]
s4:rpc_server: use helper variables to access 'struct dcesrv_auth' in common/reply.c

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: use helper variables to access 'struct dcesrv_auth' in dcesrv_auth.c
Stefan Metzmacher [Wed, 31 Oct 2018 16:12:02 +0000 (17:12 +0100)]
s4:rpc_server: use helper variables to access 'struct dcesrv_auth' in dcesrv_auth.c

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/remote: make use of dcesrv_call_credentials()
Stefan Metzmacher [Thu, 8 Nov 2018 12:08:19 +0000 (13:08 +0100)]
s4:rpc_server/remote: make use of dcesrv_call_credentials()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/netlogon: make use of dcesrv_call_auth_info()
Stefan Metzmacher [Thu, 8 Nov 2018 11:44:30 +0000 (12:44 +0100)]
s4:rpc_server/netlogon: make use of dcesrv_call_auth_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/netlogon: simplify logic of dcesrv_netr_creds_server_step_check()
Stefan Metzmacher [Thu, 8 Nov 2018 12:05:25 +0000 (13:05 +0100)]
s4:rpc_server/netlogon: simplify logic of dcesrv_netr_creds_server_step_check()

It's enough to check the auth_type for DCERPC_AUTH_TYPE_SCHANNEL,
there's no need to also check the auth_level for integrity or privacy.

The gensec layer already required at least DCERPC_AUTH_LEVEL_INTEGRITY,
see schannel_update_internal().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/lsa: make use of dcesrv_call_auth_info()
Stefan Metzmacher [Thu, 8 Nov 2018 11:44:30 +0000 (12:44 +0100)]
s4:rpc_server/lsa: make use of dcesrv_call_auth_info()

It's enough to check the auth_type for DCERPC_AUTH_TYPE_SCHANNEL,
there's no need to also check the auth_level for integrity or privacy.

The gensec layer already required at least DCERPC_AUTH_LEVEL_INTEGRITY,
see schannel_update_internal().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/samr: make use of dcesrv_call_auth_info()
Stefan Metzmacher [Thu, 8 Nov 2018 11:44:30 +0000 (12:44 +0100)]
s4:rpc_server/samr: make use of dcesrv_call_auth_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: add dcesrv_call_auth_info()
Stefan Metzmacher [Thu, 8 Nov 2018 11:44:30 +0000 (12:44 +0100)]
s4:rpc_server: add dcesrv_call_auth_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/handles: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/handles: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: remove the old dcesrv_handle_{new,fetch}() api
Stefan Metzmacher [Thu, 8 Nov 2018 11:20:44 +0000 (12:20 +0100)]
s4:rpc_server: remove the old dcesrv_handle_{new,fetch}() api

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: only use the new dcesrv_handle_{create,lookup}() api
Stefan Metzmacher [Thu, 8 Nov 2018 11:20:44 +0000 (12:20 +0100)]
s4:rpc_server: only use the new dcesrv_handle_{create,lookup}() api

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/winreg: make use of dcesrv_handle_create()
Stefan Metzmacher [Thu, 8 Nov 2018 11:20:44 +0000 (12:20 +0100)]
s4:rpc_server/winreg: make use of dcesrv_handle_create()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/samr: make use of dcesrv_handle_create()
Stefan Metzmacher [Thu, 8 Nov 2018 11:20:44 +0000 (12:20 +0100)]
s4:rpc_server/samr: make use of dcesrv_handle_create()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/lsa: make use of dcesrv_handle_create()
Stefan Metzmacher [Thu, 8 Nov 2018 11:20:44 +0000 (12:20 +0100)]
s4:rpc_server/lsa: make use of dcesrv_handle_create()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/eventlog: make use of dcesrv_handle_create()
Stefan Metzmacher [Thu, 8 Nov 2018 11:20:44 +0000 (12:20 +0100)]
s4:rpc_server/eventlog: make use of dcesrv_handle_create()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/drsuapi: make use of dcesrv_handle_create()
Stefan Metzmacher [Thu, 8 Nov 2018 11:20:44 +0000 (12:20 +0100)]
s4:rpc_server/drsuapi: make use of dcesrv_handle_create()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: add dcesrv_handle_{create,lookup}() functions
Stefan Metzmacher [Thu, 8 Nov 2018 10:48:46 +0000 (11:48 +0100)]
s4:rpc_server: add dcesrv_handle_{create,lookup}() functions

They take struct dcesrv_call_state as argument and will replace
dcesrv_handle_{new,fetch}() which take dcesrv_connection_context
as argument.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: add some const to dcesrv_handle_fetch()
Stefan Metzmacher [Thu, 8 Nov 2018 11:14:05 +0000 (12:14 +0100)]
s4:rpc_server: add some const to dcesrv_handle_fetch()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: merge dcesrv_fetch_session_key() into dcesrv_transport_session_key()
Stefan Metzmacher [Thu, 8 Nov 2018 10:52:29 +0000 (11:52 +0100)]
s4:rpc_server: merge dcesrv_fetch_session_key() into dcesrv_transport_session_key()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: remove unused dcesrv_inherited_session_key()
Stefan Metzmacher [Thu, 8 Nov 2018 10:52:29 +0000 (11:52 +0100)]
s4:rpc_server: remove unused dcesrv_inherited_session_key()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: only pass dcesrv_auth to auth_state.session_key_fn()
Stefan Metzmacher [Thu, 8 Nov 2018 10:14:41 +0000 (11:14 +0100)]
s4:rpc_server: only pass dcesrv_auth to auth_state.session_key_fn()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: only setup the auth_state.session_key fn in dcesrv_endpoint_connect()
Stefan Metzmacher [Thu, 8 Nov 2018 10:14:41 +0000 (11:14 +0100)]
s4:rpc_server: only setup the auth_state.session_key fn in dcesrv_endpoint_connect()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: make dcesrv_endpoint_connect() static
Stefan Metzmacher [Thu, 8 Nov 2018 10:14:41 +0000 (11:14 +0100)]
s4:rpc_server: make dcesrv_endpoint_connect() static

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: only AUTH_TYPE_NONE should get a transport session key
Stefan Metzmacher [Thu, 8 Nov 2018 08:45:15 +0000 (09:45 +0100)]
s4:rpc_server: only AUTH_TYPE_NONE should get a transport session key

There's only a logic change for NCALRPC and NCACN_UNIX_STREAM.
dcesrv_generic_session_key() already returned
NT_STATUS_NO_USER_SESSION_KEY for all other cases.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: split out a dcesrv_session_info_session_key() helper function
Stefan Metzmacher [Thu, 8 Nov 2018 08:45:15 +0000 (09:45 +0100)]
s4:rpc_server: split out a dcesrv_session_info_session_key() helper function

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: allow a NULL function pointer in dcesrv_fetch_session_key()
Stefan Metzmacher [Thu, 8 Nov 2018 08:45:15 +0000 (09:45 +0100)]
s4:rpc_server: allow a NULL function pointer in dcesrv_fetch_session_key()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/drsuapi: make use of dcesrv_auth_session_key()
Stefan Metzmacher [Thu, 8 Nov 2018 10:52:29 +0000 (11:52 +0100)]
s4:rpc_server/drsuapi: make use of dcesrv_auth_session_key()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/samr: make use of dcesrv_transport_session_key()
Stefan Metzmacher [Thu, 8 Nov 2018 10:52:29 +0000 (11:52 +0100)]
s4:rpc_server/samr: make use of dcesrv_transport_session_key()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/lsa: make use of dcesrv_transport_session_key()
Stefan Metzmacher [Thu, 8 Nov 2018 10:52:29 +0000 (11:52 +0100)]
s4:rpc_server/lsa: make use of dcesrv_transport_session_key()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: add dcesrv_{auth,transport}_session_key() functions
Stefan Metzmacher [Thu, 8 Nov 2018 10:48:46 +0000 (11:48 +0100)]
s4:rpc_server: add dcesrv_{auth,transport}_session_key() functions

They take struct dcesrv_call_state as argument and will replace
dcesrv_{inherited,fetch}_session_key() which take dcesrv_connection
as argument.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/common: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/common: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/winreq: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/winreq: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/srvsvc: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/srvsvc: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/samr: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/samr: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/netlogon: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/netlogon: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/lsa: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/lsa: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/drsuapi: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/drsuapi: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/dnsserver: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/dnsserver: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/backupkey: make use dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:19:51 +0000 (01:19 +0100)]
s4:rpc_server/backupkey: make use dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: add dcesrv_call_session_info()
Stefan Metzmacher [Sat, 3 Nov 2018 00:18:59 +0000 (01:18 +0100)]
s4:rpc_server: add dcesrv_call_session_info()

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: remove unused dcesrv_connection->transport_session_key
Stefan Metzmacher [Wed, 21 Nov 2018 08:41:51 +0000 (09:41 +0100)]
s4:rpc_server: remove unused dcesrv_connection->transport_session_key

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: move dcesrv_auth.c and common/reply.c to dcerpc_server
Stefan Metzmacher [Tue, 13 Nov 2018 08:42:17 +0000 (09:42 +0100)]
s4:rpc_server: move dcesrv_auth.c and common/reply.c to dcerpc_server

They belong to the core dcerpc server.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: let test_rpc_dns_server_dnsutils depend on dcerpc_server
Stefan Metzmacher [Thu, 29 Nov 2018 15:48:42 +0000 (16:48 +0100)]
s4:rpc_server: let test_rpc_dns_server_dnsutils depend on dcerpc_server

The core dcerpc server is required here, which also implies
DCERPC_COMMON.

This is required to move common/reply.c dcesrv_auth.c from
DCERPC_COMMON to dcerpc_server in the next commit.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server: remove dcerpc_remote dependency from dcerpc_server
Stefan Metzmacher [Thu, 29 Nov 2018 15:47:58 +0000 (16:47 +0100)]
s4:rpc_server: remove dcerpc_remote dependency from dcerpc_server

dcerpc_remote is just an implementation and does not belong to the
core dcerpc server.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:rpc_server/samr: Fix the O3 developer build
Stefan Metzmacher [Fri, 16 Nov 2018 15:11:50 +0000 (16:11 +0100)]
s4:rpc_server/samr: Fix the O3 developer build

Different gcc versions complain at different places.

I recently got these:

../source4/rpc_server/samr/dcesrv_samr.c: In function
‘dcesrv_samr_QueryDisplayInfo2’:
../source4/rpc_server/samr/dcesrv_samr.c:4117:2: error: ‘q.out.result.v’
may be used uninitialized in this function [-Werror=maybe-uninitialized]
  return result;
  ^
../source4/rpc_server/samr/dcesrv_samr.c: In function
‘dcesrv_samr_QueryDisplayInfo3’:
../source4/rpc_server/samr/dcesrv_samr.c:4151:2: error: ‘q.out.result.v’
may be used uninitialized in this function [-Werror=maybe-uninitialized]
  return result;
  ^
cc1: all warnings being treated as errors

../source4/rpc_server/samr/dcesrv_samr.c: In function
‘dcesrv_samr_QueryDisplayInfo3’:
../source4/rpc_server/samr/dcesrv_samr.c:4151:2: error: ‘q.out.result.v’
may be used uninitialized in this function [-Werror=maybe-uninitialized]
  return result;
  ^
In file included from ../source4/rpc_server/samr/dcesrv_samr.c:4447:0:
default/librpc/gen_ndr/ndr_samr_s.c: In function ‘samr__op_dispatch’:
default/librpc/gen_ndr/ndr_samr_s.c:597:18: error: ‘q.out.result.v’ may
be used uninitialized in this function [-Werror=maybe-uninitialized]
   r2->out.result = dcesrv_samr_QueryDisplayInfo2(dce_call, mem_ctx,
r2);
                  ^
cc1: all warnings being treated as errors

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agos4:torture: make test_GetUserName() more strict
Stefan Metzmacher [Mon, 26 Nov 2018 10:06:44 +0000 (11:06 +0100)]
s4:torture: make test_GetUserName() more strict

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agolibrpc: add SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET) protection
Stefan Metzmacher [Mon, 24 Dec 2018 10:21:38 +0000 (11:21 +0100)]
librpc: add SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET) protection

A lot of functions rely on having the 16 bytes dcerpc header to operate
on. This makes it more obvious and makes sure they can't be misused in
future.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agolibrpc: add dcerpc_get_auth_{type,level,context_id}() helper functions
Stefan Metzmacher [Wed, 31 Oct 2018 15:44:11 +0000 (16:44 +0100)]
librpc: add dcerpc_get_auth_{type,level,context_id}() helper functions

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agolibrpc: add dcerpc_get_auth_length() helper function
Stefan Metzmacher [Wed, 31 Oct 2018 15:44:11 +0000 (16:44 +0100)]
librpc: add dcerpc_get_auth_length() helper function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agolib: remove unused function nttime_from_string()
Swen Schillig [Fri, 11 Jan 2019 08:26:29 +0000 (09:26 +0100)]
lib: remove unused function nttime_from_string()

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 months agotevent: deprecate tevent_wrapper api again
Stefan Metzmacher [Tue, 8 Jan 2019 14:25:22 +0000 (15:25 +0100)]
tevent: deprecate tevent_wrapper api again

Samba doesn't use it anymore and we don't want to
invite new users of that api without further discussion.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jan 12 03:12:09 CET 2019 on sn-devel-144

9 months agoRevert "smbd: add smbd_server_connection->raw_ev_ctx pointer"
Ralph Boehme [Thu, 27 Dec 2018 14:26:15 +0000 (15:26 +0100)]
Revert "smbd: add smbd_server_connection->raw_ev_ctx pointer"

This reverts commit 6114f9545fa856717220658e87f2a60f6767b7f4.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agovfs_aio_pthread: add sync fallback
Ralph Boehme [Tue, 8 Jan 2019 09:39:56 +0000 (10:39 +0100)]
vfs_aio_pthread: add sync fallback

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agovfs_aio_pthread: store conn instead of sconn in aio_open_private_data
Ralph Boehme [Tue, 8 Jan 2019 09:34:11 +0000 (10:34 +0100)]
vfs_aio_pthread: store conn instead of sconn in aio_open_private_data

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agovfs_aio_pthread: use struct initializer for aio_open_private_data
Ralph Boehme [Tue, 8 Jan 2019 09:32:16 +0000 (10:32 +0100)]
vfs_aio_pthread: use struct initializer for aio_open_private_data

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agovfs_default: add sync fallback to fsync_send/recv
Ralph Boehme [Tue, 8 Jan 2019 06:38:53 +0000 (07:38 +0100)]
vfs_default: add sync fallback to fsync_send/recv

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agovfs_default: add sync fallback to pwrite_send/recv
Ralph Boehme [Tue, 8 Jan 2019 06:38:42 +0000 (07:38 +0100)]
vfs_default: add sync fallback to pwrite_send/recv

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agovfs_default: add sync fallback to pread_send/recv
Ralph Boehme [Tue, 8 Jan 2019 06:38:04 +0000 (07:38 +0100)]
vfs_default: add sync fallback to pread_send/recv

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agos3:smbd: don't use async dosmode if per-thread cwd is not available
Ralph Boehme [Mon, 7 Jan 2019 20:10:19 +0000 (21:10 +0100)]
s3:smbd: don't use async dosmode if per-thread cwd is not available

The additional overhead for the async processing should be avoided when
we know the lower level has to fallback to sync processing anyway.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agos3:smbd: use passed in ev in smbd_smb2_query_directory_send()
Ralph Boehme [Fri, 28 Dec 2018 12:25:57 +0000 (13:25 +0100)]
s3:smbd: use passed in ev in smbd_smb2_query_directory_send()

The ev argument is also a raw ev.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agoRevert "vfs_glusterfs: explain that/why we use the raw tevent_context in init_gluster...
Ralph Boehme [Thu, 27 Dec 2018 14:26:08 +0000 (15:26 +0100)]
Revert "vfs_glusterfs: explain that/why we use the raw tevent_context in init_gluster_aio()"

This reverts commit b0af5715b0a7592a9728e0b76f653b9ab6228708.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agoRevert "smbd: explain that/why we use the raw tevent_context for update_write_time_ha...
Ralph Boehme [Thu, 27 Dec 2018 14:26:03 +0000 (15:26 +0100)]
Revert "smbd: explain that/why we use the raw tevent_context for update_write_time_handler()"

This reverts commit 7cfafaf190643eb28fc95d21a02a4e5e529e16d1.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agoRevert "smbd: explain that/why we use the raw tevent_context for lease_timeout_handler()"
Ralph Boehme [Thu, 27 Dec 2018 14:24:37 +0000 (15:24 +0100)]
Revert "smbd: explain that/why we use the raw tevent_context for lease_timeout_handler()"

This reverts commit 52f098d38da72d6eff3c4cac61487da897a8651c.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agoRevert "smbd: explain that/why we use the raw tevent_context for oplock_timeout_handl...
Ralph Boehme [Thu, 27 Dec 2018 14:23:52 +0000 (15:23 +0100)]
Revert "smbd: explain that/why we use the raw tevent_context for oplock_timeout_handler()"

This reverts commit e73eaa3c8004d3d8aff316cdb26b0bef85eceaca.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agoRevert "smbd: explain that/why we use the raw tevent_context for do_break_to_none()"
Ralph Boehme [Thu, 27 Dec 2018 14:23:43 +0000 (15:23 +0100)]
Revert "smbd: explain that/why we use the raw tevent_context for do_break_to_none()"

This reverts commit 1d5210b615035e46b90758ac7aa4ceec9174bee5.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agoRevert "smbd: explain that/why we use the raw tevent_context for linux_oplock_signal_...
Ralph Boehme [Thu, 27 Dec 2018 14:21:06 +0000 (15:21 +0100)]
Revert "smbd: explain that/why we use the raw tevent_context for linux_oplock_signal_handler()"

This reverts commit dc517b20f60a156d73fdd551557eb1d4366dfdeb.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 months agoRevert "smbd: use raw_ev_ctx to clear the MSG_SMB_CONF_UPDATED registration"
Ralph Boehme [Thu, 27 Dec 2018 14:21:04 +0000 (15:21 +0100)]
Revert "smbd: use raw_ev_ctx to clear the MSG_SMB_CONF_UPDATED registration"

This reverts commit f5f9b719741465c7be3de20a6a69ec106ecc4568.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>