mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-02-07 14:52:10 +00:00
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.
This commit is contained in:
parent
28bdcfe0ef
commit
ef61313366
@ -218,7 +218,7 @@
|
|||||||
<segmentedlist id="bash-testdeps">
|
<segmentedlist id="bash-testdeps">
|
||||||
<segtitle>&testsuites;</segtitle>
|
<segtitle>&testsuites;</segtitle>
|
||||||
<seglistitem>
|
<seglistitem>
|
||||||
<seg>Shadow</seg>
|
<seg>Expect and Shadow</seg>
|
||||||
</seglistitem>
|
</seglistitem>
|
||||||
</segmentedlist>
|
</segmentedlist>
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ EOF</userinput></screen>
|
|||||||
user. We add this user here and delete this account at the end of that
|
user. We add this user here and delete this account at the end of that
|
||||||
chapter.</para>
|
chapter.</para>
|
||||||
|
|
||||||
<screen><userinput>echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd
|
<screen><userinput>echo "tester:x:101:101::/home/tester:/bin/bash" >> /etc/passwd
|
||||||
echo "tester:x:101:" >> /etc/group
|
echo "tester:x:101:" >> /etc/group
|
||||||
install -o tester -d /home/tester</userinput></screen>
|
install -o tester -d /home/tester</userinput></screen>
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@
|
|||||||
<para>Now, run the tests as the <systemitem
|
<para>Now, run the tests as the <systemitem
|
||||||
class="username">tester</systemitem> user:</para>
|
class="username">tester</systemitem> user:</para>
|
||||||
|
|
||||||
<screen><userinput remap="test">su tester << EOF
|
<screen><userinput remap="test">su -s /usr/bin/expect tester << EOF
|
||||||
PATH=$PATH make tests < $(tty)
|
spawn make tests; expect EOF;
|
||||||
EOF</userinput></screen>
|
EOF</userinput></screen>
|
||||||
|
|
||||||
<para>Install the package:</para>
|
<para>Install the package:</para>
|
||||||
|
Loading…
Reference in New Issue
Block a user