From b0d37376274788db03d9d7f69089dc938b95eaa7 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Sun, 7 Jun 2020 22:16:56 -0700 Subject: [PATCH] contenthash: allow security.capability in cache checksum Signed-off-by: Tonis Tiigi --- cache/contenthash/tarsum.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/contenthash/tarsum.go b/cache/contenthash/tarsum.go index 3327ab2c..de72d6cd 100644 --- a/cache/contenthash/tarsum.go +++ b/cache/contenthash/tarsum.go @@ -39,7 +39,7 @@ func v1TarHeaderSelect(h *tar.Header) (orderedHeaders [][2]string) { // Get extended attributes. xAttrKeys := make([]string, len(h.Xattrs)) for k := range h.Xattrs { - if !strings.HasPrefix(k, "security.") && !strings.HasPrefix(k, "system.") { + if k == "security.capability" || !strings.HasPrefix(k, "security.") && !strings.HasPrefix(k, "system.") { xAttrKeys = append(xAttrKeys, k) } }