Skip to content

Comments

chrooted bash executor#560

Merged
yalosev merged 2 commits intomainfrom
chrooted-bash-executor
Mar 7, 2025
Merged

chrooted bash executor#560
yalosev merged 2 commits intomainfrom
chrooted-bash-executor

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 2 times, most recently from 1e83eea to b18ca92 Compare February 20, 2025 10:53
@miklezzzz miklezzzz marked this pull request as draft February 24, 2025 16:08
Signed-off-by: Mikhail Scherba <mikhail.scherba@flant.com>
@miklezzzz miklezzzz force-pushed the chrooted-bash-executor branch from b18ca92 to ef24da5 Compare February 24, 2025 18:32
@miklezzzz miklezzzz marked this pull request as ready for review February 24, 2025 19:50
Signed-off-by: Mikhail Scherba <mikhail.scherba@flant.com>
@miklezzzz miklezzzz force-pushed the chrooted-bash-executor branch from 3a79135 to f0e99c6 Compare March 5, 2025 09:08
@miklezzzz miklezzzz requested a review from yalosev March 5, 2025 09:29
@yalosev yalosev merged commit 48da565 into main Mar 7, 2025
8 checks passed
@yalosev yalosev deleted the chrooted-bash-executor branch March 7, 2025 13:43
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.

4 participants