Skip to content

permission-based actions? #42

@stsp

Description

@stsp

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions