samba.git
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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

3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 months agoRevert "smbd: add smbd_server_connection->{root,guest}_ev_ctx pointer"
Ralph Boehme [Thu, 27 Dec 2018 14:21:01 +0000 (15:21 +0100)]
Revert "smbd: add smbd_server_connection->{root,guest}_ev_ctx pointer"

This reverts commit 146938217ed1ab9a7a9f38c055fec5513cbd5c4d.

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>
3 months agoRevert "smbd: use sconn->root_ev_ctx for brl_timeout_fn()"
Ralph Boehme [Thu, 27 Dec 2018 14:20:58 +0000 (15:20 +0100)]
Revert "smbd: use sconn->root_ev_ctx for brl_timeout_fn()"

This reverts commit 182991c26c8149c79b13a277b9822efc49fd1df0.

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>
3 months agoRevert "smbd: use sconn->root_ev_ctx for smbd_sig_{term,hup}_handler()"
Ralph Boehme [Thu, 27 Dec 2018 14:20:54 +0000 (15:20 +0100)]
Revert "smbd: use sconn->root_ev_ctx for smbd_sig_{term,hup}_handler()"

This reverts commit c835ffa72ddfd2431d22909148913b50f0d829d1.

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>
3 months agoRevert "smbd: add an effective connection_struct->user_ev_ctx that holds the event...
Ralph Boehme [Thu, 27 Dec 2018 14:19:20 +0000 (15:19 +0100)]
Revert "smbd: add an effective connection_struct->user_ev_ctx that holds the event context used for the current user"

This reverts commit f2df8be16be9dccd3d10ec060f1efbe5007a28c6.

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>
3 months agoRevert "smbd: add an effective {smb,smbd_smb2}_request->ev_ctx that holds the event...
Ralph Boehme [Thu, 27 Dec 2018 14:18:55 +0000 (15:18 +0100)]
Revert "smbd: add an effective {smb,smbd_smb2}_request->ev_ctx that holds the event context used for the request processing"

This reverts commit 894e5001c747ce765dad5517778dda55d7d1f4d9.

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>
3 months agoRevert "smbd: remove unused smbd_server_connection->ev_ctx"
Ralph Boehme [Thu, 27 Dec 2018 14:17:22 +0000 (15:17 +0100)]
Revert "smbd: remove unused smbd_server_connection->ev_ctx"

This reverts commit 721fbbfa7001b2788602106101f0407483894322.

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>
3 months agoRevert "s3:messages: protect against usage of wrapper tevent_context objects for...
Ralph Boehme [Thu, 27 Dec 2018 11:48:30 +0000 (12:48 +0100)]
Revert "s3:messages: protect against usage of wrapper tevent_context objects for messaging"

This reverts commit 7f2afc20e1b6397c364a98d1be006377c95e4665.

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>
3 months agoRevert "s3:messages: allow messaging_{dgm,ctdb}_register_tevent_context() to use...
Ralph Boehme [Thu, 27 Dec 2018 11:45:42 +0000 (12:45 +0100)]
Revert "s3:messages: allow messaging_{dgm,ctdb}_register_tevent_context() to use wrapper tevent_context"

This reverts commit 660cf86639753edaa7a7a21a5b5ae207ae7d4260.

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>
3 months agoRevert "s3:messages: allow messaging_dgm_ref() to use wrapper tevent_context"
Ralph Boehme [Thu, 27 Dec 2018 11:45:28 +0000 (12:45 +0100)]
Revert "s3:messages: allow messaging_dgm_ref() to use wrapper tevent_context"

This reverts commit 9dc332060cf5f249ea887dbc60ec7a39b6f91120.

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>
3 months agoRevert "s3:messages: allow messaging_filtered_read_send() to use wrapper tevent_context"
Ralph Boehme [Thu, 27 Dec 2018 11:45:15 +0000 (12:45 +0100)]
Revert "s3:messages: allow messaging_filtered_read_send() to use wrapper tevent_context"

This reverts commit 2b05f1098187e00166649c8ea7c63e6901b9d242.

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>
3 months agoRevert "s4:messaging: make sure only imessaging_client_init() can be used with a...
Ralph Boehme [Thu, 27 Dec 2018 11:41:25 +0000 (12:41 +0100)]
Revert "s4:messaging: make sure only imessaging_client_init() can be used with a wrapper tevent_context wrapper"

This reverts commit e186d6a06b1b300256a2cb4138f0532d518d0597.

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>
3 months agoRevert "smbd: add [un]become_guest() helper functions"
Ralph Boehme [Thu, 27 Dec 2018 10:42:45 +0000 (11:42 +0100)]
Revert "smbd: add [un]become_guest() helper functions"

This reverts commit 7b5a47b84696e8e5c26207bd398742b883e598c2.

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>
3 months agoRevert "smbd: add smbd_impersonate_debug_create() helper"
Ralph Boehme [Thu, 27 Dec 2018 10:41:57 +0000 (11:41 +0100)]
Revert "smbd: add smbd_impersonate_debug_create() helper"

This reverts commit 23319ef5a2eff4811b685d4ab54179efc49bac99.

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>
3 months agoRevert "smbd: add simple noop smbd_impersonate_{conn_vuid,conn_sess,root,guest}_creat...
Ralph Boehme [Thu, 27 Dec 2018 10:38:36 +0000 (11:38 +0100)]
Revert "smbd: add simple noop smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create() wrappers"

This reverts commit 5285966e67cbee8519015df12a15e938e85e6ee7.

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>
3 months agoRevert "smbd: make use of smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create...
Ralph Boehme [Thu, 27 Dec 2018 10:38:34 +0000 (11:38 +0100)]
Revert "smbd: make use of smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create() wrappers"

This reverts commit 0dcaa0707bad67f7bfaa10ccaf167bfefbe87a0c.

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>
3 months agoRevert "smbd: implement smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create...
Ralph Boehme [Thu, 27 Dec 2018 10:38:27 +0000 (11:38 +0100)]
Revert "smbd: implement smbd_impersonate_{conn_vuid,conn_sess,root,guest}_create() wrappers"

This reverts commit 1b804f7ae23f54a6c1004e5ff17b9df1376b5adb.

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>
3 months agoRevert "smbd: avoid explicit change_to_user() in defer_rename_done() already done...
Ralph Boehme [Thu, 27 Dec 2018 10:37:16 +0000 (11:37 +0100)]
Revert "smbd: avoid explicit change_to_user() in defer_rename_done() already done by impersonation"

This reverts commit e37e41b3cac52e3623f0c79f83733a51edb35c10.

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>
3 months agoRevert "smbd: remove unused change_to_root_user() from smbd_sig_hup_handler()"
Ralph Boehme [Thu, 27 Dec 2018 10:37:03 +0000 (11:37 +0100)]
Revert "smbd: remove unused change_to_root_user() from smbd_sig_hup_handler()"

This reverts commit d0b1f96f086bdd613644f64b3f75ee8c4388f674.

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>
3 months agoRevert "smbd: remove unused change_to_root_user() from brl_timeout_fn()"
Ralph Boehme [Thu, 27 Dec 2018 10:36:43 +0000 (11:36 +0100)]
Revert "smbd: remove unused change_to_root_user() from brl_timeout_fn()"

This reverts commit c310647e560abc2343ef2ff0ab15daab0fba2650.

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>
3 months agoRevert "pthreadpool: split out pthreadpool_tevent_job from pthreadpool_tevent_job_state"
Ralph Boehme [Fri, 28 Dec 2018 08:03:45 +0000 (09:03 +0100)]
Revert "pthreadpool: split out pthreadpool_tevent_job from pthreadpool_tevent_job_state"

This reverts commit 245d684d28dab630f3d47ff61006a1fe3e5eeefa.

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>
3 months agoRevert "pthreadpool: add pthreadpool_tevent_job_cancel()"
Ralph Boehme [Fri, 28 Dec 2018 08:03:34 +0000 (09:03 +0100)]
Revert "pthreadpool: add pthreadpool_tevent_job_cancel()"

This reverts commit 791c05144ee9296024cc0fdebe4afeaaf67e26bc.

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>
3 months agoRevert "pthreadpool: maintain a global list of orphaned pthreadpool_tevent_jobs"
Ralph Boehme [Fri, 28 Dec 2018 08:02:54 +0000 (09:02 +0100)]
Revert "pthreadpool: maintain a global list of orphaned pthreadpool_tevent_jobs"

This reverts commit 25756425aaf5465e56ea809cd415b6a387848919.

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>
3 months agoRevert "pthreadpool: add some lockless coordination between the main and job threads"
Ralph Boehme [Sun, 23 Dec 2018 08:46:13 +0000 (09:46 +0100)]
Revert "pthreadpool: add some lockless coordination between the main and job threads"

This reverts commit 9656b8d8ee11ee351870286f16ea8fbe49112292.

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>
3 months agoRevert "pthreadpool: add helgrind magic to PTHREAD_TEVENT_JOB_THREAD_FENCE_*()"
Ralph Boehme [Sun, 23 Dec 2018 08:44:49 +0000 (09:44 +0100)]
Revert "pthreadpool: add helgrind magic to PTHREAD_TEVENT_JOB_THREAD_FENCE_*()"

This reverts commit 9b73fda926eb8493e80012794483039be66d4e6c.

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>
3 months agoRevert "pthreadpool: maintain a list of job_states on each pthreadpool_tevent_glue"
Ralph Boehme [Sun, 23 Dec 2018 08:44:32 +0000 (09:44 +0100)]
Revert "pthreadpool: maintain a list of job_states on each pthreadpool_tevent_glue"

This reverts commit aa9b64eccfd037941512bad108c4e3946714a502.

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>
3 months agoRevert "pthreadpool: add a comment about a further optimization in pthreadpool_tevent...
Ralph Boehme [Sun, 23 Dec 2018 08:44:22 +0000 (09:44 +0100)]
Revert "pthreadpool: add a comment about a further optimization in pthreadpool_tevent_job_destructor()"

This reverts commit f23cac39b36b026650e0922c78fe0fd3fe567e35.

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>
3 months agoRevert "pthreadpool: test cancelling and freeing pending pthreadpool_tevent jobs...
Ralph Boehme [Sun, 23 Dec 2018 08:44:07 +0000 (09:44 +0100)]
Revert "pthreadpool: test cancelling and freeing pending pthreadpool_tevent jobs/pools"

This reverts commit 40d15260d24d0071732f47873f395fce29b8a6f4.

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>
3 months agoRevert "pthreadpool: add pthreadpool_tevent_[current_job_]per_thread_cwd()"
Ralph Boehme [Mon, 7 Jan 2019 20:27:19 +0000 (21:27 +0100)]
Revert "pthreadpool: add pthreadpool_tevent_[current_job_]per_thread_cwd()"

This reverts commit 12a45ee1a66379ba7562729b835ce0e2e4bfb3b3.

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>
3 months agoRevert "pthreadpool: add tests for pthreadpool_tevent_[current_job_]per_thread_cwd()"
Ralph Boehme [Sun, 23 Dec 2018 08:43:25 +0000 (09:43 +0100)]
Revert "pthreadpool: add tests for pthreadpool_tevent_[current_job_]per_thread_cwd()"

This reverts commit fbafdc99ef2cef11a1a28e795ffe965cb53ef7fa.

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>
3 months agoRevert "pthreadpool: call unshare(CLONE_FS) if available"
Ralph Boehme [Mon, 7 Jan 2019 17:35:27 +0000 (18:35 +0100)]
Revert "pthreadpool: call unshare(CLONE_FS) if available"

This reverts commit 65e4742d168454df6507d9e74993749063435dd6.

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>
3 months agoRevert "pthreadpool: add pthreadpool_restart_check[_monitor_{fd,drain}]()"
Ralph Boehme [Sun, 23 Dec 2018 08:43:07 +0000 (09:43 +0100)]
Revert "pthreadpool: add pthreadpool_restart_check[_monitor_{fd,drain}]()"

This reverts commit 3c4cdb290723432b00ff9ff88b892cb4e66e76cd.

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>
3 months agoRevert "pthreadpool: implement pthreadpool_tevent_wrapper_create() infrastructure"
Ralph Boehme [Sun, 23 Dec 2018 08:42:53 +0000 (09:42 +0100)]
Revert "pthreadpool: implement pthreadpool_tevent_wrapper_create() infrastructure"

This reverts commit f9745d8b5234091c38e93ed57a255120b61f3ad7.

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>