diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-05-17 16:24:20 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-17 16:24:20 -0400 |
commit | 9a9118b831e7d0cfe8e6a876a8856aa306cb880a (patch) | |
tree | 7ff8446de44be256ea5e6274c559cd19a45956b5 /libpod/container_internal_linux.go | |
parent | f65d9309cbe8ccbacb64fc720d99d78c14ef4139 (diff) | |
parent | cf30f160ad599cac0f3dc300f673d88f60128275 (diff) | |
download | podman-9a9118b831e7d0cfe8e6a876a8856aa306cb880a.tar.gz podman-9a9118b831e7d0cfe8e6a876a8856aa306cb880a.tar.bz2 podman-9a9118b831e7d0cfe8e6a876a8856aa306cb880a.zip |
Merge pull request #10366 from ashley-cui/secretoptions
Support uid,gid,mode options for secrets
Diffstat (limited to 'libpod/container_internal_linux.go')
-rw-r--r-- | libpod/container_internal_linux.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 17b894ce0..04340e6b2 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -29,7 +29,6 @@ import ( "github.com/containers/common/pkg/apparmor" "github.com/containers/common/pkg/chown" "github.com/containers/common/pkg/config" - "github.com/containers/common/pkg/secrets" "github.com/containers/common/pkg/subscriptions" "github.com/containers/common/pkg/umask" "github.com/containers/podman/v3/libpod/define" @@ -759,7 +758,10 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) { return nil, errors.Wrapf(err, "error setting up OCI Hooks") } if len(c.config.EnvSecrets) > 0 { - manager, err := secrets.NewManager(c.runtime.GetSecretsStorageDir()) + manager, err := c.runtime.SecretsManager() + if err != nil { + return nil, err + } if err != nil { return nil, err } @@ -2392,7 +2394,7 @@ func (c *Container) createSecretMountDir() error { oldUmask := umask.Set(0) defer umask.Set(oldUmask) - if err := os.MkdirAll(src, 0644); err != nil { + if err := os.MkdirAll(src, 0755); err != nil { return err } if err := label.Relabel(src, c.config.MountLabel, false); err != nil { |