aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAtsushi Murai <amurai@FreeBSD.org>1998-06-01 08:47:04 +0000
committerAtsushi Murai <amurai@FreeBSD.org>1998-06-01 08:47:04 +0000
commit89caae2932adde71022cb5691ee1b73cd26a8286 (patch)
treee8ef228b9354b10f24452d07fdbc488518363e82 /usr.bin
parentf66ca81068480d66f3ff8fd4735b0978bec37695 (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/login/login.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c
index 17137f05d0aca..0c6ee3a2d1051 100644
--- a/usr.bin/login/login.c
+++ b/usr.bin/login/login.c
@@ -42,7 +42,7 @@ static char copyright[] =
static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
- "$Id: login.c,v 1.33 1998/04/30 16:48:20 peter Exp $";
+ "$Id: login.c,v 1.34 1998/04/30 16:50:07 peter Exp $";
#endif /* not lint */
/*
@@ -118,6 +118,7 @@ int klogin __P((struct passwd *, char *, char *, char *));
#endif
extern void login __P((struct utmp *));
+extern void trimdomain __P((char *, int));
static void usage __P((void));
#define TTYGRPNAME "tty" /* name of group to own ttys */
@@ -213,6 +214,9 @@ main(argc, argv)
if (domain && (p = strchr(optarg, '.')) &&
strcasecmp(p, domain) == 0)
*p = 0;
+
+ trimdomain(optarg, UT_HOSTSIZE );
+
if (strlen(optarg) > UT_HOSTSIZE) {
struct hostent *hp = gethostbyname(optarg);