Bug 1194699

Summary: trying to start service as unprivileged user isn't denied properly
Product: Red Hat Software Collections Reporter: Karel Volný <kvolny>
Component: mysqlAssignee: Honza Horak <hhorak>
Status: CLOSED ERRATA QA Contact: Karel Volný <kvolny>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rh-mysql56CC: bblaskov, databases-maint, hhorak
Target Milestone: beta   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rh-mysql56-mysql-5.6.23-6.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-04 08:44:55 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 Karel Volný 2015-02-20 14:57:20 UTC
Description of problem:
Trying to start rh-mysql56-mysqld as an unprivileged user, I'm getting errors for actions that should not have been even tried and it is not reported that (if) the startup has failed - in fact, it suggests the opposite saying "The daemon will be run ..."

Version-Release number of selected component (if applicable):
rh-mysql56-mysql-5.6.23-2.el6

How reproducible:
always

Steps to Reproduce:
1. run /CoreOS/mysql/Sanity/init-script-LSB

Actual results:
:: [ 21:24:14 ] :: >>>>>>>>> insufficient rights
:: [  BEGIN   ] :: Insufficient rights, starting the service under nonprivileged user must fail :: actually running 'su testuserqa -c 'service rh-mysql56-mysqld start''
touch: cannot touch `/var/opt/rh/scls/rh-mysql56/log/mysql/rh-mysql56-mysqld.log': Permission denied
The log file /var/opt/rh/scls/rh-mysql56/log/mysql/rh-mysql56-mysqld.log could not be created.
The daemon will be run under mysql:mysql
:: [   PASS   ] :: Insufficient rights, starting the service under nonprivileged user must fail (Expected 4, got 4)
:: [   FAIL   ] :: File '/var/tmp/tmp.P9HAkWXu3i' should contain 'FAILED' 

Expected results:
:: [ 20:05:44 ] :: >>>>>>>>> insufficient rights
:: [  BEGIN   ] :: Insufficient rights, starting the service under nonprivileged user must fail :: actually running 'su testuserqa -c 'service mysql55-mysqld start''
Starting mysql55-mysqld:  [FAILED]
:: [   PASS   ] :: Insufficient rights, starting the service under nonprivileged user must fail (Expected 4, got 4)
:: [   PASS   ] :: File '/var/tmp/tmp.58iIqPvvZU' should contain 'FAILED' 


Additional info:

Comment 6 errata-xmlrpc 2015-06-04 08:44:55 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/RHEA-2015-1059.html