Date: Mon, 21 Jan 2002 02:46:03 -0800 (PST) From: Maxim Katargin <kmv@asplinux.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/34108: quotacheck does not work with large quotafiles. (with patch) Message-ID: <200201211046.g0LAk3Y34534@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 34108 >Category: bin >Synopsis: quotacheck does not work with large quotafiles. (with patch) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 21 02:50:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Maxim Katargin >Release: Freebsd-4.4 >Organization: >Environment: FreeBSD kmv.asplinux.ru 4.4-VRE FreeBSD 4.4-VRE #31: Fri Jan 18 19:46:12 MSK 2002 kmv@kmv.asplinux.ru:/usr/home/kmv/src/src/sys/compile/gemmm i386 >Description: quotacheck does not works with large quotafiles. >How-To-Repeat: make user with uid 1000000000 and try to run quotacheck. >Fix: Index: quotacheck.c =================================================================== RCS file: /ext/vcvs/src/sbin/quotacheck/quotacheck.c,v retrieving revision 1.11.10000.4 retrieving revision 1.11.10000.6 diff -u -r1.11.10000.4 -r1.11.10000.6 --- quotacheck.c 2001/10/22 07:47:25 1.11.10000.4 +++ quotacheck.c 2002/01/18 15:13:23 1.11.10000.6 @@ -450,7 +450,7 @@ dqbuf.dqb_itime = 0; dqbuf.dqb_curinodes = fup->fu_curinodes; dqbuf.dqb_curblocks = fup->fu_curblocks; - if (fseek(qfo, (long)offset, SEEK_SET) < 0) { + if (fseeko(qfo, offset, SEEK_SET) < 0) { warn("%s: seek failed", quotafile); return(1); } @@ -463,7 +463,7 @@ fclose(qfi); fflush(qfo); ftruncate(fileno(qfo), - (off_t)((highid[type] + 1) * sizeof(struct dqblk))); + (((off_t)highid[type] + 1) * sizeof(struct dqblk))); fclose(qfo); return (0); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201211046.g0LAk3Y34534>