8 Star 0 Fork 5

src-anolis-os/glusterfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0135-geo-rep-fix-incorrectly-formatted-authorized_keys.patch 2.43 KB
一键复制 编辑 原始数据 按行查看 历史
张彬琛 提交于 2021-01-20 13:34 . import glusterfs-6.0-20.el8.src.rpm
From 677f575d2289285d2e553ddd610944856cb947db Mon Sep 17 00:00:00 2001
From: Sunny Kumar <[email protected]>
Date: Fri, 10 May 2019 11:21:03 +0530
Subject: [PATCH 135/141] geo-rep: fix incorrectly formatted authorized_keys
There are two ways for creating secret pem pub file during geo-rep
setup.
1. gluster-georep-sshkey generate
2. gluster system:: execute gsec_create
Below patch solves this problem for `gluster-georep-sshkey generate`
method.
Patch link: https://review.gluster.org/#/c/glusterfs/+/22246/
This patch is added to support old way of creating secret pem pub file
`gluster system:: execute gsec_create`.
Problem: While Geo-rep setup when creating an ssh authorized_keys
the geo-rep setup inserts an extra space before the "ssh-rsa" label.
This gets flagged by an enterprise customer's security scan as a
security violation.
Solution: Remove extra space while creating secret key.
Upstream Patch: https://review.gluster.org/#/c/glusterfs/+/22673/
>fixes: bz#1679401
>Change-Id: I92ba7e25aaa5123dae9ebe2f3c68d14315aa5f0e
>Signed-off-by: Sunny Kumar <[email protected]>
BUG: 1671862
Change-Id: I11e90c00a14a301a5d95e14b5e8984867e6ff893
Signed-off-by: Sunny Kumar <[email protected]>
Reviewed-on: https://code.engineering.redhat.com/gerrit/169870
Tested-by: RHGS Build Bot <[email protected]>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <[email protected]>
---
geo-replication/src/peer_gsec_create.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/geo-replication/src/peer_gsec_create.in b/geo-replication/src/peer_gsec_create.in
index 05c1638..6d4a484 100755
--- a/geo-replication/src/peer_gsec_create.in
+++ b/geo-replication/src/peer_gsec_create.in
@@ -18,7 +18,7 @@ if [ "Xcontainer" = "X$1" ]; then
output1=`cat "$GLUSTERD_WORKDIR"/geo-replication/secret.pem.pub`
output2=`cat "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem.pub`
else
- output1=`echo command=\"${libexecdir}/glusterfs/gsyncd\" " "``cat "$GLUSTERD_WORKDIR"/geo-replication/secret.pem.pub`
- output2=`echo command=\"tar \$\{SSH_ORIGINAL_COMMAND#* \}\" " "``cat "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem.pub`
+ output1=`echo command=\"${libexecdir}/glusterfs/gsyncd\" ""``cat "$GLUSTERD_WORKDIR"/geo-replication/secret.pem.pub`
+ output2=`echo command=\"tar \$\{SSH_ORIGINAL_COMMAND#* \}\" ""``cat "$GLUSTERD_WORKDIR"/geo-replication/tar_ssh.pem.pub`
fi
echo -e "$output1\n$output2"
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/glusterfs.git
[email protected]:src-anolis-os/glusterfs.git
src-anolis-os
glusterfs
glusterfs
a8

搜索帮助