[Fedora-directory-commits] adminutil/lib/libadmsslutil srvutilssl.c, 1.5, 1.6

Nathan Kinder (nkinder) fedora-directory-commits at redhat.com
Thu Jun 28 20:47:59 UTC 2007


Author: nkinder

Update of /cvs/dirsec/adminutil/lib/libadmsslutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20389/lib/libadmsslutil

Modified Files:
	srvutilssl.c 
Log Message:
Resolves: 246124
Summary: Made findSIEDNByIDSSL() use the credentials from the password pipe.



Index: srvutilssl.c
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadmsslutil/srvutilssl.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- srvutilssl.c	8 May 2007 19:13:26 -0000	1.5
+++ srvutilssl.c	28 Jun 2007 20:47:56 -0000	1.6
@@ -151,8 +151,28 @@
 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;




More information about the Fedora-directory-commits mailing list