From owner-freebsd-isp Thu Apr 2 21:28:18 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA20263 for freebsd-isp-outgoing; Thu, 2 Apr 1998 21:28:18 -0800 (PST) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from mercury.jorsm.com (mercury.jorsm.com [207.112.128.9]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA20236 for ; Thu, 2 Apr 1998 21:28:14 -0800 (PST) (envelope-from jeff@mercury.jorsm.com) Received: from localhost (jeff@localhost) by mercury.jorsm.com (8.8.7/8.8.7) with SMTP id XAA06311 for ; Thu, 2 Apr 1998 23:28:12 -0600 (CST) Date: Thu, 2 Apr 1998 23:28:12 -0600 (CST) From: Jeff Lynch To: freebsd-isp@FreeBSD.ORG Subject: Re: cistron radius In-Reply-To: <35244310.EA8E1638@scitec.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Fri, 3 Apr 1998, John Saunders wrote: > Paul Sandys wrote: > > I had the same problem. From what I've seen, the acct.c is the problem. It > > uses lseek when it deletes users from radutmp file. Here's a snip of the > > code: > > > > if (lseek(fd, -sizeof(u), SEEK_CUR) < 0) { > > log(L_ERR, "Accounting: negative lseek!\n"); > > lseek(fd, 0, SEEK_SET); > > } > > > > On FreeBSD -sizeof(u) generates 32-bit result, but FreeBSD lseek expects > > 64-bit offset. Thats why your file grows to (4096MB - 100 bytes). I > > changed all -sizeof(u) arguments to -100, and everything seems to be > > running fine now for 3 weeks. > > Maybe a safer way to code that would be "-(off_t)sizeof(u)". ^^^^^^^ Yes. This works very well. ========================================================================= Jeffrey A. Lynch JORSM Internet email: jeff@jorsm.com Northwest Indiana's Full-Service Provider Voice: (219)322-2180 927 Sheffield Avenue, Dyer, IN 46311 Autoresponse: info@jorsm.com http://www.jorsm.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message