Date: Thu, 13 Jul 2000 03:40:05 -0700 (PDT) From: Sheldon Hearn <sheldonh@uunet.co.za> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/19886: skey won't work for usernames > 8 characters Message-ID: <200007131040.DAA75387@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/19886; it has been noted by GNATS. From: Sheldon Hearn <sheldonh@uunet.co.za> To: Gregory Bond <gnb@itga.com.au> Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/19886: skey won't work for usernames > 8 characters Date: Thu, 13 Jul 2000 12:36:03 +0200 On Thu, 13 Jul 2000 16:12:12 +1000, Gregory Bond wrote: > skey will not authenticate usernames longer than 8 characters. Your patch doesn't deal with the header inclusions in a style(9)-consistent way. Of course, the file is already out of sync with style(9) in that respect. :-) I'm sending two patches, to be applied in order. The first corrects the existing inclusions, while the second applies the change you intended. it would be better if they were applied as two distinct commits. Note also that the style of the conditional was not consistent with the conditionals in the rest of the file. Ciao, Sheldon. Index: skeylogin.c =================================================================== RCS file: /home/ncvs/src/lib/libskey/skeylogin.c,v retrieving revision 1.14 diff -u -d -r1.14 skeylogin.c --- skeylogin.c 1998/10/26 13:33:39 1.14 +++ skeylogin.c 2000/07/13 10:30:02 @@ -10,14 +10,11 @@ #include <sys/time.h> #include <sys/resource.h> - +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sys/types.h> -#include <sys/stat.h> #include <time.h> -#include <errno.h> #include "skey.h" #include "pathnames.h" --- skeylogin.c.orig Thu Jul 13 12:33:23 2000 +++ skeylogin.c Thu Jul 13 12:34:08 2000 @@ -15,6 +15,7 @@ #include <stdlib.h> #include <string.h> #include <time.h> +#include <utmp.h> #include "skey.h" #include "pathnames.h" @@ -121,7 +122,8 @@ /* 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); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007131040.DAA75387>