]> git.ipfire.org Git - thirdparty/util-linux.git/commit
agetty: Fix input of non-ASCII characters in get_logname()
authorStanislav Brabec <sbrabec@suse.cz>
Wed, 27 Feb 2019 22:22:19 +0000 (23:22 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 2 Apr 2019 10:57:51 +0000 (12:57 +0200)
commitb72c23f220d8cc05c5f77c0b7d55ebe5be14258e
tree8fda0159d0f475f19e7731c8857b43fe883ac2f4
parent669b60a0ce66d73e474a4714828377d38f04f45d
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>
term-utils/agetty.c