From 8f2c88da7cf54fe2bf585b90dededdcf40bb7591 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Tue, 1 Apr 2025 01:32:17 +0200
Subject: [PATCH] Fix.

---
 testing/scripts/_setup_secrets_user.sh | 2 +-
 testing/scripts/setup_secrets.sh       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testing/scripts/_setup_secrets_user.sh b/testing/scripts/_setup_secrets_user.sh
index 9947ab8..c80c652 100644
--- a/testing/scripts/_setup_secrets_user.sh
+++ b/testing/scripts/_setup_secrets_user.sh
@@ -23,7 +23,7 @@ abort_if_exists "${PATH_USER_SSH}"
 abort_if_exists "${PATH_REPOS}"
 abort_if_exists "${PATH_BORG_CONF}"
 
-mount_secrets # sets PASSPHRASE
+mount_secrets "$1" # sets PASSPHRASE
 copy_and_unmount_secrets 'in'
 export BORG_PASSPHRASE="${PASSPHRASE}"
 
diff --git a/testing/scripts/setup_secrets.sh b/testing/scripts/setup_secrets.sh
index 7f0bf47..79674c1 100755
--- a/testing/scripts/setup_secrets.sh
+++ b/testing/scripts/setup_secrets.sh
@@ -14,5 +14,5 @@ PATH_TMP_REPO="$(path_tmp_timestamped configrepo)"
 echo "Setting up config repo copy for user at ${PATH_TMP_REPO} …"
 cp -a "${PATH_REPO}" "${PATH_TMP_REPO}"
 chown -R "${USERNAME}:${USERNAME}" "${PATH_TMP_REPO}"
-su -l "${USERNAME}" --whitelist-environment=BORG_PASSPHRASE -c "/bin/sh ${PATH_TMP_REPO}/${PATH_REL_SETUP_SECRETS_USER}"
+su -l "${USERNAME}" -c "/bin/sh ${PATH_TMP_REPO}/${PATH_REL_SETUP_SECRETS_USER} $1"
 rm -rf "${PATH_TMP_REPO}"
-- 
2.30.2