aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1997-03-03 07:59:54 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1997-03-03 07:59:54 +0000
commit08a77c42e1cd998af13b0ae7558349671c4086f7 (patch)
tree124c0a9bfc8a89192dbd53d5517d7bf354f4549b
parent27117f574eb6b6b12497f7a89299c612349c031e (diff)
downloadsrc-08a77c42e1cd998af13b0ae7558349671c4086f7.tar.gz
src-08a77c42e1cd998af13b0ae7558349671c4086f7.zip
Back out MAXLOGNAME fix, Bruce points that copyinstr require NUL
Notes
Notes: svn path=/head/; revision=23318
-rw-r--r--games/battlestar/externs.h2
-rw-r--r--usr.bin/at/at.c4
-rw-r--r--usr.sbin/pw/pw_user.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/games/battlestar/externs.h b/games/battlestar/externs.h
index f47ca9f615b8..2d853521cfdb 100644
--- a/games/battlestar/externs.h
+++ b/games/battlestar/externs.h
@@ -279,7 +279,7 @@ int wear[NUMOFWORDS];
char beenthere[NUMOFROOMS+1];
char injuries[NUMOFINJURIES];
-char uname[MAXLOGNAME+1];
+char uname[MAXLOGNAME];
struct wlist {
char *string;
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c
index 84e7dbde28a0..07bf7ffd1cc6 100644
--- a/usr.bin/at/at.c
+++ b/usr.bin/at/at.c
@@ -53,10 +53,10 @@
#include <locale.h>
#endif
-#if MAXLOGNAME > UT_NAMESIZE
+#if (MAXLOGNAME-1) > UT_NAMESIZE
#define LOGNAMESIZE UT_NAMESIZE
#else
-#define LOGNAMESIZE MAXLOGNAME
+#define LOGNAMESIZE (MAXLOGNAME-1)
#endif
/* Local headers */
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c
index faebb3063ea3..a5ea8017434b 100644
--- a/usr.sbin/pw/pw_user.c
+++ b/usr.sbin/pw/pw_user.c
@@ -44,10 +44,10 @@
#include "bitmap.h"
#include "pwupd.h"
-#if MAXLOGNAME > UT_NAMESIZE
+#if (MAXLOGNAME-1) > UT_NAMESIZE
#define LOGNAMESIZE UT_NAMESIZE
#else
-#define LOGNAMESIZE MAXLOGNAME
+#define LOGNAMESIZE (MAXLOGNAME-1)
#endif
static int print_user(struct passwd * pwd, int pretty);