RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 884264 - agent always required with gpg2
Summary: agent always required with gpg2
Keywords:
Status: CLOSED DUPLICATE of bug 841588
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gnupg2
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Mraz
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-05 18:53 UTC by Rob Crittenden
Modified: 2012-12-05 21:59 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-05 21:59:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rob Crittenden 2012-12-05 18:53:00 UTC
Description of problem:

In ipa we use gpg for simple symmetric encryption within a tool, basically like this:

% touch encrypt_me
% mkdir /tmp/test
% echo password | /usr/bin/gpg2 --batch --homedir /tmp/test --passphrase-fd 0 --yes --no-tty -o encrypt_me.gpg -c encrypt_me
gpg: WARNING: unsafe permissions on homedir `/tmp/test'
gpg: keyring `/tmp/test/pubring.gpg' created
gpg: can't connect to the agent: IPC connect call failed
gpg: problem with the agent: No agent running
% echo $? 2

This succeeds in encrypting the file but returns error code 2.

The reverse of this does not complain about the agent and returns 0.

% echo password | /usr/bin/gpg2 --batch --homedir /tmp/test --passphrase-fd 0 
--yes --no-tty -o encrypt_me.out -d encrypt_me.gpg
gpg: WARNING: unsafe permissions on homedir `/tmp/test'
gpg: CAST5 encrypted data
gpg: encrypted with 1 passphrase
gpg: WARNING: message was not integrity protected
% echo $?
0

Similar commands works fine using gpg.

Error code 2 is not documented on the man page. It just says that anything non-zero is bad. Does 2 mean can't connect to agent or something else? I can ignore that return code if needed.

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

gnupg2-2.0.19-6.el7

Comment 1 Tomas Mraz 2012-12-05 21:59:50 UTC

*** This bug has been marked as a duplicate of bug 841588 ***


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