Even with -p, PATH is reset. This is now documented and tested.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 "# "
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user