summaryrefslogtreecommitdiffstats
path: root/geo-replication/src
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2019-05-07 13:35:47 +0530
committerAmar Tumballi <amarts@redhat.com>2019-05-08 10:29:03 +0000
commit5c9ec08d36b825cd8abd0489dc5f77488dbfbc8b (patch)
tree52bc33d9fb07c71475ba79090f1964c92d101138 /geo-replication/src
parent1fa089e7a2b180e0bdcc1e7e09a63934a2a0c0ef (diff)
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. fixes: bz#1679401 Change-Id: I92ba7e25aaa5123dae9ebe2f3c68d14315aa5f0e Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'geo-replication/src')
-rwxr-xr-xgeo-replication/src/peer_gsec_create.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/geo-replication/src/peer_gsec_create.in b/geo-replication/src/peer_gsec_create.in
index 05c1638bdcd..6d4a4847013 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"