Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/libexec/getty Pull up revision 1.29 (via patch, request...
details: https://anonhg.NetBSD.org/src/rev/576a057e29fe
branches: netbsd-1-4
changeset: 469905:576a057e29fe
user: he <he%NetBSD.org@localhost>
date: Mon Dec 20 15:01:15 1999 +0000
description:
Pull up revision 1.29 (via patch, requested by drochner):
Make room for a terminating '\0' in the username string and make
sure the user name passed to "login" is terminated.
diffstat:
libexec/getty/main.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 876d67a0449d -r 576a057e29fe libexec/getty/main.c
--- a/libexec/getty/main.c Mon Dec 20 14:58:11 1999 +0000
+++ b/libexec/getty/main.c Mon Dec 20 15:01:15 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.28 1999/01/15 23:44:32 kml Exp $ */
+/* $NetBSD: main.c,v 1.28.2.1 1999/12/20 15:01:15 he Exp $ */
/*-
* Copyright (c) 1980, 1993
@@ -44,7 +44,7 @@
#if 0
static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";
#else
-__RCSID("$NetBSD: main.c,v 1.28 1999/01/15 23:44:32 kml Exp $");
+__RCSID("$NetBSD: main.c,v 1.28.2.1 1999/12/20 15:01:15 he Exp $");
#endif
#endif /* not lint */
@@ -98,7 +98,7 @@
char hostname[MAXHOSTNAMELEN + 1];
struct utsname kerninfo;
-char name[16];
+char name[17];
char dev[] = _PATH_DEV;
char ttyn[32];
char lockfile[512];
@@ -465,7 +465,8 @@
if (c == EOT)
exit(1);
- if (c == '\r' || c == '\n' || np >= &name[sizeof name]) {
+ if (c == '\r' || c == '\n' || np >= &name[16]) {
+ *np = '\0';
putf("\r\n");
break;
}
Home |
Main Index |
Thread Index |
Old Index