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

Get prospective restriction status, without applying restrictions #36

Open
mrcnski opened this issue May 26, 2023 · 4 comments
Open

Get prospective restriction status, without applying restrictions #36

mrcnski opened this issue May 26, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@mrcnski
Copy link

mrcnski commented May 26, 2023

Hi, appreciate the work on this! I'm curious if it's possible to get what the RestrictionStatus would be, without actually applying the restrictions. Kind of like a dry run? I have two use cases:

  1. Telemetry a single time on application startup, instead of every time the worker thread is locked.
  2. Disabling tests when the test environment doesn't support landlock.

I don't know how landlock works under the hood, so maybe this can result in a race, but for our purposes that wouldn't really matter. I can help with the implementation if this is possible & desired.

@l0kod
Copy link
Member

l0kod commented Jun 16, 2023

Thanks! Your telemetry use case is definitely valuable.

About the "disabling tests" use case, I guess it is about testing the sandboxing itself, not directly the app, right?

There is an API improvement ongoing #12 and I'll get back to it this month. I need to implement the remaining changes I proposed at FOSDEM. This revamp should bring most of the mechanic to add a "dry-run" feature. Feel free to give your point of view about this new API. I'll ping you once #12 land.

@mrcnski
Copy link
Author

mrcnski commented Jul 6, 2023

About the "disabling tests" use case, I guess it is about testing the sandboxing itself, not directly the app, right?

Yep, we are testing to ensure landlocked threads are really restricted. If landlock is not supported by the kernel (in the CI machine or whatever), the test has to bail early.

I'll ping you once #12 land.

Awesome, thanks! I watched the FOSDEM talk so I should be able to understand the PR.

@l0kod
Copy link
Member

l0kod commented Feb 21, 2024

@mrcnski are you still interested to work on this?

@l0kod l0kod added the enhancement New feature or request label Feb 21, 2024
@mrcnski
Copy link
Author

mrcnski commented Feb 21, 2024

Hey @l0kod, not at the moment but appreciate the consideration! Glad to see this ticket is on the agenda.

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

No branches or pull requests

2 participants