From f3d3746f72f0296bd89db67a546ede2aed0c5b18 Mon Sep 17 00:00:00 2001 From: Ho Kim Date: Thu, 26 Jun 2025 10:59:32 +0000 Subject: [PATCH] fix(ldconfig): suppress /proc mount error for non-root users Non-root users are not permitted to mount /proc, which causes `mountProc` to fail and abort `prepareRoot`. To prevent this, the error is now printed to stderr instead of causing a failure, allowing continued execution. --- internal/ldconfig/ldconfig.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/ldconfig/ldconfig.go b/internal/ldconfig/ldconfig.go index f3db1a77..cc1bb27d 100644 --- a/internal/ldconfig/ldconfig.go +++ b/internal/ldconfig/ldconfig.go @@ -130,7 +130,8 @@ func (l *Ldconfig) prepareRoot() (string, error) { // To prevent leaking the parent proc filesystem, we create a new proc mount // in the specified root. if err := mountProc(l.inRoot); err != nil { - return "", fmt.Errorf("error mounting /proc: %w", err) + // Non-root users cannot mount /proc; print the error but continue execution + fmt.Fprintf(os.Stderr, "error mounting /proc: %s\n", err) } // We mount the host ldconfig before we pivot root since host paths are not