summaryrefslogtreecommitdiff
path: root/libexec/rlogind
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/rlogind')
-rw-r--r--libexec/rlogind/Makefile15
-rw-r--r--libexec/rlogind/rlogind.c7
2 files changed, 16 insertions, 6 deletions
diff --git a/libexec/rlogind/Makefile b/libexec/rlogind/Makefile
index 90254a106465..3ca4401cf755 100644
--- a/libexec/rlogind/Makefile
+++ b/libexec/rlogind/Makefile
@@ -1,4 +1,5 @@
-# @(#)Makefile 5.9 (Berkeley) 9/27/90
+# $Id: Makefile,v 1.5 1994/03/04 20:32:55 wollman Exp $
+# From: @(#)Makefile 5.9 (Berkeley) 9/27/90
PROG= rlogind
SRCS= rlogind.c
@@ -7,10 +8,14 @@ DPADD= ${LIBUTIL}
LDADD= -lutil
.PATH: ${.CURDIR}/../../usr.bin/rlogin
-.if exists(/usr/lib/libcrypt.a)
-#CFLAGS+=-DCRYPT -DKERBEROS
-DPADD+= ${LIBCRYPT} #${LIBKRB}
-LDADD+= -lcrypt #-lkrb
+.if exists(${DESTDIR}/usr/lib/libcrypt.a)
+DPADD+= ${LIBCRYPT}
+LDADD+= -lcrypt
+.endif
+.if exists(${DESTDIR}/usr/lib/libkrb.a)
+CFLAGS+= -DKERBEROS
+DPADD+= ${LIBKRB} ${LIBDES}
+LDADD+= -lkrb -ldes
.endif
.include <bsd.prog.mk>
diff --git a/libexec/rlogind/rlogind.c b/libexec/rlogind/rlogind.c
index f3b50b696be4..f81c8253f2a3 100644
--- a/libexec/rlogind/rlogind.c
+++ b/libexec/rlogind/rlogind.c
@@ -44,7 +44,7 @@ static char sccsid[] = "@(#)rlogind.c 5.53 (Berkeley) 4/20/91";
#ifdef KERBEROS
/* From:
* $Source: /home/cvs/386BSD/src/libexec/rlogind/rlogind.c,v $
- * $Header: /home/cvs/386BSD/src/libexec/rlogind/rlogind.c,v 1.1.1.1 1993/06/12 14:54:58 rgrimes Exp $
+ * $Header: /home/cvs/386BSD/src/libexec/rlogind/rlogind.c,v 1.2 1994/05/22 19:22:02 karl Exp $
*/
#endif
@@ -317,6 +317,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))