[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Sat Jan 12 05:26:03 UTC 2019


The branch, master has been updated
       via  e61f9406de1 selftest:Samba4: run fl2003dc without security context multiplexing
       via  ea0a7041771 selftest:Samba4: run the raw_protocol test with a limit of 8 auth contexts
       via  7bc6ec81c85 s4:rpc_server: implement security context multiplexing
       via  a0b230631bc py:dcerpc/raw_protocol: add tests to demonstrate how security context multiplexing works
       via  3f535ed1adf py:dcerpc/raw_testcase: add assertEqualsStrLower()
       via  1d7930c8ad2 pidl/Python: use py_dcerpc_ndr_pointer_wrap/deref if multiple pointer levels are used
       via  8bd0f4405a3 s4:pyrpc: add py_dcerpc_ndr_pointer_deref/wrap() infrastructure
       via  ae467704f3f s4:pyrpc: make use of pytalloc_get_type() in py_dcerpc_syntax_init_helper()
       via  4bb3a66ae13 s4:rpc_server/lsa: specify \pipe\lsass as ncacn_np_secondary_endpoint
       via  98d58722933 s4:rpc_server: make it possible to specify ncacn_np_secondary_endpoint
       via  a650120d2ec py:dcerpc/raw_protocol: demonstrate that \pipe\lsarpc returns \pipe\lsass as secondary_address
       via  b3659fb52d8 s4:rpc_server: only share assoc group ids on the same transport
       via  a8feb556318 py:dcerpc/raw_protocol: add test_assoc_group_fail3()
       via  c192dc1c9d2 s4:rpc_server: don't replace '\pipe\' with '\PIPE\'
       via  b1c6b954a15 py:dcerpc/raw_protocol: add test_assoc_group_ok2 to check assoc groups over ncacn_np
       via  276286caa97 selftest:Samba4: allow dcerpc auth level connect:lsarpc = yes in chgdcpass
       via  aa3f1f86c0c py:dcerpc/raw_protocol: enable tests with the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN bit
       via  975e8e1f254 s4:rpc_server: fix DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN negotiation to match Windows
       via  fb9f613364d py:dcerpc/raw_protocol: consistently call self.recv_pdu(timeout=0.01) after auth3
       via  5466ed1232e py:dcerpc/raw_protocol: add tests for delayed header signing activation
       via  d47f9af7cbb py:dcerpc/raw_testcase: add pfc_flags_2nd and use_auth3 options to do_generic_bind()
       via  6f53c993723 s4:rpc_server: SMB_ASSERT(auth->auth_finished); in order to get auth details
       via  e9eb8e6a447 s4:rpc_server: only pass context to op_bind() hooks
       via  70b00c7567a s4:rpc_server: only use context within op_bind() hooks and dcesrv_interface_bind_*() functions
       via  28f4cb442c3 s4:rpc_server: remove unused dcesrv_connection_context->private_date
       via  792b6b9d697 s4:rpc_server: remove unused dcesrv_assoc_group->proxied_id
       via  2ed7db445bf s4:rpc_server/winreg: don't cache an ldb connection per presentation context
       via  9616f6b8bc9 s4:rpc_server/remote: make use dcesrv_iface_state_{store,find}_{assoc,conn}() helpers
       via  9d387919f61 s4:rpc_server/remote: introduce struct dcesrv_remote_call
       via  a8134191ec0 s4:rpc_server/remote: defer the connect to the first client request
       via  199d4ba7ac4 s4:rpc_server/remote: fail the connection if the remote server don't support MPX
       via  954dd89f511 selftest: use "dcerpc_remote:allow_anonymous_fallback = yes" for rpc_proxy
       via  3a17389e1be s4:rpc_server/remote: add dcerpc_remote:allow_anonymous_fallback option
       via  23d1393a5f2 s4:rpc_server/remote: reformat code to get "dcerpc_remote:use_machine_account"
       via  d9b88ccd811 s4:rpc_server/remote: reformat code to get "dcerpc_remote:binding"
       via  1f348d077b2 s4:rpc_server/remote: remote_op_bind already has the table available
       via  965abe8e1a5 s4:rpc_server/remote: introduce remote_get_private()
       via  245a0ef73f8 s4:rpc_server/dnsserver: make use of dcesrv_iface_state_{create,find}_conn()
       via  5cbcc78a40e s4:rpc_server/netlogon: make use of dcesrv_iface_state_{create,find}_conn()
       via  c76a5be87bf s4:rpc_server: add dcesrv_iface_state_{store,find}_{assoc,conn}() helpers
       via  38e0c06abc7 s4:rpc_server: move bind_time_features to dcesrv_assoc_group
       via  6b02b94d037 s4:rpc_server: add a min_auth_level to context handles
       via  d8293acdb4f s4:rpc_server: replace dce_conn->allow_request with auth->auth_finished
       via  13e52cc9292 s4:rpc_server: replace dce_conn->allow_auth3 with auth->auth_started
       via  0191516efcb s4:rpc_server: set auth_invalid = true on disconnect
       via  b46df3a85c3 s4:rpc_server: split out log_successful_dcesrv_authz_event()
       via  76976eab01c s4:rpc_server: add some protection checks to dcesrv_auth_prepare_gensec()
       via  2640f60e885 s4:rpc_server: split out dcesrv_auth_prepare_gensec()
       via  e2a05c3ad86 s4:rpc_server: allocate struct dcesrv_auth with talloc
       via  58021612583 s4:rpc_server: make use of dcesrv_call_state->auth_state in dcerpc_server.c
       via  097299ae7a4 s4:rpc_server: make use of dcesrv_call_state->auth_state in common/reply.c
       via  8ec932923b1 s4:rpc_server: make use of dcesrv_call_state->auth_state in dcesrv_auth.c
       via  9a3ea90cc5c s4:rpc_server: introduce dcesrv_call_state->auth_state
       via  93ae817a02e s4:rpc_server: use helper variables to access 'struct dcesrv_auth' in dcerpc_server.c
       via  b8d384177ca s4:rpc_server: use helper variables to access 'struct dcesrv_auth' in common/reply.c
       via  72643248d9a s4:rpc_server: use helper variables to access 'struct dcesrv_auth' in dcesrv_auth.c
       via  c621a87322c s4:rpc_server/remote: make use of dcesrv_call_credentials()
       via  6b49e325f11 s4:rpc_server/netlogon: make use of dcesrv_call_auth_info()
       via  cd380d8adad s4:rpc_server/netlogon: simplify logic of dcesrv_netr_creds_server_step_check()
       via  fc596ef1c73 s4:rpc_server/lsa: make use of dcesrv_call_auth_info()
       via  10816794c02 s4:rpc_server/samr: make use of dcesrv_call_auth_info()
       via  62d45e16e0c s4:rpc_server: add dcesrv_call_auth_info()
       via  f6a296863f3 s4:rpc_server/handles: make use dcesrv_call_session_info()
       via  8639d73025e s4:rpc_server: remove the old dcesrv_handle_{new,fetch}() api
       via  237ae037f4e s4:rpc_server: only use the new dcesrv_handle_{create,lookup}() api
       via  86661abacf8 s4:rpc_server/winreg: make use of dcesrv_handle_create()
       via  70a5d21d744 s4:rpc_server/samr: make use of dcesrv_handle_create()
       via  884a18fa397 s4:rpc_server/lsa: make use of dcesrv_handle_create()
       via  89a42fc011c s4:rpc_server/eventlog: make use of dcesrv_handle_create()
       via  ec3e404a806 s4:rpc_server/drsuapi: make use of dcesrv_handle_create()
       via  47a941cafbe s4:rpc_server: add dcesrv_handle_{create,lookup}() functions
       via  d1f5e5d5b48 s4:rpc_server: add some const to dcesrv_handle_fetch()
       via  ace06729687 s4:rpc_server: merge dcesrv_fetch_session_key() into dcesrv_transport_session_key()
       via  b8eae043dde s4:rpc_server: remove unused dcesrv_inherited_session_key()
       via  57edc9a0d5f s4:rpc_server: only pass dcesrv_auth to auth_state.session_key_fn()
       via  e0a963a7ce7 s4:rpc_server: only setup the auth_state.session_key fn in dcesrv_endpoint_connect()
       via  00e92045674 s4:rpc_server: make dcesrv_endpoint_connect() static
       via  d2aecd87554 s4:rpc_server: only AUTH_TYPE_NONE should get a transport session key
       via  6df71436068 s4:rpc_server: split out a dcesrv_session_info_session_key() helper function
       via  851c06f40b1 s4:rpc_server: allow a NULL function pointer in dcesrv_fetch_session_key()
       via  2f5c344bfc7 s4:rpc_server/drsuapi: make use of dcesrv_auth_session_key()
       via  dbb381ad37a s4:rpc_server/samr: make use of dcesrv_transport_session_key()
       via  8a171c692f3 s4:rpc_server/lsa: make use of dcesrv_transport_session_key()
       via  13c534bd938 s4:rpc_server: add dcesrv_{auth,transport}_session_key() functions
       via  905417c2a77 s4:rpc_server/common: make use dcesrv_call_session_info()
       via  014e55b8e9d s4:rpc_server/winreq: make use dcesrv_call_session_info()
       via  ba127cab2cf s4:rpc_server/srvsvc: make use dcesrv_call_session_info()
       via  89c8870c6a3 s4:rpc_server/samr: make use dcesrv_call_session_info()
       via  aa6d9e49bbf s4:rpc_server/netlogon: make use dcesrv_call_session_info()
       via  73bda4b6d6b s4:rpc_server/lsa: make use dcesrv_call_session_info()
       via  e1caa511469 s4:rpc_server/drsuapi: make use dcesrv_call_session_info()
       via  c989e35c630 s4:rpc_server/dnsserver: make use dcesrv_call_session_info()
       via  707105d0dee s4:rpc_server/backupkey: make use dcesrv_call_session_info()
       via  961ebf229af s4:rpc_server: add dcesrv_call_session_info()
       via  5f33379ee87 s4:rpc_server: remove unused dcesrv_connection->transport_session_key
       via  a71558cf8f7 s4:rpc_server: move dcesrv_auth.c and common/reply.c to dcerpc_server
       via  6739d1b8e4e s4:rpc_server: let test_rpc_dns_server_dnsutils depend on dcerpc_server
       via  f17cd478024 s4:rpc_server: remove dcerpc_remote dependency from dcerpc_server
       via  0b972ec6943 s4:rpc_server/samr: Fix the O3 developer build
       via  36d5268a943 s4:torture: make test_GetUserName() more strict
       via  a94c4e55b73 librpc: add SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET) protection
       via  c919514d2d9 librpc: add dcerpc_get_auth_{type,level,context_id}() helper functions
       via  7817e42d941 librpc: add dcerpc_get_auth_length() helper function
       via  a2f718fb753 lib: remove unused function nttime_from_string()
      from  168079b2c36 tevent: deprecate tevent_wrapper api again

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e61f9406de17a037106ce5f81feb85a8b477a986
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 14 13:36:39 2018 +0100

    selftest:Samba4: run fl2003dc without security context multiplexing
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Jan 12 06:25:37 CET 2019 on sn-devel-144

commit ea0a7041771c43724e469ba95341c3a966f3d910
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Dec 14 13:51:27 2018 +0100

    selftest:Samba4: run the raw_protocol test with a limit of 8 auth contexts
    
    This is much faster than exploring the limit of 2049 during autobuild.
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 7bc6ec81c85eb51f5d6948b9266a7db2918892d4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 14:59:58 2018 +0100

    s4:rpc_server: implement security context multiplexing
    
    There're some systems like Cisco ISE use security multiplexing
    without checking (via bind time feature negotiation)
    the server supports it.
    
    Others like VMWare View, fallback to NT4 style netlogon
    connections without using netlogon secure channel,
    which then triggers an error, with "server schannel = yes",
    see https://bugzilla.samba.org/show_bug.cgi?id=13464.
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a0b230631bcb0fd9b0299aa41711af08cc2594c3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 11:01:55 2018 +0100

    py:dcerpc/raw_protocol: add tests to demonstrate how security context multiplexing works
    
    Important things are this:
    - It's not required to use the bind time feature negotiation in order
      to use it, it's only a hint for the client, but nothing is really
      negotiated, unlike the request multiplexing with the
      DCERPC_PFC_FLAG_CONC_MPX.
    - There's special handling related to AUTH_LEVEL_CONNECT
      and requests without auth trailer
    - An security context is identified by the unique
      tuple of auth_type, auth_level and auth_context_id (all together!),
      not just the auth_context_id.
    - There's a limit of 2049 explicit authentication contexts.
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 3f535ed1adfe9c7088852a2c6aa56988440ce8fa
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Nov 26 11:49:22 2018 +0100

    py:dcerpc/raw_testcase: add assertEqualsStrLower()
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 1d7930c8ad2ac5b7f5139b471ebc0b96c8d8b773
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 29 13:25:21 2018 +0100

    pidl/Python: use py_dcerpc_ndr_pointer_wrap/deref if multiple pointer levels are used
    
    This will help the raw_protocol test to explore lsa_GetUserName.
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 8bd0f4405a3545437a9b52adff775696b542e1bf
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 29 12:41:34 2018 +0100

    s4:pyrpc: add py_dcerpc_ndr_pointer_deref/wrap() infrastructure
    
    Some idl files use more than one layer of unique pointers. e.g.
    
        NTSTATUS lsa_GetUserName(
                [in,unique] [string,charset(UTF16)] uint16 *system_name,
                [in,out,ref] lsa_String **account_name,
                [in,out,unique] lsa_String **authority_name
                );
    
    In order to specify *io.in.authority_name = NULL,
    we need to wrap the pointer value (lsa_String or None)
    into an base.ndr_pointer() object.
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ae467704f3fe6794f1f4e31b1d5c4fd3f1a14053
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 29 16:47:15 2018 +0100

    s4:pyrpc: make use of pytalloc_get_type() in py_dcerpc_syntax_init_helper()
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 4bb3a66ae13ad90101034451c2200fc669fb3dec
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 12 22:41:56 2018 +0100

    s4:rpc_server/lsa: specify \\pipe\lsass as ncacn_np_secondary_endpoint
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 98d58722933a2929fb8564f9c8526f7ae45f6059
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 12 22:41:56 2018 +0100

    s4:rpc_server: make it possible to specify ncacn_np_secondary_endpoint
    
    Even a connect to \\pipe\lsarpc should return a secondary_address
    of '\\pipe\\lsass'. But that will be implemented in a following 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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a650120d2ecd70ae4a1bc0b29f177db9ff526703
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Dec 13 10:13:03 2018 +0100

    py:dcerpc/raw_protocol: demonstrate that \\pipe\lsarpc returns \\pipe\lsass as secondary_address
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b3659fb52d8da81cf68f45c163d9d232b1d48425
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 12 13:49:35 2018 +0100

    s4:rpc_server: only share assoc group ids on the same transport
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a8feb556318049ee0da2db372bbc58cb5bdc63e4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 12 13:43:45 2018 +0100

    py:dcerpc/raw_protocol: add test_assoc_group_fail3()
    
    This demonstrates that assoc groups are only shared on the
    same transport (endpoint).
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit c192dc1c9d22e2f7602fd98926026b092eaa6241
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 12 13:48:05 2018 +0100

    s4:rpc_server: don't replace '\\pipe\\' with '\\PIPE\\'
    
    This is not what Windows returns (at least for \\pipe\lsass).
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b1c6b954a153232dbee0cb20cb02cab22a0fbb82
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Dec 12 12:35:09 2018 +0100

    py:dcerpc/raw_protocol: add test_assoc_group_ok2 to check assoc groups over ncacn_np
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 276286caa9785c82a597cffe7c7fb7702d0e0505
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 23 00:23:23 2018 +0100

    selftest:Samba4: allow dcerpc auth level connect:lsarpc = yes in chgdcpass
    
    This is required to explore the details of security context multiplexing
    using lsa_GetUserName().
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit aa3f1f86c0ce5c46be85168de6c6c188b4193b19
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 09:38:46 2018 +0100

    py:dcerpc/raw_protocol: enable tests with the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN bit
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 975e8e1f25456302bddc7245bb1f0570518b4af1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 09:39:36 2018 +0100

    s4:rpc_server: fix DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN negotiation to match Windows
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit fb9f613364d6ec32ae22b12b1d6785f094154de2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 11:49:40 2018 +0100

    py:dcerpc/raw_protocol: consistently call self.recv_pdu(timeout=0.01) after auth3
    
    When we don't expect a FAULT, we should wait a little bit to check
    there's no response to auth3 request. This reduces the raw_procol
    test from 45s down to 35s total runtime against Windows.
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 5466ed1232ee5e13335a79bf04e6205f901f6e21
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 11:49:40 2018 +0100

    py:dcerpc/raw_protocol: add tests for delayed header signing activation
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d47f9af7cbb09ed015abcfc6ea7d19ec443bdcf2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 11:49:40 2018 +0100

    py:dcerpc/raw_testcase: add pfc_flags_2nd and use_auth3 options to do_generic_bind()
    
    This makes it more flexible and allows to write complex tests in an
    easier fashion.
    
    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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6f53c9937233f18c0c18a6680d455157b8025bec
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 23 13:24:05 2018 +0100

    s4:rpc_server: SMB_ASSERT(auth->auth_finished); in order to get auth details
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit e9eb8e6a4474018ece6ac3550275cec9839557ab
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 20:06:21 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 70b00c7567aeef4027f3d4d55c74bb37a2e9e673
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 20:06:21 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 28f4cb442c3c08ea761776012036b30f7b9dbd7d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 10 23:51:09 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 792b6b9d6970682154d8c7c7f613fce39e69152d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 23:38:25 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 2ed7db445bf2bd1b4ecab437cb1e860d51a58879
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 20:05:01 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9616f6b8bc97bd59b2b934d5dc56cd0599b4e781
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 19:28:30 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9d387919f61b64c24c99d9ea3db2425001377c30
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 23 14:28:56 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a8134191ec000b236948b93d2e2290cc4dc8b110
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 19:19:15 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 199d4ba7ac45d2740987be0b85438d2b4c532035
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 23 14:21:45 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 954dd89f511865c14bd5160f8f6c26bc28691d40
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 23 13:15:10 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 3a17389e1bef67361dd152793e85e00a6efb9cb5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 23 13:13:53 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 23d1393a5f27a3329005f3d560339f85ad780e41
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 19:14:59 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d9b88ccd8110e5dc6a09e5f29fbffb2c5b41e3c3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 19:13:50 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 1f348d077b25eb674c099c9b3a7776750b39f4a2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 19:08:59 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 965abe8e1a55b2631ea3e8bf03134a567f02ac5c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 18:00:29 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 245a0ef73f87cdfbfe98c05dde1976c67272248c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 10 22:42:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 5cbcc78a40e46651c6d0a35e02448e172aae7c2c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 10 22:42:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit c76a5be87bf8985d54e82a32df3abf855a616134
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 10 22:41:31 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 38e0c06abc71620af7c8cfc44af326d10ff9ff14
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 23:39:11 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6b02b94d037429e7bdca67377e390fb636c63f64
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 23:27:50 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d8293acdb4f738a5fe66c53bfd01715ebf7952ba
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 22 10:30:47 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 13e52cc9292a46ebcabf4e6ff385fd89cadc0fa7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 22 10:30:47 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0191516efcbcb0c71b63cd8a9d3be60f8dc564b1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Dec 6 17:03:25 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b46df3a85c39240d33ecb2ea0d54afcaa97c5815
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 22 13:26:21 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 76976eab01cd64ccf3ea2a2247a77997db3094ed
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 16:36:52 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 2640f60e885335b47bc7a1d509c8b26ba95a86ed
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 16:36:13 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit e2a05c3ad8668ee723c71378ccf83a612f9cb255
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 13:28:07 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 58021612583e087ecbc2885bc1b258bced6009b5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 31 14:44:33 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 097299ae7a48dd7cd9242c283a14969a53c0a5ce
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 31 14:44:33 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 8ec932923b1c1c5dab214b93720d04b83cdc3886
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 31 14:44:33 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 9a3ea90cc5cc83dd411a819f3448c3bef1ab20fe
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 31 14:44:33 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 93ae817a02eadc637e13bf371241c0bf91afffc9
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 31 17:12:02 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b8d384177cad0d962d6ac6c0bb2fd260ea82e898
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 31 17:12:02 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 72643248d9aef3ce793e156ec80021a2163bdce3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 31 17:12:02 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit c621a87322c60811483c735a23922f85064a684a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 13:08:19 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6b49e325f11847ba3a3efa7ba79c7a4992b81714
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:44:30 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit cd380d8adad8cea7df8ee2cfb33dab86ba3900b6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 13:05:25 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit fc596ef1c733c75e56a4790b70641f7ca8fb9828
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:44:30 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 10816794c0210c622d6f2f75ac518a651ef7ce7c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:44:30 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 62d45e16e0c993e830048478b0f370e1be4d3b45
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:44:30 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit f6a296863f34e0fd6c5273bdd25e1faad8e3af52
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 8639d73025e5f567d8366546b8c0c944ffe2407d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:20:44 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 237ae037f4e5683213f3ef0d02ac3d411ca1889f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:20:44 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 86661abacf8ba0dea7a7b050facb2dfe8ea7bf79
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:20:44 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 70a5d21d744960aa60612b7f0af39c57c28d25f7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:20:44 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 884a18fa397821fb1e9570d608ca707dcb7170c8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:20:44 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 89a42fc011c28a20054df7dd8655bc93aef1d3d8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:20:44 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ec3e404a806fd3aa5da19dc8696878281e6e08fa
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:20:44 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 47a941cafbe9e8a6cbf3eef375297859db7ccf53
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:48:46 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d1f5e5d5b48f9cdcddedce8e22f930264397e602
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 12:14:05 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ace0672968707db0349f77c89a2a48c3219ef73b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:52:29 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit b8eae043dde33b080257766807c6d66ae29ff862
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:52:29 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 57edc9a0d5fe092252b102c6bb34d94e5d5c13c1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:14:41 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit e0a963a7ce7f68a0589f366b9623bc2604a3b08c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:14:41 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 00e92045674c664f2deed14a23829acefd72ba42
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:14:41 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit d2aecd8755413fb32c3e05a4b644a7015a6dc47b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 09:45:15 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6df71436068eb548ac211e8a1f5104a52bc7c901
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 09:45:15 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 851c06f40b1494440d8b404f5af38f9e080fead1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 09:45:15 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 2f5c344bfc75b945e469f3d89b31383f61ab32fa
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:52:29 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit dbb381ad37a3792568fdfd142d790caf512bc2d2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:52:29 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 8a171c692f3dd8e66b450473aa4dac5a33987566
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:52:29 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 13c534bd9382131ac97cd687caa0cc6990367e65
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 8 11:48:46 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 905417c2a77e85287e435ed9c11480c39bc7f230
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 014e55b8e9d339b364337b1638359d126267d523
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ba127cab2cfb9770a5ab06ee8f3a42d4ac660ac2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 89c8870c6a3bbffdba1c4e9cbbc11ec127455623
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit aa6d9e49bbf6056f20d44247364eaf586765ad09
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 73bda4b6d6b1f96fd7d381a36849e934461152e6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit e1caa51146935884080726650d0647b8c1f3dba7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit c989e35c630536231fb4f6c95cc61b4d6b38dd9f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 707105d0dee2cc4d86fc583065b03dec6f75b371
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:19:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 961ebf229af5345d86f60cb82e773271040cdcad
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Nov 3 01:18:59 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 5f33379ee87bcc8fd9a633b5e3cc90d9b071e9b8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Nov 21 09:41:51 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a71558cf8f7e24d35ba5459fecc82d6ecd0839c6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Nov 13 09:42:17 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 6739d1b8e4e5fd90febb9c9535416cffedd9a86a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 29 16:48:42 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit f17cd478024939efd64e49bc56e5dc7ff3ce3c6c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Nov 29 16:47:58 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 0b972ec69431a9801d8ab885ce102c48f2d1a0f5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Nov 16 16:11:50 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 36d5268a94315e3f6d32a11e225ab8dbd055157a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Nov 26 11:06:44 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a94c4e55b7347ce5a524eeed78db632c5a251f4d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Dec 24 11:21:38 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit c919514d2d9b358a8bb1ab152d34c5345677ba78
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 31 16:44:11 2018 +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 at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 7817e42d94140af8151cafa608398e4974489730
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Oct 31 16:44:11 2018 +0100

    librpc: add dcerpc_get_auth_length() helper function
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit a2f718fb753b7ee38e30acebb02ef931a89f279f
Author: Swen Schillig <swen at linux.ibm.com>
Date:   Fri Jan 11 09:26:29 2019 +0100

    lib: remove unused function nttime_from_string()
    
    Signed-off-by: Swen Schillig <swen at linux.ibm.com>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 lib/util/time.h                                    |    5 -
 librpc/rpc/dcerpc_util.c                           |  106 ++
 librpc/rpc/rpc_common.h                            |    4 +
 pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm           |   16 +-
 pidl/lib/Parse/Pidl/Samba4/Python.pm               |   35 +-
 python/samba/tests/dcerpc/raw_protocol.py          | 1247 +++++++++++++++++++-
 python/samba/tests/dcerpc/raw_testcase.py          |   22 +-
 selftest/target/Samba4.pm                          |   11 +-
 source3/lib/time.c                                 |    9 -
 source4/librpc/rpc/pyrpc.c                         |  101 ++
 source4/librpc/rpc/pyrpc_util.c                    |   31 +-
 source4/librpc/rpc/pyrpc_util.h                    |    3 +
 source4/rpc_server/backupkey/dcesrv_backupkey.c    |   22 +-
 .../backupkey/dcesrv_backupkey_heimdal.c           |   22 +-
 source4/rpc_server/common/forward.c                |    7 +-
 source4/rpc_server/common/reply.c                  |   19 +-
 source4/rpc_server/common/server_info.c            |    4 +-
 source4/rpc_server/dcerpc_server.c                 |  448 +++++--
 source4/rpc_server/dcerpc_server.h                 |  151 ++-
 source4/rpc_server/dcesrv_auth.c                   |  393 ++++--
 source4/rpc_server/dcesrv_mgmt.c                   |    8 +-
 source4/rpc_server/dnsserver/dcerpc_dnsserver.c    |   27 +-
 source4/rpc_server/drsuapi/dcesrv_drsuapi.c        |   18 +-
 source4/rpc_server/drsuapi/drsutil.c               |    6 +-
 source4/rpc_server/drsuapi/getncchanges.c          |   14 +-
 source4/rpc_server/drsuapi/updaterefs.c            |   10 +-
 source4/rpc_server/drsuapi/writespn.c              |    4 +-
 source4/rpc_server/echo/rpc_echo.c                 |    8 +-
 source4/rpc_server/epmapper/rpc_epmapper.c         |    8 +-
 source4/rpc_server/eventlog/dcesrv_eventlog6.c     |    4 +-
 source4/rpc_server/handles.c                       |  256 +++-
 source4/rpc_server/lsa/dcesrv_lsa.c                |   66 +-
 source4/rpc_server/lsa/lsa_init.c                  |    7 +-
 source4/rpc_server/lsa/lsa_lookup.c                |   15 +-
 source4/rpc_server/netlogon/dcerpc_netlogon.c      |  141 +--
 source4/rpc_server/remote/dcesrv_remote.c          |  176 ++-
 source4/rpc_server/samr/dcesrv_samr.c              |  128 +-
 source4/rpc_server/samr/samr_password.c            |   14 +-
 source4/rpc_server/srvsvc/dcesrv_srvsvc.c          |   11 +-
 source4/rpc_server/srvsvc/srvsvc_ntvfs.c           |    4 +-
 source4/rpc_server/winreg/rpc_winreg.c             |   75 +-
 source4/rpc_server/wscript_build                   |   10 +-
 source4/selftest/tests.py                          |    4 +-
 source4/torture/rpc/lsa.c                          |   24 +-
 source4/torture/rpc/spoolss_notify.c               |   11 +-
 45 files changed, 3036 insertions(+), 669 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/time.h b/lib/util/time.h
index 9b897eb4b6c..1988b330576 100644
--- a/lib/util/time.h
+++ b/lib/util/time.h
@@ -180,11 +180,6 @@ void push_nttime(uint8_t *base, uint16_t offset, NTTIME t);
 */
 NTTIME pull_nttime(uint8_t *base, uint16_t offset);
 
-/**
-  parse a nttime as a large integer in a string and return a NTTIME
-*/
-NTTIME nttime_from_string(const char *s);
-
 /**
   return (tv1 - tv2) in microseconds
 */
diff --git a/librpc/rpc/dcerpc_util.c b/librpc/rpc/dcerpc_util.c
index 0808131dd14..6bc97f7e7d8 100644
--- a/librpc/rpc/dcerpc_util.c
+++ b/librpc/rpc/dcerpc_util.c
@@ -34,6 +34,8 @@
    decode */
 void dcerpc_set_frag_length(DATA_BLOB *blob, uint16_t v)
 {
+	SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET);
+
 	if (CVAL(blob->data,DCERPC_DREP_OFFSET) & DCERPC_DREP_LE) {
 		SSVAL(blob->data, DCERPC_FRAG_LEN_OFFSET, v);
 	} else {
@@ -43,6 +45,8 @@ void dcerpc_set_frag_length(DATA_BLOB *blob, uint16_t v)
 
 uint16_t dcerpc_get_frag_length(const DATA_BLOB *blob)
 {
+	SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET);
+
 	if (CVAL(blob->data,DCERPC_DREP_OFFSET) & DCERPC_DREP_LE) {
 		return SVAL(blob->data, DCERPC_FRAG_LEN_OFFSET);
 	} else {
@@ -52,6 +56,8 @@ uint16_t dcerpc_get_frag_length(const DATA_BLOB *blob)
 
 void dcerpc_set_auth_length(DATA_BLOB *blob, uint16_t v)
 {
+	SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET);
+
 	if (CVAL(blob->data,DCERPC_DREP_OFFSET) & DCERPC_DREP_LE) {
 		SSVAL(blob->data, DCERPC_AUTH_LEN_OFFSET, v);
 	} else {
@@ -59,11 +65,111 @@ void dcerpc_set_auth_length(DATA_BLOB *blob, uint16_t v)
 	}
 }
 
+uint16_t dcerpc_get_auth_length(const DATA_BLOB *blob)
+{
+	SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET);
+
+	if (CVAL(blob->data,DCERPC_DREP_OFFSET) & DCERPC_DREP_LE) {
+		return SVAL(blob->data, DCERPC_AUTH_LEN_OFFSET);
+	} else {
+		return RSVAL(blob->data, DCERPC_AUTH_LEN_OFFSET);
+	}
+}
+
 uint8_t dcerpc_get_endian_flag(DATA_BLOB *blob)
 {
+	SMB_ASSERT(blob->length >= DCERPC_NCACN_PAYLOAD_OFFSET);
+
 	return blob->data[DCERPC_DREP_OFFSET];
 }
 
+static uint16_t dcerpc_get_auth_context_offset(const DATA_BLOB *blob)
+{
+	uint16_t frag_len = dcerpc_get_frag_length(blob);
+	uint16_t auth_len = dcerpc_get_auth_length(blob);
+	uint16_t min_offset;
+	uint16_t offset;
+
+	if (auth_len == 0) {
+		return 0;
+	}
+
+	if (frag_len > blob->length) {
+		return 0;
+	}
+
+	if (auth_len > frag_len) {
+		return 0;
+	}
+
+	min_offset = DCERPC_NCACN_PAYLOAD_OFFSET + DCERPC_AUTH_TRAILER_LENGTH;
+	offset = frag_len - auth_len;
+	if (offset < min_offset) {
+		return 0;
+	}
+	offset -= DCERPC_AUTH_TRAILER_LENGTH;
+
+	return offset;
+}
+
+uint8_t dcerpc_get_auth_type(const DATA_BLOB *blob)
+{
+	uint16_t offset;
+
+	offset = dcerpc_get_auth_context_offset(blob);
+	if (offset == 0) {
+		return 0;
+	}
+
+	/*
+	 * auth_typw is in the 1st byte
+	 * of the auth trailer
+	 */
+	offset += 0;
+
+	return blob->data[offset];
+}
+
+uint8_t dcerpc_get_auth_level(const DATA_BLOB *blob)
+{
+	uint16_t offset;
+
+	offset = dcerpc_get_auth_context_offset(blob);
+	if (offset == 0) {
+		return 0;
+	}
+
+	/*
+	 * auth_level is in 2nd byte
+	 * of the auth trailer
+	 */
+	offset += 1;
+
+	return blob->data[offset];
+}
+
+uint32_t dcerpc_get_auth_context_id(const DATA_BLOB *blob)
+{
+	uint16_t offset;
+
+	offset = dcerpc_get_auth_context_offset(blob);
+	if (offset == 0) {
+		return 0;
+	}
+
+	/*
+	 * auth_context_id is in the last 4 byte
+	 * of the auth trailer
+	 */
+	offset += 4;
+
+	if (CVAL(blob->data,DCERPC_DREP_OFFSET) & DCERPC_DREP_LE) {
+		return IVAL(blob->data, offset);
+	} else {
+		return RIVAL(blob->data, offset);
+	}
+}
+
 /**
 * @brief Decodes a ncacn_packet
 *
diff --git a/librpc/rpc/rpc_common.h b/librpc/rpc/rpc_common.h
index cdc9fe8ac88..f1535d74220 100644
--- a/librpc/rpc/rpc_common.h
+++ b/librpc/rpc/rpc_common.h
@@ -168,7 +168,11 @@ enum dcerpc_transport_t dcerpc_transport_by_tower(const struct epm_tower *tower)
 void dcerpc_set_frag_length(DATA_BLOB *blob, uint16_t v);
 uint16_t dcerpc_get_frag_length(const DATA_BLOB *blob);
 void dcerpc_set_auth_length(DATA_BLOB *blob, uint16_t v);
+uint16_t dcerpc_get_auth_length(const DATA_BLOB *blob);
 uint8_t dcerpc_get_endian_flag(DATA_BLOB *blob);
+uint8_t dcerpc_get_auth_type(const DATA_BLOB *blob);
+uint8_t dcerpc_get_auth_level(const DATA_BLOB *blob);
+uint32_t dcerpc_get_auth_context_id(const DATA_BLOB *blob);
 const char *dcerpc_default_transport_endpoint(TALLOC_CTX *mem_ctx,
 					      enum dcerpc_transport_t transport,
 					      const struct ndr_interface_table *table);
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
index ad36f000077..945c0ffcee0 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
@@ -81,10 +81,10 @@ sub Boilerplate_Iface($)
 	my $if_version = $interface->{VERSION};
 
 	pidl "
-static NTSTATUS $name\__op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface, uint32_t if_version)
+static NTSTATUS $name\__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
 {
 #ifdef DCESRV_INTERFACE_$uname\_BIND
-	return DCESRV_INTERFACE_$uname\_BIND(dce_call,iface);
+	return DCESRV_INTERFACE_$uname\_BIND(context,iface);
 #else
 	return NT_STATUS_OK;
 #endif
@@ -223,12 +223,22 @@ sub Boilerplate_Ep_Server($)
 static NTSTATUS $name\__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
 {
 	int i;
+#ifdef DCESRV_INTERFACE_$uname\_NCACN_NP_SECONDARY_ENDPOINT
+	const char *ncacn_np_secondary_endpoint =
+		DCESRV_INTERFACE_$uname\_NCACN_NP_SECONDARY_ENDPOINT;
+#else
+	const char *ncacn_np_secondary_endpoint = NULL;
+#endif
 
 	for (i=0;i<ndr_table_$name.endpoints->count;i++) {
 		NTSTATUS ret;
 		const char *name = ndr_table_$name.endpoints->names[i];
 
-		ret = dcesrv_interface_register(dce_ctx, name, &dcesrv_$name\_interface, NULL);
+		ret = dcesrv_interface_register(dce_ctx,
+						name,
+						ncacn_np_secondary_endpoint,
+						&dcesrv_$name\_interface,
+						NULL);
 		if (!NT_STATUS_IS_OK(ret)) {
 			DEBUG(1,(\"$name\_op_init_server: failed to register endpoint \'%s\'\\n\",name));
 			return ret;
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 1ef64db14ee..5697b52c4fe 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -1902,6 +1902,9 @@ sub ConvertObjectFromPythonLevel($$$$$$$$$)
 	$recurse = $recurse + 1;
 
 	if ($l->{TYPE} eq "POINTER") {
+		my $need_deindent = 0;
+		my $need_deref = 0;
+
 		if ($l->{POINTER_TYPE} ne "ref") {
 			$self->pidl("if ($py_var == Py_None) {");
 			$self->indent;
@@ -1909,10 +1912,13 @@ sub ConvertObjectFromPythonLevel($$$$$$$$$)
 			$self->deindent;
 			$self->pidl("} else {");
 			$self->indent;
+			$need_deindent = 1;
+			if ($nl->{TYPE} eq "POINTER") {
+				$need_deref = 1;
+			}
 		}
-		# if we want to handle more than one level of pointer in python interfaces
-		# then this is where we would need to allocate it
-		if ($l->{POINTER_TYPE} eq "ref") {
+
+		if ($l->{POINTER_TYPE} eq "ref" or $need_deref == 1) {
 			$self->pidl("$var_name = talloc_ptrtype($mem_ctx, $var_name);");
 			$self->pidl("if ($var_name == NULL) {");
 			$self->indent;
@@ -1932,11 +1938,15 @@ sub ConvertObjectFromPythonLevel($$$$$$$$$)
 		} else {
 			$self->pidl("$var_name = NULL;");
 		}
+		if ($need_deref == 1) {
+			my $ndr_pointer_typename = $self->import_type_variable("samba.dcerpc.base", "ndr_pointer");
+			$self->pidl("$py_var = py_dcerpc_ndr_pointer_deref($ndr_pointer_typename, $py_var);");
+		}
 		unless ($nl->{TYPE} eq "DATA" and Parse::Pidl::Typelist::scalar_is_reference($nl->{DATA_TYPE})) {
 			$var_name = get_value_of($var_name);
 		}
 		$self->ConvertObjectFromPythonLevel($env, $mem_ctx, $py_var, $e, $nl, $var_name, $fail, $recurse);
-		if ($l->{POINTER_TYPE} ne "ref") {
+		if ($need_deindent == 1) {
 			$self->deindent;
 			$self->pidl("}");
 		}
@@ -2138,6 +2148,10 @@ sub ConvertObjectToPythonLevel($$$$$$$)
 	}
 
 	if ($l->{TYPE} eq "POINTER") {
+		my $need_wrap = 0;
+		if ($l->{POINTER_TYPE} ne "ref" and $nl->{TYPE} eq "POINTER") {
+			$need_wrap = 1;
+		}
 		if ($l->{POINTER_TYPE} ne "ref") {
 			if ($recurse == 0) {
 				$self->pidl("if ($var_name == NULL) {");
@@ -2164,6 +2178,19 @@ sub ConvertObjectToPythonLevel($$$$$$$)
 			$self->deindent;
 			$self->pidl("}");
 		}
+		if ($need_wrap) {
+			my $py_var_wrap = undef;
+			$need_wrap = 1;
+			$self->pidl("{");
+			$self->indent;
+			$py_var_wrap = "py_$e->{NAME}_level_$l->{LEVEL_INDEX}";
+			$self->pidl("PyObject *$py_var_wrap = $py_var;");
+			my $ndr_pointer_typename = $self->import_type_variable("samba.dcerpc.base", "ndr_pointer");
+			$self->pidl("$py_var = py_dcerpc_ndr_pointer_wrap($ndr_pointer_typename, $py_var_wrap);");
+			$self->pidl("Py_XDECREF($py_var_wrap);");
+			$self->deindent;
+			$self->pidl("}");
+		}
 	} elsif ($l->{TYPE} eq "ARRAY") {
 		if ($pl && $pl->{TYPE} eq "POINTER") {
 			$var_name = get_pointer_to($var_name);
diff --git a/python/samba/tests/dcerpc/raw_protocol.py b/python/samba/tests/dcerpc/raw_protocol.py
index aab6d86253f..e2c45603d39 100755
--- a/python/samba/tests/dcerpc/raw_protocol.py
+++ b/python/samba/tests/dcerpc/raw_protocol.py
@@ -29,10 +29,14 @@ import samba.dcerpc.misc as misc
 import samba.dcerpc.epmapper
 import samba.dcerpc.mgmt
 import samba.dcerpc.netlogon
+import samba.dcerpc.lsa
 import struct
 from samba import gensec
 from samba.tests.dcerpc.raw_testcase import RawDCERPCTest
 from samba.compat import binary_type
+from samba.ntstatus import (
+    NT_STATUS_SUCCESS
+)
 
 global_ndr_print = False
 global_hexdump = False
@@ -186,9 +190,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
                                         dcerpc.DCERPC_PFC_FLAG_FIRST |
                                         dcerpc.DCERPC_PFC_FLAG_LAST)
 
-    # TODO: doesn't announce DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
-    # without authentication
-    def _test_no_auth_request_bind_pfc_HDR_SIGNING(self):
+    def test_no_auth_request_bind_pfc_HDR_SIGNING(self):
         return self._test_no_auth_request_bind_pfc_flags(
                                         req_pfc_flags=0 |
                                         dcerpc.DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN |
@@ -285,9 +287,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
                                         dcerpc.DCERPC_PFC_FLAG_FIRST |
                                         dcerpc.DCERPC_PFC_FLAG_LAST)
 
-    # TODO: doesn't announce DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
-    # without authentication
-    def _test_no_auth_request_alter_pfc_HDR_SIGNING(self):
+    def test_no_auth_request_alter_pfc_HDR_SIGNING(self):
         return self._test_no_auth_request_alter_pfc_flags(
                                         req_pfc_flags=0 |
                                         dcerpc.DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN |
@@ -342,9 +342,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
                                         dcerpc.DCERPC_PFC_FLAG_FIRST |
                                         dcerpc.DCERPC_PFC_FLAG_LAST)
 
-    # TODO: doesn't announce DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
-    # without authentication
-    def _test_no_auth_request_alter_pfc_ff(self):
+    def test_no_auth_request_alter_pfc_ff(self):
         return self._test_no_auth_request_alter_pfc_flags(
                                         req_pfc_flags=0 |
                                         0xff |
@@ -1473,6 +1471,41 @@ class TestDCERPC_BIND(RawDCERPCTest):
         self.assertNDRSyntaxEquals(rep.u.ctx_list[0].syntax, zero_syntax)
         self.assertEquals(rep.u.auth_info, b'\0' * 0)
 
+    def test_no_auth_bind_time_sec_ctx_ignore_additional(self):
+        features1 = dcerpc.DCERPC_BIND_TIME_SECURITY_CONTEXT_MULTIPLEXING
+        btf1 = base.bind_time_features_syntax(features1)
+
+        features2 = dcerpc.DCERPC_BIND_TIME_KEEP_CONNECTION_ON_ORPHAN
+        btf2 = base.bind_time_features_syntax(features2)
+
+        zero_syntax = misc.ndr_syntax_id()
+        ndr64 = base.transfer_syntax_ndr64()
+
+        tsf1_list = [btf1, btf2, zero_syntax]
+        ctx1 = dcerpc.ctx_list()
+        ctx1.context_id = 1
+        ctx1.num_transfer_syntaxes = len(tsf1_list)
+        ctx1.abstract_syntax = ndr64
+        ctx1.transfer_syntaxes = tsf1_list
+
+        req = self.generate_bind(call_id=0, ctx_list=[ctx1])
+        self.send_pdu(req)
+        rep = self.recv_pdu()
+        self.verify_pdu(rep, dcerpc.DCERPC_PKT_BIND_ACK, req.call_id,
+                        auth_length=0)
+        self.assertEquals(rep.u.max_xmit_frag, req.u.max_xmit_frag)
+        self.assertEquals(rep.u.max_recv_frag, req.u.max_recv_frag)
+        self.assertNotEquals(rep.u.assoc_group_id, req.u.assoc_group_id)
+        self.assertEquals(rep.u.secondary_address_size, 4)
+        self.assertEquals(rep.u.secondary_address, "%d" % self.tcp_port)
+        self.assertPadding(rep.u._pad1, 2)
+        self.assertEquals(rep.u.num_results, 1)
+        self.assertEquals(rep.u.ctx_list[0].result,
+                          dcerpc.DCERPC_BIND_ACK_RESULT_NEGOTIATE_ACK)
+        self.assertEquals(rep.u.ctx_list[0].reason, features1)
+        self.assertNDRSyntaxEquals(rep.u.ctx_list[0].syntax, zero_syntax)
+        self.assertEquals(rep.u.auth_info, b'\0' * 0)
+
     def _test_auth_type_level_bind_nak(self, auth_type, auth_level, creds=None,
                                        reason=dcerpc.DCERPC_BIND_NAK_REASON_INVALID_AUTH_TYPE):
         ndr32 = base.transfer_syntax_ndr()
@@ -2982,7 +3015,7 @@ class TestDCERPC_BIND(RawDCERPCTest):
         req = self.generate_auth3(call_id=0,
                                   auth_info=auth_info)
         self.send_pdu(req)
-        rep = self.recv_pdu()
+        rep = self.recv_pdu(timeout=0.01)
         self.assertIsNone(rep)
         self.assertIsConnected()
 
@@ -4231,6 +4264,8 @@ class TestDCERPC_BIND(RawDCERPCTest):
         req = self.generate_auth3(call_id=0,
                                   auth_info=auth_info)
         self.send_pdu(req)
+        rep = self.recv_pdu(timeout=0.01)
+        self.assertIsNone(rep)
         self.assertIsConnected()
 
         # And now try a request without auth_info
@@ -4988,6 +5023,1198 @@ class TestDCERPC_BIND(RawDCERPCTest):
         conn2._disconnect("End of Test")
         return
 
+    def test_assoc_group_ok2(self):
+        abstract = samba.dcerpc.mgmt.abstract_syntax()
+        transfer = base.transfer_syntax_ndr()
+
+        self.reconnect_smb_pipe(primary_address='\\pipe\\lsarpc',
+                                secondary_address='\\pipe\\lsass',
+                                transport_creds=self.get_user_creds())
+        (ctx1, ack1) = self.prepare_presentation(abstract, transfer,
+                                                 context_id=1, return_ack=True)
+
+        conn2 = self.second_connection()
+        (ctx2, ack2) = conn2.prepare_presentation(abstract, transfer,
+                                                  assoc_group_id=ack1.u.assoc_group_id,
+                                                  context_id=2, return_ack=True)
+
+        inq_if_ids = samba.dcerpc.mgmt.inq_if_ids()
+        self.do_single_request(call_id=1, ctx=ctx1, io=inq_if_ids)
+        conn2.do_single_request(call_id=1, ctx=ctx2, io=inq_if_ids)
+
+        conn2.do_single_request(call_id=1, ctx=ctx1, io=inq_if_ids,
+                                fault_pfc_flags=(
+                                    samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_FIRST |
+                                    samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_LAST |
+                                    samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_DID_NOT_EXECUTE),
+                                fault_status=dcerpc.DCERPC_NCA_S_UNKNOWN_IF,
+                                fault_context_id=0)
+
+        self.do_single_request(call_id=1, ctx=ctx1, io=inq_if_ids)
+        conn2.do_single_request(call_id=1, ctx=ctx2, io=inq_if_ids)
+        conn2._disconnect("End of Test")
+        return
+
+    def test_assoc_group_fail3(self):
+        abstract = samba.dcerpc.mgmt.abstract_syntax()
+        transfer = base.transfer_syntax_ndr()
+
+        (ctx1, ack1) = self.prepare_presentation(abstract, transfer,
+                                                 context_id=1, return_ack=True)
+
+        # assoc groups are per transport
+        connF = self.second_connection(primary_address="\\pipe\\lsarpc",
+                                       secondary_address="\\pipe\\lsass",
+                                       transport_creds=self.get_user_creds())
+        tsfF_list = [transfer]
+        ctxF = samba.dcerpc.dcerpc.ctx_list()
+        ctxF.context_id = 0xF
+        ctxF.num_transfer_syntaxes = len(tsfF_list)
+        ctxF.abstract_syntax = abstract
+        ctxF.transfer_syntaxes = tsfF_list
+        ack = connF.do_generic_bind(ctx=ctxF, assoc_group_id=ack1.u.assoc_group_id,
+                                    nak_reason=dcerpc.DCERPC_BIND_NAK_REASON_NOT_SPECIFIED)
+        # wait for a disconnect
+        rep = connF.recv_pdu()
+        self.assertIsNone(rep)
+        connF.assertNotConnected()
+
+        conn2 = self.second_connection()
+        (ctx2, ack2) = conn2.prepare_presentation(abstract, transfer,
+                                                  assoc_group_id=ack1.u.assoc_group_id,
+                                                  context_id=2, return_ack=True)
+
+        inq_if_ids = samba.dcerpc.mgmt.inq_if_ids()
+        self.do_single_request(call_id=1, ctx=ctx1, io=inq_if_ids)
+        conn2.do_single_request(call_id=1, ctx=ctx2, io=inq_if_ids)
+
+        conn2.do_single_request(call_id=1, ctx=ctx1, io=inq_if_ids,
+                                fault_pfc_flags=(
+                                    samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_FIRST |
+                                    samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_LAST |
+                                    samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_DID_NOT_EXECUTE),
+                                fault_status=dcerpc.DCERPC_NCA_S_UNKNOWN_IF,
+                                fault_context_id=0)
+
+        self.do_single_request(call_id=1, ctx=ctx1, io=inq_if_ids)
+        conn2.do_single_request(call_id=1, ctx=ctx2, io=inq_if_ids)
+        conn2._disconnect("End of Test")
+        return
+
+    def _test_krb5_hdr_sign_delayed1(self, do_upgrade):
+        auth_type = dcerpc.DCERPC_AUTH_TYPE_KRB5
+        auth_level = dcerpc.DCERPC_AUTH_LEVEL_INTEGRITY
+        auth_context_id = 1
+
+        creds = self.get_user_creds()
+
+        abstract = samba.dcerpc.mgmt.abstract_syntax()
+        transfer = base.transfer_syntax_ndr()
+
+        tsf1_list = [transfer]


-- 
Samba Shared Repository



More information about the samba-cvs mailing list