diff --git a/docker.changes b/docker.changes index 73b98e4..9d370de 100644 --- a/docker.changes +++ b/docker.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 11 11:49:05 UTC 2017 - asarai@suse.com + +- Update SUSE secrets patch to handle boo#1030702. + * secrets-0001-daemon-allow-directory-creation-in-run-secrets.patch + * secrets-0002-SUSE-implement-SUSE-container-secrets.patch + ------------------------------------------------------------------- Tue Apr 11 08:28:33 UTC 2017 - mmeister@suse.com diff --git a/secrets-0001-daemon-allow-directory-creation-in-run-secrets.patch b/secrets-0001-daemon-allow-directory-creation-in-run-secrets.patch index c1665a2..8b1eebe 100644 --- a/secrets-0001-daemon-allow-directory-creation-in-run-secrets.patch +++ b/secrets-0001-daemon-allow-directory-creation-in-run-secrets.patch @@ -1,4 +1,4 @@ -From 0c4cf4fac76f2a5272a808665985a2e0df6af0db Mon Sep 17 00:00:00 2001 +From 36b539ca64d8c47681d5f15689db03751962d496 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Wed, 8 Mar 2017 12:41:54 +1100 Subject: [PATCH 1/2] daemon: allow directory creation in /run/secrets @@ -10,14 +10,26 @@ useful for creating directories and subdirectories of secrets. Backport: https://github.com/docker/docker/pull/31632 Signed-off-by: Aleksa Sarai --- - daemon/container_operations_unix.go | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) + daemon/container_operations_unix.go | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/daemon/container_operations_unix.go b/daemon/container_operations_unix.go -index 2296045765d4..8527a7907373 100644 +index 2296045765d4..bb08d3c4a207 100644 --- a/daemon/container_operations_unix.go +++ b/daemon/container_operations_unix.go -@@ -195,8 +195,14 @@ func (daemon *Daemon) setupSecretDir(c *container.Container) (setupErr error) { +@@ -177,11 +177,6 @@ func (daemon *Daemon) setupSecretDir(c *container.Container) (setupErr error) { + } + + targetPath := filepath.Clean(s.File.Name) +- // ensure that the target is a filename only; no paths allowed +- if targetPath != filepath.Base(targetPath) { +- return fmt.Errorf("error creating secret: secret must not be a path") +- } +- + fPath := filepath.Join(localMountPath, targetPath) + if err := idtools.MkdirAllAs(filepath.Dir(fPath), 0700, rootUID, rootGID); err != nil { + return errors.Wrap(err, "error creating secret mount path") +@@ -195,8 +190,14 @@ func (daemon *Daemon) setupSecretDir(c *container.Container) (setupErr error) { if secret == nil { return fmt.Errorf("unable to get secret from secret store") } @@ -35,5 +47,5 @@ index 2296045765d4..8527a7907373 100644 uid, err := strconv.Atoi(s.File.UID) -- -2.12.0 +2.12.2 diff --git a/secrets-0002-SUSE-implement-SUSE-container-secrets.patch b/secrets-0002-SUSE-implement-SUSE-container-secrets.patch index a785381..600b8e4 100644 --- a/secrets-0002-SUSE-implement-SUSE-container-secrets.patch +++ b/secrets-0002-SUSE-implement-SUSE-container-secrets.patch @@ -1,4 +1,4 @@ -From a3106907d4786ed7d624201debdd43dc41fb4b97 Mon Sep 17 00:00:00 2001 +From a7fbdb729255da73e47e77ca37eec0da325356c4 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Wed, 8 Mar 2017 11:43:29 +1100 Subject: [PATCH 2/2] SUSE: implement SUSE container secrets @@ -286,5 +286,5 @@ index 000000000000..591abc998e67 + return nil +} -- -2.12.0 +2.12.2