Date: Thu, 2 Apr 1998 23:28:12 -0600 (CST) From: Jeff Lynch <jeff@mercury.jorsm.com> To: freebsd-isp@FreeBSD.ORG Subject: Re: cistron radius Message-ID: <Pine.BSF.3.95q.980402232633.6059A-100000@mercury.jorsm.com> In-Reply-To: <35244310.EA8E1638@scitec.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.980402232633.6059A-100000>