From 9782bf66b6c407582334af62a163962c79325bca Mon Sep 17 00:00:00 2001 From: Martin Lablans <6804500+lablans@users.noreply.github.com> Date: Wed, 7 May 2025 16:13:16 +0200 Subject: [PATCH] Code review: Move to /tmp/bridgehead/... --- lib/functions.sh | 2 +- lib/gitlab-token-helper.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/functions.sh b/lib/functions.sh index d30cf58..680032c 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -348,7 +348,7 @@ function secret_sync_gitlab_token() { fi # Create a temporary directory for Secret Sync that is valid per boot - secret_sync_tempdir="/tmp/secret-sync.boot-$(cat /proc/sys/kernel/random/boot_id)" + secret_sync_tempdir="/tmp/bridgehead/secret-sync.boot-$(cat /proc/sys/kernel/random/boot_id)" mkdir -p $secret_sync_tempdir # Use Secret Sync to validate the GitLab token in $secret_sync_tempdir/cache. diff --git a/lib/gitlab-token-helper.sh b/lib/gitlab-token-helper.sh index 56d65c6..1aa7a62 100755 --- a/lib/gitlab-token-helper.sh +++ b/lib/gitlab-token-helper.sh @@ -2,7 +2,7 @@ [ "$1" = "get" ] || exit -source "/tmp/secret-sync.boot-$(cat /proc/sys/kernel/random/boot_id)/gitlab-token" +source "/tmp/bridgehead/secret-sync.boot-$(cat /proc/sys/kernel/random/boot_id)/gitlab-token" # Any non-empty username works, only the token matters cat << EOF