Skip to content

Commit

Permalink
Merge pull request #1299 from rpm-software-management/fix-permctl-regex
Browse files Browse the repository at this point in the history
SUIDPermissionsCheck: Escape path for regular expression
  • Loading branch information
danigm authored Nov 11, 2024
2 parents 1b69a23 + f535fdc commit 1714e96
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rpmlint/checks/SUIDPermissionsCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1714e96

Please sign in to comment.