From d7b3176278de8f35347ccec2f9ff330fa40157c1 Mon Sep 17 00:00:00 2001 From: Guido van Rooij Date: Fri, 1 Dec 1995 20:38:40 +0000 Subject: [PATCH] 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. --- libexec/rlogind/rlogind.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c index f7198ea7684..5de2a056cd4 100644 --- a/libexec/rlogind/rlogind.c +++ b/libexec/rlogind/rlogind.c @@ -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);