Skip to content

Commit a3d5825

Browse files
committed
Remove unused environment variables
Removes these environment variables: OSCAP_PROBE_OS_NAME, OSCAP_PROBE_OS_VERSION, OSCAP_PROBE_ARCHITECTURE. They are not read anywhere since 1c18a7b, so we don't have to set them. Fixes #1427.
1 parent dc98bc8 commit a3d5825

File tree

4 files changed

+0
-17
lines changed

4 files changed

+0
-17
lines changed

utils/oscap-chroot

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ fi
9191
# Learn more at https://www.redhat.com/archives/open-scap-list/2013-July/msg00000.html
9292
export OSCAP_PROBE_ROOT
9393
OSCAP_PROBE_ROOT="$(cd "$1"; pwd)"
94-
export OSCAP_PROBE_OS_NAME="Linux" # TODO: This may be wrong!
95-
export OSCAP_PROBE_OS_VERSION
96-
OSCAP_PROBE_OS_VERSION="$(uname --kernel-release)" # TODO
97-
export OSCAP_PROBE_ARCHITECTURE
98-
OSCAP_PROBE_ARCHITECTURE="$(uname --hardware-platform)" # TODO
9994
export OSCAP_EVALUATION_TARGET="chroot://$OSCAP_PROBE_ROOT"
10095
shift 1
10196

utils/oscap-podman

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ for VAR in `podman inspect $ID --format '{{join .Config.Env " "}}'`; do
8484
done
8585

8686
export OSCAP_PROBE_ROOT="$(cd "$DIR"; pwd)"
87-
export OSCAP_PROBE_OS_NAME="Linux"
88-
export OSCAP_PROBE_OS_VERSION="$(uname --kernel-release)"
89-
export OSCAP_PROBE_ARCHITECTURE="$(uname --hardware-platform)"
9087
export OSCAP_EVALUATION_TARGET="$TARGET"
9188
shift 1
9289

utils/oscap-vm

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,6 @@ fi
129129
# Learn more at https://www.redhat.com/archives/open-scap-list/2013-July/msg00000.html
130130
export OSCAP_PROBE_ROOT
131131
OSCAP_PROBE_ROOT="$(cd "$MOUNTPOINT"; pwd)"
132-
export OSCAP_PROBE_OS_NAME="Linux" # TODO: This may be wrong!
133-
export OSCAP_PROBE_OS_VERSION
134-
OSCAP_PROBE_OS_VERSION="$(uname --kernel-release)" # TODO
135-
export OSCAP_PROBE_ARCHITECTURE
136-
OSCAP_PROBE_ARCHITECTURE="$(uname --hardware-platform)" # TODO
137132
export OSCAP_EVALUATION_TARGET="oscap-vm $1 $2"
138133
shift 2
139134

utils/oscap_docker_python/oscap_docker_common.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ def oscap_chroot(chroot_path, oscap_binary, oscap_args, target_name, local_env=[
3333
'''
3434
Wrapper running oscap_chroot on an OscapDockerScan OscapAtomicScan object
3535
'''
36-
os.environ["OSCAP_PROBE_ARCHITECTURE"] = platform.processor()
3736
os.environ["OSCAP_PROBE_ROOT"] = os.path.join(chroot_path)
38-
os.environ["OSCAP_PROBE_OS_NAME"] = platform.system()
39-
os.environ["OSCAP_PROBE_OS_VERSION"] = platform.release()
40-
4137
os.environ["OSCAP_EVALUATION_TARGET"] = target_name
4238

4339
for var in local_env:

0 commit comments

Comments
 (0)