1 Star 0 Fork 27

qingxiyingyue/cloud-init

forked from src-openEuler/cloud-init 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-permission-of-the-private-key.patch 992 Bytes
一键复制 编辑 原始数据 按行查看 历史
桐小哥 提交于 2023-03-14 14:49 . Fix permission of SSH host keys
From ef18ff5a437e9abe91c81289157a4e846169736a Mon Sep 17 00:00:00 2001
From: shixuantong <shixuantong1@huawei.com>
Date: Tue, 14 Mar 2023 07:38:03 +0000
Subject: [PATCH] fix permission of the private key
---
cloudinit/config/cc_ssh.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cloudinit/config/cc_ssh.py b/cloudinit/config/cc_ssh.py
index 6210627..bc4a158 100644
--- a/cloudinit/config/cc_ssh.py
+++ b/cloudinit/config/cc_ssh.py
@@ -274,7 +274,7 @@ def handle(_name, cfg, cloud: Cloud, log: Logger, _args):
if gid != -1:
# perform same "sanitize permissions" as sshd-keygen
os.chown(keyfile, -1, gid)
- os.chmod(keyfile, 0o640)
+ os.chmod(keyfile, 0o600)
os.chmod(keyfile + ".pub", 0o644)
except subp.ProcessExecutionError as e:
err = util.decode_binary(e.stderr).lower()
--
2.39.1
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qingxiyingyue/cloud-init.git
git@gitee.com:qingxiyingyue/cloud-init.git
qingxiyingyue
cloud-init
cloud-init
master

搜索帮助