From owner-freebsd-isp Thu Apr 2 18:02:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA25896 for freebsd-isp-outgoing; Thu, 2 Apr 1998 18:02:39 -0800 (PST) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from firewall.scitec.com.au (firewall-user@fgate.scitec.com.au [203.17.180.68]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA25885 for ; Thu, 2 Apr 1998 18:02:30 -0800 (PST) (envelope-from john.saunders@scitec.com.au) Received: by firewall.scitec.com.au; id MAA19575; Fri, 3 Apr 1998 12:02:19 +1000 (EST) Received: from mailhub.scitec.com.au(203.17.180.131) by fgate.scitec.com.au via smap (3.2) id xma019536; Fri, 3 Apr 98 12:01:55 +1000 Received: from hydra.scitec.com.au (hydra.scitec.com.au [203.17.182.101]) by mailhub.scitec.com.au (8.6.12/8.6.9) with ESMTP id MAA24293; Fri, 3 Apr 1998 12:01:54 +1000 Received: from scitec.com.au (saruman.scitec.com.au) by hydra.scitec.com.au with ESMTP (1.40.112.8/16.2) id AA116428912; Fri, 3 Apr 1998 12:01:52 +1000 Message-Id: <35244310.EA8E1638@scitec.com.au> Date: Fri, 03 Apr 1998 12:01:52 +1000 From: John Saunders Organization: SCITEC LIMITED X-Mailer: Mozilla 4.04 [en] (WinNT; I) Mime-Version: 1.0 To: Paul Sandys Cc: freebsd-isp@FreeBSD.ORG Subject: Re: cistron radius References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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)". Cheers. -- +------------------------------------------------------------+ . | John Saunders mailto:John.Saunders@scitec.com.au (Work) | ,--_|\ | mailto:john@nlc.net.au (Home) | / Oz \ | http://www.nlc.net.au/~john/ | \_,--\_/ | SCITEC LIMITED Phone +61 2 9428 9563 Fax +61 2 9428 9933 | v | "By the time you make ends meet, they move the ends." | +------------------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message