diff options
author | sheldonh <sheldonh@FreeBSD.org> | 2000-07-18 11:32:27 +0000 |
---|---|---|
committer | sheldonh <sheldonh@FreeBSD.org> | 2000-07-18 11:32:27 +0000 |
commit | a27343321b84fcf37e10e8442c07507498ba625e (patch) | |
tree | dbfe5adafbf4348b27e037d8c8107fea01899dbb | |
parent | 864a72134ac09aabb0429287618cd3ce5de46df5 (diff) | |
download | FreeBSD-src-a27343321b84fcf37e10e8442c07507498ba625e.zip FreeBSD-src-a27343321b84fcf37e10e8442c07507498ba625e.tar.gz |
Substitute UT_NAMESIZE for 8 when truncating long usernames.
PR: 19886
Reported by: Gregory Bond <gnb@itga.com.au>
-rw-r--r-- | lib/libskey/skeylogin.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libskey/skeylogin.c b/lib/libskey/skeylogin.c index d0564c4..ae2e279 100644 --- a/lib/libskey/skeylogin.c +++ b/lib/libskey/skeylogin.c @@ -17,6 +17,7 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#include <utmp.h> #include "skey.h" #include "pathnames.h" @@ -123,7 +124,8 @@ const char *name; /* Look up user name in database */ len = strlen(name); - if( len > 8 ) len = 8; /* Added 8/2/91 - nmh */ + if(len > UT_NAMESIZE) + len = UT_NAMESIZE; found = 0; while(!feof(mp->keyfile)){ recstart = ftell(mp->keyfile); |