Ignore:
Timestamp:
07/20/2021 10:24:26 AM (3 years ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
7ea60d3
Parents:
14e0b47 (diff), 94862da (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'xry111/tester-nohack' into trunk

Use a fixed UID for "tester" user, instead of the tty owner's UID.

The problem using tty owner's UID is, when tty is owned by "root" the
UID of "tester" will be 0. This cause a namesis between "tester" and
root. And, the "tester" is introduced to run some tests which are not
expected to be ran as root. If "tester" has UID 0, it will have root
priviledge and the tests will fail again.

Bash tests require the user to own the tty. To satisify it, we use
Expect to spawn a new pseudoterminal to run Bash tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter07/createfiles.xml

    r14e0b47 r908a3c3  
    176176  chapter.</para>
    177177
    178 <screen><userinput>echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" &gt;&gt; /etc/passwd
     178<screen><userinput>echo "tester:x:101:101::/home/tester:/bin/bash" &gt;&gt; /etc/passwd
    179179echo "tester:x:101:" &gt;&gt; /etc/group
    180180install -o tester -d /home/tester</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.