From 13a86a4f8d2422e51965fd6e0cfc2e0a6e80c07a Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 16 Jan 2023 19:28:38 +0100 Subject: [PATCH] store: prefer /etc/containers/storage.conf when running in rootful mode, if it is present, prefer the override path /etc/containers/storage.conf instead of using the default storage.conf provided by the package under the /usr/share/containers/ directory. Signed-off-by: Giuseppe Scrivano (cherry picked from commit f64e1bd14ae9e8694c4ead537569d139853d32bc) --- types/utils.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/utils.go b/types/utils.go index 76ff122b4..72c38f861 100644 --- a/types/utils.go +++ b/types/utils.go @@ -173,6 +173,9 @@ func DefaultConfigFile(rootless bool) (string, error) { return path, nil } if !rootless { + if _, err := os.Stat(defaultOverrideConfigFile); err == nil { + return defaultOverrideConfigFile, nil + } return defaultConfigFile, nil }