From 72c707be927482e767e19a90c91087f42eaa9ec8 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 5 Jun 2024 15:01:53 -0400 Subject: [PATCH] proxy: Fix logic error with auth_data switch The previous change switched to use `auth_data` directly instead of passing the file. Update the logic just below which needs adjustment to continue to support authenticated pulls. Signed-off-by: Colin Walters --- lib/src/container/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/container/mod.rs b/lib/src/container/mod.rs index 65bd1ef7..3c7f2929 100644 --- a/lib/src/container/mod.rs +++ b/lib/src/container/mod.rs @@ -427,10 +427,10 @@ pub fn merge_default_container_proxy_opts_with_isolation( if !auth_specified { let root = &Dir::open_ambient_dir("/", cap_std::ambient_authority())?; config.auth_data = crate::globals::get_global_authfile(root)?.map(|a| a.1); - // If there's no authfile, then force on anonymous pulls to ensure + // If there's no auth data, then force on anonymous pulls to ensure // that the container stack doesn't try to find it in the standard // container paths. - if config.authfile.is_none() { + if config.auth_data.is_none() { config.auth_anonymous = true; } }