5a303093dc
'nix-daemon' now creates subdirectories for users when they first connect. Fixes #509 (CVE-2019-17365). Should also fix #3127.
12 lines
434 B
Bash
12 lines
434 B
Bash
source common.sh
|
|
|
|
sed -e "s|@localstatedir@|$TEST_ROOT/profile-var|g" -e "s|@coreutils@|$coreutils|g" < ../scripts/nix-profile.sh.in > $TEST_ROOT/nix-profile.sh
|
|
|
|
user=$(whoami)
|
|
rm -rf $TEST_HOME $TEST_ROOT/profile-var
|
|
mkdir -p $TEST_HOME
|
|
USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh; set"
|
|
USER=$user $SHELL -e -c ". $TEST_ROOT/nix-profile.sh" # test idempotency
|
|
|
|
[ -L $TEST_HOME/.nix-profile ]
|
|
[ -e $TEST_HOME/.nix-channels ]
|