Remove unused redirect descriptors and ensure gpg import output is not leaked to console

This commit is contained in:
Jason Ertel
2020-11-16 16:39:54 -05:00
parent 1ec4af1a4d
commit 3cf8afc1dd
2 changed files with 1 additions and 7 deletions

View File

@@ -117,7 +117,7 @@ update_docker_containers() {
fi fi
# Let's make sure we have the public key # 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 rm -rf $SIGNPATH >> "$LOG_FILE" 2>&1
mkdir -p $SIGNPATH >> "$LOG_FILE" 2>&1 mkdir -p $SIGNPATH >> "$LOG_FILE" 2>&1

View File

@@ -878,13 +878,7 @@ docker_seed_update() {
fi fi
((docker_seed_update_percent=docker_seed_update_percent+percent_delta)) ((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" set_progress_str "$docker_seed_update_percent" "Downloading $name"
# Restore current output descriptors and remove backups
exec 1>&8- 2>&9-
} }
docker_seed_registry() { docker_seed_registry() {