Project

General

Profile

Actions

Bug #51632

closed

cephadm: selinux is not checked against running configuration

Added by Javier Cacheiro almost 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

The _fetch_selinux function inside kernel_security in cephadm is not checking the actual selinux mode in which the kernel is running but the one configured in /etc/selinux/config, but the configured and the actual modes can be different.

For example, the mode in the configuration file and the actual mode will defer if the server has not been rebooted since the change in the config file. They will also differ if the mode was changed after boot using setenforce.

This leads to a wrong assumption of the selinux mode when launching docker commands like `inventory` that causes the command to fail.

The actual selinux mode should be checked looking at the output of the getenforce command, this will get the current selinux mode in which the kernel is running.

Actions #1

Updated by Sebastian Wagner almost 3 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Javier Cacheiro
  • Pull request ID set to 42290
Actions #2

Updated by Sebastian Wagner over 2 years ago

  • Project changed from Ceph to Orchestrator
Actions #3

Updated by Dimitri Savineau over 2 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to pacific
Actions #4

Updated by Sebastian Wagner over 2 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF