[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Tue Feb 8 20:25:02 UTC 2022
The branch, master has been updated
via 3ee690455eb s3/libads: ensure a sockaddr variable is correctly zero initialized
via c266ed40aeb s3/libads: simplify storing existing ads->ldap.ss
from fe275259603 lib: Simplify pm_process()
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3ee690455eb963dedc7955b79316481387d4ac8c
Author: Ralph Boehme <slow at samba.org>
Date: Fri Jan 28 17:51:10 2022 +0100
s3/libads: ensure a sockaddr variable is correctly zero initialized
is_zero_addr() doesn't work with addresses that have been zero-initialized.
This fixes the logic added in c863cc2ba34025731a18ac735f714b5b888504da.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14674
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2354
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Tue Feb 8 20:24:12 UTC 2022 on sn-devel-184
commit c266ed40aeb1b1f59a1811cd4511e32e44a4a719
Author: Ralph Boehme <slow at samba.org>
Date: Mon Jan 31 12:54:12 2022 +0100
s3/libads: simplify storing existing ads->ldap.ss
We just need temporal storage for ads->ldap.ss, no need to store it as a struct
samba_sockaddr.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14674
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2354
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/libads/ldap.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index 1bc271785e2..647cdbd0459 100755
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -605,7 +605,9 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads)
ADS_STATUS status;
NTSTATUS ntstatus;
char addr[INET6_ADDRSTRLEN];
- struct samba_sockaddr existing_sa = {0};
+ struct sockaddr_storage existing_ss;
+
+ zero_sockaddr(&existing_ss);
/*
* ads_connect can be passed in a reused ADS_STRUCT
@@ -627,11 +629,7 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads)
*/
if (ads->server.ldap_server == NULL && !is_zero_addr(&ads->ldap.ss)) {
/* Save off the address we previously found by ads_find_dc(). */
- bool ok = sockaddr_storage_to_samba_sockaddr(&existing_sa,
- &ads->ldap.ss);
- if (!ok) {
- return ADS_ERROR_NT(NT_STATUS_INVALID_ADDRESS);
- }
+ existing_ss = ads->ldap.ss;
}
ads_zero_ldap(ads);
@@ -679,11 +677,11 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads)
}
}
- if (!is_zero_addr(&existing_sa.u.ss)) {
+ if (!is_zero_addr(&existing_ss)) {
/* We saved off who we should talk to. */
bool ok = ads_try_connect(ads,
ads->server.gc,
- &existing_sa.u.ss);
+ &existing_ss);
if (ok) {
goto got_connection;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list