From 78407f0914803274187a7a3c3501d8bc38424168 Mon Sep 17 00:00:00 2001 From: ache Date: Mon, 3 Mar 1997 07:59:54 +0000 Subject: Back out MAXLOGNAME fix, Bruce points that copyinstr require NUL --- games/battlestar/externs.h | 2 +- usr.bin/at/at.c | 4 ++-- usr.sbin/pw/pw_user.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/games/battlestar/externs.h b/games/battlestar/externs.h index f47ca9f..2d85352 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 84e7dbd..07bf7ff 100644 --- a/usr.bin/at/at.c +++ b/usr.bin/at/at.c @@ -53,10 +53,10 @@ #include #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 faebb30..a5ea801 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); -- cgit v1.1