From owner-freebsd-hackers Wed Nov 29 01:59:14 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA26431 for hackers-outgoing; Wed, 29 Nov 1995 01:59:14 -0800 Received: from pcpsj.pfcs.com (RKFvq3wkey+8bwC8FlqIX5n0Nr1WgGPa@harlan.clark.net [168.143.10.179]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id BAA26426 for ; Wed, 29 Nov 1995 01:59:09 -0800 Received: from mumps.pfcs.com (mumps.pfcs.com [192.52.69.11]) by pcpsj.pfcs.com (8.6.11/8.6.9) with SMTP id EAA00249 for ; Wed, 29 Nov 1995 04:46:18 -0500 Received: from localhost by mumps.pfcs.com with SMTP id AA05550 (5.67b/IDA-1.5 for ); Wed, 29 Nov 1995 04:46:16 -0500 To: freebsd-hackers@freebsd.org Subject: Patches for lib/libskey/ Date: Wed, 29 Nov 1995 04:46:15 -0400 Message-Id: <5548.817638375@mumps.pfcs.com> From: Harlan Stenn Sender: owner-hackers@freebsd.org Precedence: bulk The following patch for skey.h is because recstart is used by fseek. The patch for skeysubr.c comes from logdaemon-5.0, and fixes the problem I had with -lskey and the skey patches for wu-ftpd. There are other patches with logdaemon-5.0, but I haven't really looked further. H --- skey.h- Wed Nov 29 04:36:15 1995 +++ skey.h Fri Nov 17 03:45:54 1995 @@ -11,7 +11,7 @@ int n; char *seed; char *val; - long recstart; /*needed so reread of buffer is efficient*/ + off_t recstart; /*needed so reread of buffer is efficient*/ }; /* Client-side structure for scanning data stream for challenge */ --- skeysubr.c- Sun Jun 11 15:29:19 1995 +++ skeysubr.c Fri Nov 17 07:15:34 1995 @@ -67,7 +67,10 @@ rip(buf) char *buf; { - buf[strcspn(buf, "\r\n")] = 0; + buf += strcspn(buf, "\r\n"); + + if (*buf) + *buf = 0; } static struct termios saved_ttymode;