Date: Fri, 03 Apr 1998 12:01:52 +1000 From: John Saunders <john.saunders@scitec.com.au> To: Paul Sandys <myj@nyct.net> Cc: freebsd-isp@FreeBSD.ORG Subject: Re: cistron radius Message-ID: <35244310.EA8E1638@scitec.com.au> References: <Pine.BSF.3.96.980402173030.470A-100000@bsd3.nyct.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35244310.EA8E1638>