Re: [PATCH 3/3] agetty: Reload only if it is really needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 11, 2018 at 09:37:07PM +0200, Stanislav Brabec wrote:
> Karel Zak wrote:
> > Can you retest the current master branch with my changes? I do not
> > expect any issue, but for sure...
> Works as expected.
> 
> There is one remaining issue:
> 
> Reload happens even if user already started to type logname. It is very
> uncomfortable

I thought about it too.

> and it can even lead to problems with login. I tried to
> fix that: Once any letter is already entered, reload will be blocked
> and postponed.
> 
> To fix this, we would need to disable reloads once any character was
> entered. It would require switch to character mode and custom handling
> of backspace. I am not sure, whether we want this.

We already had implementation based on character mode for the select()
and it was pretty fragile (see commit message 2a14beb4e9c6cdf4466993741d86e45dd57ddef3).

The problem was that the code tried to switch back to line mode within
get_logname() to manage control keys (del/backspace) by terminal. The
switch between the modes is really bad idea in time you read from the
terminal.

The character mode for all get_logname() is definitely good idea for
the reload issue, the question is how tricky will be to manage login
name string on terminal. You need to refresh all the output line on
del/backspace, etc.

Send patch ;-)

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux