The Samba-Bugzilla – Attachment 480 Details for
Bug 1291
winbindd kerberos_kinit_password failure due to HOST/ prefix
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix for the HOST/ prefix problem against Samba 3.0.2a
winbindd.patch (text/plain), 1.10 KB, created by
A. Steinmetz
on 2004-04-28 06:44:06 UTC
(
hide
)
Description:
fix for the HOST/ prefix problem against Samba 3.0.2a
Filename:
MIME Type:
Creator:
A. Steinmetz
Created:
2004-04-28 06:44:06 UTC
Size:
1.10 KB
patch
obsolete
>--- samba-3.0.2a/source/libads/ldap.c.orig 2004-04-28 10:51:18.000000000 +0200 >+++ samba-3.0.2a/source/libads/ldap.c 2004-04-28 14:20:26.000000000 +0200 >@@ -190,8 +190,10 @@ > ADS_STATUS ads_connect(ADS_STRUCT *ads) > { > int version = LDAP_VERSION3; >+ int ismachine = 0; > ADS_STATUS status; > >+repeat: > ads->last_attempt = time(NULL); > ads->ld = NULL; > >@@ -227,11 +229,17 @@ > > if (!ads->auth.user_name) { > /* by default use the machine account */ >+ ismachine++; > fstring myname; > fstrcpy(myname, global_myname()); > strlower_m(myname); > asprintf(&ads->auth.user_name, "HOST/%s", myname); > } >+ else if (ismachine) { >+ ismachine++; >+ memmove(ads->auth.user_name,ads->auth.user_name+5, >+ strlen(ads->auth.user_name)-4); >+ } > > if (!ads->auth.realm) { > ads->auth.realm = strdup(ads->config.realm); >@@ -264,7 +272,15 @@ > return ADS_ERROR(ldap_simple_bind_s( ads->ld, ads->auth.user_name, ads->auth.password)); > } > >- return ads_sasl_bind(ads); >+ status = ads_sasl_bind(ads); >+ >+ if (!ADS_ERR_OK(status)&&ismachine==1) >+ { >+ if (ads->ld) ldap_unbind(ads->ld); >+ goto repeat; >+ } >+ >+ return status; > } > > /*
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 1291
: 480