Fix handling of auth.json file while in a user namespace
If you are running buildah within a user namespace, without XDG_RUNTIME_DIR being set, we need to make sure buildah login, logout handle XDG_RUNTIME_DIR the same was as buildah push. Running buildah within a container is triggering failures, where buildah login puts the auth.json file in /run/containers/0/auth.json but buildah push looks for it in /tmp/container-user-0/containers/containers/auth.json Fixes: https://github.com/containers/buildah/issues/3259 [NO TESTS NEEDED] The existing tests should see if this causes any problems. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
1192500cf0
commit
c5a6950b50
|
|
@ -132,7 +132,7 @@ func before(cmd *cobra.Command) error {
|
|||
}
|
||||
|
||||
switch cmd.Use {
|
||||
case "", "help", "version", "mount", "login", "logout":
|
||||
case "", "help", "version", "mount":
|
||||
return nil
|
||||
}
|
||||
unshare.MaybeReexecUsingUserNamespace(false)
|
||||
|
|
|
|||
Loading…
Reference in New Issue