regexes are not supported

Open
#1,350 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
cli, security

Research direction

Start by tracing sudo-rs handling of regular expressions in sudoers, then compare its behavior with chapters 9.3.3 and 9.3.4 of the referenced POSIX standard. Reproduce the LHCATHOMEBOINC_11 example and verify that escaped dots are treated as literal dots while unescaped dots retain their wildcard meaning.

Written by the indexing model from the issue text.

Description

C-checker C-parser enhancement wontfix

Please ensure sudo-rs does not violate the regular expressions standard published here:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html

A volunteer running tasks for CERN's public project https://lhcathome.cern.ch/lhcathome/index.php recently reported his CERN tasks were failing after he upgraded his Linux box to Ubuntu 25.10.
He could track this down to sudo-rs which complains about a custom sudoers file using regular expressions like this:
Cmnd_Alias LHCATHOMEBOINC_11 = /usr/bin/systemctl ^(freeze|thaw) ATLAS_[-a-zA-Z0-9_]+\.scope$

The volunteer found out that after replacing \. with . sudo-rs accepts the sudoers file.

According to the regular expressions standard above (especially chapters 9.3.3, 9.3.4) a dot is a placeholder for nearly 'all characters' while an escaped dot stands for a literal dot.
The latter is the expected meaning in the custom sudoers file.

Dominant language
Rust
Stars
4.5k
Forks
179
Avg merge
16h 45m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from trifectatechfoundation/sudo-rs

All issues in trifectatechfoundation/sudo-rs

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.