From c4a705f0dbb8610c619ca7c906f5924c2b65a416 Mon Sep 17 00:00:00 2001 From: Scott Koranda Date: Mon, 6 Feb 2023 09:33:18 -0600 Subject: [PATCH] container slashRoot preserve symlinks (CO-2599) --- container/match/base/comanage_shibboleth_sp_utils.sh | 4 ++-- container/match/base/comanage_utils.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/container/match/base/comanage_shibboleth_sp_utils.sh b/container/match/base/comanage_shibboleth_sp_utils.sh index 02ac20986..27964cec4 100755 --- a/container/match/base/comanage_shibboleth_sp_utils.sh +++ b/container/match/base/comanage_shibboleth_sp_utils.sh @@ -226,11 +226,11 @@ function comanage_shibboleth_sp_utils::process_slash_root() { pushd "${slash_root}" - # Copy all files and preserve all details but exclude any files + # Copy all files and sysmlinks and preserve all details but exclude any files # for the Shibboleth SP if they exist to allow the Shib SP # entrypoint script to process that path and prevent a race # condition. - find etc/shibboleth -type f | xargs -I{} cp --preserve=all --parents {} / > ${OUTPUT} 2>&1 + find etc/shibboleth -type f,l | xargs -I{} cp --preserve=all --parents --no-dereference {} / > ${OUTPUT} 2>&1 popd diff --git a/container/match/base/comanage_utils.sh b/container/match/base/comanage_utils.sh index d66d4ad4a..341ebeafa 100644 --- a/container/match/base/comanage_utils.sh +++ b/container/match/base/comanage_utils.sh @@ -651,11 +651,11 @@ function comanage_utils::process_slash_root() { pushd "${slash_root}" - # Copy all files and preserve all details but exclude any files + # Copy all files and symlinks and preserve all details but exclude any files # for the Shibboleth SP if they exist to allow the Shib SP # entrypoint script to process that path and prevent a race # condition. - find . -type f -not -path "./etc/shibboleth/*" | xargs -I{} cp --preserve=all --parents {} / > ${OUTPUT} 2>&1 + find . -type f,l -not -path "./etc/shibboleth/*" | xargs -I{} cp --preserve=all --parents --no-dereference {} / > ${OUTPUT} 2>&1 popd