diff options
author | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-07-18 01:04:22 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-07-18 01:04:22 +0800 |
commit | ef61313366e6ca42298c4a48ecbe50c50c125b12 (patch) | |
tree | db0ea25d083be06a9d95f15699f15f5618a0eff1 /chapter08 | |
parent | 28bdcfe0ef164ea92e1debc35bf71e62e29a5c4b (diff) |
do not use UID hack for tester
It's causing "root-tester namesis" (both have UID 0) if the tty is owned
by root. To fix bash test, use Expect to spawn a new PTY for it.
Diffstat (limited to 'chapter08')
-rw-r--r-- | chapter08/bash.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chapter08/bash.xml b/chapter08/bash.xml index bb0f2b0fb..99ee2e3f4 100644 --- a/chapter08/bash.xml +++ b/chapter08/bash.xml @@ -76,8 +76,8 @@ <para>Now, run the tests as the <systemitem class="username">tester</systemitem> user:</para> -<screen><userinput remap="test">su tester << EOF -PATH=$PATH make tests < $(tty) +<screen><userinput remap="test">su -s /usr/bin/expect tester << EOF +spawn make tests; expect EOF; EOF</userinput></screen> <para>Install the package:</para> |