[Fedora-directory-commits] adminutil/lib/libadmsslutil dllVersionInfo.rc, 1.1.1.1, 1.2 srvutilssl.c, 1.1.1.1, 1.2
Noriko Hosoi (nhosoi)
fedora-directory-commits at redhat.com
Wed Nov 16 18:50:23 UTC 2005
- Previous message (by thread): [Fedora-directory-commits] adminutil/lib/libadminutil dllVersionInfo.rc, 1.1.1.1, 1.2 srvutil.c, 1.1.1.1, 1.2
- Next message (by thread): [Fedora-directory-commits] adminutil/tests Makefile, NONE, 1.1 readme.txt, NONE, 1.1 retrieveSIE.c, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nhosoi
Update of /cvs/dirsec/adminutil/lib/libadmsslutil
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv856/lib/libadmsslutil
Modified Files:
dllVersionInfo.rc srvutilssl.c
Log Message:
Index: dllVersionInfo.rc
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadmsslutil/dllVersionInfo.rc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- dllVersionInfo.rc 20 Jul 2005 22:51:33 -0000 1.1.1.1
+++ dllVersionInfo.rc 16 Nov 2005 18:50:15 -0000 1.2
@@ -50,7 +50,7 @@
VALUE "InternalName", INTERNAL_NAME "\0"
VALUE "LegalCopyright", VI_COPYRIGHT "\0"
VALUE "OriginalFilename", INTERNAL_NAME ".dll\0"
- VALUE "ProductName", "Fedora Administration Server\0"
+ VALUE "ProductName", "Administration Server\0"
VALUE "ProductVersion", ADMSDK_VERSION "\0"
END
END
Index: srvutilssl.c
===================================================================
RCS file: /cvs/dirsec/adminutil/lib/libadmsslutil/srvutilssl.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- srvutilssl.c 20 Jul 2005 22:51:33 -0000 1.1.1.1
+++ srvutilssl.c 16 Nov 2005 18:50:15 -0000 1.2
@@ -26,23 +26,37 @@
PR_IMPLEMENT(AttrNameList)
getServerDNListSSL(AdmldapInfo info)
{
- char *domainDN, *isie, *sie;
+ char *domainDN = NULL, *isie = NULL, *sie = NULL;
+ char *ptr = NULL, *adminName = NULL;
PsetHndl domainPset;
int errorCode;
AttrNameList nl;
-
isie = admldapGetISIEDN(info);
- domainDN=strchr(isie, ',');
- if (!domainDN) return NULL;
+ /*
+ * ISIE sample:
+ * isie: cn=<NAME> Administration Server, cn=Server Group, cn=myhost.example.com, ou=example.com, o=NetscapeRoot
+ */
+
+ ptr=strchr(isie, ',');
+ if (!ptr) goto err;
+
+ *ptr = '\0'; /* to cut out "<NAME> Administration Server" later */
sie = admldapGetSIEDN(info);
- domainDN++;
+ ptr++;
- while (*domainDN == ' ' && *domainDN != '\0') domainDN++;
+ while (*ptr == ' ' && *ptr != '\0') ptr++;
- if (*domainDN == '\0') return NULL;
+ if (*ptr == '\0') goto err;
+
+ domainDN = PL_strdup(ptr);
+ if (!domainDN) goto err;
+
+ adminName = strchr(isie, '=');
+ if (!adminName) goto err;
+ adminName++;
/* Use domainDN to create a pset */
domainPset = psetRealCreateSSL(admldapGetHost(info),
@@ -54,12 +68,19 @@
NULL,
&errorCode);
- if (!domainPset) return NULL;
+ if (!domainPset) goto err;
- nl = retrieveSIEs(domainPset, domainDN);
+ nl = retrieveSIEs(domainPset, domainDN, adminName);
- psetDelete(domainPset);
+ psetDelete(domainPset); /* free sie, domainDN, internally */
+ if (isie) PR_Free(isie);
return nl;
+
+err:
+ if (isie) PR_Free(isie);
+ if (sie) PR_Free(sie);
+ if (domainDN) PR_Free(domainDN);
+ return NULL;
}
PR_IMPLEMENT(AttributeList)
- Previous message (by thread): [Fedora-directory-commits] adminutil/lib/libadminutil dllVersionInfo.rc, 1.1.1.1, 1.2 srvutil.c, 1.1.1.1, 1.2
- Next message (by thread): [Fedora-directory-commits] adminutil/tests Makefile, NONE, 1.1 readme.txt, NONE, 1.1 retrieveSIE.c, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-directory-commits
mailing list