[SCM] Samba Shared Repository - branch master updated
Volker Lendecke
vlendec at samba.org
Mon Jan 10 11:48:01 UTC 2022
The branch, master has been updated
via b5e56a30dfd rpcclient: Fix ncacn_ip_tcp:<ip-address>
via 03734be1d62 test: Test rpcclient ncacn_ip_tcp:<ip-address>
from 23fbf0bad03 s3: smbd: Create and use a common function for generating a fileid - create_clock_itime().
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b5e56a30dfd33e89cfb602b1e7480e210434d600
Author: Volker Lendecke <vl at samba.org>
Date: Sun Jan 9 13:38:37 2022 +0100
rpcclient: Fix ncacn_ip_tcp:<ip-address>
inet_pton expects "struct in_addr" or "struct in6_addr" as destination
pointer. It does not fill in a struct
sockaddr_storage. interpret_string_addr() takes care of this.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Volker Lendecke <vl at samba.org>
Autobuild-Date(master): Mon Jan 10 11:47:34 UTC 2022 on sn-devel-184
commit 03734be1d62b8860a6ccaae3801d89b7129729df
Author: Volker Lendecke <vl at samba.org>
Date: Sun Jan 9 13:39:12 2022 +0100
test: Test rpcclient ncacn_ip_tcp:<ip-address>
Right now connecting to an IP address is broken.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/rpcclient/rpcclient.c | 21 ++++-----------------
source3/selftest/tests.py | 8 ++++++++
2 files changed, 12 insertions(+), 17 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index b89534f2225..4042d0d60be 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -897,23 +897,10 @@ static NTSTATUS do_cmd(struct cli_state *cli,
binding, "target_hostname");
if (remote_host != NULL) {
- int af = AF_UNSPEC;
-
- if (remote_name == NULL) {
- remote_name = dcerpc_binding_get_string_option(
- binding, "host");
- }
-
- if (is_ipaddress_v4(remote_host)) {
- af = AF_INET;
- } else if (is_ipaddress_v6(remote_host)) {
- af = AF_INET6;
- }
- if (af != AF_UNSPEC) {
- int ok = inet_pton(af, remote_host, &remote_ss);
- if (ok) {
- remote_sockaddr = &remote_ss;
- }
+ bool ok = interpret_string_addr(
+ &remote_ss, remote_host, 0);
+ if (ok) {
+ remote_sockaddr = &remote_ss;
}
}
}
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index 69cdc5b7f85..4a09a92bf24 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -1054,6 +1054,14 @@ for s in signseal_options:
"none",
f'ncalrpc:[{a}{s}{e}] -c epmmap',
configuration])
+ if s != ",connect":
+ plantestsuite(
+ f'samba3.blackbox.rpcclient over ncacn_ip_tcp with [{a}{s}{e}] ',
+ "nt4_dc:local",
+ [os.path.join(samba3srcdir, "script/tests/test_rpcclient.sh"),
+ "none",
+ f'ncacn_ip_tcp:"$SERVER_IP"[{a}{s}{e}] -c epmmap -U"$USERNAME"%"$PASSWORD"',
+ configuration])
# We should try more combinations in future, but this is all
# the pre-calculated credentials cache supports at the moment
--
Samba Shared Repository
More information about the samba-cvs
mailing list