summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>2010-08-28 19:49:12 +0000
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>2010-08-28 19:49:12 +0000
commit2772f3caaf53b05c6b2e8a57b14545a7cec1c598 (patch)
treeb01a7dd8dc60ede5b1af8c74df8c771f44ff5b8e
parentd4da4879119a763901feabd1eaf7b2bd4a7a3016 (diff)
downloadshadow-2772f3caaf53b05c6b2e8a57b14545a7cec1c598.tar.gz
Even with -p, PATH is reset. This is now documented and tested.
-rwxr-xr-xtests/su/02/env_special-options_-l-p.exp4
-rwxr-xr-xtests/su/02/env_special-options_-p.exp4
-rwxr-xr-xtests/su/02/env_special_root-options_-l-p.exp2
-rwxr-xr-xtests/su/02/env_special_root-options_-p.exp4
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/su/02/env_special-options_-l-p.exp b/tests/su/02/env_special-options_-l-p.exp
index 28176157..15c10b62 100755
--- a/tests/su/02/env_special-options_-l-p.exp
+++ b/tests/su/02/env_special-options_-l-p.exp
@@ -35,12 +35,12 @@ send "id\n"
expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
expect "$ "
-send_user "\n# PATH should be '/usr/local/bin:/usr/bin:/bin:/usr/games'"
+send_user "\n# Even with -p, PATH is reset"
send "\r"
expect "$ "
send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect "PATH=\"/usr/local/bin:/usr/bin:/bin:/usr/games\"\r"
+expect "PATH=\"/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games\"\r"
expect "$ "
send "echo \"'\$HOME'\$USER'\$LOGNAME'\$SHELL'\"\r"
diff --git a/tests/su/02/env_special-options_-p.exp b/tests/su/02/env_special-options_-p.exp
index aaac4973..3a7143c6 100755
--- a/tests/su/02/env_special-options_-p.exp
+++ b/tests/su/02/env_special-options_-p.exp
@@ -36,12 +36,12 @@ send "id\n"
expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
expect "$ "
-send_user "\n# PATH should be '$PATH'"
+send_user "\n# Even with -p, PATH is reset"
send "\r"
expect "$ "
send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect "PATH=\"$PATH\"\r"
+expect "PATH=\"/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games\"\r"
expect "$ "
send "echo \"'\$HOME'\$USER'\$LOGNAME'\$SHELL'\"\r"
diff --git a/tests/su/02/env_special_root-options_-l-p.exp b/tests/su/02/env_special_root-options_-l-p.exp
index f94e26f0..8ddae3d4 100755
--- a/tests/su/02/env_special_root-options_-l-p.exp
+++ b/tests/su/02/env_special_root-options_-l-p.exp
@@ -36,7 +36,7 @@ send "id\n"
expect "uid=0(root) gid=0(root) groups=0(root)\r"
expect "# "
-send_user "\n# PATH should be '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'"
+send_user "\n# Even with -p, PATH is reset"
send "\r"
expect "# "
diff --git a/tests/su/02/env_special_root-options_-p.exp b/tests/su/02/env_special_root-options_-p.exp
index e28e58cc..453c02cd 100755
--- a/tests/su/02/env_special_root-options_-p.exp
+++ b/tests/su/02/env_special_root-options_-p.exp
@@ -36,12 +36,12 @@ send "id\n"
expect "uid=0(root) gid=0(root) groups=0(root)\r"
expect "# "
-send_user "\n# PATH should be '$PATH'"
+send_user "\n# Even with -p, PATH is reset"
send "\r"
expect "# "
send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect "PATH=\"$PATH\"\r"
+expect "PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\"\r"
expect "# "
send "echo \"'\$HOME'\$USER'\$LOGNAME'\$SHELL'\"\r"