代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/docker 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 412b8a34a2aa40ddf6f9b507142c4793922cedf5 Mon Sep 17 00:00:00 2001
From: lujingxiao <lujingxiao@huawei.com>
Date: Sat, 19 Jan 2019 11:22:46 +0800
Subject: [PATCH 022/111] umask: fix nil pointer on c.Annotations in
setUmask
reason: c.Annotations should be check before using in setUmask().
When "/create" request is sent via restful api, the c.Annotations
is nil, so **nil map** happens in setUmask.
Change-Id: Idafa2d8d1f54c1ebc34a6380d64c1cd7efad0266
Signed-off-by: lujingxiao <lujingxiao@huawei.com>
---
components/engine/daemon/create.go | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/components/engine/daemon/create.go b/components/engine/daemon/create.go
index fa000c2208..b57b01eacc 100644
--- a/components/engine/daemon/create.go
+++ b/components/engine/daemon/create.go
@@ -86,10 +86,15 @@ func (daemon *Daemon) setUmask(c *containertypes.Config) error {
if val != umaskNormal && val != umaskSecure {
return fmt.Errorf("native.umask option %s not supported", val)
}
- } else if UsingNormalUmask(daemon.configStore) {
- c.Annotations["native.umask"] = umaskNormal
} else {
- c.Annotations["native.umask"] = umaskSecure
+ if c.Annotations == nil {
+ c.Annotations = make(map[string]string)
+ }
+ if UsingNormalUmask(daemon.configStore) {
+ c.Annotations["native.umask"] = umaskNormal
+ } else {
+ c.Annotations["native.umask"] = umaskSecure
+ }
}
return nil
--
2.17.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。