Andreas Schneider
62aa769667
s3:rpc_client: Add remote name and socket to cli_rpc_pipe_open_bind_schannel()
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14767
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-02 13:59:31 +00:00
Günther Deschner
c7ead12928
s3:rpc_client: Pass remote name and socket to cli_rpc_pipe_open_with_creds()
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14767
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-02 13:59:31 +00:00
Günther Deschner
bb3e0ce8fc
s3:rpc_client: Pass remote name and socket to cli_rpc_pipe_open_noauth_transport()
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14767
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-02 13:59:31 +00:00
Günther Deschner
016429acaf
s3:rpc_client: Pass remote name and socket to cli_rpc_pipe_open()
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14767
Pair-Programmed-With: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-02 13:59:31 +00:00
Andreas Schneider
b3bf5bbaf8
s3:rpc_client: Remove trailing white spaces from cli_pipe.c
...
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14767
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2021-12-02 13:59:31 +00:00
Volker Lendecke
d244d16ca9
rpc_client: Align cli_api_pipe_send() with tevent_req() conventions
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
17b6c25bda
rpc_client: Use tevent_req_nterror() properly in cli_api_pipe
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
730e2903b2
rpc_client: Make rpc_pipe_open_tcp() static
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
965ebcae76
rpc_client: Simplify get_complete_frag_send()
...
tevent_req_oom() and tevent_req_nomem() instead of explicit
NT_STATUS_NO_MEMORY; do an early return if done.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
7df7bf44e5
rpc_client: Simplify get_complete_frag_got_header()
...
tevent_req_nterror() returns a bool, no separate check required
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
39c0e3ea2e
rpc_client: Simplify get_complete_frag_got_header()
...
Use tevent_req_oom()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
68a3e478d1
rpc_client: Simplify get_complete_frag_got_rest()
...
tevent_req_simple_finish_ntstatus() is made precisely for this simple
case where we just pass on a subreq's NTSTATUS
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
f8c828b87d
rpc_client: Simplify rpc_api_pipe_auth3_done()
...
Use tevent_req_simple_finish_ntstatus()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
dc4371f7d6
rpc_client: Avoid casts
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
56328aef8e
rpc_client: Use tevent_req_nterror() properly
...
Signed-off-by: Volker Lendecke <vl@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
d11688059f
rpc_client: Simplify rpccli_bh_disconnect_recv()
...
Use tevent_req_simple_recv_ntstatus()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
8c7b41063c
rpc_client: Adapt rpc_write_send() to tevent_req conventions
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
398e38400d
rpc_client: Adapt rpc_api_pipe_send() to recent coding conventions
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:29 +00:00
Volker Lendecke
e8dda8421b
rpc_client: Use ndr_syntax_id_equal() in check_bind_response()
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:28 +00:00
Volker Lendecke
89a0f256e2
rpc_client: Use struct init/assignment
...
Don't leave structures/unions partially uninitialized
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:28 +00:00
Volker Lendecke
a3f7f279ff
rpc_client: Adapt rpc_pipe_bind_send() to talloc_req conventions
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:28 +00:00
Volker Lendecke
c4aea464bb
rpc_client: Avoid ZERO_STRUCTP in prepare_verification_trailer()
...
Direct struct assignments are easier to read for me, but YMMV.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:28 +00:00
Volker Lendecke
2a4e785040
rpc_client: Adapt rpc_api_pipe_req_send() to talloc_req conventions
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:28 +00:00
Volker Lendecke
106c04689e
rpc_client: Slightly simplify rpc_api_pipe_req_send()
...
tevent_req_create() zero-initializes "state"
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:28 +00:00
Volker Lendecke
b0c065773e
rpc_client: Early TALLOC_FREE() in prepare_verification_trailer()
...
We don't need "t" from here on anymore
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:28 +00:00
Volker Lendecke
3e3cc4eae9
rpc_client: Fix a small memleak
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-24 17:32:28 +00:00
Volker Lendecke
cac5e8287a
rpc_client: Avoid two casts with proper printf specifiers
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-06 17:22:30 +00:00
Volker Lendecke
cf8601e785
rpc_client: Save 65 .text bytes with -Os
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-06 17:22:30 +00:00
Volker Lendecke
c8768551fb
rpc_client: Simplify create_rpc_bind_req()
...
In former times this switch statement had more than one branch
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-06 17:22:30 +00:00
Volker Lendecke
dbb1047e47
rpc_client: Simplify rpc_pipe_bind_step_one_done()
...
With just one case handled specially in a switch statement and the
rest being default:, a simple if-statement can reduce indentation.
Best viewed with "git show -b".
I wonder if the second "if (pauth->auth_type == DCERPC_AUTH_TYPE_NONE)"
leads to reachable code, this should have been taken care of already
further up. But for now I did the 1:1 translation of existing code.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-08-06 17:22:30 +00:00
Andreas Schneider
521f77c667
auth:creds: Add obtained arg to cli_credentials_set_kerberos_state()
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2021-04-28 03:43:34 +00:00
Volker Lendecke
8945d99758
rpc: Give dcerpc_util.c its own header
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-04-06 22:29:34 +00:00
Volker Lendecke
0426f11bf0
rpcclient: Let rpc_pipe_open_ncalrpc() figure out the dst sock itself
...
Let the epmapper take care of this, with "EPMAPPER" being the default
socket that is connected for registration from ep_register()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-19 07:09:37 +00:00
Volker Lendecke
a8ab5ab5bc
rpc_client: Factor out rpccli_epm_map_interface() from rpc_pipe_get_tcp_port()
...
Make it usable for ncalrpc as well
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-19 07:09:37 +00:00
Volker Lendecke
3ee8960a1e
rpcclient: No need to use an object id in epm_map
...
The interface id we're looking for is listed as floor 0 in the
map_tower argument.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-19 07:09:37 +00:00
Volker Lendecke
87137e340c
rpcclient: Don't put a port into the epm_map request
...
That's what the server is supposed to fill in for us
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-19 07:09:37 +00:00
Volker Lendecke
409da523a7
rpc_client: Fix a typo
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-03-09 22:36:28 +00:00
Volker Lendecke
1b054aa0a5
rpc_client: Simplify rpc_pipe_open_ncalrpc()
...
Consolidate close(fd)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-12 00:10:30 +00:00
Volker Lendecke
ad5aabf8a1
rpc_client: Use common "goto fail" for all error cases
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-12 00:10:30 +00:00
Volker Lendecke
2745f6ec74
rpc_client: Fix an error path memleak in rpc_pipe_open_ncalrpc()
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-12 00:10:30 +00:00
Volker Lendecke
d51b4ac527
rpc_client: Error from rpc_pipe_open_ncalrpc() for path overflow
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2021-01-12 00:10:30 +00:00
Andreas Schneider
1298280a22
auth:creds: Rename CRED_USE_KERBEROS values
...
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2020-11-03 15:25:37 +00:00
Stefan Metzmacher
19ef9c40f1
s3:rpc_client: reverse rpccli_{is_connected,set_timeout}() and rpccli_bh_{is_connected,set_timeout}()
...
rpccli->transport should never be used directly,
everything should go via the binding handle.
Internal pipes don't have a transport, so p->transport is always
NULL. rpccli_is_connected() checks this and this causes all SAMR and LSA
requests for the local domain to be processed a second time by the triggered
retry logic.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14457
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2020-08-08 09:36:28 +00:00
Stefan Metzmacher
1aaf32c327
s3:cli_pipe: remove unused cli_rpc_pipe_open_generic_auth()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2020-05-28 06:43:38 +00:00
Stefan Metzmacher
ee4eab14f1
s3:cli_pipe: improve debug messages in cli_rpc_pipe_open_with_creds()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2020-05-28 06:43:38 +00:00
Stefan Metzmacher
6e6e0bc638
s3:cli_pipe: remove unused 'use_kerberos' from cli_rpc_pipe_open_generic_auth()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2020-05-28 06:43:37 +00:00
Volker Lendecke
5d8493f5b4
rpc_client: Don't pass a NULL string to talloc_asprintf
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-10-02 08:01:40 +00:00
Noel Power
6831b6ba6f
s3/rpc_client: clang: Fix 'Value stored during initialization is never read'
...
Fixes:
source3/rpc_client/cli_pipe.c:397:11: warning: Value stored to 'ret' during its initialization is never read <--[clang]
NTSTATUS ret = NT_STATUS_OK;
^~~ ~~~~~~~~~~~~
source3/rpc_client/cli_pipe.c🔢 11: warning: Value stored to 'ret' during its initialization is never read <--[clang]
NTSTATUS ret = NT_STATUS_OK;
^~~ ~~~~~~~~~~~~
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-26 18:41:26 +00:00
Volker Lendecke
39bdd175e9
libsmb: Give namequery.c its own header
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-04-11 01:06:39 +02:00
Volker Lendecke
32e823e08d
netlogon_creds_cli: Pass "capabilities" up from creds_cli_check
...
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-09-25 09:43:13 +02:00