The Samba-Bugzilla – Attachment 2816 Details for
Bug 3906
net ads join failed on 3.0.23rc2/rc3
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch: Use resolved IP address instead of short DNS name
samba-3.0.24-ads_connect-ip.patch (text/plain), 1.50 KB, created by
SATOH Fumiyasu
on 2007-07-12 19:46:39 UTC
(
hide
)
Description:
Proposed patch: Use resolved IP address instead of short DNS name
Filename:
MIME Type:
Creator:
SATOH Fumiyasu
Created:
2007-07-12 19:46:39 UTC
Size:
1.50 KB
patch
obsolete
>Because ads->config.ldap_server_name has a short (non-FQDN) hostname, >it cannot be resolved on some situation (e.g. DNS domainname and/or >search suffix != AD domainname) and ldap_open_with_timeout() failed. > >-- fumiyas, 2007-07-11 > >--- samba-3.0.24.osstech/source/libads/ldap.c 2007-06-08 16:10:57.056007000 +0900 >+++ samba-3.0.24.osstech/source/libads/ldap.c 2007-07-12 02:42:54.551925512 +0900 >@@ -271,6 +271,7 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) > { > int version = LDAP_VERSION3; > ADS_STATUS status; >+ fstring ldap_ip; > > ads->last_attempt = time(NULL); > ads->ld = NULL; >@@ -289,7 +290,8 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) > return ADS_ERROR_SYSTEM(errno?errno:ENOENT); > > got_connection: >- DEBUG(3,("Connected to LDAP server %s\n", inet_ntoa(ads->ldap_ip))); >+ fstrcpy(ldap_ip, inet_ntoa(ads->ldap_ip)); >+ DEBUG(3,("Connected to LDAP server %s\n", ldap_ip)); > > if (!ads->auth.user_name) { > /* Must use the userPrincipalName value here or sAMAccountName >@@ -303,7 +305,7 @@ got_connection: > } > > if (!ads->auth.kdc_server) { >- ads->auth.kdc_server = SMB_STRDUP(inet_ntoa(ads->ldap_ip)); >+ ads->auth.kdc_server = SMB_STRDUP(ldap_ip); > } > > #if KRB5_DNS_HACK >@@ -325,8 +327,8 @@ got_connection: > > /* Otherwise setup the TCP LDAP session */ > >- if ( (ads->ld = ldap_open_with_timeout(ads->config.ldap_server_name, >- LDAP_PORT, lp_ldap_timeout())) == NULL ) >+ if ( (ads->ld = ldap_open_with_timeout(ldap_ip, LDAP_PORT, >+ lp_ldap_timeout())) == NULL ) > { > return ADS_ERROR(LDAP_OPERATIONS_ERROR); > }
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 3906
:
2019
| 2816 |
3923