[SCM] Samba Shared Repository - branch master updated

Ralph Böhme slow at samba.org
Thu Sep 26 16:36:02 UTC 2024


The branch, master has been updated
       via  93db1c7f3bb pylibsmb: Fix a typo
       via  342d45eddbd posix_ext: Pass unix file type through posix query_directory
       via  83794d08bc3 tests: Check that we return the posix type in query_directory
       via  529951ade5b smbd: Return file type in the posix create context response
       via  3b63170f506 tests: Check that posix extensions return the file type
       via  5a3fd9c0f5b idl: Rename smb3_posix_cc_info.posix_perms to posix_mode
       via  2182a12c447 pylibsmb: Add unix_mode_to_wire and wire_mode_to_unix
       via  bad2646ff01 libsmb: Move UNIX constants to smb3posix.idl
       via  57e23c92de1 idl: smb3posix.idl references NTTIME
       via  a9983bb6ed1 libsmb: Define to transfer file types via smb3 unix extensions
       via  03fe0d631dc smbd: Simplify unix_perms_from_wire()
       via  bf82e232d17 smbd: Factor out create/directory mode/mask logic
       via  2ba46540c97 smbd: Slightly simplify unix_perms_from_wire()
       via  6084914e22f libsmb: Move unix_filetype_to_wire() to libcli/smb
       via  4c9aa5fa15b libsmb: Rename and simplify unix_filetype_from_wire()
       via  977fb57d225 libsmb: Remove duplicate prototypes
       via  13a9417f0da smbd: Return reparse tag in smb311 unix query dir
       via  677a6125bc2 s3:rpc_client: let cli_rpc_pipe_open_schannel() use rpccli_connect_netlogon() for netlogon
       via  d1a3c74eb92 s3:rpc_client: pass remote_{name,sockaddr} to rpccli_connect_netlogon()
       via  10d34de8d32 s3:libnet: make use of rpccli_connect_netlogon() instead of reimplement the logic
       via  3e8747944f3 s3:rpc_client: let rpccli_connect_netlogon() reuse the existing connection
       via  bbea955c3df s3:rpc_client: allow rpccli_setup_netlogon_creds_locked() to return netlogon_pipe
       via  7a68a90ba86 s3:rpc_client: make rpccli_setup_netlogon_creds_locked() static
       via  14fe854ec53 s3:rpc_client: split out cli_rpc_pipe_client_auth_schannel()
       via  dd798084159 s3:rpc_client: add cli_rpc_pipe_client_prepare_alter() helper
       via  899c9f2d683 s3:rpc_client: make real use of rpc_client_{association,connection}
       via  fab0d27c5cf s3:rpc_client: let cli_rpc_pipe_open() use rpc_client_connection_np()
       via  7b9cef2a293 s3:rpc_client: convert rpc_pipe_open_np() to rpc_client_{association,connection}
       via  637a8e5270f s3:rpc_client: convert rpc_pipe_open_tcp_port() to rpc_client_{association,connection}
       via  338dd71cc39 s3:rpc_client: convert rpc_pipe_open_local_np() to rpc_client_{association,connection}
       via  5e9c2ebb37b s3:rpc_client: convert rpc_pipe_open_ncalrpc() to rpc_client_{association,connection}
       via  327fe920d07 s3:rpc_client: add struct rpc_client_{association,connection} and helpers
       via  5b3573135b2 s3:rpc_client: only pass the pipe_name to rpc_transport_np_init_send()
       via  ae88941c8a2 s3:rpc_client: make most of rpc_pipe_client internal struct members
       via  b874619b5ed s3:librpc/rpc: split out dcerpc_internal.h for struct pipe_auth_data
       via  8d666e18f8d s3:libsmb: make use of dcerpc_binding_get_abstract_syntax()
       via  fe94230f7eb s3:lib/netapi: make use of dcerpc_binding_get_abstract_syntax()
       via  e5c09e041d1 s3:rpcclient: make use of dcerpc_binding_handle_get_transport()
       via  504906e60f9 s3:winbindd: make use of dcerpc_binding_handle_get_transport()
       via  dc6d3c96c33 s3:rpc_client: remove references to rpc_pipe_client from wsp_cli.c
       via  344e45507e1 s3:rpc_client: remember rpc_pipe_client->print_username
       via  353af4b7055 s4:librpc: make all but dcerpc_pipe->binding_handle internal struct members
       via  382ece66063 s4:torture/rpc: make use of dcerpc_binding_handle_get_transport()
       via  1713ad96a42 s4:tortore/rpc: make use of dcerpc_binding_get_abstract_syntax() and dcerpc_binding_get_flags()
       via  7ed9867fa82 s4:torture/rpc: make use of dcerpc_binding_handle_get_binding() and dcerpc_binding_get_flags()
       via  a4b1845f4c5 s4:libnet: make use of dcerpc_binding_handle_get_transport()
       via  ad20c6656aa s4:libnet: make use of dcerpc_binding_handle_get_binding()
       via  9fe85a93539 librpc/rpc: un-const dcerpc_default_transport_endpoint()
       via  0e751215b34 librpc/rpc: add dcerpc_binding_handle_get_transport() helper function
       via  a038e7d8cf7 librpc/rpc: add dcerpc_binding_handle_get_binding()
       via  fffc6e0f37a s3:rpc_client: implement rpccli_bh_get_binding()
       via  0ef5d79eb6f s4:librpc/rpc: implement dcerpc_bh_get_binding()
       via  e8d59ca3361 s4:librpc/rpc: call dcerpc_binding_set_abstract_syntax after bind or alter context
       via  8c2aa56c700 s3:winbindd: implement wbint_bh_get_binding() in winbindd_dual_ndr.c
       via  a6034592faf s4:lib/messaging: implement irpc_bh_get_binding()
       via  66411b96b88 libcli/tstream_binding_handle: implement get_binding()
       via  1adf226e743 librpc/rpc: add get_binding() to dcerpc_binding_handle_ops
       via  72b79a771fd s3:rpc_client: header signing is negotiated per transport connection
       via  d406f9fffed s3:rpc_client: make use of struct samba_sockaddr in rpc_pipe_open_ncalrpc()
       via  61d38f70be3 s3:winbindd: cm_connect_lsa_tcp() doesn't need to check for NCACN_IP_TCP or LEVEL_INTEGRITY
       via  8dcbbebe56d s3:rpcclient: make use of dcerpc_binding_handle_auth_info()
       via  1a311df3d61 s3:rpc_client: the transport_session_key is per connection!
       via  3a3338bd184 s3:rpc_client: remove unused cli_get_session_key()
       via  f75189dee9d s3:rpcclient/cli_drsuapi: make use of dcerpc_binding_handle_auth_session_key()
       via  099c8d904ec s3:libnet_dssync: make use of dcerpc_binding_handle_auth_session_key()
       via  77da0914d5c s3:rpc_client: make use of dcerpc_binding_handle_transport_session_key()
       via  a14ac349dec s3:utils/net_rpc: make use of dcerpc_binding_handle_transport_session_key()
       via  56175a0947f s3:libnet_join: make use of dcerpc_binding_handle_transport_session_key()
       via  2cb726e92c8 s3:lib/netapi: make use of dcerpc_binding_handle_transport_session_key()
       via  bbe529a2f60 s4:torture/drs: make use of dcerpc_binding_handle_auth_session_key()
       via  38874d28404 s4:pyrpc: make use of dcerpc_binding_handle_auth_session_key()
       via  5d3faa86fd4 s4:py_net: make use of dcerpc_binding_handle_auth_session_key()
       via  bf888b59e34 s4:libnet: make use of dcerpc_binding_handle_auth_session_key() in libnet_become_dc.c
       via  51f5eefcd11 s4:drepl: make use of dcerpc_binding_handle_auth_session_key()
       via  af16ecece87 s3:rpc_client: add rpccli_bh_auth_session_key()
       via  64467157479 s4:librpc/rpc: add dcerpc_bh_auth_session_key()
       via  5e34173041e librpc/rpc: add dcerpc_binding_handle_auth_session_key()
       via  d9bf23f971d s4:librpc/rpc: remove unused dcerpc_fetch_session_key()
       via  4ccd2dd8a2f s4:torture/rpc: make use of dcerpc_binding_handle_transport_session_key()
       via  57905603e06 xss4:pyrpc: make use of dcerpc_binding_handle_transport_session_key()
       via  93e8d58736e s4:libnet: make use of dcerpc_binding_handle_transport_session_key() in libnet_passwd.c
       via  2d1c182bf51 s4:libnet: add struct dcerpc_binding_handle helper variables in libnet_passwd.c
       via  3cc6ddeb589 s4:librpc/rpc: remove unused dcerpc_transport_encrypted()
       via  9567d753ac0 s4:pyrpc: let py_iface_transport_encrypted() use dcerpc_binding_handle_transport_encrypted()
       via  5bb35cc7cca s3:rpc_client: add rpccli_bh_transport_session_key()
       via  9b50ab08c16 s4:librpc/rpc: add dcerpc_bh_transport_{encrypted,session_key}()
       via  3dc3f9cf1b6 librpc/rpc: add dcerpc_binding_handle_transport_{encrypted,session_key}()
       via  061267e0e4d s4:torture/rpc: avoid using DCERPC_NDR_REF_ALLOC in fsrvp.c
       via  136ee756fe3 s4:torture/rpc: remove useless usage of DCERPC_SIGN, DCERPC_SEAL
       via  b0be3c8af82 s4:torture/rpc: avoid checking p->last_fault_code in iremotewinspool*
       via  492f6a0eef7 librpc/rpc: map DCERPC_NCA_S_UNSUPPORTED_TYPE to NT_STATUS_RPC_UNSUPPORTED_TYPE
       via  722e93e4d9a librpc/rpc: map DCERPC_NCA_S_SERVER_TOO_BUSY to NT_STATUS_RPC_SERVER_TOO_BUSY
      from  b3bc2c950fd lib:ldb: Use tdb_traverse_read() in ldb_kv_index_sub_transaction_commit()

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


- Log -----------------------------------------------------------------
commit 93db1c7f3bb4209b5d69b879bc506ca72b635bd7
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Sep 24 10:59:23 2024 +0200

    pylibsmb: Fix a typo
    
    pylibsmb is supposed to be used only internally, at least I hope this
    has not made it into an API that is perceived to be publically used.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>
    
    Autobuild-User(master): Ralph Böhme <slow at samba.org>
    Autobuild-Date(master): Thu Sep 26 16:35:55 UTC 2024 on atb-devel-224

commit 342d45eddbde41b2ae27f8cd2299818da74d83a5
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Sep 24 09:50:57 2024 +0200

    posix_ext: Pass unix file type through posix query_directory
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 83794d08bc39c74caebebd8dee4cc3f207ed90c5
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Sep 23 19:37:15 2024 +0200

    tests: Check that we return the posix type in query_directory
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 529951ade5b64bf45e8d1fbc783c935b368099d7
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Sep 23 18:52:13 2024 +0200

    smbd: Return file type in the posix create context response
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 3b63170f506114a556fad31cba6a4f1922944e39
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Sep 23 18:23:43 2024 +0200

    tests: Check that posix extensions return the file type
    
    We'll need to check more, but this is a start
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5a3fd9c0f5b68e7f0decf6c5774732ae2cfca561
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Sep 23 13:55:30 2024 +0200

    idl: Rename smb3_posix_cc_info.posix_perms to posix_mode
    
    We'll stash the file type in there soon
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 2182a12c44752fd1e3cc9d76fe24745e795ca933
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Sep 21 02:42:16 2024 +0200

    pylibsmb: Add unix_mode_to_wire and wire_mode_to_unix
    
    Make the wire-representation of mode_t available for tests
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bad2646ff016fe8932fa8e18209337f361859b73
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Sep 21 01:22:54 2024 +0200

    libsmb: Move UNIX constants to smb3posix.idl
    
    Make them available to python
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 57e23c92de1afbd52354a8c0c84e0e3c5885b3fb
Author: Volker Lendecke <vl at samba.org>
Date:   Sat Sep 21 01:17:47 2024 +0200

    idl: smb3posix.idl references NTTIME
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit a9983bb6ed12e28b41d412f8ade13d1e9a66bee7
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 20 22:58:03 2024 +0200

    libsmb: Define to transfer file types via smb3 unix extensions
    
    Ride on the definitions of the SMB1 extensions, send the UNIX type in the 3
    bits above the permissions and extra (suid,sgid,sticky) bits
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 03fe0d631dcda88d0268941b6406240bdc91bc0e
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 20 21:49:23 2024 +0200

    smbd: Simplify unix_perms_from_wire()
    
    Remove enum perm_type: Only the _NEW_ defines were actually used, and
    this made the logic harder for me to understand than necessary.
    
    On the other hand, it forced you to think about what this is. Now you
    could theoretically miss applying masks. Still, I like it better with
    this patch.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bf82e232d176034f74ff5a12d0b00bccbb3a1008
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 20 21:33:33 2024 +0200

    smbd: Factor out create/directory mode/mask logic
    
    Don't write down that logic twice
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 2ba46540c9789f2498b8b5a3a434c3678936d25e
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 20 21:01:52 2024 +0200

    smbd: Slightly simplify unix_perms_from_wire()
    
    Avoid an else-branch, we return before
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 6084914e22feee578b2c28230dea4b65a9f98bfd
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 20 19:43:18 2024 +0200

    libsmb: Move unix_filetype_to_wire() to libcli/smb
    
    Mostly symmetry reasons, we have the opposite function here as well
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 4c9aa5fa15b13b5a2532f421b0584216a52875cb
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 20 19:36:25 2024 +0200

    libsmb: Rename and simplify unix_filetype_from_wire()
    
    Align naming with the perms functions, use the fact that the unix
    types are numbered the way they are
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 977fb57d225f3ed9398ce5e5db17ee31818071d8
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 20 19:21:08 2024 +0200

    libsmb: Remove duplicate prototypes
    
    libcli/smb/smb_util.h also has these
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 13a9417f0da3f17ecb0d7d834e5b375649d1bcef
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Sep 20 19:16:17 2024 +0200

    smbd: Return reparse tag in smb311 unix query dir
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 677a6125bc2ced693b4969f859e922c3740447e5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 07:41:09 2024 +0200

    s3:rpc_client: let cli_rpc_pipe_open_schannel() use rpccli_connect_netlogon() for netlogon
    
    This way we could reuse the connection already created...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit d1a3c74eb92d93b5964402efb5fd32c4b7ffaf33
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Sep 20 10:03:11 2024 +0200

    s3:rpc_client: pass remote_{name,sockaddr} to rpccli_connect_netlogon()
    
    Otherwise this can only work with NCACN_NP...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 10d34de8d32401b1bbc4806350854ea9517b29c2
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 07:33:40 2024 +0200

    s3:libnet: make use of rpccli_connect_netlogon() instead of reimplement the logic
    
    We only need the logic to setup a full netlogon connection once...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 3e8747944f320b2242d0a6476a37ad3d7128d31f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 07:30:45 2024 +0200

    s3:rpc_client: let rpccli_connect_netlogon() reuse the existing connection
    
    We either use security context multiplexing if negotiated and
    just do an alter_context on the existing connection or
    we create a new connection within the same association group.
    
    This is basically what windows clients are doing...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bbea955c3df91fdfcddf3742211485601dc3bdaf
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 05:35:01 2024 +0200

    s3:rpc_client: allow rpccli_setup_netlogon_creds_locked() to return netlogon_pipe
    
    Let the caller decide if it wants to keep the netlogon connection...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7a68a90ba86ae30d5fee530e7b795b0a6d305d0e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 06:46:29 2024 +0200

    s3:rpc_client: make rpccli_setup_netlogon_creds_locked() static
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 14fe854ec5379c422e805cde6ed6290f86ad66db
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 04:23:40 2024 +0200

    s3:rpc_client: split out cli_rpc_pipe_client_auth_schannel()
    
    This will allow us to use it without creating a new
    association group and transport connection.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit dd7980841593d18081216e6eb3e1b0fb9bd9c757
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 05:54:05 2024 +0200

    s3:rpc_client: add cli_rpc_pipe_client_prepare_alter() helper
    
    This will allow to do an alter context if security context multiplexing
    is negotiated or opening a new connection in the same association group.
    
    The old connection will be kept open, but not used anymore...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 899c9f2d6836c3b63acb6f261690c087e287afde
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Sep 15 18:26:07 2024 +0200

    s3:rpc_client: make real use of rpc_client_{association,connection}
    
    This will allow NCACN_NP and NCACN_IP_TCP to support
    alter_context with security context multiplexing
    or otherwise more than one connection per association group.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit fab0d27c5cf4885c31d7ed04ea69eda7992ea209
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 16 22:10:00 2024 +0200

    s3:rpc_client: let cli_rpc_pipe_open() use rpc_client_connection_np()
    
    This way cli_rpc_pipe_open() uses the same flow for
    rpc_client_connection_np() and rpc_pipe_open_tcp_port().
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7b9cef2a29333c6338520754927ee37027738010
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 16 22:09:34 2024 +0200

    s3:rpc_client: convert rpc_pipe_open_np() to rpc_client_{association,connection}
    
    This split out rpc_client_connection_np_send/recv, which will
    be used as shortcut in a later commit.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 637a8e5270fefaea5c61921d4b6ecfc4455a91aa
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 16 22:04:49 2024 +0200

    s3:rpc_client: convert rpc_pipe_open_tcp_port() to rpc_client_{association,connection}
    
    Note that cli_rpc_pipe_open() calls rpc_client_association_create()
    without a need for NCACN_NP, but that will change in the next commits...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 338dd71cc39195fcf25977b40b9772775972bc9f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 16 22:01:06 2024 +0200

    s3:rpc_client: convert rpc_pipe_open_local_np() to rpc_client_{association,connection}
    
    For rpc_pipe_open_local_np() it's not really important to abstract
    these out, but we want to have these for all...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5e9c2ebb37b276d7c90b4cc8397c4853f62aa189
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 16 21:56:50 2024 +0200

    s3:rpc_client: convert rpc_pipe_open_ncalrpc() to rpc_client_{association,connection}
    
    For rpc_pipe_open_ncalrpc() it's not really important to abstract these
    out, but we want to have these for all...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 327fe920d07e5bcbcaa0f09f276aad2b99d68235
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 16 21:56:50 2024 +0200

    s3:rpc_client: add struct rpc_client_{association,connection} and helpers
    
    They will be every useful for NCACN_NP and NCACN_IP_TCP,
    so that we can support alter_context or more than one connection
    per association group.
    
    We mark the helpers as _UNUSED_ for now in order to compile...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5b3573135b222755cd897d4539c0e5a89f7cdf5b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Sep 20 00:24:05 2024 +0200

    s3:rpc_client: only pass the pipe_name to rpc_transport_np_init_send()
    
    There's no need to have the ndr_interface_table at that stage...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ae88941c8a2e4e9c7d0deb9c39dcbb2f9fab0ebb
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 06:43:14 2024 +0200

    s3:rpc_client: make most of rpc_pipe_client internal struct members
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit b874619b5ed5d29a939f13d8064a47c8aca45b8c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 06:39:02 2024 +0200

    s3:librpc/rpc: split out dcerpc_internal.h for struct pipe_auth_data
    
    This should be anonymous for callers.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 8d666e18f8d254124967e7ac56fc5b171963c02f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 10:32:58 2024 +0200

    s3:libsmb: make use of dcerpc_binding_get_abstract_syntax()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit fe94230f7ebedfdcc5f087b442ee91d9c44b734f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 09:39:44 2024 +0200

    s3:lib/netapi: make use of dcerpc_binding_get_abstract_syntax()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit e5c09e041d1517649616d0d4b072422802a69f08
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 09:20:03 2024 +0200

    s3:rpcclient: make use of dcerpc_binding_handle_get_transport()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 504906e60f9a09518202397f0aa0782242dbe3bb
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 09:13:03 2024 +0200

    s3:winbindd: make use of dcerpc_binding_handle_get_transport()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit dc6d3c96c33797163ac578675b255872deca9b98
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 09:12:10 2024 +0200

    s3:rpc_client: remove references to rpc_pipe_client from wsp_cli.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 344e45507e122137c357fc177bb024f09fff8b01
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Sep 19 06:27:22 2024 +0200

    s3:rpc_client: remember rpc_pipe_client->print_username
    
    This is ugly, but it's less ugly than doing it deep
    inside of cli_spoolss.c and other code.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 353af4b70559be1665df345655af43a61177c710
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 23:35:20 2024 +0200

    s4:librpc: make all but dcerpc_pipe->binding_handle internal struct members
    
    We could use a dcerpc_internal.h for struct dcecli_security and
    struct dcecli_connection, but in struct dcerpc_pipe we still
    expose binding_handle and changing that would require way too
    much work for now...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 382ece66063bd8ef465e989857394e6f412df6d3
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 22:41:16 2024 +0200

    s4:torture/rpc: make use of dcerpc_binding_handle_get_transport()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 1713ad96a42e9245697a29d4899924cfbf636fc5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 23:27:17 2024 +0200

    s4:tortore/rpc: make use of dcerpc_binding_get_abstract_syntax() and dcerpc_binding_get_flags()
    
    We should not use p->syntax nor p->transfer_syntax...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 7ed9867fa82ae61a4522a724580900adce7e2bb5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 23:04:23 2024 +0200

    s4:torture/rpc: make use of dcerpc_binding_handle_get_binding() and dcerpc_binding_get_flags()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit a4b1845f4c5202afedd65b9d0db2866de75420a5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 23:34:44 2024 +0200

    s4:libnet: make use of dcerpc_binding_handle_get_transport()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit ad20c6656aa6798541b71b172534054c172d3aa5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 23:33:53 2024 +0200

    s4:libnet: make use of dcerpc_binding_handle_get_binding()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 9fe85a93539adb73ae59247d044746073915684a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Sep 20 00:00:31 2024 +0200

    librpc/rpc: un-const dcerpc_default_transport_endpoint()
    
    It returns an alloced string so it should not be marked as
    const...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 0e751215b349e10cc796065d6d01de35f52b41fd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 22:29:58 2024 +0200

    librpc/rpc: add dcerpc_binding_handle_get_transport() helper function
    
    This will allow callers to avoid the dcerpc_binding_handle_get_binding()
    dcerpc_binding_get_transport() dance...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit a038e7d8cf7a93ecf9a3e0c906f0d0db81ecee54
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 20:56:07 2024 +0200

    librpc/rpc: add dcerpc_binding_handle_get_binding()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit fffc6e0f37a2d6a6612e17ad6fa777ae6a8eb3b6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 22:21:23 2024 +0200

    s3:rpc_client: implement rpccli_bh_get_binding()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 0ef5d79eb6feefa2b7c5821ced98773d6d8fdd3a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 20:55:35 2024 +0200

    s4:librpc/rpc: implement dcerpc_bh_get_binding()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit e8d59ca3361bcdaf4db729eeb4a71f714bd9feda
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 23:25:34 2024 +0200

    s4:librpc/rpc: call dcerpc_binding_set_abstract_syntax after bind or alter context
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 8c2aa56c7003e690252dfb05f78fd083c0c13dab
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 20:52:41 2024 +0200

    s3:winbindd: implement wbint_bh_get_binding() in winbindd_dual_ndr.c
    
    We use NCACN_INTERNAL here too...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit a6034592faf0676532c97a79b9c542bcd2de9537
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 20:43:28 2024 +0200

    s4:lib/messaging: implement irpc_bh_get_binding()
    
    We just use NCACN_INTERNAL here...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 66411b96b88fbb7b405efa87015e4af1f2988fad
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 20:43:28 2024 +0200

    libcli/tstream_binding_handle: implement get_binding()
    
    We just create an dummy binding handle here
    as it's not really dcerpc...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 1adf226e74375b2fb0932380f13bf19d8d856ea4
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Sep 17 19:28:55 2024 +0200

    librpc/rpc: add get_binding() to dcerpc_binding_handle_ops
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 72b79a771fdbf54aa73b4c1b0372b9dffd81bfa6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Sep 15 17:58:53 2024 +0200

    s3:rpc_client: header signing is negotiated per transport connection
    
    All gensec backends support GENSEC_FEATURE_SIGN_PKT_HEADER, so there's
    no point in negotiating header signing based on the
    auth context used during the DCERPC Bind.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit d406f9fffede27220f4d589c8ab3c7210ca01b74
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sun Sep 15 05:35:30 2024 +0200

    s3:rpc_client: make use of struct samba_sockaddr in rpc_pipe_open_ncalrpc()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 61d38f70be378c59b42a6e20e7d49fea21255c6b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 18:54:43 2024 +0200

    s3:winbindd: cm_connect_lsa_tcp() doesn't need to check for NCACN_IP_TCP or LEVEL_INTEGRITY
    
    We only ever create domain->lsa_pipe_tcp with
    cli_rpc_pipe_open_schannel_with_creds() and hardcoded NCACN_IP_TCP.
    
    And schannel_update_internal returns an error with
    an auth level lower than DCERPC_AUTH_LEVEL_INTEGRITY.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 8dcbbebe56d3dad3650eca79322150e9d397e227
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 16:46:47 2024 +0200

    s3:rpcclient: make use of dcerpc_binding_handle_auth_info()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 1a311df3d61d3f3dbb986cc35470df6445802ff6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 15:59:29 2024 +0200

    s3:rpc_client: the transport_session_key is per connection!
    
    It's not per auth_context_id, currently there's no difference
    but that will change in future...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 3a3338bd184e3c51eab48fb1a03b1b3e749f2dc6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 15:58:44 2024 +0200

    s3:rpc_client: remove unused cli_get_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit f75189dee9db486d393cd17c25f5a84ce2d0b889
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 15:57:03 2024 +0200

    s3:rpcclient/cli_drsuapi: make use of dcerpc_binding_handle_auth_session_key()
    
    Note we only need to call this once per connection, not after
    each request...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 099c8d904ece0edbefecbaa51fa50256fd2ea7c0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 15:57:03 2024 +0200

    s3:libnet_dssync: make use of dcerpc_binding_handle_auth_session_key()
    
    Note we only need to call this once per connection, not after
    each request...
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 77da0914d5cccd7116ca3b6f75cb4d0cd0107239
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 15:55:30 2024 +0200

    s3:rpc_client: make use of dcerpc_binding_handle_transport_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit a14ac349deca11cda4159266cb3119fb3024999c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 15:54:25 2024 +0200

    s3:utils/net_rpc: make use of dcerpc_binding_handle_transport_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 56175a0947fbb56d151fca057cf9696d55ea5d82
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 15:52:29 2024 +0200

    s3:libnet_join: make use of dcerpc_binding_handle_transport_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 2cb726e92c819d60509419a33cd8da265e1c99e7
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 15:51:20 2024 +0200

    s3:lib/netapi: make use of dcerpc_binding_handle_transport_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bbe529a2f6090d2b9df0f361aee9b0a28523cefe
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 15:00:37 2024 +0200

    s4:torture/drs: make use of dcerpc_binding_handle_auth_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 38874d28404f49a075bab71fb7357d266173791a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 14:20:46 2024 +0200

    s4:pyrpc: make use of dcerpc_binding_handle_auth_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5d3faa86fd47d6bc887e182f3eb5a51144339549
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 14:19:55 2024 +0200

    s4:py_net: make use of dcerpc_binding_handle_auth_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit bf888b59e34169e1f6b9fd1d211cb8ff973cf333
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 14:16:42 2024 +0200

    s4:libnet: make use of dcerpc_binding_handle_auth_session_key() in libnet_become_dc.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 51f5eefcd119b5981281924a45380d99f9158a88
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 14:16:01 2024 +0200

    s4:drepl: make use of dcerpc_binding_handle_auth_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit af16ecece870846323956c37d3e15abe24e336fd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 09:55:20 2024 +0200

    s3:rpc_client: add rpccli_bh_auth_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 64467157479c04cb4bafa6c4ec19213009f0643f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 09:55:20 2024 +0200

    s4:librpc/rpc: add dcerpc_bh_auth_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5e34173041eb04e30f3f6f81a3269d621220b09c
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 09:55:20 2024 +0200

    librpc/rpc: add dcerpc_binding_handle_auth_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit d9bf23f971dd8f426424f05076e76be587d42087
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 14:32:22 2024 +0200

    s4:librpc/rpc: remove unused dcerpc_fetch_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 4ccd2dd8a2f78bcd53c047889b8043e8d95a6d55
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 14:31:58 2024 +0200

    s4:torture/rpc: make use of dcerpc_binding_handle_transport_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 57905603e066e2d1ca60268b1b1e8166868d60e5
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 14:20:46 2024 +0200

    xss4:pyrpc: make use of dcerpc_binding_handle_transport_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 93e8d58736e53d8d360ef2ee40f1619bd917c054
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 14:16:42 2024 +0200

    s4:libnet: make use of dcerpc_binding_handle_transport_session_key() in libnet_passwd.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 2d1c182bf512666606b8192b2021d571a47d2f58
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 14:16:42 2024 +0200

    s4:libnet: add struct dcerpc_binding_handle helper variables in libnet_passwd.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 3cc6ddeb589f0357c436d1caa70130f053ddcba0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 13:37:34 2024 +0200

    s4:librpc/rpc: remove unused dcerpc_transport_encrypted()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 9567d753ac0fcffb50f3710f3329334afb7595cd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 13:35:47 2024 +0200

    s4:pyrpc: let py_iface_transport_encrypted() use dcerpc_binding_handle_transport_encrypted()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 5bb35cc7cca101390e58256e9b38e31113211e4f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 09:55:20 2024 +0200

    s3:rpc_client: add rpccli_bh_transport_session_key()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 9b50ab08c16c197291835c8e66cd064ca0bb6579
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 09:55:20 2024 +0200

    s4:librpc/rpc: add dcerpc_bh_transport_{encrypted,session_key}()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 3dc3f9cf1b6fc47baea329863e31ff140cf89550
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Sep 14 09:55:20 2024 +0200

    librpc/rpc: add dcerpc_binding_handle_transport_{encrypted,session_key}()
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 061267e0e4de5c6379205a09376ec21374a87a3d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 06:27:30 2024 +0200

    s4:torture/rpc: avoid using DCERPC_NDR_REF_ALLOC in fsrvp.c
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 136ee756fe3a41f863c2d1d538ad029bfe54e1d1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 04:31:04 2024 +0200

    s4:torture/rpc: remove useless usage of DCERPC_SIGN, DCERPC_SEAL
    
    We already used DCERPC_AUTH_LEVEL_PRIVACY for the connection.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit b0be3c8af8240cfb7bc0b63fb7bf73f0f1655e4e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 22:42:17 2024 +0200

    s4:torture/rpc: avoid checking p->last_fault_code in iremotewinspool*
    
    Now that we check for NT_STATUS_RPC_UNSUPPORTED_TYPE, there's no
    need to check for DCERPC_NCA_S_UNSUPPORTED_TYPE.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 492f6a0eef7e7c64806ac9137c18a76fd116766d
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 22:37:14 2024 +0200

    librpc/rpc: map DCERPC_NCA_S_UNSUPPORTED_TYPE to NT_STATUS_RPC_UNSUPPORTED_TYPE
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

commit 722e93e4d9ace010e44cc041e6614ce5b71265d8
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Sep 18 22:36:26 2024 +0200

    librpc/rpc: map DCERPC_NCA_S_SERVER_TOO_BUSY to NT_STATUS_RPC_SERVER_TOO_BUSY
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Ralph Boehme <slow at samba.org>

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

Summary of changes:
 libcli/smb/smb_unix_ext.h                          |   42 +-
 libcli/smb/smb_util.h                              |    5 +-
 libcli/smb/util.c                                  |   70 +-
 .../tstream_binding_handle.c                       |   19 +
 librpc/idl/smb3posix.idl                           |   36 +-
 librpc/rpc/binding_handle.c                        |   44 +
 librpc/rpc/dcerpc_error.c                          |    4 +-
 librpc/rpc/dcerpc_util.c                           |    8 +-
 librpc/rpc/dcerpc_util.h                           |    6 +-
 librpc/rpc/rpc_common.h                            |   26 +
 python/samba/tests/smb3unix.py                     |   35 +-
 source3/lib/netapi/cm.c                            |   15 +-
 source3/lib/netapi/joindomain.c                    |   12 +-
 source3/lib/netapi/user.c                          |    6 +-
 source3/libnet/libnet_dssync.c                     |   17 +-
 source3/libnet/libnet_join.c                       |  127 +-
 source3/librpc/rpc/dcerpc.h                        |   17 +-
 source3/librpc/rpc/dcerpc_helpers.c                |    1 +
 .../librpc/rpc/dcerpc_internal.h                   |   22 +-
 source3/libsmb/cli_smb2_fnum.c                     |    2 +-
 source3/libsmb/clifile.c                           |    2 +-
 source3/libsmb/libsmb_xattr.c                      |   10 +-
 source3/libsmb/proto.h                             |    2 -
 source3/libsmb/pylibsmb.c                          |   50 +-
 source3/rpc_client/cli_netlogon.c                  |   76 +-
 source3/rpc_client/cli_netlogon.h                  |    9 +-
 source3/rpc_client/cli_pipe.c                      | 1616 ++++++++++++++------
 source3/rpc_client/cli_pipe.h                      |   16 +-
 source3/rpc_client/cli_pipe_schannel.c             |   17 +
 source3/rpc_client/cli_spoolss.c                   |    6 +-
 source3/rpc_client/rpc_client.h                    |   39 +-
 source3/rpc_client/rpc_transport.h                 |    2 +-
 source3/rpc_client/rpc_transport_np.c              |    5 +-
 source3/rpc_client/wsp_cli.c                       |   71 +-
 source3/rpcclient/cmd_drsuapi.c                    |   15 +-
 source3/rpcclient/cmd_iremotewinspool.c            |    3 +-
 source3/rpcclient/cmd_lsarpc.c                     |   27 +-
 source3/rpcclient/cmd_samr.c                       |    3 +-
 source3/rpcclient/rpcclient.c                      |   25 +-
 source3/smbd/dosmode.c                             |   25 +-
 source3/smbd/open.c                                |   14 +-
 source3/smbd/proto.h                               |   11 +-
 source3/smbd/smb1_trans2.c                         |   43 +-
 source3/smbd/smb2_create.c                         |    3 +-
 source3/smbd/smb2_posix.c                          |    2 +-
 source3/smbd/smb2_trans2.c                         |   76 +-
 source3/utils/net_rpc.c                            |    6 +-
 source3/utils/net_rpc_printer.c                    |    3 +-
 source3/utils/net_rpc_trust.c                      |    3 +-
 source3/winbindd/winbindd_cm.c                     |   25 +-
 source3/winbindd/winbindd_dual_ndr.c               |   47 +-
 source3/winbindd/winbindd_msrpc.c                  |    4 +-
 source3/winbindd/winbindd_rpc.c                    |    7 +-
 source4/dsdb/repl/drepl_out_helpers.c              |    7 +-
 source4/lib/messaging/messaging.c                  |   44 +-
 source4/libnet/libnet_become_dc.c                  |   29 +-
 source4/libnet/libnet_join.c                       |    3 +-
 source4/libnet/libnet_passwd.c                     |   55 +-
 source4/libnet/libnet_rpc.c                        |   27 +-
 source4/libnet/py_net.c                            |   12 +-
 source4/librpc/rpc/dcerpc.c                        |  121 ++
 source4/librpc/rpc/dcerpc.h                        |   22 +-
 source4/librpc/rpc/dcerpc_auth.c                   |    2 +
 source4/librpc/rpc/dcerpc_connect.c                |    1 +
 source4/librpc/rpc/dcerpc_roh.c                    |    2 +
 source4/librpc/rpc/dcerpc_schannel.c               |    2 +
 source4/librpc/rpc/dcerpc_secondary.c              |    1 +
 source4/librpc/rpc/dcerpc_smb.c                    |    2 +
 source4/librpc/rpc/dcerpc_sock.c                   |    2 +
 source4/librpc/rpc/dcerpc_util.c                   |   34 +-
 source4/librpc/rpc/pyrpc.c                         |   50 +-
 source4/librpc/rpc/pyrpc_util.c                    |    2 +
 source4/rpc_server/remote/dcesrv_remote.c          |    2 +
 source4/torture/drs/rpc/dssync.c                   |    5 +-
 source4/torture/drs/rpc/msds_intid.c               |    5 +-
 source4/torture/rpc/alter_context.c                |   36 +-
 source4/torture/rpc/backupkey.c                    |    9 +-
 source4/torture/rpc/bind.c                         |    4 +-
 source4/torture/rpc/drsuapi.c                      |    5 +-
 source4/torture/rpc/dsgetinfo.c                    |    4 +-
 source4/torture/rpc/echo.c                         |   17 +-
 source4/torture/rpc/forest_trust.c                 |    5 +-
 source4/torture/rpc/fsrvp.c                        |   72 +-
 source4/torture/rpc/handles.c                      |   28 +-
 source4/torture/rpc/iremotewinspool.c              |   22 +-
 source4/torture/rpc/iremotewinspool_common.c       |    4 -
 source4/torture/rpc/iremotewinspool_common.h       |    1 -
 source4/torture/rpc/lsa.c                          |   22 +-
 source4/torture/rpc/lsa_lookup.c                   |    5 +-
 source4/torture/rpc/netlogon.c                     |   30 +-
 source4/torture/rpc/samba3rpc.c                    |   19 +-
 source4/torture/rpc/samr.c                         |   24 +-
 source4/torture/rpc/samsync.c                      |    6 +-
 source4/torture/rpc/session_key.c                  |    4 +-
 source4/torture/rpc/spoolss.c                      |    4 +-
 source4/torture/rpc/testjoin.c                     |    2 +-
 source4/torture/rpc/winreg.c                       |    8 +-
 source4/torture/rpc/wkssvc.c                       |    4 +-
 98 files changed, 2382 insertions(+), 1160 deletions(-)
 copy source4/echo_server/echo_server.h => source3/librpc/rpc/dcerpc_internal.h (64%)


Changeset truncated at 500 lines:

diff --git a/libcli/smb/smb_unix_ext.h b/libcli/smb/smb_unix_ext.h
index 2f2357d8acf..ca0470672ab 100644
--- a/libcli/smb/smb_unix_ext.h
+++ b/libcli/smb/smb_unix_ext.h
@@ -24,6 +24,9 @@
 #ifndef __SMB_UNIX_EXT_H__
 #define __SMB_UNIX_EXT_H__
 
+#include <replace.h>
+#include "librpc/gen_ndr/smb3posix.h"
+
 /* UNIX CIFS Extensions - created by HP */
 /*
  * UNIX CIFS Extensions have the range 0x200 - 0x2FF reserved.
@@ -80,45 +83,6 @@ Offset Size         Name
 
 #define SMB_FILE_UNIX_BASIC_SIZE 100
 
-/* UNIX filetype mappings. */
-
-#define UNIX_TYPE_FILE 0
-#define UNIX_TYPE_DIR 1
-#define UNIX_TYPE_SYMLINK 2
-#define UNIX_TYPE_CHARDEV 3
-#define UNIX_TYPE_BLKDEV 4
-#define UNIX_TYPE_FIFO 5
-#define UNIX_TYPE_SOCKET 6
-#define UNIX_TYPE_UNKNOWN 0xFFFFFFFF
-
-/*
- * Oh this is fun. "Standard UNIX permissions" has no
- * meaning in POSIX. We need to define the mapping onto
- * and off the wire as this was not done in the original HP
- * spec. JRA.
- */
-
-#define UNIX_X_OTH			0000001
-#define UNIX_W_OTH			0000002
-#define UNIX_R_OTH			0000004
-#define UNIX_X_GRP			0000010
-#define UNIX_W_GRP                      0000020
-#define UNIX_R_GRP                      0000040
-#define UNIX_X_USR                      0000100
-#define UNIX_W_USR                      0000200
-#define UNIX_R_USR                      0000400
-#define UNIX_STICKY                     0001000
-#define UNIX_SET_GID                    0002000
-#define UNIX_SET_UID                    0004000
-
-/* Masks for the above */
-#define UNIX_OTH_MASK                   0000007
-#define UNIX_GRP_MASK                   0000070
-#define UNIX_USR_MASK                   0000700
-#define UNIX_PERM_MASK                  0000777
-#define UNIX_EXTRA_MASK                 0007000
-#define UNIX_ALL_MASK                   0007777
-
 /* Flags for chflags (CIFS_UNIX_EXTATTR_CAP capability) and
  * SMB_QUERY_FILE_UNIX_INFO2.
  */
diff --git a/libcli/smb/smb_util.h b/libcli/smb/smb_util.h
index f2cc0fba9cc..cd91e42f30a 100644
--- a/libcli/smb/smb_util.h
+++ b/libcli/smb/smb_util.h
@@ -32,7 +32,10 @@ const char *smb_protocol_types_string(enum protocol_types protocol);
 char *attrib_string(TALLOC_CTX *mem_ctx, uint32_t attrib);
 uint32_t unix_perms_to_wire(mode_t perms);
 mode_t wire_perms_to_unix(uint32_t perms);
-mode_t unix_filetype_from_wire(uint32_t wire_type);
+mode_t wire_filetype_to_unix(uint32_t wire_type);
+uint32_t unix_filetype_to_wire(mode_t mode);
+mode_t wire_mode_to_unix(uint32_t wire);
+uint32_t unix_mode_to_wire(mode_t mode);
 
 bool smb_buffer_oob(uint32_t bufsize, uint32_t offset, uint32_t length);
 
diff --git a/libcli/smb/util.c b/libcli/smb/util.c
index baae532b55a..a864a1078cd 100644
--- a/libcli/smb/util.c
+++ b/libcli/smb/util.c
@@ -162,40 +162,50 @@ mode_t wire_perms_to_unix(uint32_t perms)
         return ret;
 }
 
+
 /****************************************************************************
- Return the file type from the wire filetype for UNIX extensions.
-****************************************************************************/
+ * Return the file type from the wire filetype for UNIX extensions.
+ *
+ * This uses the fact that the unix file types are numbered from
+ * FILE=0 to SOCKET=6. This is an accepted protocol element that will
+ * never change.
+ ****************************************************************************/
 
-mode_t unix_filetype_from_wire(uint32_t wire_type)
+static mode_t unix_filetypes[] =
+	{S_IFREG, S_IFDIR, S_IFLNK, S_IFCHR, S_IFBLK, S_IFIFO, S_IFSOCK};
+
+mode_t wire_filetype_to_unix(uint32_t wire_type)
 {
-	switch (wire_type) {
-		case UNIX_TYPE_FILE:
-			return S_IFREG;
-		case UNIX_TYPE_DIR:
-			return S_IFDIR;
-#ifdef S_IFLNK
-		case UNIX_TYPE_SYMLINK:
-			return S_IFLNK;
-#endif
-#ifdef S_IFCHR
-		case UNIX_TYPE_CHARDEV:
-			return S_IFCHR;
-#endif
-#ifdef S_IFBLK
-		case UNIX_TYPE_BLKDEV:
-			return S_IFBLK;
-#endif
-#ifdef S_IFIFO
-		case UNIX_TYPE_FIFO:
-			return S_IFIFO;
-#endif
-#ifdef S_IFSOCK
-		case UNIX_TYPE_SOCKET:
-			return S_IFSOCK;
-#endif
-		default:
-			return (mode_t)0;
+	if (wire_type > ARRAY_SIZE(unix_filetypes)) {
+		return (mode_t)0;
+	}
+	return unix_filetypes[wire_type];
+}
+
+uint32_t unix_filetype_to_wire(mode_t mode)
+{
+	mode_t type = mode & S_IFMT;
+	size_t i;
+
+	for (i = 0; i < ARRAY_SIZE(unix_filetypes); i++) {
+		if (type == unix_filetypes[i]) {
+			return i;
+		}
 	}
+	return UNIX_TYPE_UNKNOWN;
+}
+
+mode_t wire_mode_to_unix(uint32_t wire)
+{
+	uint32_t wire_type = (wire & UNIX_FILETYPE_MASK) >>
+			     UNIX_FILETYPE_SHIFT;
+	return wire_perms_to_unix(wire) | wire_filetype_to_unix(wire_type);
+}
+
+uint32_t unix_mode_to_wire(mode_t mode)
+{
+	uint32_t wire_type = unix_filetype_to_wire(mode);
+	return unix_perms_to_wire(mode) | (wire_type << UNIX_FILETYPE_SHIFT);
 }
 
 bool smb_buffer_oob(uint32_t bufsize, uint32_t offset, uint32_t length)
diff --git a/libcli/tstream_binding_handle/tstream_binding_handle.c b/libcli/tstream_binding_handle/tstream_binding_handle.c
index 76f54a7f338..672fd3b89c6 100644
--- a/libcli/tstream_binding_handle/tstream_binding_handle.c
+++ b/libcli/tstream_binding_handle/tstream_binding_handle.c
@@ -35,8 +35,17 @@ struct tstream_bh_state {
 	size_t call_initial_read_size;
 	tstream_read_pdu_blob_full_fn_t *complete_pdu_fn;
 	void *complete_pdu_fn_private;
+	const struct dcerpc_binding *binding;
 };
 
+static const struct dcerpc_binding *tstream_bh_get_binding(struct dcerpc_binding_handle *h)
+{
+	struct tstream_bh_state *hs = dcerpc_binding_handle_data(
+		h, struct tstream_bh_state);
+
+	return hs->binding;
+}
+
 static bool tstream_bh_is_connected(struct dcerpc_binding_handle *h)
 {
 	struct tstream_bh_state *hs = dcerpc_binding_handle_data(
@@ -290,6 +299,7 @@ static NTSTATUS tstream_bh_call_recv(struct tevent_req *req,
 
 static const struct dcerpc_binding_handle_ops tstream_bh_ops = {
 	.name			= "tstream_binding_handle",
+	.get_binding		= tstream_bh_get_binding,
 	.is_connected		= tstream_bh_is_connected,
 	.set_timeout		= tstream_bh_set_timeout,
 	.raw_call_send		= tstream_bh_call_send,
@@ -309,6 +319,8 @@ struct dcerpc_binding_handle *tstream_binding_handle_create(
 {
 	struct dcerpc_binding_handle *h = NULL;
 	struct tstream_bh_state *hs = NULL;
+	struct dcerpc_binding *b = NULL;
+	NTSTATUS status;
 
 	h = dcerpc_binding_handle_create(mem_ctx,
 					 &tstream_bh_ops,
@@ -333,6 +345,13 @@ struct dcerpc_binding_handle *tstream_binding_handle_create(
 		return NULL;
 	}
 
+	status = dcerpc_parse_binding(hs, "", &b);
+	if (!NT_STATUS_IS_OK(status)) {
+		TALLOC_FREE(h);
+		return NULL;
+	}
+	hs->binding = b;
+
 	if (max_data > 0) {
 		tstream_smbXcli_np_set_max_data(hs->stream, max_data);
 	}
diff --git a/librpc/idl/smb3posix.idl b/librpc/idl/smb3posix.idl
index e75922963a2..e07d4c1f46f 100644
--- a/librpc/idl/smb3posix.idl
+++ b/librpc/idl/smb3posix.idl
@@ -8,14 +8,46 @@ import "security.idl";
 
 [
   version(0.0),
-  pointer_default(unique)
+  pointer_default(unique),
+  headerhelper("../lib/util/time.h")
 ]
 interface smb3posix
 {
+	const int UNIX_TYPE_FILE		= 0;
+	const int UNIX_TYPE_DIR			= 1;
+	const int UNIX_TYPE_SYMLINK		= 2;
+	const int UNIX_TYPE_CHARDEV		= 3;
+	const int UNIX_TYPE_BLKDEV		= 4;
+	const int UNIX_TYPE_FIFO		= 5;
+	const int UNIX_TYPE_SOCKET		= 6;
+	const int UNIX_TYPE_UNKNOWN		= 0xFFFFFFFF;
+
+	const int UNIX_X_OTH			= 0000001;
+	const int UNIX_W_OTH			= 0000002;
+	const int UNIX_R_OTH			= 0000004;
+	const int UNIX_X_GRP			= 0000010;
+	const int UNIX_W_GRP			= 0000020;
+	const int UNIX_R_GRP			= 0000040;
+	const int UNIX_X_USR			= 0000100;
+	const int UNIX_W_USR			= 0000200;
+	const int UNIX_R_USR			= 0000400;
+	const int UNIX_STICKY			= 0001000;
+	const int UNIX_SET_GID			= 0002000;
+	const int UNIX_SET_UID			= 0004000;
+
+	const int UNIX_OTH_MASK			= 0000007;
+	const int UNIX_GRP_MASK			= 0000070;
+	const int UNIX_USR_MASK			= 0000700;
+	const int UNIX_PERM_MASK		= 0000777;
+	const int UNIX_EXTRA_MASK		= 0007000;
+	const int UNIX_FILETYPE_MASK		= 0070000;
+	const int UNIX_FILETYPE_SHIFT		= 12;
+	const int UNIX_ALL_MASK			= 0077777;
+
 	typedef [public,flag(NDR_NOALIGN)] struct {
 		uint32 nlinks;
 		uint32 reparse_tag;
-		uint32 posix_perms;
+		uint32 posix_mode;
 		dom_sid owner;
 		dom_sid group;
 	} smb3_posix_cc_info;
diff --git a/librpc/rpc/binding_handle.c b/librpc/rpc/binding_handle.c
index 41675e10360..8ace6722a43 100644
--- a/librpc/rpc/binding_handle.c
+++ b/librpc/rpc/binding_handle.c
@@ -87,6 +87,17 @@ void dcerpc_binding_handle_set_sync_ev(struct dcerpc_binding_handle *h,
 	h->sync_ev = ev;
 }
 
+const struct dcerpc_binding *dcerpc_binding_handle_get_binding(struct dcerpc_binding_handle *h)
+{
+	return h->ops->get_binding(h);
+}
+
+enum dcerpc_transport_t dcerpc_binding_handle_get_transport(struct dcerpc_binding_handle *h)
+{
+	const struct dcerpc_binding *b = dcerpc_binding_handle_get_binding(h);
+	return dcerpc_binding_get_transport(b);
+}
+
 bool dcerpc_binding_handle_is_connected(struct dcerpc_binding_handle *h)
 {
 	return h->ops->is_connected(h);
@@ -98,6 +109,27 @@ uint32_t dcerpc_binding_handle_set_timeout(struct dcerpc_binding_handle *h,
 	return h->ops->set_timeout(h, timeout);
 }
 
+bool dcerpc_binding_handle_transport_encrypted(struct dcerpc_binding_handle *h)
+{
+	if (h->ops->transport_encrypted == NULL) {
+		return false;
+	}
+
+	return h->ops->transport_encrypted(h);
+}
+
+NTSTATUS dcerpc_binding_handle_transport_session_key(
+		struct dcerpc_binding_handle *h,
+		TALLOC_CTX *mem_ctx,
+		DATA_BLOB *session_key)
+{
+	if (h->ops->transport_session_key == NULL) {
+		return NT_STATUS_NO_USER_SESSION_KEY;
+	}
+
+	return h->ops->transport_session_key(h, mem_ctx, session_key);
+}
+
 void dcerpc_binding_handle_auth_info(struct dcerpc_binding_handle *h,
 				     enum dcerpc_AuthType *auth_type,
 				     enum dcerpc_AuthLevel *auth_level)
@@ -123,6 +155,18 @@ void dcerpc_binding_handle_auth_info(struct dcerpc_binding_handle *h,
 	h->ops->auth_info(h, auth_type, auth_level);
 }
 
+NTSTATUS dcerpc_binding_handle_auth_session_key(
+		struct dcerpc_binding_handle *h,
+		TALLOC_CTX *mem_ctx,
+		DATA_BLOB *session_key)
+{
+	if (h->ops->auth_session_key == NULL) {
+		return NT_STATUS_NO_USER_SESSION_KEY;
+	}
+
+	return h->ops->auth_session_key(h, mem_ctx, session_key);
+}
+
 struct dcerpc_binding_handle_raw_call_state {
 	const struct dcerpc_binding_handle_ops *ops;
 	uint8_t *out_data;
diff --git a/librpc/rpc/dcerpc_error.c b/librpc/rpc/dcerpc_error.c
index d5b5b66ab6a..26c96336615 100644
--- a/librpc/rpc/dcerpc_error.c
+++ b/librpc/rpc/dcerpc_error.c
@@ -40,9 +40,9 @@ static const struct dcerpc_fault_table dcerpc_faults[] =
 	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_YOU_CRASHED),
 	_FAULT_STR(DCERPC_NCA_S_PROTO_ERROR, NT_STATUS_RPC_PROTOCOL_ERROR),
 	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_OUT_ARGS_TOO_BIG),
-	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_SERVER_TOO_BUSY),
+	_FAULT_STR(DCERPC_NCA_S_SERVER_TOO_BUSY, NT_STATUS_RPC_SERVER_TOO_BUSY),
 	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_STRING_TOO_LARGE),
-	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_UNSUPPORTED_TYPE),
+	_FAULT_STR(DCERPC_NCA_S_UNSUPPORTED_TYPE, NT_STATUS_RPC_UNSUPPORTED_TYPE),
 	_FAULT_STR_NO_NT_MAPPING(DCERPC_NCA_S_FAULT_ADDR_ERROR),
 	_FAULT_STR(DCERPC_NCA_S_FAULT_FP_DIV_BY_ZERO, NT_STATUS_RPC_FP_DIV_ZERO),
 	_FAULT_STR(DCERPC_NCA_S_FAULT_FP_UNDERFLOW, NT_STATUS_RPC_FP_UNDERFLOW),
diff --git a/librpc/rpc/dcerpc_util.c b/librpc/rpc/dcerpc_util.c
index 66b38a4acf2..75a49323078 100644
--- a/librpc/rpc/dcerpc_util.c
+++ b/librpc/rpc/dcerpc_util.c
@@ -660,13 +660,13 @@ NTSTATUS dcerpc_read_ncacn_packet_recv(struct tevent_req *req,
 	return NT_STATUS_OK;
 }
 
-const char *dcerpc_default_transport_endpoint(TALLOC_CTX *mem_ctx,
-					      enum dcerpc_transport_t transport,
-					      const struct ndr_interface_table *table)
+char *dcerpc_default_transport_endpoint(TALLOC_CTX *mem_ctx,
+					enum dcerpc_transport_t transport,
+					const struct ndr_interface_table *table)
 {
 	NTSTATUS status;
 	const char *p = NULL;
-	const char *endpoint = NULL;
+	char *endpoint = NULL;
 	uint32_t i;
 	struct dcerpc_binding *default_binding = NULL;
 	TALLOC_CTX *frame = talloc_stackframe();
diff --git a/librpc/rpc/dcerpc_util.h b/librpc/rpc/dcerpc_util.h
index 4e49e3e8572..86c254e539c 100644
--- a/librpc/rpc/dcerpc_util.h
+++ b/librpc/rpc/dcerpc_util.h
@@ -36,9 +36,9 @@ 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);
+char *dcerpc_default_transport_endpoint(TALLOC_CTX *mem_ctx,
+					enum dcerpc_transport_t transport,
+					const struct ndr_interface_table *table);
 
 NTSTATUS dcerpc_pull_ncacn_packet(TALLOC_CTX *mem_ctx,
 				  const DATA_BLOB *blob,
diff --git a/librpc/rpc/rpc_common.h b/librpc/rpc/rpc_common.h
index 76557101dcd..493c3137126 100644
--- a/librpc/rpc/rpc_common.h
+++ b/librpc/rpc/rpc_common.h
@@ -172,13 +172,23 @@ enum dcerpc_transport_t dcerpc_transport_by_tower(const struct epm_tower *tower)
 struct dcerpc_binding_handle_ops {
 	const char *name;
 
+	const struct dcerpc_binding *(*get_binding)(struct dcerpc_binding_handle *h);
+
 	bool (*is_connected)(struct dcerpc_binding_handle *h);
 	uint32_t (*set_timeout)(struct dcerpc_binding_handle *h,
 				uint32_t timeout);
 
+	bool (*transport_encrypted)(struct dcerpc_binding_handle *h);
+	NTSTATUS (*transport_session_key)(struct dcerpc_binding_handle *h,
+					  TALLOC_CTX *mem_ctx,
+					  DATA_BLOB *session_key);
+
 	void (*auth_info)(struct dcerpc_binding_handle *h,
 			  enum dcerpc_AuthType *auth_type,
 			  enum dcerpc_AuthLevel *auth_level);
+	NTSTATUS (*auth_session_key)(struct dcerpc_binding_handle *h,
+				     TALLOC_CTX *mem_ctx,
+				     DATA_BLOB *session_key);
 
 	struct tevent_req *(*raw_call_send)(TALLOC_CTX *mem_ctx,
 					    struct tevent_context *ev,
@@ -245,15 +255,31 @@ void *_dcerpc_binding_handle_data(struct dcerpc_binding_handle *h);
 _DEPRECATED_ void dcerpc_binding_handle_set_sync_ev(struct dcerpc_binding_handle *h,
 						    struct tevent_context *ev);
 
+const struct dcerpc_binding *dcerpc_binding_handle_get_binding(struct dcerpc_binding_handle *h);
+
+enum dcerpc_transport_t dcerpc_binding_handle_get_transport(struct dcerpc_binding_handle *h);
+
 bool dcerpc_binding_handle_is_connected(struct dcerpc_binding_handle *h);
 
 uint32_t dcerpc_binding_handle_set_timeout(struct dcerpc_binding_handle *h,
 					   uint32_t timeout);
 
+bool dcerpc_binding_handle_transport_encrypted(struct dcerpc_binding_handle *h);
+
+NTSTATUS dcerpc_binding_handle_transport_session_key(
+		struct dcerpc_binding_handle *h,
+		TALLOC_CTX *mem_ctx,
+		DATA_BLOB *session_key);
+
 void dcerpc_binding_handle_auth_info(struct dcerpc_binding_handle *h,
 				     enum dcerpc_AuthType *auth_type,
 				     enum dcerpc_AuthLevel *auth_level);
 
+NTSTATUS dcerpc_binding_handle_auth_session_key(
+		struct dcerpc_binding_handle *h,
+		TALLOC_CTX *mem_ctx,
+		DATA_BLOB *session_key);
+
 struct tevent_req *dcerpc_binding_handle_raw_call_send(TALLOC_CTX *mem_ctx,
 						struct tevent_context *ev,
 						struct dcerpc_binding_handle *h,
diff --git a/python/samba/tests/smb3unix.py b/python/samba/tests/smb3unix.py
index 66aa98b5aa9..d8e8783670a 100644
--- a/python/samba/tests/smb3unix.py
+++ b/python/samba/tests/smb3unix.py
@@ -26,6 +26,7 @@ from samba.dcerpc.security import dom_sid
 from samba import reparse_symlink
 import os
 import subprocess
+import stat
 
 def posix_context(mode):
     return (libsmb.SMB2_CREATE_TAG_POSIX, mode.to_bytes(4, 'little'))
@@ -69,6 +70,13 @@ class Smb3UnixTests(samba.tests.libsmb.LibsmbTests):
 
         return (conn1, conn2)
 
+    def wire_mode_to_unix(self, wire):
+        mode = libsmb.wire_mode_to_unix(wire)
+        type = stat.S_IFMT(mode)
+        perms = mode & (stat.S_IRWXU|stat.S_IRWXG|stat.S_IRWXO|
+                        stat.S_ISUID|stat.S_ISGID|stat.S_ISVTX)
+        return (type, perms)
+
     def test_negotiate_context_posix(self):
         c = libsmb.Conn(
             self.server_ip,
@@ -289,25 +297,36 @@ class Smb3UnixTests(samba.tests.libsmb.LibsmbTests):
             for fname,perm in test_files.items():
                 self.assertIn(get_string(fname), found_files.keys(),
                               'Test file not found')
-                self.assertEqual(test_files[fname], found_files[fname]['perms'],
+
+                found_unixmode = found_files[fname]['perms']
+                found_perms = found_unixmode & (stat.S_IRWXU|
+                                                stat.S_IRWXG|
+                                                stat.S_IRWXO|
+                                                stat.S_ISUID|
+                                                stat.S_ISGID|
+                                                stat.S_ISVTX)
+
+                self.assertEqual(test_files[fname], found_perms,
                                  'Requested %04o, Received %04o' % \
-                                         (test_files[fname], found_files[fname]['perms']))
+                                 (test_files[fname], found_perms))
 
                 self.assertEqual(found_files[fname]['reparse_tag'],
                                  libsmb.IO_REPARSE_TAG_RESERVED_ZERO)
-                self.assertEqual(found_files[fname]['perms'], perm)
+                self.assertEqual(found_perms, perm)


-- 
Samba Shared Repository



More information about the samba-cvs mailing list