add support for luksSuspend/luksResume#558
Draft
Narrat wants to merge 1 commit into
Draft
Conversation
May come in handy for hibernation/suspending the OS without completly closing the tomb.
| done | ||
|
|
||
| _message "Commanded to revive tomb ::1 tomb name::" $tombname | ||
| # Currently missing check if $tombname is valid or could be found |
Contributor
There was a problem hiding this comment.
Can this work?
if [[ ${#mounted_tombs[@]} -eq 0 ]]; then
_failure "No mounted tombs found for: $tombname"
fi
Collaborator
Author
There was a problem hiding this comment.
As a general check, yes. But it would still need to check on available/open mounts and their names in detail.
Comment on lines
+3080
to
+3085
| # process bind-hooks (mount -o bind of directories) | ||
| # and exec-hooks (execute on open) | ||
| #option_is_set -n || { | ||
| # exec_safe_bind_hooks "${tombmount}" | ||
| # exec_safe_func_hooks open "${tombmount}" | ||
| #} |
Contributor
There was a problem hiding this comment.
Not sure if this is what we are going for
# Process bind-hooks and exec-hooks safely
if ! option_is_set -n; then
if [[ -d "$tombmount" ]]; then
exec_safe_bind_hooks "$tombmount" || _failure "Failed to execute bind-hooks."
exec_safe_func_hooks open "$tombmount" || _failure "Failed to execute function hooks."
else
_failure "Invalid tomb mount directory: $tombmount"
fi
fi
Collaborator
Author
There was a problem hiding this comment.
The right direction.
I didn't look into implementing this, as the general question still needs an answer.
Does is offer some kind of benefit? The script would contain three ways to "close" a tomb. close, slam and then suspend/resume. With suspend/resume kinda in between close and slam and I'm still not sure it is a benefical addition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
May come in handy for hibernation/suspending the OS without completly closing the tomb.
Just a POC for #34 without a full close operation, but still avoiding writing the secret to places where it shouldn't be.
Not fully fleshed out, as bind mounts are ignored, operations on a suspened device are allowed.
But it is imo enough to play around with and decide if it is worth or close (or slam) is enough.