Fixed data leak

This commit is contained in:
Kurt Seifried 2021-03-25 13:05:44 -06:00
parent 3acff50554
commit c0b26eb791
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(){
@ -19,7 +20,7 @@ DIR=${PWD}
# 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}"