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

chrooted bash executor #560

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

chrooted bash executor #560

wants to merge 1 commit into from

Conversation

miklezzzz
Copy link
Contributor

@miklezzzz miklezzzz commented Feb 5, 2025

Overview

Implements running modules' shell scripts (hooks, enabled scripts) in a chrooted environment, prepared by a new module manager's component called environment manager.
The environment manager is enriched with the list of objects to provide in each module's chrooted directory in order to successfully launch corresponding module's scripts. Every object belongs to one of the predefined environment levels: EnabledScriptEnvironment and ShellHookEnvironment.
The resulting environment for a module is derived from the module's content (if the module has an enabled script or not, if the module has shell hooks to run or not, etc). The environment manager is capable of promoting and demoting modules' environments based on the aforementioned modules' content and the fact if a module is enabled or not.

Also, it contains several fixes to get rid of races when updating modules' states and module sets.

What this PR does / why we need it

Special notes for your reviewer

@miklezzzz miklezzzz added the enhancement New feature or request label Feb 5, 2025
@miklezzzz miklezzzz self-assigned this Feb 5, 2025
@miklezzzz miklezzzz force-pushed the chrooted-bash-executor branch 2 times, most recently from 104aff1 to bcb8093 Compare February 5, 2025 07:53
@miklezzzz miklezzzz force-pushed the chrooted-bash-executor branch 7 times, most recently from ef07ad1 to 4aa6ba0 Compare February 18, 2025 07:42
@miklezzzz miklezzzz marked this pull request as ready for review February 18, 2025 07:53
@miklezzzz miklezzzz marked this pull request as draft February 18, 2025 10:29
@miklezzzz
Copy link
Contributor Author

It seems I've found other races to fix before reviewing, though.

@miklezzzz miklezzzz marked this pull request as ready for review February 19, 2025 12:12
@miklezzzz miklezzzz requested a review from juev February 19, 2025 12:12
@miklezzzz miklezzzz force-pushed the chrooted-bash-executor branch from 9ca1489 to 1e83eea Compare February 20, 2025 09:03
Signed-off-by: Mikhail Scherba <[email protected]>
@miklezzzz miklezzzz force-pushed the chrooted-bash-executor branch from 1e83eea to b18ca92 Compare February 20, 2025 10:53
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

Successfully merging this pull request may close these issues.

2 participants