Bug 137497

Summary: Root home dir hardcoded in gpgUtils.py, should be ~root, not /root
Product: Red Hat Enterprise Linux 2.1 Reporter: Trever Furnish <tgfurnish>
Component: up2dateAssignee: Adrian Likins <alikins>
Status: CLOSED DUPLICATE QA Contact: Fanny Augustin <fmoquete>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:06:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Trever Furnish 2004-10-28 20:56:03 UTC
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 20:57:45 UTC
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 16:08:46 UTC

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

Comment 3 Red Hat Bugzilla 2006-02-21 19:06:41 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.