From 239bc14a70f59f604d09397e891bebeb455fa304 Mon Sep 17 00:00:00 2001 From: Nathan Kinder Date: Jun 28 2007 20:47:56 +0000 Subject: Resolves: 246124 Summary: Made findSIEDNByIDSSL() use the credentials from the password pipe. --- diff --git a/lib/libadmsslutil/srvutilssl.c b/lib/libadmsslutil/srvutilssl.c index b522d5e..689c321 100644 --- a/lib/libadmsslutil/srvutilssl.c +++ b/lib/libadmsslutil/srvutilssl.c @@ -151,8 +151,28 @@ PR_IMPLEMENT(char *) findSIEDNByIDSSL(AdmldapInfo info, const char *serverID) { char *retval = NULL; + char *siedn = NULL; + char *userdn = NULL; + char *passwd = NULL; + int rval = 0; + + siedn = admldapGetSIEDN(info); + ADM_GetUserDNString(&rval, &userdn); + ADM_GetCurrentPassword(&rval, &passwd); + + /* HACK HACK HACK */ + /* getServerDNListSSL uses the siedn as the binddn - so we temporarily + replace the siedn with the userdn - fortunately it doesn't use the + siedn as the SIE DN */ + admldapSetSIEDN(info, userdn); + admSetCachedSIEPWD(passwd); + AttrNameList nl = getServerDNListSSL(info); + /* HACK HACK HACK - reset after getServerDNListSSL */ + admldapSetSIEDN(info, siedn); + PL_strfree(siedn); + if (nl) { size_t len = strlen(serverID); AttrNameList nlptr = nl;