diff options
Diffstat (limited to 'recipes-containers/docker/files/disable_sha1sum_startup.patch')
-rw-r--r-- | recipes-containers/docker/files/disable_sha1sum_startup.patch | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/recipes-containers/docker/files/disable_sha1sum_startup.patch b/recipes-containers/docker/files/disable_sha1sum_startup.patch deleted file mode 100644 index d37d7a06..00000000 --- a/recipes-containers/docker/files/disable_sha1sum_startup.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From 12fd6388a033ab5ec9b3a7b144c4976031e6aa52 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
3 | Date: Fri, 20 Nov 2015 10:02:09 +0000 | ||
4 | Subject: [PATCH] disable sha1sum startup | ||
5 | |||
6 | Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com> | ||
7 | --- | ||
8 | utils/utils.go | 18 +----------------- | ||
9 | 1 file changed, 1 insertion(+), 17 deletions(-) | ||
10 | |||
11 | diff --git a/utils/utils.go b/utils/utils.go | ||
12 | index a17ab9d..3fc514a 100644 | ||
13 | --- a/utils/utils.go | ||
14 | +++ b/utils/utils.go | ||
15 | @@ -2,8 +2,6 @@ package utils | ||
16 | |||
17 | import ( | ||
18 | "bufio" | ||
19 | - "crypto/sha1" | ||
20 | - "encoding/hex" | ||
21 | "fmt" | ||
22 | "io" | ||
23 | "io/ioutil" | ||
24 | @@ -42,20 +40,6 @@ func SelfPath() string { | ||
25 | return path | ||
26 | } | ||
27 | |||
28 | -func dockerInitSha1(target string) string { | ||
29 | - f, err := os.Open(target) | ||
30 | - if err != nil { | ||
31 | - return "" | ||
32 | - } | ||
33 | - defer f.Close() | ||
34 | - h := sha1.New() | ||
35 | - _, err = io.Copy(h, f) | ||
36 | - if err != nil { | ||
37 | - return "" | ||
38 | - } | ||
39 | - return hex.EncodeToString(h.Sum(nil)) | ||
40 | -} | ||
41 | - | ||
42 | func isValidDockerInitPath(target string, selfPath string) bool { // target and selfPath should be absolute (InitPath and SelfPath already do this) | ||
43 | if target == "" { | ||
44 | return false | ||
45 | @@ -77,7 +61,7 @@ func isValidDockerInitPath(target string, selfPath string) bool { // target and | ||
46 | } | ||
47 | return os.SameFile(targetFileInfo, selfPathFileInfo) | ||
48 | } | ||
49 | - return dockerversion.INITSHA1 != "" && dockerInitSha1(target) == dockerversion.INITSHA1 | ||
50 | + return true | ||
51 | } | ||
52 | |||
53 | // DockerInitPath figures out the path of our dockerinit (which may be SelfPath()) | ||
54 | -- | ||
55 | 1.9.1 | ||
56 | |||