Bug 1479370 - sestatus prints Mode from config file: error (Success)
sestatus prints Mode from config file: error (Success)
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: policycoreutils (Show other bugs)
7.4
All Linux
low Severity low
: rc
: ---
Assigned To: Petr Lautrbach
Milos Malik
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-08 08:56 EDT by Milos Malik
Modified: 2017-08-09 04:17 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milos Malik 2017-08-08 08:56:28 EDT
Description of problem:
* if the /etc/selinux/config file does not contain any line starting with SELINUX= or if such lines are commented out then sestatus prints a weird "error (Success)" message

Version-Release number of selected component (if applicable):
policycoreutils-python-2.5-8.el7.x86_64
policycoreutils-2.5-8.el7.x86_64

How reproducible:
* always

Steps to Reproduce:
1. get a RHEL-7.3 machine (targeted policy is active)
2. comment out the SELINUX=enforcing line in /etc/selinux/config
3. run sestatus

Actual results:
# sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          error (Success)
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      30
#

Expected results:
# sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          error (not found)
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      30
#

Note You need to log in before you can comment on or make changes to this bug.