summaryrefslogtreecommitdiffstats
path: root/usr.bin/quota
Commit message (Collapse)AuthorAgeFilesLines
* Add missing static keywords to quota(1)ed2011-11-061-8/+7
|
* Fix quota(1) output.pluknet2011-06-301-5/+11
| | | | | | | | | | | - 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
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-112-8/+0
| | | | | | | | | 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
* Debugging nits found while testing the new 64-bit quota code.mckusick2010-03-161-0/+1
|
* Fix warnings + minor style issuesdes2010-03-041-33/+30
|
* Update to work with quotafile functions in -libutil.mckusick2009-10-211-149/+82
|
* In preparation for raising NGROUPS and NGROUPS_MAX, change basebrooks2009-06-191-2/+8
| | | | | | | | | | | | | | | | | | | | | | 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
* Make quota(1) to compile with WARNS=6:delphij2008-08-041-5/+2
| | | | | | - ANSI'fy showrawquotas(). - Shut up GCC by initializing bgrace and igrace. The situation that caused the GCC warning can never happen though.
* ctime() expects a time_t, but qup->dqblk.dqb_btime is an int32_t, so forcognet2008-08-031-6/+9
| | | | | | | | | 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
* Make the human readable numbers printed with the -h option a bitmpp2008-02-181-4/+6
| | | | | | | | 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.
* Use [u]intmax_t to printf unknown integer types.dwmalone2007-05-071-36/+31
| | | | | Make timeprt always allocate memory, to make things a little simpler. Remove an unused variable.
* Insert explicit space between the output fields to prevent themyar2007-04-231-3/+3
| | | | | | from running together when a field overflows. MFC after: 1 week
* Fix some spelling / markup / grammar.mpp2007-02-111-5/+5
| | | | Pointed out by: ru
* Add two new options to quota:mpp2007-02-112-24/+94
| | | | | | | | | -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
* If a user is over both the soft block limit and soft i-nodempp2007-02-041-13/+29
| | | | | | | | | | | | 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.
* If two files systems, /a and /b are marked as having quotas enabledmpp2007-02-041-7/+21
| | | | | | | | | | | | | 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
* Make quota exit with a non-zero status if one more more filempp2007-02-011-30/+37
| | | | | | systems are over quota, as documented in the man page. PR: bin/77918
* - Document the default disk block usage unit.ru2006-10-213-21/+48
| | | | | | - Add option -h, human-readable output. PR: docs/53732
* Remove an unused #define. md5's with and without this commit match.ceri2005-03-131-1/+0
| | | | Approved by: murray (mentor)
* Sort sections.ru2005-01-181-5/+5
|
* Assign the result of getopt() to an int rather than to a char.stefanf2004-08-071-2/+1
|
* Remove redundant declarations.das2003-08-051-2/+0
|
* Don't overflow the block quota calculations for NFS mounts.das2003-08-051-3/+3
| | | | | PR: 47607 Submitted by: Eric van Gyzen <vangyzen@stat.duke.edu>
* Now that the kernel access control for quotactl(2) appears to workrwatson2003-06-151-32/+0
| | | | | | | | | | | | | | | | | | | | | | | 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).
* Now that the kernel access control for quotactl(2) appears to workrwatson2003-06-152-18/+0
| | | | | | | | | | | | | | | 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.
* Uniformly refer to a file system as "file system".ru2002-12-121-11/+11
| | | | Approved by: re
* Add a new flag (-l) that suppresses quota checks on NFS filesystems.iedowse2002-08-092-7/+26
| | | | | PR: bin/12939 Submitted by: Neil Blakey-Milner <nbm@rucus.ru.ac.za>
* Fix a few compiler warnings, sort options and make the usage()iedowse2002-08-092-27/+29
| | | | output match the synopsis.
* Call getmntinfo with MNT_NOWAIT to avoid hanging if any NFS serversiedowse2002-06-031-1/+8
| | | | | | | | 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>
* Fix some low-hanging fruit in the warnings department; ANSIfy functions,markm2002-04-281-88/+59
| | | | sort out some const issues.
* Use `The .Nm utility'charnier2002-04-201-6/+7
|
* remove __Pimp2002-03-221-2/+2
|
* Set BINOWN=root explicitly for setuid root binaries.ru2001-09-131-0/+2
| | | | | | 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.
* Remove whitespace at EOL.dd2001-07-151-1/+1
|
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* Changed 'blocks' to 'usage' because we may not be getting quotas frompirzyk2001-05-231-1/+1
| | | | | | | | | | 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
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-3/+3
|
* Remove incorrect use of .Nm. Wrap long lines, Unwrap short linescharnier2000-03-262-13/+12
| | | | Options: -> The following options are available:
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* Remove useless `BINOWN=root' now that it is the default.obrien1998-09-191-1/+0
|
* Local filesystems are ufs not ffsache1998-06-111-2/+2
| | | | Submitted by: "D. Rock" <rock@cs.uni-sb.de>
* Don't assume that hp->h_lenght == 4. Be conservative in its use.imp1998-06-091-2/+2
| | | | Submitted by: J. Assange a long time ago.
* Converted to Lite2 mount interface - decide filesystem types by namebde1998-01-201-3/+3
| | | | instead of by number.
* Use err(3). Cosmetic in usage string. Typo in man page.charnier1997-08-042-45/+35
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-291-1/+1
| | | | posix standard on the topic.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* delete doubled words, e.g.: "the the" -> "the"wosch1996-10-051-2/+2
|
* Code clean up. Prototypes, casting, and parentheses around assignmentsalex1996-06-151-18/+48
| | | | used as truth value.
* fixed some printf format mismatches and some lines exceeding 80 col'sgraichen1996-01-091-16/+20
| | | | (thanks to bruce)
OpenPOWER on IntegriCloud