[Fedora-directory-commits] adminutil/lib/libadminutil admutil.c, 1.8, 1.9 distadm.c, 1.3, 1.4
Nathan Kinder (nkinder)
fedora-directory-commits at redhat.com
Thu Jul 5 21:12:57 UTC 2007
- Previous message (by thread): [Fedora-directory-commits] adminutil/include/libadminutil distadm.h, 1.4, 1.5
- Next message (by thread): [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt ldapfct.c, 1.3, 1.4 ldclt.c, 1.4, 1.5 ldclt.h, 1.3, 1.4 ldcltU.c, 1.3, 1.4 threadMain.c, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nkinder
Update of /cvs/dirsec/adminutil/lib/libadminutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12226/lib/libadminutil
Modified Files:
admutil.c distadm.c
Log Message:
Resolves: 247192
Summary: Modified the admldapBuildInfoCbk() function to pass the userdn through for authentication to the Directory if the userdn is initialized.
Index: admutil.c
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadminutil/admutil.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- admutil.c 8 May 2007 19:13:25 -0000 1.8
+++ admutil.c 5 Jul 2007 21:12:55 -0000 1.9
@@ -1276,6 +1276,8 @@
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;
@@ -1294,6 +1296,14 @@
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);
}
@@ -1377,6 +1387,12 @@
admInfo->passwd=PL_strdup(siePasswd);
}
+ /* Reset the siedn if we changed it*/
+ if (siedn) {
+ admldapSetSIEDN(admInfo, siedn);
+ PL_strfree(siedn);
+ }
+
return (AdmldapInfo)admInfo;
}
Index: distadm.c
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadminutil/distadm.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- distadm.c 4 Apr 2007 19:37:36 -0000 1.3
+++ distadm.c 5 Jul 2007 21:12:55 -0000 1.4
@@ -103,9 +103,6 @@
#endif
*/
-/* Yeah, I know, globals suck. */
-#define ADM_NOT_INITIALIZED "NS-not-initialized"
-
#ifndef BIG_LINE
#define BIG_LINE 1024
#endif
- Previous message (by thread): [Fedora-directory-commits] adminutil/include/libadminutil distadm.h, 1.4, 1.5
- Next message (by thread): [Fedora-directory-commits] ldapserver/ldap/servers/slapd/tools/ldclt ldapfct.c, 1.3, 1.4 ldclt.c, 1.4, 1.5 ldclt.h, 1.3, 1.4 ldcltU.c, 1.3, 1.4 threadMain.c, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-directory-commits
mailing list