The Samba-Bugzilla – Attachment 17155 Details for
Bug 14674
net ads info shows LDAP Server: 0.0.0.0 depending on contacted server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for 4.16.rcNext, 4.15.next, 4.14.next
bug-14674-4.16.patch (text/plain), 3.18 KB, created by
Jeremy Allison
on 2022-02-08 22:21:40 UTC
(
hide
)
Description:
git-am fix for 4.16.rcNext, 4.15.next, 4.14.next
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2022-02-08 22:21:40 UTC
Size:
3.18 KB
patch
obsolete
>From ee3de671e83caa4f9b30b458953ee25b2640ced0 Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Mon, 31 Jan 2022 12:54:12 +0100 >Subject: [PATCH 1/2] 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@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit c266ed40aeb1b1f59a1811cd4511e32e44a4a719) >--- > source3/libads/ldap.c | 12 ++++-------- > 1 file changed, 4 insertions(+), 8 deletions(-) > >diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c >index 1bc271785e2..28f396f0fe4 100755 >--- a/source3/libads/ldap.c >+++ b/source3/libads/ldap.c >@@ -605,7 +605,7 @@ 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 = {0}; > > /* > * ads_connect can be passed in a reused ADS_STRUCT >@@ -627,11 +627,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 +675,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; > } >-- >2.32.0 > > >From 5db3707d44219b3e4f9345fb0e29db3b24be8ab5 Mon Sep 17 00:00:00 2001 >From: Ralph Boehme <slow@samba.org> >Date: Fri, 28 Jan 2022 17:51:10 +0100 >Subject: [PATCH 2/2] 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@samba.org> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Tue Feb 8 20:24:12 UTC 2022 on sn-devel-184 > >(cherry picked from commit 3ee690455eb963dedc7955b79316481387d4ac8c) >--- > source3/libads/ldap.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c >index 28f396f0fe4..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 sockaddr_storage existing_ss = {0}; >+ struct sockaddr_storage existing_ss; >+ >+ zero_sockaddr(&existing_ss); > > /* > * ads_connect can be passed in a reused ADS_STRUCT >-- >2.32.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
slow
:
review+
Actions:
View
Attachments on
bug 14674
:
16558
|
16559
|
16560
|
16562
|
17137
|
17138
| 17155 |
17301