This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 496410

Summary: Problems launching ESC with token already plugged in
Product: Red Hat Enterprise Linux 5 Reporter: Jack Magne <jmagne>
Component: escAssignee: Jack Magne <jmagne>
Status: CLOSED ERRATA QA Contact: desktop-bugs <desktop-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 5.4CC: aakkiang, alee, ckannan, mharmsen, rlerch, rrelyea, shaines
Target Milestone: rcKeywords: Rebase
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Rebase: Bug Fixes and Enhancements
Doc Text:
The ESC package has been rebased to take advantage of the stability and feature improvements that will be part of the RHEL version of ESC for Certificate System 8.0.
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 05:58:25 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 443788, 468301, 479722, 497004    

Description Jack Magne 2009-04-18 15:07:14 EDT
Description of problem:

This issue shows up on Linux with the latest Beta code when plugging in a key while only the daemon is running. The key insertion launches ESC and the following couple of issues show up:

1. If the token is blank, the required Phone Home configuration dialog does not pop up.

2. Once the token is removed, ESC can crash.

A Patch for this to follow.
Comment 1 Jack Magne 2009-04-18 19:10:16 EDT
Proposed patch:

Index: src/app/xpcom/tray/Makefile.sdk
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/tray/Makefile.sdk,v
retrieving revision 1.1
diff -r1.1 Makefile.sdk
26c26
< CXXFLAGS        += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS)
---
> CXXFLAGS        += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -fPIC
32c32
< GECKO_SDK_PATH =/usr/lib/xulrunner-sdk-1.9pre/sdk
---
> GECKO_SDK_PATH =/usr/lib/xulrunner-sdk-1.9/sdk
36c36
< GECKO_INCLUDE_PATH=/usr/include/xulrunner-sdk-1.9pre
---
> GECKO_INCLUDE_PATH=/usr/include/xulrunner-sdk-1.9
39c39
< GECKO_BIN_PATH=/usr/lib/xulrunner-1.9pre
---
> GECKO_BIN_PATH=/usr/lib/xulrunner-1.9
150a151,154
> ifeq ($(OS_ARCH),Linux)
> GECKO_LD_LIBS= -L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue_s.a
> endif
> 

Index: src/app/xul/esc/application.ini
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/application.ini,v
retrieving revision 1.7
diff -r1.7 application.ini
28c28
< Version=1.1.0-1
---
> Version=1.1.0-3

Index: src/app/xul/esc/chrome/content/esc/GenericAuth.xul
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/GenericAuth.xul,v
retrieving revision 1.5
diff -r1.5 GenericAuth.xul
27c27
<     height="225"
---
>     height="240"

Index: src/lib/coolkey/SmartCardMonitoringThread.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/lib/coolkey/SmartCardMonitoringThread.cpp,v
retrieving revision 1.3
diff -r1.3 SmartCardMonitoringThread.cpp
106a107,110
>     #ifdef LINUX
>     sleep(3);
>     #endif
> 
112c116
<     PK11SlotList *sl =
---
>    /* PK11SlotList *sl =
125a130,131
>    */
>
Comment 2 Matthew Harmsen 2009-04-18 19:17:12 EDT
Comment #1 +mharmsen
Comment 3 Jack Magne 2009-04-18 19:26:26 EDT
cvs commit -m "Fix for #496410."


Checking in src/app/xpcom/tray/Makefile.sdk;
/cvs/dirsec/esc/src/app/xpcom/tray/Makefile.sdk,v  <--  Makefile.sdk
new revision: 1.2; previous revision: 1.1
done
Running syncmail...
Mailing relnotes@fedoraproject.org...
...syncmail done.
Running syncmail...
Mailing cvsdirsec@fedoraproject.org...
...syncmail done.
Checking in src/app/xul/esc/application.ini;
/cvs/dirsec/esc/src/app/xul/esc/application.ini,v  <--  application.ini
new revision: 1.8; previous revision: 1.7
done
Running syncmail...
Mailing relnotes@fedoraproject.org...
...syncmail done.
Running syncmail...
Mailing cvsdirsec@fedoraproject.org...
...syncmail done.
Checking in src/app/xul/esc/chrome/content/esc/GenericAuth.xul;
/cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/GenericAuth.xul,v  <--  GenericAuth.xul
new revision: 1.6; previous revision: 1.5
done
Running syncmail...
Mailing relnotes@fedoraproject.org...
...syncmail done.
Running syncmail...
Mailing cvsdirsec@fedoraproject.org...
...syncmail done.
Checking in src/lib/coolkey/SmartCardMonitoringThread.cpp;
/cvs/dirsec/esc/src/lib/coolkey/SmartCardMonitoringThread.cpp,v  <--  SmartCardMonitoringThread.cpp
new revision: 1.4; previous revision: 1.3
done
Running syncmail...
Mailing relnotes@fedoraproject.org...
...syncmail done.
Running syncmail...
Mailing cvsdirsec@fedoraproject.org...
...syncmail done.
Comment 4 Scott Haines 2009-04-22 14:34:55 EDT
Changing product from Certificate System to Red Hat Enterprise 5.  Rebase of ESC to version 1.1.0 to pick up present and future Certificate System v8 fixes.
Comment 5 Scott Haines 2009-04-22 14:36:12 EDT
Setting acks.
Comment 7 Scott Haines 2009-04-22 15:10:04 EDT
Setting devel ack.
Comment 8 Jack Magne 2009-04-23 18:41:20 EDT
How to test:

1. Install the esc package.

2. Log out of your user session.

3. Log back in as your user. At this point the esc daemon will be running.

4. Insert a valid "blank" smart card.

5. After a few seconds esc should come to life and present the Phone Home Configuration dialog.

6. After processing the phone home dialog, bring the Smart Card Manager dialog by using the tray icon.

7 Remove the key and make sure esc behaves normally.



This bug blocks a tracker bug 497004, which contains a list of other bugs being done for CS 8.0. Each one of those bugs will have directions on how to test within where appropriate.
Comment 13 Jack Magne 2009-06-26 14:19:19 EDT
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
The ESC package has been rebased to take advantage of the stability and feature improvements that will be part of the RHEL version of ESC for Certificate System 8.0.
Comment 15 Asha Akkiangady 2009-07-26 17:07:14 EDT
I tried following steps on RHEL 5.3 i386 and X_86_64, esc does not pop up home phone url configuration dialog.

coolkey version: coolkey-1.1.0-6.el5 (latest from RHEL5.3 BaseOS)
esc version: esc-1.1.0-9.el5 (cs 8.0 build)

1. Start esc application

2. Bring up Smart card Manager by clicking the tray.

3. Insert a valid "blank" smart card token#1.

4. After a few seconds esc come Phone Home
Configuration dialog pops up.

5. Enter phone home url and enroll token#1 for user#1.

6. Format token#1.

7. Remove token#1 from the usb drive.

8. Insert a valid "blank" smart card token#2.


Actual Result:
Phone home url configuration dialog does not pop up, esc crashes.

Expected Result:
Phone home url configuration dialog should pop up.
Comment 16 Jack Magne 2009-07-27 12:50:47 EDT
This sounds like a new bug. The original issue seems ok.
Comment 18 Asha Akkiangady 2009-07-27 15:43:04 EDT
Verified.

Opened a new bug for the issue mentioned in comment#15 (https://bugzilla.redhat.com/show_bug.cgi?id=514053).

Executed following steps: 
1. Install the esc package.

2. Log out of your user session.

3. Log back in as your user. At this point the esc daemon will be running.

4. Insert a valid "blank" smart card.

5. After a few seconds esc should come to life and present the Phone Home
Configuration dialog.

6. After processing the phone home dialog, bring the Smart Card Manager dialog
by using the tray icon.

7 Remove the key and Phone Home configuration dialog pop up and esc behaves normally after that.
Comment 20 errata-xmlrpc 2009-09-02 05:58:25 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1310.html