Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158620 Details for
Bug 247192
adminutil: admldapBuildInfoCbk() is not properly setting the LDAP handle
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
CVS Diffs
diffs.txt (text/plain), 2.90 KB, created by
Nathan Kinder
on 2007-07-05 21:06:04 UTC
(
hide
)
Description:
CVS Diffs
Filename:
MIME Type:
Creator:
Nathan Kinder
Created:
2007-07-05 21:06:04 UTC
Size:
2.90 KB
patch
obsolete
>Index: include/libadminutil/distadm.h >=================================================================== >RCS file: /cvs/dirsec/adminutil/include/libadminutil/distadm.h,v >retrieving revision 1.4 >diff -u -5 -t -r1.4 distadm.h >--- include/libadminutil/distadm.h 4 Apr 2007 19:37:41 -0000 1.4 >+++ include/libadminutil/distadm.h 5 Jul 2007 20:54:56 -0000 >@@ -50,10 +50,13 @@ > #define ADM_USERDN_STRING "UserDN: " > #endif > #ifndef ADM_SIEPWD_STRING > #define ADM_SIEPWD_STRING "SIEPWD: " > #endif >+#ifndef ADM_NOT_INITIALIZED >+#define ADM_NOT_INITIALIZED "NS-not-initialized" >+#endif > > /* Initialize libadminutil. Should be called by EVERY CGI. */ > /* util.c */ > PR_IMPLEMENT(int) ADMUTIL_Init(void); > >Index: lib/libadminutil/admutil.c >=================================================================== >RCS file: /cvs/dirsec/adminutil/lib/libadminutil/admutil.c,v >retrieving revision 1.8 >diff -u -5 -t -r1.8 admutil.c >--- lib/libadminutil/admutil.c 8 May 2007 19:13:25 -0000 1.8 >+++ lib/libadminutil/admutil.c 5 Jul 2007 20:54:56 -0000 >@@ -1274,10 +1274,12 @@ > > PR_IMPLEMENT(AdmldapInfo) > admldapBuildInfoCbk(char* configRoot, char *(*cbk)(), int *errorcode) > { > char *siePasswd = NULL; >+ char *siedn = NULL; >+ char *userdn = NULL; > AdmldapHdnlPtr admInfo = NULL; > int ldapError = LDAP_SUCCESS; > int secureLDAP = 0; > > *errorcode = ADMUTIL_OP_OK; >@@ -1292,10 +1294,18 @@ > if (admldapGetSecurity((AdmldapInfo)admInfo)) { > *errorcode = ADMUTIL_NO_SSL_SUPPORT; > secureLDAP = 1; > } > >+ /* if userdn is initialized, override the siedn to make bind succeed */ >+ ADM_GetUserDNString(errorcode, &userdn); >+ if (strcasecmp(userdn, ADM_NOT_INITIALIZED)) { >+ siedn = admldapGetSIEDN(admInfo); >+ admldapSetSIEDN(admInfo, userdn); >+ admSetCachedSIEPWD(siePasswd); >+ } >+ > if (!secureLDAP) { > admInfo->ldapHndl = ldap_init(admInfo->ldapInfo->lud_host, admInfo->ldapInfo->lud_port); > } > > /* authenticate to LDAP server*/ >@@ -1375,10 +1385,16 @@ > if (siePasswd != NULL) { > /* returned value from ADM_Get... should NOT be freed */ > admInfo->passwd=PL_strdup(siePasswd); > } > >+ /* Reset the siedn if we changed it*/ >+ if (siedn) { >+ admldapSetSIEDN(admInfo, siedn); >+ PL_strfree(siedn); >+ } >+ > return (AdmldapInfo)admInfo; > } > > static char * > cachedPwdCbk(int retry) >Index: lib/libadminutil/distadm.c >=================================================================== >RCS file: /cvs/dirsec/adminutil/lib/libadminutil/distadm.c,v >retrieving revision 1.3 >diff -u -5 -t -r1.3 distadm.c >--- lib/libadminutil/distadm.c 4 Apr 2007 19:37:36 -0000 1.3 >+++ lib/libadminutil/distadm.c 5 Jul 2007 20:54:56 -0000 >@@ -101,13 +101,10 @@ > #ifndef MALLOC > #define MALLOC PR_MALLOC > #endif > */ > >-/* Yeah, I know, globals suck. */ >-#define ADM_NOT_INITIALIZED "NS-not-initialized" >- > #ifndef BIG_LINE > #define BIG_LINE 1024 > #endif > > static char *user = ADM_NOT_INITIALIZED;
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 247192
: 158620