From owner-freebsd-bugs Mon Jan 21 2:50: 8 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0FD3A37B405 for ; Mon, 21 Jan 2002 02:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0LAo1V35208; Mon, 21 Jan 2002 02:50:01 -0800 (PST) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6F0B537B404 for ; Mon, 21 Jan 2002 02:46:03 -0800 (PST) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0LAk3Y34534; Mon, 21 Jan 2002 02:46:03 -0800 (PST) (envelope-from nobody) Message-Id: <200201211046.g0LAk3Y34534@freefall.freebsd.org> Date: Mon, 21 Jan 2002 02:46:03 -0800 (PST) From: Maxim Katargin To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/34108: quotacheck does not work with large quotafiles. (with patch) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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