mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-18 02:39:59 +00:00
tpmr: Add TRACE to cleanup functions
Add TRACE to cleanup_shred, cleanup_session Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
parent
ebabcffbdc
commit
733fea8e2d
@ -220,6 +220,7 @@ tpm2_startsession() {
|
||||
# session file. E.g.:
|
||||
# trap "cleanup_session '$SESSION_FILE'" EXIT
|
||||
cleanup_session() {
|
||||
TRACE "Under /bin/tpmr:cleanup_session"
|
||||
session_file="$1"
|
||||
if [ -f "$session_file" ]; then
|
||||
DEBUG "Clean up session: $session_file"
|
||||
@ -235,6 +236,7 @@ cleanup_session() {
|
||||
# trap EXIT, e.g.:
|
||||
# trap "cleanup_shred '$FILE'" EXIT
|
||||
cleanup_shred() {
|
||||
TRACE "Under /bin/tpmr:cleanup_shred"
|
||||
shred -n 10 -z -u "$1" 2>/dev/null || true
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user