Fixed information leak

Signed-off-by: Kurt Seifried <kurt@seifried.org>
Signed-off-by: Ry Jones <ry@linux.com>
This commit is contained in:
Kurt Seifried 2021-03-25 21:46:32 -06:00 committed by Ry Jones
parent c5e190680f
commit 9f7a5e8d99
2 changed files with 9 additions and 7 deletions

View file

@ -2,6 +2,7 @@
#
# SPDX-License-Identifier: Apache-2.0
#
TMPFILE=`mktemp`
shopt -s extglob
function _exit(){
@ -19,7 +20,7 @@ DIR=${PWD}
# Locate the test network
cd "${DIR}/../../../test-network"
env | sort > /tmp/env.orig
env | sort > $TMPFILE
OVERRIDE_ORG="1"
. ./scripts/envVar.sh
@ -30,8 +31,8 @@ parsePeerConnectionParameters 1 2
export FABRIC_CFG_PATH="${DIR}/../../../config"
export PATH="${DIR}/../../../bin:${PWD}:$PATH"
env | sort | comm -1 -3 /tmp/env.orig - | sed -E 's/(.*)=(.*)/export \1="\2"/'
env | sort | comm -1 -3 $TMPFILE - | sed -E 's/(.*)=(.*)/export \1="\2"/'
rm /tmp/env.orig
rm $TMPFILE
cd "${DIR}"

View file

@ -1,6 +1,7 @@
#!/bin/bash
#
# SPDX-License-Identifier: Apache-2.0
TMPFILE=`mktemp`
shopt -s extglob
function _exit(){
@ -17,9 +18,9 @@ function _exit(){
# Where am I?
DIR=${PWD}
# Locate the test-network
# Locate the test-network
cd "${DIR}/../../../test-network"
env | sort > /tmp/env.orig
env | sort > $TMPFILE
OVERRIDE_ORG="2"
. ./scripts/envVar.sh
@ -31,7 +32,7 @@ parsePeerConnectionParameters 1 2
export FABRIC_CFG_PATH="${DIR}/../../../config"
export PATH="${DIR}/../../../bin:${PWD}:$PATH"
env | sort | comm -1 -3 /tmp/env.orig - | sed -E 's/(.*)=(.*)/export \1="\2"/'
rm /tmp/env.orig
env | sort | comm -1 -3 $TMPFILE - | sed -E 's/(.*)=(.*)/export \1="\2"/'
rm $TMPFILE
cd "${DIR}"