~mrooney/ecryptfs/nautilus-integration

« back to all changes in this revision

Viewing changes to src/libecryptfs/key_management.c

  • Committer: Michal Hlavinka
  • Date: 2009-04-22 09:36:25 UTC
  • mto: This revision was merged to the branch mainline in revision 384.
  • Revision ID: mhlavink@redhat.com-20090422093625-t9sbammr8girlc66
key_management.c: if key is already in keyring don't report it as error

ecryptfs_add_passphrase_key_to_keyring gets return code 1 if key,
it is trying to add to keyring, already exists in keyring.
Return code remains 1, just don't report it as error.

Signed-off-by: Michal Hlavinka <mhlavink@redhat.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
                goto out;
232
232
        }
233
233
        rc = ecryptfs_add_auth_tok_to_keyring(auth_tok, auth_tok_sig);
234
 
        if (rc) {
 
234
        if (rc < 0) {
235
235
                syslog(LOG_ERR, "%s: Error adding auth tok with sig [%s] to "
236
236
                       "the keyring; rc = [%d]\n", __FUNCTION__, auth_tok_sig,
237
237
                       rc);