Bug 748876

Summary: rhnreg_ks accepts relative path to SSL Cert but also writes relative path to /etc/sysconfig/rhn/up2date
Product: Red Hat Enterprise Linux 6 Reporter: Jiří Mikulka <jmikulka>
Component: rhn-client-toolsAssignee: Michael Mráka <mmraka>
Status: CLOSED ERRATA QA Contact: Jiří Mikulka <jmikulka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: mminar, mmraka, msuchy, slukasik
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhn-client-tools-1.0.0-76.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 11:59:44 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 Jiří Mikulka 2011-10-25 14:09:15 UTC
Description of problem:
I tried to register my system manually using `rhnreg_ks` command with specified --serverUrl, --username, --password and --sslCACert with relative path to the certificate. Registration was sucessful, but relative path to the certificate was written into the `/etc/sysconfig/rhn/up2date`, which led to failures when picking up events by `rhn_check -vv`.

Version-Release number of selected component (if applicable):
RHEL Server 6.1, x86_64
rhn-client-tools-1.0.0-73.el6.src.rpm

How reproducible:
always

Steps to Reproduce:
1. save the certificate in /path/to/ssl/cert
2. change directory to /path/to/ssl
   `cd /path/to/ssl/`
2. register machine to the Satellite using rhnreg_ks
   `rhnreg_ks --serverUrl=https://server.url/XMLRPC --sslCACert=./cert --username <username> --password <password>`
3. system should be registered (check in WebUI)
4. in WebUI plan some event (eg. errata installation)
5. pick up planned event
   `rhn_check -vv`
6. there should be SSL certificate problems while downloading/... packages/erratas from Satellite
  
Actual results:
`rhn_check -vv` fails

Expected results:
`rhn_check -vv` should pick up planned events correctly and install packages/...

Additional info:

Comment 1 Michael Mráka 2012-01-12 08:46:10 UTC
Fixed in Spacewalk master by
commit 3da9d23b1b96252db62f8c16b484fbcc5361fecc
    748876 - convert paths to absolute before saving
commit d10af2e339f9d432617c197d467b7a73247661a8
    748876 - simplify ConfigFile.save() loop

Comment 2 Michael Mráka 2012-01-12 08:48:17 UTC
Backported to CLIENT_RHEL-6 as
commit 44549e8d906b428c5c029fbe2bde41fe97b8c092
    748876 - convert paths to absolute before saving
commit 317ff51fe2bff45dd9d125e5c03dc32df8491127
    748876 - simplify ConfigFile.save() loop

Comment 6 errata-xmlrpc 2012-06-20 11:59:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0752.html