mirror of https://github.com/containers/podman.git
Update vendor on containers/storage to v1.12.10
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
cae5af5b93
commit
6109de4b93
|
@ -19,7 +19,7 @@ github.com/containers/image 2c0349c99af7d90694b3faa0e9bde404d407b145
|
|||
github.com/vbauerster/mpb v3.3.4
|
||||
github.com/mattn/go-isatty v0.0.4
|
||||
github.com/VividCortex/ewma v1.1.1
|
||||
github.com/containers/storage 9b10041d7b2ef767ce9c42b5862b6c51eeb82214
|
||||
github.com/containers/storage v1.12.10
|
||||
github.com/containers/psgo v1.3.0
|
||||
github.com/coreos/go-systemd v17
|
||||
github.com/coreos/pkg v4
|
||||
|
|
|
@ -3398,12 +3398,18 @@ func init() {
|
|||
ReloadConfigurationFile(defaultConfigFile, &defaultStoreOptions)
|
||||
}
|
||||
|
||||
// GetDefaultMountOptions returns the default mountoptions defined in container/storage
|
||||
func GetDefaultMountOptions() ([]string, error) {
|
||||
return GetMountOptions(defaultStoreOptions.GraphDriverName, defaultStoreOptions.GraphDriverOptions)
|
||||
}
|
||||
|
||||
// GetMountOptions returns the mountoptions for the specified driver and graphDriverOptions
|
||||
func GetMountOptions(driver string, graphDriverOptions []string) ([]string, error) {
|
||||
mountOpts := []string{
|
||||
".mountopt",
|
||||
fmt.Sprintf("%s.mountopt", defaultStoreOptions.GraphDriverName),
|
||||
fmt.Sprintf("%s.mountopt", driver),
|
||||
}
|
||||
for _, option := range defaultStoreOptions.GraphDriverOptions {
|
||||
for _, option := range graphDriverOptions {
|
||||
key, val, err := parsers.ParseKeyValueOpt(option)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -71,14 +71,16 @@ func ParseIDMapping(UIDMapSlice, GIDMapSlice []string, subUIDMap, subGIDMap stri
|
|||
// GetRootlessRuntimeDir returns the runtime directory when running as non root
|
||||
func GetRootlessRuntimeDir(rootlessUid int) (string, error) {
|
||||
runtimeDir := os.Getenv("XDG_RUNTIME_DIR")
|
||||
if runtimeDir == "" {
|
||||
tmpDir := fmt.Sprintf("/run/user/%d", rootlessUid)
|
||||
st, err := system.Stat(tmpDir)
|
||||
if err == nil && int(st.UID()) == os.Getuid() && st.Mode()&0700 == 0700 && st.Mode()&0066 == 0000 {
|
||||
return tmpDir, nil
|
||||
}
|
||||
|
||||
if runtimeDir != "" {
|
||||
return runtimeDir, nil
|
||||
}
|
||||
tmpDir := fmt.Sprintf("%s/%d", os.TempDir(), rootlessUid)
|
||||
tmpDir := fmt.Sprintf("/run/user/%d", rootlessUid)
|
||||
st, err := system.Stat(tmpDir)
|
||||
if err == nil && int(st.UID()) == os.Getuid() && st.Mode()&0700 == 0700 && st.Mode()&0066 == 0000 {
|
||||
return tmpDir, nil
|
||||
}
|
||||
tmpDir = fmt.Sprintf("%s/%d", os.TempDir(), rootlessUid)
|
||||
if err := os.MkdirAll(tmpDir, 0700); err != nil {
|
||||
logrus.Errorf("failed to create %s: %v", tmpDir, err)
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue