summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-04-23 20:25:31 -0400
committerGitHub <noreply@github.com>2018-04-23 20:25:31 -0400
commit10f9dc0d8860e358796d1325ef1a7e31f02a0166 (patch)
treeab099989be43c245cbc3fd50c8175555c1a9a8e2 /libpod/container_internal.go
parent2279242b5ce1f7be90338d5da247e86b50a4755e (diff)
parent57afb7514d5c123779601cae77d016bf6de8a5f1 (diff)
downloadpodman-10f9dc0d8860e358796d1325ef1a7e31f02a0166.tar.gz
podman-10f9dc0d8860e358796d1325ef1a7e31f02a0166.tar.bz2
podman-10f9dc0d8860e358796d1325ef1a7e31f02a0166.zip
Merge pull request #647 from umohnani8/secrets
Add FIPS mode secret
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go14
1 files changed, 3 insertions, 11 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 32f8d2aec..62960fa0f 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -754,8 +754,7 @@ func (c *Container) makeBindMounts() error {
}
// Add Secret Mounts
- secretMounts := c.getSecretMounts(secrets.OverrideMountsFile)
- secretMounts = append(secretMounts, c.getSecretMounts(secrets.DefaultMountsFile)...)
+ secretMounts := secrets.SecretMounts(c.config.MountLabel, c.state.RunDir)
for _, mount := range secretMounts {
if _, ok := c.state.BindMounts[mount.Destination]; !ok {
c.state.BindMounts[mount.Destination] = mount.Source
@@ -765,15 +764,6 @@ func (c *Container) makeBindMounts() error {
return nil
}
-// addSecrets mounts the secrets from the override and/or default mounts file
-func (c *Container) getSecretMounts(mountFile string) (secretMounts []spec.Mount) {
- secretMounts, err := secrets.SecretMounts(mountFile, c.config.MountLabel, c.state.RunDir)
- if err != nil {
- logrus.Warn("error mounting secrets, skipping...")
- }
- return secretMounts
-}
-
// writeStringToRundir copies the provided file to the runtimedir
func (c *Container) writeStringToRundir(destFile, output string) (string, error) {
destFileName := filepath.Join(c.state.RunDir, destFile)
@@ -932,6 +922,8 @@ func (c *Container) generateSpec(ctx context.Context) (*spec.Spec, error) {
}
if !MountExists(g.Mounts(), dstPath) {
g.AddMount(newMount)
+ } else {
+ logrus.Warnf("User mount overriding libpod mount at %q", dstPath)
}
}