On Thu, 28 Nov 2019, Bruce Dubbs wrote:

> On 11/28/19 7:55 AM, Pierre Labastie wrote:
> > Le 28/11/2019 ? 13:43, Pierre Labastie a ?crit?:
> >> Le 27/11/2019 ? 17:40, Bruce Dubbs a ?crit?:
> >>> Restarting previous thread as a new discussion.
> >>>
> >>>> On 2019-11-26 14:56 -0600, Douglas R. Reno wrote:
> >>>>>> On 2019-11-26 14:39, Bruce Dubbs wrote:
> >>>
> >>>>>> Also, I am running into an issue I haven't noticed before.? On my
> >>>>>> existing system if I try to log in as user lfs with .bash_profile
> >>>>>> set,
> >>>>>> it automatically starts bash and then puts it into the background.
> >>>>>>
> >>>>>> # su - lfs
> >>>>>> [1]+? Stopped???????????????? su - lfs
> >>>>>> # jobs
> >>>>>> [1]+? Stopped???????????????? su - lfs
> >>>>>> # fg
> >>>>>> su - lfs
> >>>>>> lfs:~$
> >>>>>>
> >>>>>> The rules in the book work OK as .bash_profile is not present when
> >>>>>> we
> >>>>>> initially change to user lfs and then we source
> >>>>>> .bash_profile.? That
> >>>>>> works.
> >>>>>>
> >>>>>> It could have something to do with PAM and su, but I'm not
> >>>>>> sure.? Has
> >>>>>> anyone else seen this?
> >>>
> >>>>> Yes I have, it's happening on Debian 10 and on LFS now. I'm not sure
> >>>>> what's causing it
> >>>>
> >>>> I've seen this on LFS.? Not sure the reason.
> >>>
> >>> I've investigated this a bit.? The problem is in su after pam is
> installed.? I
> >>> rebuilt shadow using --without-libpam and copied that to /bin (ensuring it
> was
> >>> suid).? The our 'su - lfs' then worked perfectly.
> >>>
> >>> I did some initial trials to see if changing some of the /etc/pam.d/su
> >>> configuration items were causing the problem, but changing /etc/pam.d/su
> to:
> >>>
> >>> auth??????????? required??????? pam_permit.so
> >>> account???????? required??????? pam_permit.so
> >>> session???????? required??????? pam_permit.so
> >>> password??????? required??????? pam_permit.so
> >>>
> >>> still causes putting 'su - lfs' in the background.? This makes me think
> the
> >>> problem is in su, but it could be something in bash-5.
> >>
> >> On debian (where I see this problem on a fresh install, but not on an old
> (but
> >> updated) install), they use su from util-linux. So the problem might not be
> su.
> >>
> >> Note that the bash startup files are the same in both debian installations.
> >>
> >
> > Further investigating, I found that bash's version in debian sid is 5.0.11,
> > while it is 5.0.3 on debian 10, and 5.0 on lfs (point versions are just
> > available through patches, I think).
> >
> > So, on an lfs VM, I rebuilt bash with all the patches applied (up to
> 5.0.11),
> > and now, "su - lfs" works OK...
> >
> > If you want, I can prepare a consolidated patch and modify the book.
>
> That would be good, but we still need to address it as a caution in
> section 4.4 as some hosts have the problem.
>
> Looking at the patches, one of the following may be our problem:
>
> Patch-ID:     bash50-005
>
> In certain cases, bash optimizes out a fork() call too early and
> prevents traps from running.
>
> Patch-ID:     bash50-007
>
> Running `exec' when job control was disabled, even temporarily, but
> after it had been initialized, could leave the terminal in the wrong
> process group for the executed process.
>
> I suspect patch 7 fixes our specific problem.
>
>    -- Bruce
> --
> http://lists.linuxfromscratch.org/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/blfs/faq.html
> Unsubscribe: See the above information page
>
> Do not top post on this list.
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>
> http://en.wikipedia.org/wiki/Posting_style
>

While we're updating LFS then, may I suggest two additions to the new
system configuration?

As Python3 is the LFS default, we should add two aliases/links to python3
and pip3, as the installer does not seem to.

Flareon Zulu
-- 
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Do not top post on this list.

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

http://en.wikipedia.org/wiki/Posting_style

Reply via email to