History log of /freebsd/usr.bin/quota/quota.c (Results 26 – 50 of 105)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 2f39985f 30-Jun-2011 Sergey Kandaurov <pluknet@FreeBSD.org>

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

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

show more ...


Revision tags: release/7.4.0_cvs, release/8.2.0_cvs, release/7.4.0, release/8.2.0
# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

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 $F

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

show more ...


Revision tags: release/8.1.0_cvs, release/8.1.0
# e27ed89a 07-May-2010 Kirk McKusick <mckusick@FreeBSD.org>

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

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.

show more ...


Revision tags: release/7.3.0_cvs, release/7.3.0
# 829b3f6b 04-Mar-2010 Dag-Erling Smørgrav <des@FreeBSD.org>

Fix warnings + minor style issues


Revision tags: release/8.0.0_cvs, release/8.0.0
# 37ed8e48 21-Oct-2009 Kirk McKusick <mckusick@FreeBSD.org>

Update to work with quotafile functions in -libutil.


# 10b3b545 17-Sep-2009 Dag-Erling Smørgrav <des@FreeBSD.org>

Merge from head


# 09c817ba 03-Jul-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

- MFC


# 54404cfb 19-Jun-2009 Brooks Davis <brooks@FreeBSD.org>

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 siz

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

show more ...


Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0
# 61328d7a 04-Aug-2008 Xin LI <delphij@FreeBSD.org>

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.


# 049aa2e8 03-Aug-2008 Olivier Houchard <cognet@FreeBSD.org>

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 aroun

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

show more ...


Revision tags: release/7.0.0_cvs, release/7.0.0
# df272553 18-Feb-2008 Mike Pritchard <mpp@FreeBSD.org>

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 wa

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.

show more ...


Revision tags: release/6.3.0_cvs, release/6.3.0
# 2ffe6bbf 07-May-2007 David Malone <dwmalone@FreeBSD.org>

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


# f3aad16b 23-Apr-2007 Yaroslav Tykhiy <ytykhiy@gmail.com>

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

MFC after: 1 week


# 2e1f5ad9 11-Feb-2007 Mike Pritchard <mpp@FreeBSD.org>

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


# f5374712 04-Feb-2007 Mike Pritchard <mpp@FreeBSD.org>

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

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.

show more ...


# fbb42904 04-Feb-2007 Mike Pritchard <mpp@FreeBSD.org>

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

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

show more ...


# dfaa8068 01-Feb-2007 Mike Pritchard <mpp@FreeBSD.org>

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


Revision tags: release/6.2.0_cvs, release/6.2.0
# 478bf774 22-Oct-2006 Ruslan Ermilov <ru@FreeBSD.org>

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

PR: docs/53732


Revision tags: release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0
# 009cb168 13-Mar-2005 Ceri Davies <ceri@FreeBSD.org>

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

Approved by: murray (mentor)


Revision tags: release/4.11.0_cvs, release/4.11.0, release/5.3.0_cvs, release/5.3.0
# 4e14c144 07-Aug-2004 Stefan Farfeleder <stefanf@FreeBSD.org>

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


Revision tags: release/4.10.0_cvs, release/4.10.0, release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0, release/4.9.0_cvs, release/4.9.0
# 09a6b6c3 05-Aug-2003 David Schultz <das@FreeBSD.org>

Remove redundant declarations.


# 923e62f9 05-Aug-2003 David Schultz <das@FreeBSD.org>

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

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


# aee1b42a 15-Jun-2003 Robert Watson <rwatson@FreeBSD.org>

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

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).

show more ...


# 41b0d1a0 15-Jun-2003 Robert Watson <rwatson@FreeBSD.org>

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

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.

show more ...


Revision tags: release/5.1.0_cvs, release/5.1.0, release/4.8.0_cvs, release/4.8.0, release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2
# e56990e4 09-Aug-2002 Ian Dowse <iedowse@FreeBSD.org>

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>


12345