Skip to content

Commit

Permalink
stdenv: make sure the env-vars file created is not world readable
Browse files Browse the repository at this point in the history
Under some circumstances this file might contain private information
that should not be accessible to everybody.

(cherry picked from commit c47a1e7)
  • Loading branch information
LeSuisse authored and github-actions[bot] committed Aug 4, 2024
1 parent 641fa22 commit df7ecf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/stdenv/generic/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ substituteAllInPlace() {
# the environment used for building.
dumpVars() {
if [ "${noDumpEnvVars:-0}" != 1 ]; then
export 2>/dev/null >| "$NIX_BUILD_TOP/env-vars" || true
install -m 0600 <(export 2>/dev/null) "$NIX_BUILD_TOP/env-vars" || true
fi
}

Expand Down

0 comments on commit df7ecf3

Please sign in to comment.