On Sat, May 4, 2024 at 4:49 PM Carlos Rodriguez-Fernandez <
carlosrodrifernan...@gmail.com> wrote:

> The suggestion for one of the comments of using `/run/fail2ban(/.*)?`
> instead of `/run/fail2ban.*` doesn't work?
>

I try to be very careful with making changes in SELinux and I don't know
what the difference is between those two statements.

ChatGPT had the following to say:
In SELinux, these two statements represent regular expressions used in file
context definitions. Let's break down each one:

1. `/run/fail2ban(/.*)?`:
   - This regular expression matches paths that start with `/run/fail2ban/`
followed by zero or more characters (`.*`) and optionally followed by a
forward slash and zero or more characters (`(/.*)?`). Essentially, it
matches paths like `/run/fail2ban`, `/run/fail2ban/`, and any
subdirectories and files within `/run/fail2ban`.

2. `/run/fail2ban.*`:
   - This regular expression matches paths that start with `/run/fail2ban`
followed by zero or more characters (`.*`). It doesn't specify any specific
structure beyond `/run/fail2ban`, so it matches paths like `/run/fail2ban`,
`/run/fail2ban.log`, `/run/fail2ban/somefile`, etc. It doesn't specifically
include subdirectories like the previous expression.

In summary, the first expression is more specific, including subdirectories
under `/run/fail2ban`, while the second expression is more general,
matching any path that starts with `/run/fail2ban`.
---

It doesn't look like it would make a difference for the specific issue...

Thanks,
Richard
--
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to