summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1995-12-01 20:38:40 +0000
committerguido <guido@FreeBSD.org>1995-12-01 20:38:40 +0000
commitfa388c85dce484e6528dd4074c4df1dec1cd7207 (patch)
treedc6d2f3b7a597158dea1fee1e955ab57a4845d00 /libexec
parent4b53447c61e1018f31ad4decf163ed24f59b42a9 (diff)
downloadFreeBSD-src-fa388c85dce484e6528dd4074c4df1dec1cd7207.zip
FreeBSD-src-fa388c85dce484e6528dd4074c4df1dec1cd7207.tar.gz
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.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rlogind/rlogind.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index f7198ea..5de2a05 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);
OpenPOWER on IntegriCloud