Message boards :
Number crunching :
Sudo-rs parsing issue
Message board moderation
| Author | Message |
|---|---|
|
Send message Joined: 24 May 23 Posts: 56 Credit: 5,035,780 RAC: 43,863 |
Hi! People using sudo-rs instead of sudo, as it happens with Ubuntu 25.10, will likely find an issue with the file /etc/sudoers.d/50-lhcathome_boinc_theory_native. In this file the dot happens to be escaped: "\.", whereas sudo-rs parsing doesn't want it (at least with my version 0.2.8). You can delete the "\", leaving the dot alone in every occurence. You can use visudo to edit the file: sudo visudo -f /etc/sudoers.d/50-lhcathome_boinc_theory_native Then double-check with: sudo visudo -c -- Bye, Lem |
|
Send message Joined: 15 Jun 08 Posts: 2702 Credit: 290,591,141 RAC: 140,776 |
The sudoers file uses regular expressions like here: Cmnd_Alias LHCATHOMEBOINC_02 = /usr/bin/systemctl ^(freeze|thaw) Theory_[-a-zA-Z0-9_]+\.scope$ In general, if a regex contains a '.' this stands for 'any character'. If you want to restrict it literally to a '.' then you must escape it with a '\'. If sudo-rs rejects a regex containing a valid escape like above then this is a bug in sudo-rs. Hence, please send a bug report to the sudo-rs developers: https://github.com/trifectatechfoundation/sudo-rs |
|
Send message Joined: 24 May 23 Posts: 56 Credit: 5,035,780 RAC: 43,863 |
If sudo-rs rejects a regex containing a valid escape like above then this is a bug in sudo-rs. I don't think so. sudo-rs does not support wildcards in command arguments, so no need for dots to be escaped. A dot is always a dot with sudo-rs. There had been a bug with the equal sign (=) not escapable, fixed already. Sudo-rs and sudo are not 100% compatible. Just it. However, if someone doesn't like sudo-rs, he can install and use sudo instead. -- Bye, Lem |
|
Send message Joined: 15 Jun 08 Posts: 2702 Credit: 290,591,141 RAC: 140,776 |
I do not agree. We use sudo's regex support for very good reasons. Your small modification shows that sudo-rs supports regex at least partly. So, why not completely? Escaping a '.' is not a wildcard issue. Not supporting it is a clear bug or forgotten feature. Sudo-rs is rather new and claims to be a replacement for sudo. The example here and other discussions at their development site shows it is far away from being ready. |
©2025 CERN