Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Produce an error if * is encountered in a argument position. #780

Open
squell opened this issue Sep 21, 2023 · 1 comment
Open

Produce an error if * is encountered in a argument position. #780

squell opened this issue Sep 21, 2023 · 1 comment
Assignees
Labels
C-checker Permission checking logic C-parser Parser/AST enhancement New feature or request

Comments

@squell
Copy link
Member

squell commented Sep 21, 2023

We explicitly do not support wildcards as arguments (see the current README). I.e. rm *.txt will only match a literal sudo rm '*.txt', which is quite useless. This issue proposes it becomes an actual error.

@squell squell self-assigned this Sep 21, 2023
@squell squell linked a pull request Sep 21, 2023 that will close this issue
@squell
Copy link
Member Author

squell commented Sep 21, 2023

Note, closing this issue by merging the PR has the ability to break systems. E.g. suppose a sudoers rule has %sudoers ALL = (ALL:ALL) ALL, NOPASSWD: /bin/ls -la *, that entire rule will be rejected, and someone might get bricked, whereas currently they simply won't be able to use ls -la without typing in their password.

An alternative is to close this issue (and close the PR without merging) and see this as a subset of issue #53; which would involve writing a secondary "analysis" phase of the entire AST where we ferret out infelicities that are not fatal, but not recommended. (That would have my preference)

@squell squell added C-parser Parser/AST C-checker Permission checking logic enhancement New feature or request labels Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-checker Permission checking logic C-parser Parser/AST enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant