mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
It is not necessary to check if a '-' is in lusername., Checking if
lusername starts with a '-' is enough. Otherwise, no users with a '-' in there name can use rlogin.
This commit is contained in:
parent
2db54afc5e
commit
d7b3176278
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=12561
@ -302,7 +302,7 @@ doit(f, fromp)
|
||||
if (f > 2) /* f should always be 0, but... */
|
||||
(void) close(f);
|
||||
setup_term(0);
|
||||
if (strchr(lusername, '-')) {
|
||||
if (*lusername=='-')) {
|
||||
syslog(LOG_ERR, "tried to pass user \"%s\" to login",
|
||||
lusername);
|
||||
fatal(STDERR_FILENO, "invalid user", 0);
|
||||
|
Loading…
Reference in New Issue
Block a user