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

permission-based actions? #42

Open
stsp opened this issue Jan 3, 2025 · 0 comments
Open

permission-based actions? #42

stsp opened this issue Jan 3, 2025 · 0 comments

Comments

@stsp
Copy link

stsp commented Jan 3, 2025

Hi guys!

I am very new to landlock.
As far as I understand, the one can
allow the particular actions based on
a file path, but what I was looking
for, should also include permission
check.

That is, would it make sense to add
the actions like:
LANDLOCK_ACCESS_FS_WRITE_FILE_USER
LANDLOCK_ACCESS_FS_WRITE_FILE_GROUP
LANDLOCK_ACCESS_FS_WRITE_FILE_OTHER
so that I can eg allow the access only by
"Other" permission bits, but keep User and
Group denied for files in the specified dir?
More precisely, if I only use
LANDLOCK_ACCESS_FS_WRITE_FILE_OTHER
then User and Group checks are not enough
to grant the permission, but are only enough
to reject the permission.

In that semantic,
(LANDLOCK_ACCESS_FS_WRITE_FILE_USER |
LANDLOCK_ACCESS_FS_WRITE_FILE_GROUP |
LANDLOCK_ACCESS_FS_WRITE_FILE_OTHER) ==
LANDLOCK_ACCESS_FS_WRITE_FILE
I.e. specifying all 3 is similar to what
LANDLOCK_ACCESS_FS_WRITE_FILE does
right now. So basically its just a more
fine-grained control.

What do you think? Does something like this
make a sense?

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