mirror of https://github.com/containers/image.git
storage: fix UID detection in a namespace
correctly detect the UID when running in rootless mode. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
3313dcdad7
commit
43fdadd316
|
|
@ -4,7 +4,6 @@ package storage
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
|
@ -181,7 +180,7 @@ func (s *storageTransport) GetStore() (storage.Store, error) {
|
||||||
// Return the transport's previously-set store. If we don't have one
|
// Return the transport's previously-set store. If we don't have one
|
||||||
// of those, initialize one now.
|
// of those, initialize one now.
|
||||||
if s.store == nil {
|
if s.store == nil {
|
||||||
options, err := storage.DefaultStoreOptions(os.Getuid() != 0, os.Getuid())
|
options, err := storage.DefaultStoreOptionsAutoDetectUID()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
github.com/containers/image
|
github.com/containers/image
|
||||||
|
|
||||||
github.com/sirupsen/logrus v1.0.0
|
github.com/sirupsen/logrus v1.0.0
|
||||||
github.com/containers/storage v1.12.1
|
github.com/containers/storage v1.12.2
|
||||||
github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76
|
github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76
|
||||||
github.com/docker/docker-credential-helpers d68f9aeca33f5fd3f08eeae5e9d175edf4e731d1
|
github.com/docker/docker-credential-helpers d68f9aeca33f5fd3f08eeae5e9d175edf4e731d1
|
||||||
github.com/docker/distribution 5f6282db7d65e6d72ad7c2cc66310724a57be716
|
github.com/docker/distribution 5f6282db7d65e6d72ad7c2cc66310724a57be716
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue