Bug 137497 - Root home dir hardcoded in gpgUtils.py, should be ~root, not /root
Root home dir hardcoded in gpgUtils.py, should be ~root, not /root
Status: CLOSED DUPLICATE of bug 135246
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: up2date (Show other bugs)
2.1
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Adrian Likins
Fanny Augustin
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-10-28 16:56 EDT by Trever Furnish
Modified: 2007-11-30 17:06 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:06:41 EST
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 Trever Furnish 2004-10-28 16:56:03 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7)
Gecko/20040616

Description of problem:
If you change the home directory of the root account, up2date is no
longer able to verify gpg signatures because it has a hardcoded value
starting with /root instead of ~root in
/usr/share/rhn/up2date_client/gpgUtils.py.  The line causing the
problem is:

gpg_home_dir = "/root/.gnupg"

That ought to be instead:

gpg_home_dir = "~root/.gnupg"

OR something that is derived by checking the home directory of the
root user.  I'm not a python programmer - I trust you'll know the
right thing.



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

How reproducible:
Always

Steps to Reproduce:
1. cd / && usermod -d /sysadm -m root
2. log out and log back in (to get the updated environment)
3. up2date --nox --update
    

Actual Results:  Errors are printed from gpg at the beginning of the
process:
gpg: fatal: /root/.gnupg: can't create directory: No such file or
directory
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/16384
gpg: fatal: /root/.gnupg: can't create directory: No such file or
directory
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/16384
gpg: fatal: /root/.gnupg: can't create directory: No such file or
directory
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/16384
gpg: fatal: /root/.gnupg: can't create directory: No such file or
directory
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/16384

Later in the process all package updates fail because of GPG problems.


Expected Results:  Packages should have been downloaded and
successfully verified by gpg, then installed.

Additional info:

Changing the /root to ~root Works For Me.  Would really prefer not to
have to do that though, since that's going to cause package
verification headaches in the future.

Setting GNUPGHOME does not help - it's overridden by a command-line
flag when up2date runs gpg.
Comment 1 Trever Furnish 2004-10-28 16:57:45 EDT
A workaround is to symlink the original ~root path to the new ~root
path, though that's annoying.
Comment 2 Aleksey Nogin 2004-11-29 11:08:46 EST

*** This bug has been marked as a duplicate of 135246 ***
Comment 3 Red Hat Bugzilla 2006-02-21 14:06:41 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

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