Description of problem:
- rhn_check command executed in rhnsd daemon changed the file permission in yum cache into 0666.
- This happened when the cache was recreated. rhn_check can recreate it.
- When a new file was created in rhnsd, the file was created with mode=0666. Because umask=0000. (comment #56 and #57)
- rhnsd is running with umask=0000 in RHEL7. it's running with umask=0022 in RHEL6.
- On umask=0000, the default permission of the new file should be 0666. So, this matches their problem.
- umask is set in latest rhnsd itself in RHEL7. (C#57) The code to set it doesn't exist in rhnsd of RHEL6.
- This should be regression. (need to check)
rhnsd-5.0.13-5.el7: umask(0) is NOT executed in main() of rhnsd.c.
rhnsd-5.0.13-7.el7: umask(0) is executed in main() of rhnsd.c.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Verified with rhnsd-5.0.13-10.el7.x86_64
>> ll /var/run/rhn_check.pid
-rwxr-xr-x. 1 root root 5 8. pro 10.59 /var/run/rhn_check.pid
-rw-r--r--. 1 root root 4 8. pro 08.17 /var/run/rhnsd.pid
>> find /var/cache -name repomd.xml -ls
707 8 -rw-r--r-- 1 root root 1545 Nov 21 01:37 /var/cache/yum/x86_64/7Server/rhn-tools-rhel-x86_64-server-7/repomd.xml
4862657 8 -rw-r--r-- 1 root root 1545 Dec 8 01:30 /var/cache/yum/x86_64/7Server/rhel-x86_64-server-7/repomd.xml
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.