Bug 1417185

Summary: Mode permissions for /etc/sysconfig/rhn/up2date were changed after registration
Product: Red Hat Enterprise Linux 6 Reporter: Pavel Studeník <pstudeni>
Component: rhn-client-toolsAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED ERRATA QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.9CC: jhutar, mkorbel, rjerrido, tlestach
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhn-client-tools-1.0.0.1-44-el6 Doc Type: Bug Fix
Doc Text:
Default mode permissions of file /etc/sysconfig/rhn/up2date from freshly installed packages is 644. but after registration to Satellite 5 the mode permissions of the file were changed to 600. This has been fixed and permissions of the /etc/sysconfig/rhn/up2date are no longer changed during registration.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-19 05:14:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1504706    

Description Pavel Studeník 2017-01-27 12:50:15 UTC
Description of problem:
Default mode permissions of file up2date from new installed packages is 644. but after registration to Satellite 5 the mode permissions of the file were changed to 600.

I am not sure what is correct mode, everyone can read this file or not. But the permissions should be same after registration. 

And default configure file up2date doesn't contain following default options that were added after registration to ../up2date

proxyPassword[comment]=The password to use for an authenticated proxy
proxyPassword=

enableProxyAuth[comment]=To use an authenticated proxy or not
enableProxyAuth=0

proxyUser[comment]=The username for an authenticated proxy
proxyUser=

File /etc/sysconfig/rhn/systemid has set 600 mode and I guess that it is good, because it contains ID of system.

Version-Release number of selected component (if applicable):
rhn-client-tools-1.0.0.1-43.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. rm /etc/sysconfig/rhn/*
2. yum reinstall rhn-client rhn-setup rhn-check
3. ll -Z /etc/sysconfig/rhn/up2date 
-rw-r--r--. root root system_u:object_r:rhnsd_conf_t:s0 /etc/sysconfig/rhn/up2date
4. rhnreg_ks ..
5. ll -Z /etc/sysconfig/rhn/up2date 
-rw-------. root root system_u:object_r:rhnsd_conf_t:s0 /etc/sysconfig/rhn/up2date
6. rpm -V rhn-client-tools-1.0.0.1-39.el6.noarch
.M.......  c /etc/sysconfig/rhn/up2date

Actual results:
mode permissions were changed 
644 -> 600

missing defaults values in configure file

Expected results:
mode permissions are equal 

default ../rhn/up2date contains all default configurations

Comment 2 Pavel Studeník 2017-01-27 13:24:24 UTC
On RHEL 7 the permissions were not changed and they stay same.

rhn-client-tools-2.0.2-8.el7.noarch

before: 
-rw-r--r--. root root system_u:object_r:rhnsd_conf_t:s0 /etc/sysconfig/rhn/up2date

after:
-rw-------. root root unconfined_u:object_r:rhnsd_conf_t:s0 systemid
-rw-r--r--. root root unconfined_u:object_r:rhnsd_conf_t:s0 up2date

Comment 4 Tomáš Kašpárek 2017-12-13 10:19:50 UTC
spacewalk.git(master): 035d38ff1daab34e2c69d74b11a7e997dbfe9b1c
spacewalk.git(master): 68020907608f8bbf3e0c3de1cf04e7c36f8ae8ed

Comment 5 Pavel Studeník 2017-12-13 11:26:16 UTC
Right. I suppose that it is not regression for RHEL6. (6.8, 6.9)

>> ll /etc/sysconfig/rhn/up2date
-rw-------. 1 root root 2042 Dec 12 19:26 /etc/sysconfig/rhn/up2date

>> rpm -V rhn-client-tools
.M.......  c /etc/sysconfig/rhn/up2date
>> rpm -q rhn-client-tools
rhn-client-tools-1.0.0.1-43.el6.noarch

Comment 8 Martin Korbel 2018-01-05 10:33:51 UTC
VERIFIED on rhn-client-tools-1.0.0.1-44.el6

Reproducer via comment 0

Comment 11 errata-xmlrpc 2018-06-19 05:14:05 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.

https://access.redhat.com/errata/RHBA-2018:1878