summaryrefslogtreecommitdiff
path: root/tests/su/02
diff options
context:
space:
mode:
Diffstat (limited to 'tests/su/02')
-rw-r--r--tests/su/02/config.txt5
-rw-r--r--tests/su/02/config/etc/group42
-rw-r--r--tests/su/02/config/etc/gshadow42
-rw-r--r--tests/su/02/config/etc/passwd21
-rw-r--r--tests/su/02/config/etc/profile0
-rw-r--r--tests/su/02/config/etc/shadow20
l---------tests/su/02/env_FOO-options_1
l---------tests/su/02/env_FOO-options_-1
l---------tests/su/02/env_FOO-options_--login1
-rwxr-xr-xtests/su/02/env_FOO-options_--login.exp48
l---------tests/su/02/env_FOO-options_--login_bash1
l---------tests/su/02/env_FOO-options_--preserve-environment1
-rwxr-xr-xtests/su/02/env_FOO-options_--preserve-environment.exp48
l---------tests/su/02/env_FOO-options_--preserve-environment_bash1
-rwxr-xr-xtests/su/02/env_FOO-options_-.exp48
l---------tests/su/02/env_FOO-options_-_bash1
l---------tests/su/02/env_FOO-options_-l1
l---------tests/su/02/env_FOO-options_-l-m1
-rwxr-xr-xtests/su/02/env_FOO-options_-l-m.exp48
l---------tests/su/02/env_FOO-options_-l-m_bash1
-rwxr-xr-xtests/su/02/env_FOO-options_-l.exp48
l---------tests/su/02/env_FOO-options_-l_bash1
l---------tests/su/02/env_FOO-options_-m1
-rwxr-xr-xtests/su/02/env_FOO-options_-m.exp48
l---------tests/su/02/env_FOO-options_-m_bash1
l---------tests/su/02/env_FOO-options_-p1
l---------tests/su/02/env_FOO-options_-p-1
-rwxr-xr-xtests/su/02/env_FOO-options_-p-.exp48
l---------tests/su/02/env_FOO-options_-p-_bash1
-rwxr-xr-xtests/su/02/env_FOO-options_-p.exp48
l---------tests/su/02/env_FOO-options_-p_bash1
-rwxr-xr-xtests/su/02/env_FOO-options_.exp48
l---------tests/su/02/env_FOO-options__bash1
l---------tests/su/02/env_special-options_1
l---------tests/su/02/env_special-options_-l1
l---------tests/su/02/env_special-options_-l-p1
-rwxr-xr-xtests/su/02/env_special-options_-l-p.exp55
l---------tests/su/02/env_special-options_-l-p_bash1
-rwxr-xr-xtests/su/02/env_special-options_-l.exp54
l---------tests/su/02/env_special-options_-l_bash1
l---------tests/su/02/env_special-options_-p1
-rwxr-xr-xtests/su/02/env_special-options_-p.exp56
l---------tests/su/02/env_special-options_-p_bash1
-rwxr-xr-xtests/su/02/env_special-options_.exp55
l---------tests/su/02/env_special-options__bash1
l---------tests/su/02/env_special_root-options_1
l---------tests/su/02/env_special_root-options_-l1
l---------tests/su/02/env_special_root-options_-l-p1
-rwxr-xr-xtests/su/02/env_special_root-options_-l-p.exp57
l---------tests/su/02/env_special_root-options_-l-p_bash1
-rwxr-xr-xtests/su/02/env_special_root-options_-l.exp54
l---------tests/su/02/env_special_root-options_-l_bash1
l---------tests/su/02/env_special_root-options_-p1
-rwxr-xr-xtests/su/02/env_special_root-options_-p.exp56
l---------tests/su/02/env_special_root-options_-p_bash1
-rwxr-xr-xtests/su/02/env_special_root-options_.exp55
l---------tests/su/02/env_special_root-options__bash1
-rwxr-xr-xtests/su/02/run_env_test.sh38
58 files changed, 0 insertions, 1076 deletions
diff --git a/tests/su/02/config.txt b/tests/su/02/config.txt
deleted file mode 100644
index 70dfcd2f..00000000
--- a/tests/su/02/config.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-# no testsuite password
-# root password: rootF00barbaz
-# myuser password: myuserF00barbaz
-
-# /etc/profile is empty to avoid interferences.
diff --git a/tests/su/02/config/etc/group b/tests/su/02/config/etc/group
deleted file mode 100644
index 245cc9cf..00000000
--- a/tests/su/02/config/etc/group
+++ /dev/null
@@ -1,42 +0,0 @@
-root:x:0:
-daemon:x:1:
-bin:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mail:x:8:
-news:x:9:
-uucp:x:10:
-man:x:12:
-proxy:x:13:
-kmem:x:15:
-dialout:x:20:
-fax:x:21:
-voice:x:22:
-cdrom:x:24:
-floppy:x:25:
-tape:x:26:
-sudo:x:27:
-audio:x:29:
-dip:x:30:
-www-data:x:33:
-backup:x:34:
-operator:x:37:
-list:x:38:
-irc:x:39:
-src:x:40:
-gnats:x:41:
-shadow:x:42:
-utmp:x:43:
-video:x:44:
-sasl:x:45:
-plugdev:x:46:
-staff:x:50:
-games:x:60:
-users:x:100:
-nogroup:x:65534:
-crontab:x:101:
-Debian-exim:x:102:
-myuser:x:424242:
diff --git a/tests/su/02/config/etc/gshadow b/tests/su/02/config/etc/gshadow
deleted file mode 100644
index 25bd55bd..00000000
--- a/tests/su/02/config/etc/gshadow
+++ /dev/null
@@ -1,42 +0,0 @@
-root:*::
-daemon:*::
-bin:*::
-sys:*::
-adm:*::
-tty:*::
-disk:*::
-lp:*::
-mail:*::
-news:*::
-uucp:*::
-man:*::
-proxy:*::
-kmem:*::
-dialout:*::
-fax:*::
-voice:*::
-cdrom:*::
-floppy:*::
-tape:*::
-sudo:*::
-audio:*::
-dip:*::
-www-data:*::
-backup:*::
-operator:*::
-list:*::
-irc:*::
-src:*::
-gnats:*::
-shadow:*::
-utmp:*::
-video:*::
-sasl:*::
-plugdev:*::
-staff:*::
-games:*::
-users:*::
-nogroup:*::
-crontab:x::
-Debian-exim:x::
-myuser:x::
diff --git a/tests/su/02/config/etc/passwd b/tests/su/02/config/etc/passwd
deleted file mode 100644
index 9bdeb8ce..00000000
--- a/tests/su/02/config/etc/passwd
+++ /dev/null
@@ -1,21 +0,0 @@
-root:x:0:0:root:/root:/bin/bash
-daemon:x:1:1:daemon:/usr/sbin:/bin/sh
-bin:x:2:2:bin:/bin:/bin/sh
-sys:x:3:3:sys:/dev:/bin/sh
-sync:x:4:65534:sync:/bin:/bin/sync
-games:x:5:60:games:/usr/games:/bin/sh
-man:x:6:12:man:/var/cache/man:/bin/sh
-lp:x:7:7:lp:/var/spool/lpd:/bin/sh
-mail:x:8:8:mail:/var/mail:/bin/sh
-news:x:9:9:news:/var/spool/news:/bin/sh
-uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
-proxy:x:13:13:proxy:/bin:/bin/sh
-www-data:x:33:33:www-data:/var/www:/bin/sh
-backup:x:34:34:backup:/var/backups:/bin/sh
-list:x:38:38:Mailing List Manager:/var/list:/bin/sh
-irc:x:39:39:ircd:/var/run/ircd:/bin/sh
-gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
-nobody:x:65534:65534:nobody:/nonexistent:/bin/sh
-Debian-exim:x:102:102::/var/spool/exim4:/bin/false
-myuser:x:424242:424242::/home/:/bin/sh
-testsuite::424243:424243::/home:/bin/bash
diff --git a/tests/su/02/config/etc/profile b/tests/su/02/config/etc/profile
deleted file mode 100644
index e69de29b..00000000
--- a/tests/su/02/config/etc/profile
+++ /dev/null
diff --git a/tests/su/02/config/etc/shadow b/tests/su/02/config/etc/shadow
deleted file mode 100644
index 038d5cf4..00000000
--- a/tests/su/02/config/etc/shadow
+++ /dev/null
@@ -1,20 +0,0 @@
-root:$1$NBLBLIXb$WUgojj1bNuxWEADQGt1m9.:12991:0:99999:7:::
-daemon:*:12977:0:99999:7:::
-bin:*:12977:0:99999:7:::
-sys:*:12977:0:99999:7:::
-sync:*:12977:0:99999:7:::
-games:*:12977:0:99999:7:::
-man:*:12977:0:99999:7:::
-lp:*:12977:0:99999:7:::
-mail:*:12977:0:99999:7:::
-news:*:12977:0:99999:7:::
-uucp:*:12977:0:99999:7:::
-proxy:*:12977:0:99999:7:::
-www-data:*:12977:0:99999:7:::
-backup:*:12977:0:99999:7:::
-list:*:12977:0:99999:7:::
-irc:*:12977:0:99999:7:::
-gnats:*:12977:0:99999:7:::
-nobody:*:12977:0:99999:7:::
-Debian-exim:!:12977:0:99999:7:::
-myuser:$1$yQnIAZWV$gDAMB2IkqaONgrQiRdo4y.:12991:0:99999:7:::
diff --git a/tests/su/02/env_FOO-options_ b/tests/su/02/env_FOO-options_
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_- b/tests/su/02/env_FOO-options_-
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_--login b/tests/su/02/env_FOO-options_--login
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_--login
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_--login.exp b/tests/su/02/env_FOO-options_--login.exp
deleted file mode 100755
index 8cd7679b..00000000
--- a/tests/su/02/env_FOO-options_--login.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export FOO=bar\r"
-expect "# "
-
-#=============================================================================
-#
-# su --login, make a login shell
-#
-#=============================================================================
-send "/bin/su --login $command myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-send_user "\n# FOO should be empty"
-send "\r"
-expect "$ "
-
-send "echo \"FOO=\\\"\$FOO\\\"\"\r"
-expect "FOO=\"\"\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_FOO-options_--login_bash b/tests/su/02/env_FOO-options_--login_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_--login_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_--preserve-environment b/tests/su/02/env_FOO-options_--preserve-environment
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_--preserve-environment
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_--preserve-environment.exp b/tests/su/02/env_FOO-options_--preserve-environment.exp
deleted file mode 100755
index 88932bb2..00000000
--- a/tests/su/02/env_FOO-options_--preserve-environment.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export FOO=bar\r"
-expect "# "
-
-#=============================================================================
-#
-# su --preserve-environment, as for regular su, environment is preserved
-#
-#=============================================================================
-send "/bin/su $command -m myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-send_user "\n# FOO should be 'bar'"
-send "\r"
-expect "$ "
-
-send "echo \"FOO=\\\"\$FOO\\\"\"\r"
-expect "FOO=\"bar\"\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_FOO-options_--preserve-environment_bash b/tests/su/02/env_FOO-options_--preserve-environment_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_--preserve-environment_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-.exp b/tests/su/02/env_FOO-options_-.exp
deleted file mode 100755
index 6ba3e005..00000000
--- a/tests/su/02/env_FOO-options_-.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export FOO=bar\r"
-expect "# "
-
-#=============================================================================
-#
-# su -, make a login shell
-#
-#=============================================================================
-send "/bin/su - $command myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-send_user "\n# FOO should be empty"
-send "\r"
-expect "$ "
-
-send "echo \"FOO=\\\"\$FOO\\\"\"\r"
-expect "FOO=\"\"\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_FOO-options_-_bash b/tests/su/02/env_FOO-options_-_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-l b/tests/su/02/env_FOO-options_-l
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-l
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-l-m b/tests/su/02/env_FOO-options_-l-m
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-l-m
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-l-m.exp b/tests/su/02/env_FOO-options_-l-m.exp
deleted file mode 100755
index 8b187a6b..00000000
--- a/tests/su/02/env_FOO-options_-l-m.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export FOO=bar\r"
-expect "# "
-
-#=============================================================================
-#
-# su -l -m, make a login shell, but preserve environment
-#
-#=============================================================================
-send "/bin/su -l -m $command myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-send_user "\n# FOO should be 'bar'"
-send "\r"
-expect "$ "
-
-send "echo \"FOO=\\\"\$FOO\\\"\"\r"
-expect "FOO=\"bar\"\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_FOO-options_-l-m_bash b/tests/su/02/env_FOO-options_-l-m_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-l-m_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-l.exp b/tests/su/02/env_FOO-options_-l.exp
deleted file mode 100755
index a23f8c4d..00000000
--- a/tests/su/02/env_FOO-options_-l.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export FOO=bar\r"
-expect "# "
-
-#=============================================================================
-#
-# su -l, make a login shell
-#
-#=============================================================================
-send "/bin/su - $command myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-send_user "\n# FOO should be empty"
-send "\r"
-expect "$ "
-
-send "echo \"FOO=\\\"\$FOO\\\"\"\r"
-expect "FOO=\"\"\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_FOO-options_-l_bash b/tests/su/02/env_FOO-options_-l_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-l_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-m b/tests/su/02/env_FOO-options_-m
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-m
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-m.exp b/tests/su/02/env_FOO-options_-m.exp
deleted file mode 100755
index 061aacb3..00000000
--- a/tests/su/02/env_FOO-options_-m.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export FOO=bar\r"
-expect "# "
-
-#=============================================================================
-#
-# su -m, as for regular su, environment is preserved
-#
-#=============================================================================
-send "/bin/su $command -m myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-send_user "\n# FOO should be 'bar'"
-send "\r"
-expect "$ "
-
-send "echo \"FOO=\\\"\$FOO\\\"\"\r"
-expect "FOO=\"bar\"\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_FOO-options_-m_bash b/tests/su/02/env_FOO-options_-m_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-m_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-p b/tests/su/02/env_FOO-options_-p
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-p
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-p- b/tests/su/02/env_FOO-options_-p-
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-p-
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-p-.exp b/tests/su/02/env_FOO-options_-p-.exp
deleted file mode 100755
index fc848966..00000000
--- a/tests/su/02/env_FOO-options_-p-.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export FOO=bar\r"
-expect "# "
-
-#=============================================================================
-#
-# su -p -, make a login shell, but preserve environment
-#
-#=============================================================================
-send "/bin/su -p $command - myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-send_user "\n# FOO should be 'bar'"
-send "\r"
-expect "$ "
-
-send "echo \"FOO=\\\"\$FOO\\\"\"\r"
-expect "FOO=\"bar\"\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_FOO-options_-p-_bash b/tests/su/02/env_FOO-options_-p-_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-p-_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_-p.exp b/tests/su/02/env_FOO-options_-p.exp
deleted file mode 100755
index 061aacb3..00000000
--- a/tests/su/02/env_FOO-options_-p.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export FOO=bar\r"
-expect "# "
-
-#=============================================================================
-#
-# su -m, as for regular su, environment is preserved
-#
-#=============================================================================
-send "/bin/su $command -m myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-send_user "\n# FOO should be 'bar'"
-send "\r"
-expect "$ "
-
-send "echo \"FOO=\\\"\$FOO\\\"\"\r"
-expect "FOO=\"bar\"\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_FOO-options_-p_bash b/tests/su/02/env_FOO-options_-p_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options_-p_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_FOO-options_.exp b/tests/su/02/env_FOO-options_.exp
deleted file mode 100755
index ff87b2eb..00000000
--- a/tests/su/02/env_FOO-options_.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export FOO=bar\r"
-expect "# "
-
-#=============================================================================
-#
-# Regular su, preserve environment
-#
-#=============================================================================
-send "/bin/su myuser $command\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-send_user "\n# FOO should be 'bar'"
-send "\r"
-expect "$ "
-
-send "echo \"FOO=\\\"\$FOO\\\"\"\r"
-expect "FOO=\"bar\"\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_FOO-options__bash b/tests/su/02/env_FOO-options__bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_FOO-options__bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special-options_ b/tests/su/02/env_special-options_
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special-options_
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special-options_-l b/tests/su/02/env_special-options_-l
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special-options_-l
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special-options_-l-p b/tests/su/02/env_special-options_-l-p
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special-options_-l-p
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special-options_-l-p.exp b/tests/su/02/env_special-options_-l-p.exp
deleted file mode 100755
index 15c10b62..00000000
--- a/tests/su/02/env_special-options_-l-p.exp
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export PATH=bar:\$PATH\r"
-expect "# "
-send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect "# "
-
-#=============================================================================
-#
-# su -m -l, make a login shell, but preserve environment
-# However, PATH is not preserved, but set to what it would be with login
-#
-#=============================================================================
-send "/bin/su -p $command -l myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-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/local/games:/usr/games\"\r"
-expect "$ "
-
-send "echo \"'\$HOME'\$USER'\$LOGNAME'\$SHELL'\"\r"
-expect "'/root'root'root'/bin/bash'\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_special-options_-l-p_bash b/tests/su/02/env_special-options_-l-p_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special-options_-l-p_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special-options_-l.exp b/tests/su/02/env_special-options_-l.exp
deleted file mode 100755
index 75df5dcc..00000000
--- a/tests/su/02/env_special-options_-l.exp
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export PATH=bar:\$PATH\r"
-expect "# "
-send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect "# "
-
-#=============================================================================
-#
-# su -l, make a login shell
-#
-#=============================================================================
-send "/bin/su - $command myuser\r"
-expect "$ "
-
-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/local/games:/usr/games'"
-send "\r"
-expect "$ "
-
-send "echo \"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"
-expect "'/home/'myuser'myuser'/bin/sh'\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_special-options_-l_bash b/tests/su/02/env_special-options_-l_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special-options_-l_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special-options_-p b/tests/su/02/env_special-options_-p
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special-options_-p
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special-options_-p.exp b/tests/su/02/env_special-options_-p.exp
deleted file mode 100755
index 3a7143c6..00000000
--- a/tests/su/02/env_special-options_-p.exp
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export PATH=bar:\$PATH\r"
-expect "# "
-send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect -re "PATH=\"(.*)\"\r" {set PATH $expect_out(1,string)}
-send_user "PATH='$PATH'"
-expect "# "
-
-#=============================================================================
-#
-# su -m, as for regular su, environment is preserved
-#
-#=============================================================================
-send "/bin/su $command -m myuser\r"
-expect "$ "
-
-send "id\n"
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)\r"
-expect "$ "
-
-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/local/games:/usr/games\"\r"
-expect "$ "
-
-send "echo \"'\$HOME'\$USER'\$LOGNAME'\$SHELL'\"\r"
-expect "'/root'root'root'/bin/bash'\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_special-options_-p_bash b/tests/su/02/env_special-options_-p_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special-options_-p_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special-options_.exp b/tests/su/02/env_special-options_.exp
deleted file mode 100755
index 63d70e16..00000000
--- a/tests/su/02/env_special-options_.exp
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export PATH=bar:\$PATH\r"
-expect "# "
-send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect "# "
-
-#=============================================================================
-#
-# Regular su, preserve environment
-# However, PATH is reset
-#
-#=============================================================================
-send "/bin/su myuser $command\r"
-expect "$ "
-
-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/local/games:/usr/games'"
-send "\r"
-expect "$ "
-
-send "echo \"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"
-expect "'/home/'myuser'myuser'/bin/sh'\r"
-expect "$ "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_special-options__bash b/tests/su/02/env_special-options__bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special-options__bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special_root-options_ b/tests/su/02/env_special_root-options_
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special_root-options_
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special_root-options_-l b/tests/su/02/env_special_root-options_-l
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special_root-options_-l
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special_root-options_-l-p b/tests/su/02/env_special_root-options_-l-p
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special_root-options_-l-p
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special_root-options_-l-p.exp b/tests/su/02/env_special_root-options_-l-p.exp
deleted file mode 100755
index 8ddae3d4..00000000
--- a/tests/su/02/env_special_root-options_-l-p.exp
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export PATH=bar:\$PATH\r"
-expect "# "
-send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect "# "
-
-#=============================================================================
-#
-# su -l -p root, make a login shell, but preserve environment
-# However, PATH is not preserved, but set to what it would be with login
-# for root
-#
-#=============================================================================
-send "/bin/su -p $command - root\r"
-expect "# "
-
-send "id\n"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send_user "\n# Even with -p, PATH is reset"
-send "\r"
-expect "# "
-
-send "echo \"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"
-expect "'/root'root'root'/bin/bash'\r"
-expect "# "
-
-send "exit\r"
-expect "# "
-
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_special_root-options_-l-p_bash b/tests/su/02/env_special_root-options_-l-p_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special_root-options_-l-p_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special_root-options_-l.exp b/tests/su/02/env_special_root-options_-l.exp
deleted file mode 100755
index 6a58849c..00000000
--- a/tests/su/02/env_special_root-options_-l.exp
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export PATH=bar:\$PATH\r"
-expect "# "
-send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect "# "
-
-#=============================================================================
-#
-# su -l root, make a login shell
-#
-#=============================================================================
-send "/bin/su $command -l root\r"
-expect "# "
-
-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 "\r"
-expect "# "
-
-send "echo \"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"
-expect "'/root'root'root'/bin/bash'\r"
-expect "# "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_special_root-options_-l_bash b/tests/su/02/env_special_root-options_-l_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special_root-options_-l_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special_root-options_-p b/tests/su/02/env_special_root-options_-p
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special_root-options_-p
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special_root-options_-p.exp b/tests/su/02/env_special_root-options_-p.exp
deleted file mode 100755
index 453c02cd..00000000
--- a/tests/su/02/env_special_root-options_-p.exp
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export PATH=bar:\$PATH\r"
-expect "# "
-send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect -re "PATH=\"(.*)\"\r" {set PATH $expect_out(1,string)}
-send_user "PATH='$PATH'"
-expect "# "
-
-#=============================================================================
-#
-# su -p root, as for regular su, environment is preserved
-#
-#=============================================================================
-send "/bin/su $command -m\r"
-expect "# "
-
-send "id\n"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send_user "\n# Even with -p, PATH is reset"
-send "\r"
-expect "# "
-
-send "echo \"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"
-expect "'/root'root'root'/bin/bash'\r"
-expect "# "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_special_root-options_-p_bash b/tests/su/02/env_special_root-options_-p_bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special_root-options_-p_bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/env_special_root-options_.exp b/tests/su/02/env_special_root-options_.exp
deleted file mode 100755
index 0b86452b..00000000
--- a/tests/su/02/env_special_root-options_.exp
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/expect
-
-if {$argc == 1} {
- set command [lindex $argv 0]
-} else {
- set command ""
-}
-
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-spawn /bin/bash
-expect "# "
-
-send "id\r"
-expect "uid=0(root) gid=0(root) groups=0(root)\r"
-expect "# "
-
-send "export PATH=bar:\$PATH\r"
-expect "# "
-send "echo \"PATH=\\\"\$PATH\\\"\"\r"
-expect "# "
-
-#=============================================================================
-#
-# Regular su to root, preserve environment
-# However, PATH is reset
-#
-#=============================================================================
-send "/bin/su $command\r"
-expect "# "
-
-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 "\r"
-expect "# "
-
-send "echo \"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"
-expect "'/root'root'root'/bin/bash'\r"
-expect "# "
-
-send "exit\r"
-expect "# "
-
-puts "\nPASS"
-exit 0
-
diff --git a/tests/su/02/env_special_root-options__bash b/tests/su/02/env_special_root-options__bash
deleted file mode 120000
index 11a6d1a5..00000000
--- a/tests/su/02/env_special_root-options__bash
+++ /dev/null
@@ -1 +0,0 @@
-run_env_test.sh \ No newline at end of file
diff --git a/tests/su/02/run_env_test.sh b/tests/su/02/run_env_test.sh
deleted file mode 100755
index 525d6193..00000000
--- a/tests/su/02/run_env_test.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-set -e
-
-cd $(dirname $0)
-
-testname=$(basename $0)
-
-. ../../common/config.sh
-. ../../common/log.sh
-
-command=""
-
-case "$testname" in
- *_bash)
- log_start "$0" "propagation of environment variable FOO in command bash: $testname"
- testname=$(echo "$testname" | sed -s 's/_bash$//')
- command="-c bash"
- echo testname: $testname
- ;;
- *)
- log_start "$0" "propagation of environment variable FOO: $test"
- ;;
-esac
-
-save_config
-
-# restore the files on exit
-trap 'log_status "$0" "FAILURE"; restore_config' 0
-
-change_config
-
-"./$testname.exp" "$command"
-
-log_status "$0" "SUCCESS"
-restore_config
-trap '' 0
-