aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorGuido van Rooij <guido@FreeBSD.org>1994-08-15 19:44:50 +0000
committerGuido van Rooij <guido@FreeBSD.org>1994-08-15 19:44:50 +0000
commit949690303259f8e5fb245044cef9e670231c7c9e (patch)
tree807ea7f4a11bca9427bb311fb2d40d046bdf134c /libexec
parentd966229d001e1306564f495b88ac2a529c153b38 (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rlogind/rlogind.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index 6f5f5e1d4716..57927985f42d 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -293,6 +293,11 @@ doit(f, fromp)
if (f > 2) /* f should always be 0, but... */
(void) close(f);
setup_term(0);
+ if (strchr(lusername, '-')) {
+ syslog(LOG_ERR, "tried to pass user \"%s\" to login",
+ lusername);
+ fatal(STDERR_FILENO, "invalid user", 0);
+ }
if (authenticated) {
#ifdef KERBEROS
if (use_kerberos && (pwd->pw_uid == 0))