History log of /freebsd-10.0-release/usr.bin/quota/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


227176 06-Nov-2011 ed

Add missing static keywords to quota(1)


223690 30-Jun-2011 pluknet

Fix quota(1) output.

- Fix calculation of 1024-byte sized blocks from disk blocks shown when -h
option isn't specified. It was broken with quota64 integration.
- In prthumanval(): limit the size of a buffer passed to humanize_number()
to a width of 5 bytes but allow a shorter length if requested. That's what
users expect.

PR: bin/150151
Reviewed by: Kirk McKusick


216370 11-Dec-2010 joel

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


207736 07-May-2010 mckusick

Merger of the quota64 project into head.

This joint work of Dag-Erling Smørgrav and myself updates the
FFS quota system to support both traditional 32-bit and new 64-bit
quotas (for those of you who want to put 2+Tb quotas on your users).

By default quotas are not compiled into the kernel. To include them
in your kernel configuration you need to specify:

options QUOTA # Enable FFS quotas

If you are already running with the current 32-bit quotas, they
should continue to work just as they have in the past. If you
wish to convert to using 64-bit quotas, use `quotacheck -c 64';
if you wish to revert from 64-bit quotas back to 32-bit quotas,
use `quotacheck -c 32'.

There is a new library of functions to simplify the use of the
quota system, do `man quotafile' for details. If your application
is currently using the quotactl(2), it is highly recommended that
you convert your application to use the quotafile interface.
Note that existing binaries will continue to work.

Special thanks to John Kozubik of rsync.net for getting me
interested in pursuing 64-bit quota support and for funding
part of my development time on this project.


194494 19-Jun-2009 brooks

In preparation for raising NGROUPS and NGROUPS_MAX, change base
system callers of getgroups(), getgrouplist(), and setgroups() to
allocate buffers dynamically. Specifically, allocate a buffer of size
sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow).

This (or similar gymnastics) is required for the code to actually follow
the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime
and where getgroups may return {NGROUPS_MAX}+1 results on systems like
FreeBSD which include the primary group.

In id(1), don't pointlessly add the primary group to the list of all
groups, it is always the first result from getgroups(). In principle
the old code was more portable, but this was only done in one of the two
places where getgroups() was called to the overall effect was pointless.

Document the actual POSIX requirements in the getgroups(2) and
setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we
may in the future.

MFC after: 2 weeks


181267 04-Aug-2008 delphij

Make quota(1) to compile with WARNS=6:
- ANSI'fy showrawquotas().
- Shut up GCC by initializing bgrace and igrace. The situation
that caused the GCC warning can never happen though.


181262 03-Aug-2008 cognet

ctime() expects a time_t, but qup->dqblk.dqb_btime is an int32_t, so for
big endian platforms where time_t is 64bits (ie armeb and sparc64), it will
be a problem.
Use a temporary time_t to work around this.

Submitted by: Matthew Luckie <mjl AT luckie DOT org dot nz>
MFC after: 3 days


176378 18-Feb-2008 mpp

Make the human readable numbers printed with the -h option a bit
more human readable by telling the human print routines to use
a smaller buffer to format the value.

This makes it so a value that was previously being printed
as 600000K will now print as 586M.


169345 07-May-2007 dwmalone

Use [u]intmax_t to printf unknown integer types.
Make timeprt always allocate memory, to make things a little simpler.
Remove an unused variable.


168971 23-Apr-2007 yar

Insert explicit space between the output fields to prevent them
from running together when a field overflows.

MFC after: 1 week


166651 11-Feb-2007 mpp

Fix some spelling / markup / grammar.

Pointed out by: ru


166646 11-Feb-2007 mpp

Add two new options to quota:

-f path
Only print quota information for the file system that path resides on.
-r
Display the quota information in a raw format.

Reviewed by: freebsd-hackers


166495 04-Feb-2007 mpp

If a user is over both the soft block limit and soft i-node
limit, quota will report one of the grace times incorrectly.
This is due to it storing the result in a static buffer, and the
routine being called like:
printf("....", ..., timeprnt(btime), timeprnt(itime), ...)

The problem becomes very obvious if you change one of the default
grace periods to be much larger than the other one.

Changed timeprnt to dynamically allocate the string to be displayed.


166485 04-Feb-2007 mpp

If two files systems, /a and /b are marked as having quotas enabled
in fstab and they are normally mounted as /a/b, if /b is not mounted,
the various quota utilities will incorrectly operate with the quotas on
/a (silently) when operations are attemted on /b.

Sync up all the hasquota() routines between all the different
quota utilities and change it to detect if the file system we are
attempting to perform quota operations on is not currently mounted
and warn the user accordingly.

PR: bin/38918


166388 01-Feb-2007 mpp

Make quota exit with a non-zero status if one more more file
systems are over quota, as documented in the man page.

PR: bin/77918


163599 21-Oct-2006 ru

- Document the default disk block usage unit.
- Add option -h, human-readable output.

PR: docs/53732


143524 13-Mar-2005 ceri

Remove an unused #define. md5's with and without this commit match.

Approved by: murray (mentor)


140420 18-Jan-2005 ru

Sort sections.


133258 07-Aug-2004 stefanf

Assign the result of getopt() to an int rather than to a char.


118465 05-Aug-2003 das

Remove redundant declarations.


118464 05-Aug-2003 das

Don't overflow the block quota calculations for NFS mounts.

PR: 47607
Submitted by: Eric van Gyzen <vangyzen@stat.duke.edu>


116386 15-Jun-2003 rwatson

Now that the kernel access control for quotactl(2) appears to work
properly, clean up quota(1). quota(1) has the ability to query
quotas either directly from the kernel, or if that fails, by reading
the quota.user or quota.group files specified for the file system
in /etc/fstab. The setuid bit existed solely (apparently) to let
non-operator users query their quotas and consumption when quotas
weren't enabled for the file system.

o Remove the setuid bit from quota(1).

o Remove the logic used by quota(1) when running setuid to prevent
users from querying the quotas of other users or groups. Note
that this papered over previously broken kernel access control;
if you queried directly using the system call, you could access
some of the data "restricted" by quota(1).

In the new world order, the ability to inspect the (live) quotas of
other uids and gids via the kernel is controlled by the privilege
requirement sysctl. The ability to query via the file is controlled
by the file permissions on the quota database backing files
(root:operator, group readable by default).


116385 15-Jun-2003 rwatson

Now that the kernel access control for quotactl(2) appears to work
properly, clean up quota(1). quota(1) has the ability to query
quotas either directly from the kernel, or if that fails, by reading
the quota.user or quota.group files specified for the file system
in /etc/fstab. The setuid bit existed solely (apparently) to let
non-operator users query their quotas and consumption when quotas
weren't enabled for the file system.

o Remove the setuid bit from quota(1).

o Remove the logic used by quota(1) when running setuid to prevent
users from querying the quotas of other users or groups. Note
that this papered over previously broken kernel access control.


107788 12-Dec-2002 ru

Uniformly refer to a file system as "file system".

Approved by: re


101545 09-Aug-2002 iedowse

Add a new flag (-l) that suppresses quota checks on NFS filesystems.

PR: bin/12939
Submitted by: Neil Blakey-Milner <nbm@rucus.ru.ac.za>


101544 09-Aug-2002 iedowse

Fix a few compiler warnings, sort options and make the usage()
output match the synopsis.


97764 03-Jun-2002 iedowse

Call getmntinfo with MNT_NOWAIT to avoid hanging if any NFS servers
are down. Avoid trying to send RPCs to the pidXXX@machine names
used in the special amd(8) mounts.

PR: bin/6183
Submitted by: Petr Lampa <lampa@fee.vutbr.cz>


95624 28-Apr-2002 markm

Fix some low-hanging fruit in the warnings department; ANSIfy functions,
sort out some const issues.


95124 20-Apr-2002 charnier

Use `The .Nm utility'


92921 22-Mar-2002 imp

remove __P


83391 13-Sep-2001 ru

Set BINOWN=root explicitly for setuid root binaries.

This is not "useless", as one may have non-default
setting for BINOWN in make.conf, and we still want
these to be installed setuid root in this case.


79755 15-Jul-2001 dd

Remove whitespace at EOL.


79535 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


77047 23-May-2001 pirzyk

Changed 'blocks' to 'usage' because we may not be getting quotas from
a ufs filesystem and it may be reporting in K instead of 512b blocks.
This is true when using a vxfs filesystem (on a solaris box) for instance.

PR: bin/14545
Submitted by: Jim Pirzyk
Reviewed by: jkh
MFC after: 1 week


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


58618 26-Mar-2000 charnier

Remove incorrect use of .Nm. Wrap long lines, Unwrap short lines
Options: -> The following options are available:


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


39495 19-Sep-1998 obrien

Remove useless `BINOWN=root' now that it is the default.


36880 11-Jun-1998 ache

Local filesystems are ufs not ffs
Submitted by: "D. Rock" <rock@cs.uni-sb.de>


36792 09-Jun-1998 imp

Don't assume that hp->h_lenght == 4. Be conservative in its use.
Submitted by: J. Assange a long time ago.


32651 20-Jan-1998 bde

Converted to Lite2 mount interface - decide filesystem types by name
instead of by number.


27888 04-Aug-1997 charnier

Use err(3). Cosmetic in usage string. Typo in man page.


24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


23012 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


18718 05-Oct-1996 wosch

delete doubled words, e.g.: "the the" -> "the"


16379 15-Jun-1996 alex

Code clean up. Prototypes, casting, and parentheses around assignments
used as truth value.


13365 09-Jan-1996 graichen

fixed some printf format mismatches and some lines exceeding 80 col's
(thanks to bruce)


13236 05-Jan-1996 graichen

Obtained from: NetBSD
replaced our quota with the NetBSD one, then added all changes we made
to our - this is done to support the displaying of quota's over nfs
using the rpc.rquotad


8327 07-May-1995 bde

Fix 3 fatal mismatches in format args involving dbtob() and 10 nonfatal
mismatches.


1591 27-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1590,
which included commits to RCS files with non-trunk default branches.