diff --git a/rpmlint/checks/SUIDPermissionsCheck.py b/rpmlint/checks/SUIDPermissionsCheck.py index b7f5ee4c2..27159f1c9 100644 --- a/rpmlint/checks/SUIDPermissionsCheck.py +++ b/rpmlint/checks/SUIDPermissionsCheck.py @@ -60,7 +60,8 @@ def _check_post_scriptlets(self, pkg, path, need_verifyscript): if script: for line in script.split('\n'): - if re.search(fr'(chkstat|permctl) -n .* {path}', line): + escaped = re.escape(path) + if re.search(fr'(chkstat|permctl) -n .* {escaped}', line): found = True break