You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
A change introduced in 3006.3 to the selinux module function _fcontext_add_or_delete_policy checks for the presence of an existing matching context, and if one is found changes the action from "add" to "modify".
In certain corner cases, where a longer filespec is already defined, this detection can match other contexts - which then changes the action to "modify", however since the policy does not actually exist, the attempt to modify fails.
A change was made in 3006.5 which allowed regex filespecs to work better, but it still does not cover this case.
Setup
on-prem machine
VM (Virtualbox, KVM, etc. please specify)
VM running on a cloud service, please be explicit and add details
container (Kubernetes, Docker, containerd, etc. please specify)
Expected behavior
Both states should have succeeded
Versions Report
salt --versions-report
Salt Version:
Salt: 3006.5Python Version:
Python: 3.10.13 (main, Nov 15 2023, 04:34:27) [GCC 11.2.0]Dependency Versions:
cffi: 1.14.6cherrypy: unknowndateutil: 2.8.1docker-py: Not Installedgitdb: Not Installedgitpython: Not InstalledJinja2: 3.1.2libgit2: Not Installedlooseversion: 1.0.2M2Crypto: Not InstalledMako: Not Installedmsgpack: 1.0.2msgpack-pure: Not Installedmysql-python: Not Installedpackaging: 22.0pycparser: 2.21pycrypto: Not Installedpycryptodome: 3.9.8pygit2: Not Installedpython-gnupg: 0.4.8PyYAML: 6.0.1PyZMQ: 23.2.0relenv: 0.14.2smmap: Not Installedtimelib: 0.2.4Tornado: 4.5.3ZMQ: 4.3.4System Versions:
dist: rocky 9.2 Blue Onyxlocale: utf-8machine: x86_64release: 5.14.0-284.30.1.el9_2.x86_64system: Linuxversion: Rocky Linux 9.2 Blue Onyx
The text was updated successfully, but these errors were encountered:
Description
A change introduced in 3006.3 to the selinux module function _fcontext_add_or_delete_policy checks for the presence of an existing matching context, and if one is found changes the action from "add" to "modify".
In certain corner cases, where a longer filespec is already defined, this detection can match other contexts - which then changes the action to "modify", however since the policy does not actually exist, the attempt to modify fails.
A change was made in 3006.5 which allowed regex filespecs to work better, but it still does not cover this case.
Setup
Steps to Reproduce the behavior
Use a state file selinux.sls containing:
Expected behavior
Both states should have succeeded
Versions Report
salt --versions-report
The text was updated successfully, but these errors were encountered: