Skip to content

regexes are not supported #1350

@computezrmle

Description

@computezrmle

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions