From 3cf8afc1ddf48eeb14155bdb03ee0c1dae7e067e Mon Sep 17 00:00:00 2001 From: Jason Ertel Date: Mon, 16 Nov 2020 16:39:54 -0500 Subject: [PATCH] Remove unused redirect descriptors and ensure gpg import output is not leaked to console --- salt/common/tools/sbin/so-image-common | 2 +- setup/so-functions | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/salt/common/tools/sbin/so-image-common b/salt/common/tools/sbin/so-image-common index aefeade91..9fa1278ef 100755 --- a/salt/common/tools/sbin/so-image-common +++ b/salt/common/tools/sbin/so-image-common @@ -117,7 +117,7 @@ update_docker_containers() { fi # Let's make sure we have the public key - curl -sSL https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS | gpg --import - + curl -sSL https://raw.githubusercontent.com/Security-Onion-Solutions/securityonion/master/KEYS >> "$LOG_FILE" 2>&1 | gpg --import - >> "$LOG_FILE" 2>&1 rm -rf $SIGNPATH >> "$LOG_FILE" 2>&1 mkdir -p $SIGNPATH >> "$LOG_FILE" 2>&1 diff --git a/setup/so-functions b/setup/so-functions index cb88f8dcf..fb8b17a88 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -878,13 +878,7 @@ docker_seed_update() { fi ((docker_seed_update_percent=docker_seed_update_percent+percent_delta)) - # Backup current output descriptors and reset to saved descriptors from docker_seed_registry function - exec 8>&1 9>&2 1>&10 2>&20 - set_progress_str "$docker_seed_update_percent" "Downloading $name" - - # Restore current output descriptors and remove backups - exec 1>&8- 2>&9- } docker_seed_registry() {