From 9caba26378ab2ca77adc885e75fea31993a97551 Mon Sep 17 00:00:00 2001 From: Mattias Andersson Date: Sun, 2 Feb 2025 19:15:19 +0100 Subject: [PATCH] Force sync hashed symlinks for ca-bundle for multiple certificates Related to issue https://github.com/vmware-tanzu/cert-injection-webhook/issues/119 update-ca-certificate refuse to generate hashed symlinks when two certificate is part of the same file. To fix this issue, we want to run c_rehash to force the generation of hashed symlinks. Signed-off-by: Mattias Andersson --- cmd/setup-ca-certs/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/setup-ca-certs/main.go b/cmd/setup-ca-certs/main.go index 14f8706..b846137 100644 --- a/cmd/setup-ca-certs/main.go +++ b/cmd/setup-ca-certs/main.go @@ -50,6 +50,13 @@ func main() { } logger.Println(string(out)) + logger.Println("Forcing the generation of hashed symlinks...") + cmd = exec.Command("c_rehash", tempCerts) + err = cmd.Run() + if err != nil { + log.Fatal(err) + } + logger.Println("Copying CA certificates...") err = CopyDir(tempCerts, "/workspace") if err != nil {