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

perms regex is too lax #145

Open
the-sun-will-rise-tomorrow opened this issue Aug 3, 2024 · 1 comment
Open

perms regex is too lax #145

the-sun-will-rise-tomorrow opened this issue Aug 3, 2024 · 1 comment

Comments

@the-sun-will-rise-tomorrow

If I set perms = [{ regex = "/tmp"; }] then that also matches /some/path/tmp.

I tried to use regex = "^/tmp$" but now that doesn't seem to match anything.

I think it should be possible to set the permissions for one specific, exactly specified path.

@the-sun-will-rise-tomorrow
Copy link
Author

Ah, I figured it out.

You have to do regex = "^/nix/store/abcd......../tmp$";.

I was misled by the use of .* in documentation and examples. Usually, it makes sense and is needed if there is some kind of ^...$ added to the pattern implicitly elsewhere. But, since there is not, it is rendundant - foo and foo.* both mean the same thing as .*foo.*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant