Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 815175 - virt-viewer failed to initialize software smartcard.
Summary: virt-viewer failed to initialize software smartcard.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-viewer
Version: 6.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Daniel Berrange
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-23 03:03 UTC by Geyang Kong
Modified: 2013-08-05 03:43 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-26 07:38:14 UTC
Target Upstream Version:


Attachments (Terms of Use)
This is what I got with --spice-debug option. (deleted)
2012-04-23 03:03 UTC, Geyang Kong
no flags Details

Description Geyang Kong 2012-04-23 03:03:38 UTC
Created attachment 579401 [details]
This is what I got with --spice-debug option.

Description of problem:
  virt-viewer failed to initialize software smartcard.

Version-Release number of selected component (if applicable):
virt-viewer-0.5.2-5.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Imaging there is a running guest, and executed #yum groupinstall "smart card support".
2. mkdir ~/.netscape
3. certutil -N (use an empty password)
4. certutil -x -t "CT,CT,CT" -S -s "CN=cert1" -n cert1
5. certutil -x -t "CT,CT,CT" -S -s "CN=cert2" -n cert2
6. certutil -x -t "CT,CT,CT" -S -s "CN=cert3" -n cert3
7. spicec -p 5900 -h localhost --smartcard --smartcard-db ~/.netscape/ --smartcard-cert cert1,cert2,cert3
8. virt-viewer --spice-smartcard --spice-smartcard-db=~/.netscape/ --spice-smartcard-certificates=cert1,cert2,cert3 $guestname

Actual results:

1. After step7, guest can read smart card successfully.
2. After step8, there is an error in terminal. "GSpice-WARNING **: Failed to initialize smart card", and guest cannot get software smart card."

Expected results:

1. After step8, guest can get smart card just like spicec without error.

Additional info:

1. remote-viewer --spice-smartcard --spice-smartcard-db=~/.netscape/ --spice-smartcard-certificates=cert1,cert2,cert3 spice://127.0.0.1:5900, this command has the same issue.

Comment 1 Christophe Fergeau 2012-04-25 16:20:28 UTC
Step 8 works for me if I use the full path to ~/.netscape, /home/teuf/.netscape in my case. Can you confirm it's working for you too? It's also working if I change "--spice-smartcard-db=~/.netscape/" to "--spice-smartcard-db ~/.netscape/", and this makes the command line closer to the spicec one.

spicy has the same behaviour so it's a spice-gtk bug. The behaviour with and without = is inconsistent, but most apps accepting an optional '=' in their options probably have the same behaviour (I think the shell does the ~ -> /home/foo/ substitution when it's preceded by a blank space, but not when there's a =). If you can confirm things are working for you with the changes I mentioned, then I think we can close this bug with no further action.

Comment 2 Geyang Kong 2012-04-26 06:35:54 UTC
I have retried with following 2 commands
virt-viewer --spice-smartcard --spice-smartcard-db ~/.netscape/ --spice-smartcard-certificates=cert1,cert2,cert3 $guestname
virt-viewer --spice-smartcard --spice-smartcard-db /root/.netscape/ --spice-smartcard-certificates=cert1,cert2,cert3 $guestname
Both of them works well for me.

Comment 3 Christophe Fergeau 2012-04-26 07:38:14 UTC
Ok, thanks  for retesting, I'm closing this bug then. If anyone disagree, just reopen it.


Note You need to log in before you can comment on or make changes to this bug.