History log of /freebsd-10.0-release/usr.sbin/edquota/edquota.c
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


# 243321 20-Nov-2012 eadler

Remove unneeded includes.

Tested with "make universe"; there are no conditional features.

Approved by: cperciva
MFC after: 3 daus


# 241848 22-Oct-2012 eadler

Check the return error of set[e][ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.
Custom security modules, or future implementations of the setuid and
setgid may fail.

Submitted by: Erik Cederstrand
Approved by: cperciva
MFC after: 3 days


# 228990 30-Dec-2011 uqs

Spelling fixes for usr.sbin/


# 207736 06-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.


# 180187 02-Jul-2008 des

Drag this code kicking and screaming into the twenty-first century.


# 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


# 166480 03-Feb-2007 mpp

If quotas are not currently enabled for a file system, edquota -p
will operate directly on the quota file. It will incorrectly write
the prototype user's usage information for each new quota it sets.

Fixed to read in the current quota information and update the
file correctly.

If quotas are enabled the kernel handles this case fine.

PR: bin/15410


# 162295 14-Sep-2006 charnier

initialize unitialized variables (WARNS=6)


# 133249 07-Aug-2004 imp

Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived software
(with permission of addtional copyright holders where appropriate)


# 126201 24-Feb-2004 ceri

Have edquota honour MAXLOGNAME rather than hardcoding the maximum
username length to 29 characters.

PR: misc/62944
Submitted by: David Hill <david@wmol.com>
Approved by: ru
MFC after: 1 week


# 124830 22-Jan-2004 grehan

Userland signed char fixes for PPC build. Problems were using a char
return for getopt() and comparing to -1, ditto with fgetc() and EOF,
and using the kg_nice value from <sys/user.h>

Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
Reviewed by: obrien, bde (a while back)
Tested lightly on: ppc, i386, make universe


# 114601 03-May-2003 obrien

Use __FBSDID over rcsid[]. Protect copyright[] where needed.


# 103071 07-Sep-2002 sobomax

Allow edquota(8) to be used for setting up quotas non-interactively (add a
new -e option for that).

Feature requested by: Alex V. Belinsky <fozzy@kievweb.net.ua>
MFC after: 1 month


# 102362 24-Aug-2002 schweikh

Use "kbytes" instead of "blocks" in messages as this is really
what is calculated.

PR: 41936
Submitted by: Lukas Ertl <le@univie.ac.at>
MFC after: 1 week


# 101546 08-Aug-2002 iedowse

Improve the code for detecting UID ranges so that usernames such
as "2-xhibit" are not considered as a range. Fix a problem where
the code would forget to increment argv.

PR: misc/15658


# 99820 11-Jul-2002 alfred

WARNS=4


# 99800 11-Jul-2002 alfred

de-__P()


# 87596 10-Dec-2001 mikeh

WARNS=2 cleanup.

Submitted by: Maxime Henrion <mux@qualys.com>
MFC after: 2 weeks


# 84081 28-Sep-2001 yar

Add a new option to edquota(8) - "-f", which will
allow to limit the prototype quota distribution (-p)
to a single filesystem. Useful when initializing
quotas on a newly added disk.

PR: bin/30816
Submitted by: Dmitry Morozovsky <marck@rinet.ru>


# 79452 09-Jul-2001 brian

Fix the type of the NULL arg to execl()

Idea from: Theo de Raadt <deraadt@openbsd.org>


# 67794 28-Oct-2000 gallatin

cleanups of my previous, quick & dirty fix of unaligned access errors on alpha.
submitted by: bde


# 67643 26-Oct-2000 gallatin

fix unaligned access errors caused by bad scanf/printf format strings
PR: alpha/21247
tested by: Marcin Gryszkalis <dagoon@rs.math.uni.lodz.pl>


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 42231 01-Jan-1999 bde

Fixed overflow in 1K-blocks to disk-blocks conversions. Use quad
arithmetic instead of the special macros in PR 8163 or the magic
2's in PR 381. (Rev.1.3 unfortunately fixed only half of the
problems reported in PR 381.)

PR: 381, 8163


# 29529 17-Sep-1997 charnier

Use err(3). Add prototypes.


# 28431 19-Aug-1997 jlemon

Remove temporary file on exit.

PR: 4010
Submitted by: "Anatoly A. Orehovsky" <tolik@www.tomsk.su>


# 24428 31-Mar-1997 imp

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


# 14961 31-Mar-1996 mpp

Allow the use of uid ranges when using the "-p" option to allow
easy setup of default quotas for a range of uids. Usage:

edquota -p protouser startuid-enduid

E.g.
edquota -p mpp 10000-19999

Will duplicate the quota limints for user mpp for uids 10000 - 19999.
The uids in question do not have to currently exist in /etc/passwd.


# 8325 07-May-1995 bde

Cast some expressions involving dbtob() to (unsigned long) and print them
using %lu. This became more broken when I fixed dbtob() to support byte
offsets >= 4GB. The type had to change to [u]quad_t. Previously the
expressions had type unsigned long and were printed using %d. After
division by 1024, the expressions are guaranteed to fit in an unsigned
long, at least for the standard DEV_BSIZE, so edquota doesn't need to
know about quad_t's explicitly.

Fix all the other format mismatches exposed by compiling with -Wformat
(6 more quota limits of type unsigned long printed using %d and 6 time_t's
(i.e., longs) printed using %d).


# 4782 22-Nov-1994 ache

Make edquota works with other then vi editors,
i.e.check file by name, not by fd


# 1554 26-May-1994 rgrimes

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


# 1553 26-May-1994 rgrimes

BSD 4.4 Lite usr.sbin Sources