Bug 500361 - [ecryptfs-add-passphrase] adding key, which is in keyring already, results in error msg
Summary: [ecryptfs-add-passphrase] adding key, which is in keyring already, results in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ecryptfs-utils
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-05-12 12:47 UTC by Michal Nowak
Modified: 2013-03-08 02:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 09:57:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2009:1307 0 normal SHIPPED_LIVE Low: ecryptfs-utils security, bug fix, and enhancement update 2009-09-01 10:20:43 UTC

Description Michal Nowak 2009-05-12 12:47:01 UTC
Description of problem:

Add key to the keyring:

[root@hp-ml370g4-01 tmp]# echo "baf" | ecryptfs-add-passphrase 
Passphrase: 
Inserted auth tok with sig [0ca9a92e9c4c4b5d] into the user session keyring

Add the same key to the keyring:

[root@hp-ml370g4-01 tmp]# echo "baf" | ecryptfs-add-passphrase 
Passphrase: 
Error: Inserting key into the user session keyring failed [1]
Info: Check the system log for more information from libecryptfs

[root@hp-ml370g4-01 tmp]# echo $?
1

I guess this should end up, with exit code == 0, because the key is already in. It should work like initscripts do - when the the service is running already, and you are starting it, says nothing and ends with 0 (`ssh-add' does the same).

Also:

"Passphrase: "

is not very useful, when reading from stdin, and and should be avoided.

Version-Release number of selected component (if applicable):

ecryptfs-utils-75-1.el5

How reproducible:
always

Expected results:

Silent pass, when the key is in the keyring already.

Comment 2 Michal Hlavinka 2009-05-13 16:12:39 UTC
(In reply to comment #0)
> Also:
> 
> "Passphrase: "
> 
> is not very useful, when reading from stdin, and and should be avoided.

this is because you've forgotten to use '-' as command line parameter

Comment 7 errata-xmlrpc 2009-09-02 09:57:20 UTC
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/RHSA-2009-1307.html


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