Bug 1259770

Summary: permission changed after writing to /etc/cups/subscriptions.conf
Product: Red Hat Enterprise Linux 7 Reporter: Branislav Náter <bnater>
Component: cupsAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Petr Sklenar <psklenar>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: jcerny, jlieskov, jpopelka, jscotka, orion, psklenar, zdohnal
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cups-1.6.3-24.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 06:46:09 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:

Description Branislav Náter 2015-09-03 13:56:58 UTC
Description of problem:
/etc/cups/subscriptions.conf file permissions are changed after cups fills file with content. See bellow.

# rpm -V cups
.M.......  c /etc/cups/subscriptions.conf

Version-Release number of selected component (if applicable):
cups-1.6.3-22.el7

How reproducible:
always

Steps to Reproduce:
# service cups restart
Redirecting to /bin/systemctl restart  cups.service
# service cups-browsed restart
Redirecting to /bin/systemctl restart  cups-browsed.service
# ls /etc/cups/subscriptions.conf -la
-rw-r--r--. 1 root lp 0 Jul 21 11:39 /etc/cups/subscriptions.conf
# cat /etc/cups/subscriptions.conf

# wait a while "read" for "others" is missing
# ll /etc/cups/subscriptions.conf
-rw-r-----. 1 root lp 249 Sep  3 09:48 /etc/cups/subscriptions.conf

and rpm -V cups is unhappy:
# rpm -V cups
.M.......  c /etc/cups/subscriptions.conf

Comment 1 Jiri Popelka 2015-10-29 12:04:44 UTC
Cups scheduler re-writes the configuration files with mode 640, so I think we should ship/install it with the same mode (we use 644 atm).

from scheduler/conf.h:
VAR int	ConfigFilePerm VALUE(0640) /* Permissions for config files */

Comment 2 Tim Waugh 2015-11-02 09:50:05 UTC
Agreed.

Comment 9 errata-xmlrpc 2016-11-04 06:46:09 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://rhn.redhat.com/errata/RHBA-2016-2459.html