Skip to content

Commit

Permalink
fixes saltstack#65340 correct use of egrep to parse semanage output
Browse files Browse the repository at this point in the history
  • Loading branch information
ndptech committed Oct 4, 2023
1 parent a6b3b79 commit 92bdf25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion salt/modules/selinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def _fcontext_add_or_delete_policy(
if "add" == action:
# need to use --modify if context for name file exists, otherwise ValueError
filespec = re.escape(name)
cmd = f"semanage fcontext -l | egrep {filespec}"
cmd = f"semanage fcontext -l | egrep '{filespec} '"
current_entry_text = __salt__["cmd.shell"](cmd, ignore_retcode=True)
if current_entry_text != "":
action = "modify"
Expand Down

0 comments on commit 92bdf25

Please sign in to comment.