-
-
Notifications
You must be signed in to change notification settings - Fork 159
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
add support for luksSuspend/luksResume #558
base: master
Are you sure you want to change the base?
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this work?
if [[ ${#mounted_tombs[@]} -eq 0 ]]; then
_failure "No mounted tombs found for: $tombname"
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a general check, yes. But it would still need to check on available/open mounts and their names in detail.
# 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}" | ||
#} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
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.