From: Stef Walter <stefw@redhat.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] agetty: Reprompt and reprint /etc/issue if we receive SIGUSR1
Date: Tue, 15 Jul 2014 09:35:55 +0200 [thread overview]
Message-ID: <53C4D9DB.10703@redhat.com> (raw)
In-Reply-To: <20140714133716.GB30288@x2.net.home>
On 14.07.2014 15:37, Karel Zak wrote:
> On Mon, Jul 07, 2014 at 09:31:24AM +0200, Stef Walter wrote:
>> Several of the /etc/issue escape codes such as \4 and \S depend on
>> variable data which can change after the agetty prompt is displayed.
>> This can cause stale data to be displayed when a user looks at a VT,
>> especially in cases of DHCP racing with system start up.
>>
>> This commit allows agetty to react a SIGUSR1 signal by reprinting
>> its prompt including the reprocessing of /etc/issue.
>>
>> We never want this to occur once the user has started typing a
>> user name. So we detect when the user starts typing, after which
>> no further reprompting occurs even if SIGUSR1 is received.
>
> Good idea, interesting implementation, but it's too late for v2.25.
> I'm going to apply the patch to the git tree after v2.25 release.
Nice. Thanks.
Lennart discovered an issue with this ...
That the exec'ing the login process might race with the SIGUSR1 signal.
The fix here would be to signal(SIGUSR1, SIG_IGN) before exec'ing, does
that sound appropriate? I can post a new patch.
By the way, more information about this use case here:
https://bugzilla.redhat.com/show_bug.cgi?id=1110763
Also, on the use of SIGUSR1 ... often linux daemons like to use SIGHUP
as a 'reload' signal. But obviously this signal already has specific
meaning in the agetty case, hence the choice of SIGUSR1.
Cheers,
Stef
next prev parent reply other threads:[~2014-07-15 7:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-07 7:31 [PATCH] agetty: Reprompt and reprint /etc/issue if we receive SIGUSR1 Stef Walter
2014-07-14 13:37 ` Karel Zak
2014-07-15 7:35 ` Stef Walter [this message]
2014-07-15 7:51 ` Karel Zak
2014-07-15 7:47 ` Karel Zak
2014-07-15 7:57 ` Stef Walter
2014-07-15 9:19 ` Karel Zak
2014-07-15 12:40 ` Stef Walter
2014-07-15 16:12 ` Stef Walter
2014-07-16 10:02 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53C4D9DB.10703@redhat.com \
--to=stefw@redhat.com \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.