rpms/esc/devel esc-1.0.1-log-fixes-1.patch, NONE, 1.1 esc.spec, 1.28, 1.29
Jack Magne (jmagne)
fedora-extras-commits at redhat.com
Tue Jul 17 23:39:09 UTC 2007
- Previous message (by thread): rpms/eclipse-cdt/EL-5 .cvsignore, 1.29, 1.30 eclipse-cdt.spec, 1.78, 1.79 make-autotools-tarball.sh, 1.1, 1.2 sources, 1.34, 1.35
- Next message (by thread): rpms/deskbar-applet/F-7 deskbar-applet-devhelp.patch, NONE, 1.1 deskbar-applet.spec, 1.51, 1.52
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jmagne
Update of /cvs/pkgs/rpms/esc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28749
Modified Files:
esc.spec
Added Files:
esc-1.0.1-log-fixes-1.patch
Log Message:
Minor improvement to diagnostics logging.
esc-1.0.1-log-fixes-1.patch:
--- NEW FILE esc-1.0.1-log-fixes-1.patch ---
--- ./esc/src/lib/coolkey/NSSManager.cpp.fix6 2007-07-17 13:37:43.000000000 -0700
+++ ./esc/src/lib/coolkey/NSSManager.cpp 2007-07-17 13:38:40.000000000 -0700
@@ -46,11 +46,13 @@
static PRLogModuleInfo *coolKeyLogNSS = PR_NewLogModule("coolKeyNSS");
+unsigned int NSSManager::lastError;
NSSManager::NSSManager()
{
char tBuff[56];
PR_LOG( coolKeyLogNSS, PR_LOG_DEBUG, ("%s NSSManager::NSSManager:\n",GetTStamp(tBuff,56)));
mpSCMonitoringThread = NULL;
+ NSSManager::lastError = NSS_NO_ERROR;
#ifdef LINUX
systemCertDB = NULL;
#endif
@@ -111,6 +113,8 @@
if(!userModule || !userModule->loaded)
{
PR_LOG( coolKeyLogNSS, PR_LOG_ALWAYS, ("%s NSSManager::InitNSS problem loading PKCS11 module. No keys will be recognized!\n",GetTStamp(tBuff,56)));
+
+ NSSManager::lastError = NSS_ERROR_LOAD_COOLKEY;
return E_FAIL;
}
@@ -132,6 +136,7 @@
mpSCMonitoringThread = new SmartCardMonitoringThread(userModule);
if (!mpSCMonitoringThread) {
SECMOD_UnloadUserModule(userModule);
+ NSSManager::lastError = NSS_ERROR_SMART_CARD_THREAD;
return E_FAIL;
}
mpSCMonitoringThread->Start();
--- ./esc/src/lib/coolkey/CoolKey.cpp.fix6 2007-07-17 13:37:29.000000000 -0700
+++ ./esc/src/lib/coolkey/CoolKey.cpp 2007-07-17 13:38:28.000000000 -0700
@@ -1325,7 +1325,10 @@
return E_FAIL;
if(g_Log->IsInitialized())
+ {
+ CoolKeyLogNSSStatus();
return S_OK;
+ }
else
return E_FAIL;
}
@@ -1348,6 +1351,35 @@
return S_OK;
}
+COOLKEY_API HRESULT CoolKeyLogNSSStatus()
+{
+
+ char tBuff[56];
+ if (g_NSSManager)
+ {
+ unsigned int error = g_NSSManager->GetLastInitError();
+
+ if(error == NSS_NO_ERROR)
+ {
+ CoolKeyLogMsg( PR_LOG_ALWAYS, "%s NSS system intialized successfully!\n",GetTStamp(tBuff,56));
+ return S_OK;
+ }
+
+ if(error == NSS_ERROR_LOAD_COOLKEY)
+ {
+ CoolKeyLogMsg( PR_LOG_ERROR, "%s Failed to load CoolKey module! Keys will not be recognized!\n",GetTStamp(tBuff,56));
+ }
+
+ if(error == NSS_ERROR_SMART_CARD_THREAD)
+ {
+ CoolKeyLogMsg( PR_LOG_ERROR, "%s Problem initializing the Smart Card thread! Keys will not be recognized!\n",GetTStamp(tBuff,56));
+ }
+ }
+
+ return S_OK;
+
+}
+
//Utility function to get Time Stamp
char *GetTStamp(char *aTime,int aSize)
{
--- ./esc/src/lib/coolkey/NSSManager.h.fix6 2007-07-17 13:37:51.000000000 -0700
+++ ./esc/src/lib/coolkey/NSSManager.h 2007-07-17 13:38:43.000000000 -0700
@@ -26,6 +26,10 @@
#define PROMISCUOUS_PARAMETER "noAppletOK=yes"
#define NSS_PUBLIC_CERTS "slotFlags=PublicCerts"
+#define NSS_NO_ERROR 0
+#define NSS_ERROR_LOAD_COOLKEY 1
+#define NSS_ERROR_SMART_CARD_THREAD 2
+
#ifndef NSSMANAGER_H
#define NSSMANAGER_H
@@ -70,11 +74,14 @@
static HRESULT GetKeyIssuer(const CoolKey *aKey, char *aBuf, int aBufLength);
+ static unsigned int GetLastInitError() { return lastError;}
private:
static bool IsCACert(CERTCertificate *cert);
+ static unsigned int lastError;
+
#ifdef LINUX
PK11SlotInfo *systemCertDB;
#endif
--- ./esc/src/lib/coolkey/CoolKey.h.fix6 2007-07-17 13:37:35.000000000 -0700
+++ ./esc/src/lib/coolkey/CoolKey.h 2007-07-17 13:38:33.000000000 -0700
@@ -180,6 +180,7 @@
COOLKEY_API HRESULT CoolKeyLogMsg(int logLevel, const char *fmt, ...);
+COOLKEY_API HRESULT CoolKeyLogNSSStatus();
//Utility time function
char *GetTStamp(char *aTime,int aSize);
--- ./esc/src/app/xul/esc/application.ini.fix6 2007-07-17 13:36:59.000000000 -0700
+++ ./esc/src/app/xul/esc/application.ini 2007-07-17 13:37:16.000000000 -0700
@@ -25,7 +25,7 @@
Name=ESC
;
; This field specifies your application's version. This field is optional.
-Version=1.0.1-4
+Version=1.0.1-5
;
; This field specifies your application's build ID (timestamp). This field is
; required.
Index: esc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/esc/devel/esc.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- esc.spec 17 Jul 2007 18:47:04 -0000 1.28
+++ esc.spec 17 Jul 2007 23:38:36 -0000 1.29
@@ -1,6 +1,6 @@
Name: esc
Version: 1.0.1
-Release: 4%{?dist}
+Release: 5%{?dist}
Summary: Enterprise Security Client Smart Card Client
License: GPL
URL: http://directory.fedora.redhat.com/wiki/CoolKey
@@ -13,6 +13,7 @@
Patch3: esc-1.0.1-admin-row-update.patch
Patch4: esc-1.0.1-ui-fixes-1.patch
Patch5: esc-1.0.1-log-fixes.patch
+Patch6: esc-1.0.1-log-fixes-1.patch
BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1
BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel
@@ -68,6 +69,7 @@
%patch3 -p1 -b .fix3
%patch4 -p1 -b .fix4
%patch5 -p1 -b .fix5
+%patch6 -p1 -b .fix6
#Unpack xulrunner where esc expects it to be.
@@ -165,6 +167,11 @@
%{_datadir}/%{appdir}/esc.desktop
%doc %{docdir}/LICENSE
+%preun
+
+killall --exact -q escd
+exit 0
+
%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
@@ -178,6 +185,8 @@
fi
%changelog
+* Tue Jul 17 2007 Jack Magne <jmagne at redhat.com>- 1.0.1-5
+- Further fixes to the diagnostics logging.
* Wed Jun 20 2007 Jack Magne <jmagne at redhat.com>- 1.0.1-4
- Fixes to the diagnostics log files and esc error messages.
* Thu Apr 26 2007 Jack Magne <jmagne at redhat.com>- 1.0.1-3
- Previous message (by thread): rpms/eclipse-cdt/EL-5 .cvsignore, 1.29, 1.30 eclipse-cdt.spec, 1.78, 1.79 make-autotools-tarball.sh, 1.1, 1.2 sources, 1.34, 1.35
- Next message (by thread): rpms/deskbar-applet/F-7 deskbar-applet-devhelp.patch, NONE, 1.1 deskbar-applet.spec, 1.51, 1.52
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list