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 157645 Details for
Bug 245396
adminutil: retrieveISIEs returns bogus data
[?]
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]
diffs
cvsdiffs (text/plain), 7.17 KB, created by
Rich Megginson
on 2007-06-22 20:15:36 UTC
(
hide
)
Description:
diffs
Filename:
MIME Type:
Creator:
Rich Megginson
Created:
2007-06-22 20:15:36 UTC
Size:
7.17 KB
patch
obsolete
>Index: adminutil/Makefile.am >=================================================================== >RCS file: /cvs/dirsec/adminutil/Makefile.am,v >retrieving revision 1.6 >diff -u -8 -r1.6 Makefile.am >--- adminutil/Makefile.am 21 Jun 2007 23:05:05 -0000 1.6 >+++ adminutil/Makefile.am 22 Jun 2007 20:09:45 -0000 >@@ -38,17 +38,17 @@ > dummy_SOURCES = lib/dummy.cpp > dummy_LINK = $(CXXLINK) > endif > > if enable_tests > check_PROGRAMS = retrieveSIE retrieveSIEssl psetread psetreadssl psetwrite > TESTS = retrieveSIE retrieveSIEssl psetread psetreadssl psetwrite > >-TEST_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include @nspr_inc@ @ldapsdk_inc@ @icu_inc@ >+TEST_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/include @nss_inc@ @nspr_inc@ @ldapsdk_inc@ @icu_inc@ > TEST_LDADD = libadmsslutil.la libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) > > retrieveSIE_SOURCES = tests/retrieveSIE.c > retrieveSIE_CPPFLAGS = $(TEST_CPPFLAGS) > retrieveSIE_LDADD = $(TEST_LDADD) > > retrieveSIEssl_SOURCES = tests/retrieveSIEssl.c > retrieveSIEssl_CPPFLAGS = $(TEST_CPPFLAGS) >@@ -137,16 +137,16 @@ > libadmsslutil_la_SOURCES = lib/libadmsslutil/admsslutil.c \ > lib/libadmsslutil/certmgt.c \ > lib/libadmsslutil/psetcssl.c \ > lib/libadmsslutil/secpwd.c \ > lib/libadmsslutil/srvutilssl.c \ > lib/libadmsslutil/sslerror.c \ > lib/libadmsslutil/uginfossl.c > >-libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nspr_inc@ @ldapsdk_inc@ @icu_inc@ >+libadmsslutil_la_CPPFLAGS = $(AM_CPPFLAGS) @nss_inc@ @nspr_inc@ @ldapsdk_inc@ @icu_inc@ > libadmsslutil_la_LIBADD = libadminutil.la $(NSPR_LINK) $(NSS_LINK) $(LDAPSDK_LINK) $(SASL_LINK) $(ICU_LINK) > libadmsslutil_la_LDFLAGS = -version-number $(subst .,:,$(PACKAGE_VERSION)) > if CXXLINK_REQUIRED > libadmsslutil_la_LINK = $(CXXLINK) > else > libadmsslutil_la_LINK = $(LINK) > endif >Index: adminutil/lib/libadminutil/srvutil.c >=================================================================== >RCS file: /cvs/dirsec/adminutil/lib/libadminutil/srvutil.c,v >retrieving revision 1.4 >diff -u -8 -r1.4 srvutil.c >--- adminutil/lib/libadminutil/srvutil.c 8 May 2007 19:13:25 -0000 1.4 >+++ adminutil/lib/libadminutil/srvutil.c 22 Jun 2007 20:09:45 -0000 >@@ -223,17 +223,17 @@ > node = dnList; > i = 0; > if (cnt > 0) { > resultList = createAttributeList(cnt); > while (node) { > addSingleValueAttribute(resultList, > i++, > node->name, >- (char*)(node->val)); >+ ((char**)node->val)[0]); > node = node->next; > } > } > > listDestroy(dnList); > > return resultList; > } >Index: adminutil/lib/libadmsslutil/admsslutil.c >=================================================================== >RCS file: /cvs/dirsec/adminutil/lib/libadmsslutil/admsslutil.c,v >retrieving revision 1.8 >diff -u -8 -r1.8 admsslutil.c >--- adminutil/lib/libadmsslutil/admsslutil.c 8 May 2007 19:13:26 -0000 1.8 >+++ adminutil/lib/libadmsslutil/admsslutil.c 22 Jun 2007 20:09:45 -0000 >@@ -161,16 +161,18 @@ > /* PKSC11 module must be configured before NSS is initialized */ > db_name = PL_strdup("internal (software) "); > if (!db_name) { > return -1; > } > > PK11_ConfigurePKCS11(NULL,NULL,NULL,db_name,NULL, NULL,NULL,NULL, > /*minPwdLen=*/8, /*pwdRequired=*/1); >+ PL_strfree(db_name); >+ db_name = NULL; > > /* init NSS */ > if (NSS_Initialize(securitydir, NULL, NULL, SECMOD_DB, flags)) { > return -1; > } > > /* custom file should contain a line like this: > pinFile:/path/to/pinfile >Index: adminutil/tests/retrieveSIEssl.c >=================================================================== >RCS file: /cvs/dirsec/adminutil/tests/retrieveSIEssl.c,v >retrieving revision 1.2 >diff -u -8 -r1.2 retrieveSIEssl.c >--- adminutil/tests/retrieveSIEssl.c 8 May 2007 19:13:26 -0000 1.2 >+++ adminutil/tests/retrieveSIEssl.c 22 Jun 2007 20:09:45 -0000 >@@ -43,16 +43,18 @@ > char *securitydir = NULL; > int rval = 0; > char **p; > int siecnt = 0; > char *host = NULL; > char *siedn = NULL; > char *siepwd = NULL; > char buf[BUFSIZ]; >+ char *userdn; >+ char *passwd; > > if (ac > 1) { > configdir = strdup(*(av+1)); > } > > if (NULL == configdir || 0 == strlen(configdir)) { > fprintf(stderr, "ERROR: config dir was not specified.\n"); > exit(1); >@@ -82,43 +84,49 @@ > */ > ldapInfo = admldapBuildInfo(configdir, &rval); > if (NULL == ldapInfo) { > fprintf(stderr, "ERROR: empty ldapInfo\n"); > rval = 1; > goto done; > } > >+ siedn = admldapGetSIEDN(ldapInfo); >+ ADM_GetUserDNString(&rval, &userdn); >+ ADM_GetCurrentPassword(&rval, &passwd); >+ >+ admldapSetSIEDN(ldapInfo, userdn); >+ admSetCachedSIEPWD(passwd); > /* > * get servers' DNs belonging to the Admin Server > */ > nameList = getServerDNListSSL(ldapInfo); > if (NULL == nameList) { > fprintf(stderr, "ERROR: empty nameList\n"); > rval = 1; > goto done; > } > >+ admldapSetSIEDN(ldapInfo, siedn); >+ > host = admldapGetHost(ldapInfo); >- siedn = admldapGetSIEDN(ldapInfo); >- siepwd = admldapGetSIEPWD(ldapInfo); > for (p = nameList; p && *p; p++) { > PsetHndl pset = NULL; > fprintf(stdout, "%s\n", *p); > if (0 == strncasecmp(*p, "cn=", 3)) { > siecnt++; > } > /* Create Pset for each individual server */ > rval = 0; > pset = psetRealCreateSSL(host, > admldapGetPort(ldapInfo), > admldapGetSecurity(ldapInfo), > *p, >- siedn, >- siepwd, >+ userdn, >+ passwd, > NULL, > &rval); > if (rval && (rval != PSET_LOCAL_OPEN_FAIL)) { > fprintf(stderr, "Error creating pset for server [%s] [%d: %s]\n", *p, > rval, psetErrorString(rval, NULL, buf, sizeof(buf), NULL)); > } > if (pset) { > char* serverid = psetGetAttrSingleValue(pset, "nsServerID", &rval); >@@ -140,31 +148,32 @@ > deleteAttrNameList(nameList); > nameList = NULL; > if (siecnt > 0) { > fprintf(stdout, "SUCCESS: SIE%s retrieved\n", siecnt>1?"S are":" is"); > } else { > fprintf(stdout, "FAILURE: SIE is not retrieved\n"); > } > PL_strfree(host); >- PL_strfree(siedn); >- PL_strfree(siepwd); > > /* > * get servers' DNs belonging to the Admin Server > */ >+ admldapSetSIEDN(ldapInfo, userdn); > isieList = getInstalledServerDNListSSL(ldapInfo); >+ admldapSetSIEDN(ldapInfo, siedn); > if (NULL == isieList) { > fprintf(stderr, "ERROR: empty isieList\n"); > rval = 1; > goto done; > } > > for (siecnt = 0; isieList[siecnt]; siecnt++) { >- fprintf(stdout, "%s\n", isieList[siecnt]->attrName); >+ fprintf(stdout, "productID = %s\n", isieList[siecnt]->attrName); >+ fprintf(stdout, "productDN = %s\n", isieList[siecnt]->attrVal[0]); > } > deleteAttributeList(isieList); > if (siecnt > 0) { > fprintf(stdout, "SUCCESS: ISIE%s retrieved\n", siecnt>1?"S are":" is"); > } else { > fprintf(stdout, "FAILURE: ISIE is not retrieved\n"); > } > done:
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 245396
: 157645 |
157651