mirror of
https://github.com/linuxboot/heads.git
synced 2025-01-29 15:44:07 +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.:
|
# session file. E.g.:
|
||||||
# trap "cleanup_session '$SESSION_FILE'" EXIT
|
# trap "cleanup_session '$SESSION_FILE'" EXIT
|
||||||
cleanup_session() {
|
cleanup_session() {
|
||||||
|
TRACE "Under /bin/tpmr:cleanup_session"
|
||||||
session_file="$1"
|
session_file="$1"
|
||||||
if [ -f "$session_file" ]; then
|
if [ -f "$session_file" ]; then
|
||||||
DEBUG "Clean up session: $session_file"
|
DEBUG "Clean up session: $session_file"
|
||||||
@ -235,6 +236,7 @@ cleanup_session() {
|
|||||||
# trap EXIT, e.g.:
|
# trap EXIT, e.g.:
|
||||||
# trap "cleanup_shred '$FILE'" EXIT
|
# trap "cleanup_shred '$FILE'" EXIT
|
||||||
cleanup_shred() {
|
cleanup_shred() {
|
||||||
|
TRACE "Under /bin/tpmr:cleanup_shred"
|
||||||
shred -n 10 -z -u "$1" 2>/dev/null || true
|
shred -n 10 -z -u "$1" 2>/dev/null || true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user