The Samba-Bugzilla – Attachment 10115 Details for
Bug 10717
Winbind crash on losing VPN connection
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git-am fix for master and 4.1.next
0001-s3-winbindd-Old-NT-Domain-code-sets-struct-winbind_d.patch (text/plain), 2.57 KB, created by
Jeremy Allison
on 2014-07-16 19:45:26 UTC
(
hide
)
Description:
git-am fix for master and 4.1.next
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2014-07-16 19:45:26 UTC
Size:
2.57 KB
patch
obsolete
>From 35edbf72d22f6469d7687c08673c5f3ce8668ce4 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Wed, 16 Jul 2014 12:41:55 -0700 >Subject: [PATCH] s3: winbindd: Old NT Domain code sets struct > winbind_domain->alt_name to be NULL. Ensure this is safe with modern AD-DCs. > >There are places in the code where we're not checking that alt_name is NULL >and then calling into the DC lookup code with a NULL name request. This can >happen in offline mode. > >Fixes bug #10717 - Winbind crash on losing VPN connection > >https://bugzilla.samba.org/show_bug.cgi?id=10717 > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/winbindd/winbindd_ads.c | 3 ++- > source3/winbindd/winbindd_cm.c | 8 ++++++-- > 2 files changed, 8 insertions(+), 3 deletions(-) > >diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c >index a869ff5..3ec6230 100644 >--- a/source3/winbindd/winbindd_ads.c >+++ b/source3/winbindd/winbindd_ads.c >@@ -170,6 +170,7 @@ ADS_STATUS ads_idmap_cached_connection(ADS_STRUCT **adsp, const char *dom_name) > } > > if (IS_DC) { >+ SMB_ASSERT(wb_dom->alt_name != NULL); > realm = SMB_STRDUP(wb_dom->alt_name); > } else { > struct winbindd_domain *our_domain = wb_dom; >@@ -219,7 +220,7 @@ static ADS_STRUCT *ads_cached_connection(struct winbindd_domain *domain) > } > > if ( IS_DC ) { >- >+ SMB_ASSERT(domain->alt_name != NULL); > realm = SMB_STRDUP(domain->alt_name); > } > else { >diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c >index 05205a7..bd47c70 100644 >--- a/source3/winbindd/winbindd_cm.c >+++ b/source3/winbindd/winbindd_cm.c >@@ -836,6 +836,10 @@ static NTSTATUS get_trust_creds(const struct winbindd_domain *domain, > return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; > } > >+ if (our_domain->alt_name == NULL) { >+ return NT_STATUS_INVALID_PARAMETER; >+ } >+ > if (asprintf(machine_krb5_principal, "%s$@%s", > account_name, our_domain->alt_name) == -1) > { >@@ -1202,7 +1206,7 @@ static bool dcip_to_name(TALLOC_CTX *mem_ctx, > /* For active directory servers, try to get the ldap server name. > None of these failures should be considered critical for now */ > >- if (lp_security() == SEC_ADS) { >+ if ((lp_security() == SEC_ADS) && (domain->alt_name != NULL)) { > ADS_STRUCT *ads; > ADS_STATUS ads_status; > char addr[INET6_ADDRSTRLEN]; >@@ -1328,7 +1332,7 @@ static bool get_dcs(TALLOC_CTX *mem_ctx, struct winbindd_domain *domain, > return True; > } > >- if (sec == SEC_ADS) { >+ if ((sec == SEC_ADS) && (domain->alt_name != NULL)) { > char *sitename = NULL; > > /* We need to make sure we know the local site before >-- >2.0.0.526.g5318336 >
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
Actions:
View
Attachments on
bug 10717
:
10115
|
10288
|
10296