Re: GCC: Attempting to run tests as "tester" user results in "su: Cannot drop the controlling terminal"

"Xi Ruoyao" ([email protected] via lfs-support Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.support
Message-ID <[email protected]>
On Sat, 2025-01-11 at 15:12 +0000, kevadesu wrote:
> Xi Ruoyao ([email protected] via lfs-support Mailing List) <[email protected]> wrote:
> > On Sat, 2025-01-11 at 14:48 +0000, [email protected] wrote:
> > &gt; Xi Ruoyao ([email protected] via lfs-support Mailing List) &lt;[email protected]&gt; wrote:
> > &gt; &gt; On Sat, 2025-01-11 at 10:55 +0000, [email protected] wrote:
> > &gt; &gt; 
> > &gt; &gt; &amp;gt; (lfs chroot) root:/# ls -l /
> > &gt; &gt; &amp;gt; ls -l /lib64
> > &gt; &gt; &amp;gt; ls -l /lib/ld-linux-x86-64.so.2
> > &gt; &gt; &amp;gt; ls -l /bin/bash
> > &gt; &gt; &amp;gt; total 84
> > &gt; &gt; &amp;gt; lrwxrwxrwx   1 root  root      7 Oct 23 19:46 bin -&amp;gt; usr/bin
> > &gt; &gt; &amp;gt; drwxr-xr-x   2 root  root   4096 Dec 21 19:28 boot
> > &gt; &gt; &amp;gt; drwxr-xr-x  21 root  root   4720 Jan 11 11:15 dev
> > &gt; &gt; &amp;gt; drwxr-xr-x   6 root  root   4096 Jan  8 20:28 etc
> > &gt; &gt; &amp;gt; drwxr-xr-x   3 root  root   4096 Dec 21 21:13 home
> > &gt; &gt; &amp;gt; lrwxrwxrwx   1 root  root      7 Oct 23 19:46 lib -&amp;gt; usr/lib
> > &gt; &gt; &amp;gt; drwxr-xr-x   2 30034 root   4096 Nov  7 19:02 lib64
> > &gt; &gt; 
> > &gt; &gt; Hmm who is &amp;quot;30034&amp;quot;?  Is that the UID for the lfs user on the host
> > &gt; &gt; distro?  But we have
> > &gt; &gt; 
> > &gt; &gt; case $(uname -m) in
> > &gt; &gt;  x86_64) chown --from lfs -R root:root $LFS/lib64 ;;
> > &gt; &gt; esac
> > &gt; &gt; 
> > &gt; &gt; in section 7.2 which should have changed the owner to root, so this
> > &gt; &gt; shouldn&amp;#x27;t happen anyway.
> > &gt; &gt; 
> > &gt; &gt; And what does &amp;quot;ls -l /usr&amp;quot; output in the chroot environment?
> > &gt; &gt; 
> > &gt; &gt; -- 
> > &gt; &gt; Xi Ruoyao &amp;lt;[email protected]&amp;gt;
> > &gt; &gt; School of Aerospace Science and Technology, Xidian University
> > &gt; &gt; -- 
> > &gt; &gt; http://lists.linuxfromscratch.org/sympa/info/lfs-support
> > &gt; &gt; Unsubscribe: See the above information page
> > &gt; 
> > &gt; (lfs chroot) root:/# ls -l /usr
> > &gt; total 60
> > &gt; drwxr-xr-x  2 root root 12288 Jan  8 20:26 bin
> > &gt; drwxr-xr-x 47 root root 12288 Jan  8 20:26 include
> > &gt; drwxr-xr-x 26 root root 12288 Jan  8 20:26 lib
> > &gt; drwxr-xr-x  6 root root  4096 Nov 10 17:22 libexec
> > &gt; drwxr-xr-x  8 root root  4096 Dec 21 19:28 local
> > &gt; drwxr-xr-x  2 root root  4096 Jan  8 20:26 sbin
> > &gt; drwxr-xr-x 20 root root  4096 Jan  3 18:55 share
> > &gt; drwxr-xr-x  2 root root  4096 Dec 21 19:28 src
> > &gt; drwxr-xr-x  4 root root  4096 Nov 10 16:31 x86_64-lfs-linux-gnu
> > &gt; (lfs chroot) root:/#
> > 
> > Try &quot;chmod -v 755 /&quot; in chroot.
> > 
> > Also you need to fix those directories owned by &quot;30034&quot; despite they
> > seem not the cause of the su issue.  They&#x27;ll be a security hole when the
> > LFS system is completed.
> > 
> > -- 
> > Xi Ruoyao &lt;[email protected]&gt;
> > School of Aerospace Science and Technology, Xidian University
> > -- 
> > http://lists.linuxfromscratch.org/sympa/info/lfs-support
> > Unsubscribe: See the above information page
> 
> Holy shit, it worked! Thank you!!

Well but still this shouldn't happen.  I'm unsure if this is your human
error or some insane configuration of the host distro.  If this is a
human error we cannot do anything, but if it's an insane configuration
I've just pushed some changes to the book attempting to protect us from
it.

-- 
Xi Ruoyao <[email protected]>
School of Aerospace Science and Technology, Xidian University

-- 
http://lists.linuxfromscratch.org/sympa/info/lfs-support
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.