diff options
author | Stanislav Brabec | 2019-02-27 23:22:19 +0100 |
---|---|---|
committer | Karel Zak | 2019-03-04 11:38:17 +0100 |
commit | 5de9751997cf490088f62f41fd92be57cf7ceea4 (patch) | |
tree | 401e098d1fbcc89915c46d0a1d5da4918b9eb212 /term-utils | |
parent | tests: make sure TS_HELPER_MBSENCODE compiled (diff) | |
download | kernel-qcow2-util-linux-5de9751997cf490088f62f41fd92be57cf7ceea4.tar.gz kernel-qcow2-util-linux-5de9751997cf490088f62f41fd92be57cf7ceea4.tar.xz kernel-qcow2-util-linux-5de9751997cf490088f62f41fd92be57cf7ceea4.zip |
agetty: Fix input of non-ASCII characters in get_logname()
As login supports non-ASCII characters in the logname, agetty should be
consistent.
8b58ffdd re-activated old and ASCII-only get_logname(), which restricted
the input to ASCII only. As the code does not read whole characters,
isascii(ascval) and isprint(ascval) returns nonsenses after entering a
non-ASCII character.
As keyboard maps don't contain unprintable non-control characters, it
seems to be relatively safe to remove both checks.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Lubomir Rintel <lkundrak@v3.sk>
Tested-by: Lubomir Rintel <lkundrak@v3.sk>
Diffstat (limited to 'term-utils')
-rw-r--r-- | term-utils/agetty.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 1a3ebc308..0ef8ba36d 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -2175,8 +2175,6 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t case CTL('D'): exit(EXIT_SUCCESS); default: - if (!isascii(ascval) || !isprint(ascval)) - break; if ((size_t)(bp - logname) >= sizeof(logname) - 1) log_err(_("%s: input overrun"), op->tty); if ((tp->c_lflag & ECHO) == 0) |