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:
Jonathon Hall 2023-03-08 17:17:01 -05:00
parent ebabcffbdc
commit 733fea8e2d
No known key found for this signature in database
GPG Key ID: 1E9C3CA91AE25114

View File

@ -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
}