Instead of using a cached result `GetDefaultAuthFile`, always do call the function when a new `Client` is created, since at least `/run/containers` can get created as a side-effect by one of the container. Now that we check eagerly and often the path check function was reworked to only return paths that do exist and are accessible. Also check if `REGISTRY_AUTH_FILE` is set and if so, and it is accessible use that. To check accessability, use `unix.Access` instead of `os.Stat`, since On Fedora/RHEL 9 `os.Stat` is implemented via `statx` and will indeed return `EACCES` for inaccessible paths. But on RHEL 8 `lstat` is used and that will return `ENOENT` but then later when trying to open the file we will get `EPERM`. |
||
|---|---|---|
| .. | ||
| client.go | ||
| client_test.go | ||
| container_test.go | ||
| resolver.go | ||
| resolver_test.go | ||
| spec.go | ||