diff --git a/.gitignore b/.gitignore index 6615204..bfd3723 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ esc-1.1.0.tar.bz2 +/esc-1.1.1.tar.bz2 +/esc-1.1.2.tar.bz2 diff --git a/esc b/esc index cb0d44d..293b861 100755 --- a/esc +++ b/esc @@ -18,153 +18,17 @@ # END COPYRIGHT BLOCK -DO_FORCEMODE="false" -DO_SHOW_VERSION="false" -ESC_ARGS= +ESC_PATH=/usr/lib64/esc-1.1.2 +ESC_BIN=esc.js +ESC_EXEC=gjs - -ESC_PROFILE_BASE=~/.redhat/esc -ESC_LOG_FILE=esc.log - -ESC_PATH=$LIBDIR/esc-1.1.0 -ESC_BIN_PATH=/usr/bin -ESC_EXEC=esc -ESCD_EXEC=escd - -ESC_BIN=$ESC_PATH/xulrunner/xulrunner-bin -ESCD_BIN=./$ESCD_EXEC - -LAST_PROG_PID=0 -SIGUSR1=10 - -FORCE_START_ESC= - -XPTI_DAT=xpti.dat -COMPREG_DAT=compreg.dat -LOCK_FILE=lock -PARENT_LOCK_FILE=.parentlock - -function isProgRunning { - - userID=$(whoami) - isProgRunning=$(pgrep -U $userID -f $1) - if [ $isProgRunning ]; - then - LAST_PROG_PID=$isProgRunning - return 0 - fi - LAST_PROG_PID=0 - return 1 -} - -function removeFile { - - rm -f $1 -} - -function cleanupProfile { - - removeFile $ESC_PROFILE_BASE/*default/$XPTI_DAT - removeFile $ESC_PROFILE_BASE/*default/$COMPREG_DAT - removeFile $ESC_PROFILE_BASE/*default/$LOCK_FILE - removeFile $ESC_PROFILE_BASE/*default/$PARENT_LOCK_FILE - -} - -function processArgs { - - for arg in $1 - do - - #echo "theArg: $arg" - if [ $arg == "forceStartESC" ] - then - #echo "Do force mode!" - FORCE_START_ESC="true" - fi - - if [ $arg == "keyInserted" ] - then - FORCE_START_ESC="true" - fi - - if [ $arg == "-version" ] - then - #echo "Do show version!" - DO_SHOW_VERSION="true" - fi - done -} - - -processArgs $* - -if [ ! -d $ESC_PROFILE_BASE ] -then - mkdir -p $ESC_PROFILE_BASE -fi +export OPENSC_CONF=$ESC_PATH/opensc.esc.conf +export GI_TYPELIB_PATH=$ESC_PATH/lib/girepository-1.0 +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ESC_PATH/lib cd $ESC_PATH -#First check if we just want the version - -if [ $DO_SHOW_VERSION == "true" ] - then - #echo "try to run the version command!" - ESC_ARGS="-version" - ./$ESC_EXEC $ESC_ARGS - exit 0 -fi - -# Start up the daemon if it is not running - -isProgRunning $ESCD_BIN - -if [ $LAST_PROG_PID -gt 0 ] -then - false - #echo "escd already running." -else - #echo "escd not running start." - cleanupProfile - ./$ESCD_EXEC --key_Inserted=\"/usr/bin/esc\" --on_Signal=\"/usr/bin/esc\" - exit 0 -fi - -# Now check to see if we wer signaled from the daemon - -if [ $FORCE_START_ESC ] -then - #echo "force start esc." - - #Check to see if esc is already running - - isProgRunning $ESC_BIN - if [ $LAST_PROG_PID -gt 0 ] - then - #echo "attempting a force start but already running ... exit." - exit 0 - fi - #echo "force start esc not running start esc..." - ./$ESC_EXEC - exit 0 -fi - -isProgRunning $ESC_BIN - -if [ $LAST_PROG_PID -gt 0 ] -then - #echo "esc already running." - ./$ESC_EXEC - exit 0 -else - #echo "esc not already running start up and bring up window." - ./$ESC_EXEC & - sleep 4 - #echo "done sleeping bring up esc window." - ./$ESC_EXEC - exit 0 -fi +$ESC_EXEC ./$ESC_BIN & exit 0 diff --git a/esc-1.0.1-misc.patch b/esc-1.0.1-misc.patch deleted file mode 100644 index 6d75e35..0000000 --- a/esc-1.0.1-misc.patch +++ /dev/null @@ -1,85 +0,0 @@ ---- ./esc/src/app/xpcom/rhCoolKey.cpp.fix8 2008-01-18 10:05:09.000000000 -0800 -+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2008-01-18 10:05:47.000000000 -0800 -@@ -817,7 +817,7 @@ - NS_IMETHODIMP rhCoolKey::ResetCoolKeyPIN(PRUint32 aKeyType, const char *aKeyID, const char *aScreenName, const char *aPIN, const char *aScreenNamePwd) - { - char tBuff[56]; -- ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to Reset Key PIN, ID: %s \n",GetTStamp(tBuff,56),aKeyID); -+ ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to Reset Key Password, ID: %s \n",GetTStamp(tBuff,56),aKeyID); - CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); - - if (!node) ---- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix8 2008-01-18 10:06:00.000000000 -0800 -+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2008-01-18 10:06:09.000000000 -0800 -@@ -49,9 +49,15 @@ - char tBuff[56]; - GtkWidget *icon_box_widget = GTK_WIDGET(user_data); - -+ - if(icon_box_widget) - { -+ GdkScreen* gscreen = gdk_screen_get_default(); - GdkWindow* window = icon_box_widget->window; -+ -+ if(!window) -+ return; -+ - - gint width; - gint height; -@@ -59,20 +65,37 @@ - gint px; - gint py; - -+ gint screen_width = 0; -+ gint screen_height = 0; -+ -+ if(gscreen) -+ { -+ screen_width = gdk_screen_get_width(gscreen); -+ screen_height = gdk_screen_get_height(gscreen); -+ } -+ - gdk_drawable_get_size(window,&width,&height); - -- gdk_window_get_position(window, -+ gdk_window_get_origin(window, - &px, - &py); - -- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s popup_position width %d height %d px %d py %d \n",GetTStamp(tBuff,56),width,height,px,py)); -+ PR_LOG( trayLog, PR_LOG_DEBUG, ("%s popup_position width %d height %d px %d py %d *x %d *y %d screen_w %d screen_h %d \n",GetTStamp(tBuff,56),width,height,px,py,*x,*y,screen_width, screen_height)); -+ -+ // Are we close to the bottom of the screen? - -+ if( screen_width > 0 && screen_height > 0 -+ && ( screen_height - py) < (height * 3)) -+ { -+ height = height* -2 ; -+ } - - gint x_coord = px; - gint y_coord = (py + height); - - *x = x_coord; - *y = y_coord; -+ *push_in = TRUE; - - } - ---- ./esc/src/app/xul/esc/application.ini.fix8 2008-01-18 10:04:33.000000000 -0800 -+++ ./esc/src/app/xul/esc/application.ini 2008-01-18 10:04:43.000000000 -0800 -@@ -25,11 +25,11 @@ - Name=ESC - ; - ; This field specifies your application's version. This field is optional. --Version=1.0.1-7 -+Version=1.0.1-8 - ; - ; This field specifies your application's build ID (timestamp). This field is - ; required. --BuildID=0000001011 -+BuildID=0000001012 - ; - ; This ID is just an example. Every XUL app ought to have it's own unique ID. - ; You can use the microsoft "guidgen" or "uuidgen" tools, or go on diff --git a/esc-1.1.0-fix1.patch b/esc-1.1.0-fix1.patch deleted file mode 100644 index c7b631c..0000000 --- a/esc-1.1.0-fix1.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- ./esc/src/app/xpcom/tray/Makefile.sdk.fix1 2009-04-17 13:39:58.000000000 -0700 -+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2009-04-17 14:18:17.000000000 -0700 -@@ -23,20 +23,20 @@ - include $(CORE_DEPTH)/coreconf/rules.mk - - ifeq ($(OS_ARCH),Linux) --CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -+CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -fPIC - endif - - - # Change this to point at your Gecko SDK directory. - ifndef GECKO_SDK_PATH --GECKO_SDK_PATH =/usr/lib/xulrunner-sdk-1.9pre/sdk -+GECKO_SDK_PATH =/usr/lib/xulrunner-sdk-1.9/sdk - endif - GECKO_SDK_INCLUDE_PATH=$(GECKO_SDK_PATH)/include - ifndef GECKO_INCLUDE_PATH --GECKO_INCLUDE_PATH=/usr/include/xulrunner-sdk-1.9pre -+GECKO_INCLUDE_PATH=/usr/include/xulrunner-sdk-1.9 - endif - ifndef GECKO_BIN_PATH --GECKO_BIN_PATH=/usr/lib/xulrunner-1.9pre -+GECKO_BIN_PATH=/usr/lib/xulrunner-1.9 - endif - - ifeq ($(OS_ARCH),Darwin) -@@ -148,6 +148,10 @@ - - endif - -+ifeq ($(OS_ARCH),Linux) -+GECKO_LD_LIBS= -L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue_s.a -+endif -+ - - # GCC only define which allows us to not have to #include mozilla-config - # in every .cpp file. If your not using GCC remove this line and add diff --git a/esc-1.1.0-fix2.patch b/esc-1.1.0-fix2.patch deleted file mode 100644 index f593dd2..0000000 --- a/esc-1.1.0-fix2.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp.fix2 2009-04-18 13:19:20.000000000 -0700 -+++ ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp 2009-04-18 13:20:23.000000000 -0700 -@@ -104,12 +104,16 @@ - char tBuff[56]; - PK11SlotInfo *slot; - -+ #ifdef LINUX -+ sleep(3); -+ #endif -+ - PR_LOG( coolKeyLogSC, PR_LOG_DEBUG, - ("%s SmartCardMonitoringThread::Execute.\n",GetTStamp(tBuff,56))); - // - // populate token names for already inserted tokens. - // -- PK11SlotList *sl = -+ /* PK11SlotList *sl = - PK11_FindSlotsByNames(mModule->dllName, NULL, NULL, PR_TRUE); - PK11SlotListElement *sle; - -@@ -123,6 +127,8 @@ - PK11_FreeSlotList(sl); - } - -+ */ -+ - // loop starts.. - do { - ---- ./esc/src/app/xul/esc/chrome/content/esc/GenericAuth.xul.fix2 2009-04-18 13:21:34.000000000 -0700 -+++ ./esc/src/app/xul/esc/chrome/content/esc/GenericAuth.xul 2009-04-18 13:21:47.000000000 -0700 -@@ -24,7 +24,7 @@ - id="esc-window" - title="&genericAuthTitle;" - width="400" -- height="225" -+ height="240" - onload="UiLoad();" - onunload="UiUnload();" - xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> ---- ./esc/src/app/xul/esc/application.ini.fix2 2009-04-18 13:20:51.000000000 -0700 -+++ ./esc/src/app/xul/esc/application.ini 2009-04-18 13:21:02.000000000 -0700 -@@ -25,7 +25,7 @@ - Name=ESC - ; - ; This field specifies your application's version. This field is optional. --Version=1.1.0-1 -+Version=1.1.0-3 - ; - ; This field specifies your application's build ID (timestamp). This field is - ; required. diff --git a/esc-1.1.0-fix3.patch b/esc-1.1.0-fix3.patch deleted file mode 100644 index 0dc60d3..0000000 --- a/esc-1.1.0-fix3.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- ./esc/src/app/xul/esc/chrome/locale/en-US/esc.properties.fix3 2009-04-22 17:44:14.000000000 -0700 -+++ ./esc/src/app/xul/esc/chrome/locale/en-US/esc.properties 2009-04-22 17:46:41.000000000 -0700 -@@ -104,7 +104,7 @@ - errorInvalidTokenTypeParams=The Smart Card Server cannot process the requested type of enrollment due to a misconfiguration. - errorCannotPublish=The Smart Card Server cannot publish your card's certificates to the certificate directory. - errorCommTokenDB=The Smart Card Server cannot connect to its internal database. --errorTokenSuspended=Your smart card has been suspended. -+errorTokenSuspended=You are not allowed to perform this operation with this smart card. - errorPinResetable=You are not allowed to reset the password of this smart card. - errorConnLost=The Smart Card Manager has lost the connection to the Smart Card Server. - errorEntryTokenDB=The Smart Card Server cannot add your smart card to its internal database. ---- ./esc/src/app/xul/esc/application.ini.fix3 2009-04-22 17:38:49.000000000 -0700 -+++ ./esc/src/app/xul/esc/application.ini 2009-04-22 17:39:14.000000000 -0700 -@@ -25,7 +25,7 @@ - Name=ESC - ; - ; This field specifies your application's version. This field is optional. --Version=1.1.0-3 -+Version=1.1.0-5 - ; - ; This field specifies your application's build ID (timestamp). This field is - ; required. diff --git a/esc-1.1.0-fix4.patch b/esc-1.1.0-fix4.patch deleted file mode 100644 index 94f3255..0000000 --- a/esc-1.1.0-fix4.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- ./esc/src/lib/coolkey/manifest.mn.fix4 2009-04-23 14:13:21.000000000 -0700 -+++ ./esc/src/lib/coolkey/manifest.mn 2009-04-23 14:15:00.000000000 -0700 -@@ -27,7 +27,7 @@ - ifndef MOZ_OFFSET - MOZ_OFFSET = mozilla-1.7.13 - endif --DEFINES += -I$(CORE_DEPTH)/esc/app/xpcom -I$(SYS_INC)/nspr4 -I$(SYS_INC)/nss3 -I$(SYS_INC)/PCSC -I$(SYS_INC)/$(MOZ_OFFSET)/nspr -I$(SYS_INC)/$(MOZ_OFFSET)/nss -I$(XULRUNNER_BASE)/dist/public/nss -I$(XULRUNNER_BASE)/dist/include/nspr -I$(GECKO_SDK_PATH)/include/nspr -I$(GECKO_SDK_PATH)/include/nss -+DEFINES += -I$(CORE_DEPTH)/esc/app/xpcom -I$(SYS_INC)/nspr4 -I$(SYS_INC)/nss3 -I$(SYS_INC)/PCSC -I$(SYS_INC)/$(MOZ_OFFSET)/nspr -I$(SYS_INC)/$(MOZ_OFFSET)/nss -I$(XULRUNNER_BASE)/dist/public/nss -I$(XULRUNNER_BASE)/dist/include/nspr -I$(GECKO_SDK_PATH)/include/nspr -I$(GECKO_SDK_PATH)/include/nss -fno-strict-aliasing - MAPFILE = $(OBJDIR)/ckymanager.def - - #EXTRA_LIBS += -L$(DIST)/lib -lckyapplet ---- ./esc/src/app/xul/esc/application.ini.fix4 2009-04-23 14:12:52.000000000 -0700 -+++ ./esc/src/app/xul/esc/application.ini 2009-04-23 14:13:01.000000000 -0700 -@@ -25,7 +25,7 @@ - Name=ESC - ; - ; This field specifies your application's version. This field is optional. --Version=1.1.0-5 -+Version=1.1.0-6 - ; - ; This field specifies your application's build ID (timestamp). This field is - ; required. diff --git a/esc-1.1.0-fix5.patch b/esc-1.1.0-fix5.patch deleted file mode 100644 index 8bf45a4..0000000 --- a/esc-1.1.0-fix5.patch +++ /dev/null @@ -1,218 +0,0 @@ ---- ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp.fix5 2009-06-08 14:14:44.000000000 -0700 -+++ ./esc/src/lib/coolkey/SmartCardMonitoringThread.cpp 2009-06-08 14:15:03.000000000 -0700 -@@ -159,7 +159,7 @@ - - /* if we think we have a token, but it's not the right one, or it's - * not there, then send a removal event */ -- if (info && (!isPresent || (info->mSeries != PK11_GetSlotSeries(slot))) ) { -+ if (info && !isPresent) { - - PR_LOG( coolKeyLogSC, PR_LOG_DEBUG, - ("%s SmartCardMonitoringThread::Execute Token Removed : \n",GetTStamp(tBuff,56))); ---- ./esc/src/app/xul/esc/chrome/content/esc/certManager.xul.fix5 2009-06-08 13:46:19.000000000 -0700 -+++ ./esc/src/app/xul/esc/chrome/content/esc/certManager.xul 2009-06-08 13:46:33.000000000 -0700 -@@ -59,7 +59,6 @@ -