Bug 500361 - [ecryptfs-add-passphrase] adding key, which is in keyring already, results in error msg
[ecryptfs-add-passphrase] adding key, which is in keyring already, results in...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ecryptfs-utils (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Michal Hlavinka
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-12 08:47 EDT by Michal Nowak
Modified: 2013-03-07 21:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 05:57:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michal Nowak 2009-05-12 08:47:01 EDT
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 12:12:39 EDT
(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 05:57:20 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/RHSA-2009-1307.html

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