summaryrefslogtreecommitdiffstats
path: root/usr.sbin/edquota/edquota.c
Commit message (Collapse)AuthorAgeFilesLines
* Use strlcpy() instead of strncpy() to ensure that qup->fsname is NULtruckman2016-05-131-1/+1
| | | | | | | | | terminated. Don't bother checking for truncation since the subsequent quota_read() should detect that and fail. Reported by: Coverity CID: 1009980 MFC after: 1 week
* edquota: Don't pass fd for temporary file to editor.jilles2013-10-271-1/+1
| | | | The editor opens the temporary file by name.
* Remove unneeded includes.eadler2012-11-201-2/+0
| | | | | | | Tested with "make universe"; there are no conditional features. Approved by: cperciva MFC after: 3 daus
* Check the return error of set[e][ug]id. While this can never fail in theeadler2012-10-221-2/+4
| | | | | | | | | | 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
* Spelling fixes for usr.sbin/uqs2011-12-301-1/+1
|
* type / format fixupdes2009-09-271-32/+38
|
* Update the quotafile library to manage both active quotas via themckusick2009-02-141-89/+42
| | | | | | | | quotactl(2) interface and inactive quotas by accessing the quota files directly. Update the edquota program to use this new interface as proof of concept.
* Move hasquota() function to libutil.mckusick2009-02-131-74/+27
|
* More updates to edquota based on feedback from Dag-Erling Smorgrav.mckusick2009-02-101-43/+126
|
* Updates to edquota based on feedback from Dag-Erling Smorgrav.mckusick2009-02-051-35/+56
|
* Finish conversion of edquota to work with 64-bit quotas.mckusick2009-02-041-58/+156
| | | | | | | Add -h option to request "humanized" values such as 1M, 1G, 1T, etc. Discussed with: Dag-Erling Smorgrav Sponsored by: Rsync.net
* WIPdes2009-01-301-72/+27
|
* Drag this code kicking and screaming into the twenty-first century.des2008-07-021-59/+30
|
* If two files systems, /a and /b are marked as having quotas enabledmpp2007-02-041-8/+23
| | | | | | | | | | | | | 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
* If quotas are not currently enabled for a file system, edquota -pmpp2007-02-041-8/+63
| | | | | | | | | | | | 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
* initialize unitialized variables (WARNS=6)charnier2006-09-141-2/+6
|
* Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived softwareimp2004-08-071-4/+0
| | | | (with permission of addtional copyright holders where appropriate)
* Have edquota honour MAXLOGNAME rather than hardcoding the maximumceri2004-02-241-1/+1
| | | | | | | | | username length to 29 characters. PR: misc/62944 Submitted by: David Hill <david@wmol.com> Approved by: ru MFC after: 1 week
* Userland signed char fixes for PPC build. Problems were using a chargrehan2004-01-221-2/+2
| | | | | | | | | 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
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+4
|
* Allow edquota(8) to be used for setting up quotas non-interactively (add asobomax2002-09-071-23/+104
| | | | | | | new -e option for that). Feature requested by: Alex V. Belinsky <fozzy@kievweb.net.ua> MFC after: 1 month
* Use "kbytes" instead of "blocks" in messages as this is reallyschweikh2002-08-241-2/+2
| | | | | | | | what is calculated. PR: 41936 Submitted by: Lukas Ertl <le@univie.ac.at> MFC after: 1 week
* Improve the code for detecting UID ranges so that usernames suchiedowse2002-08-091-3/+3
| | | | | | | as "2-xhibit" are not considered as a range. Fix a problem where the code would forget to increment argv. PR: misc/15658
* WARNS=4alfred2002-07-111-3/+1
|
* de-__P()alfred2002-07-111-14/+14
|
* WARNS=2 cleanup.mikeh2001-12-101-33/+33
| | | | | Submitted by: Maxime Henrion <mux@qualys.com> MFC after: 2 weeks
* Add a new option to edquota(8) - "-f", which willyar2001-09-281-10/+18
| | | | | | | | | 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>
* Fix the type of the NULL arg to execl()brian2001-07-091-1/+1
| | | | Idea from: Theo de Raadt <deraadt@openbsd.org>
* cleanups of my previous, quick & dirty fix of unaligned access errors on alpha.gallatin2000-10-281-20/+26
| | | | submitted by: bde
* fix unaligned access errors caused by bad scanf/printf format stringsgallatin2000-10-261-4/+4
| | | | | PR: alpha/21247 tested by: Marcin Gryszkalis <dagoon@rs.math.uni.lodz.pl>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fixed overflow in 1K-blocks to disk-blocks conversions. Use quadbde1999-01-011-4/+6
| | | | | | | | 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
* Use err(3). Add prototypes.charnier1997-09-171-73/+84
|
* Remove temporary file on exit.jlemon1997-08-191-0/+2
| | | | | PR: 4010 Submitted by: "Anatoly A. Orehovsky" <tolik@www.tomsk.su>
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-311-1/+1
| | | | posix standard on the topic.
* Allow the use of uid ranges when using the "-p" option to allowmpp1996-03-311-1/+22
| | | | | | | | | | | | 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.
* Cast some expressions involving dbtob() to (unsigned long) and print thembde1995-05-071-12/+12
| | | | | | | | | | | | | 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).
* Make edquota works with other then vi editors,ache1994-11-221-10/+8
| | | | i.e.check file by name, not by fd
* BSD 4.4 Lite usr.sbin Sourcesrgrimes1994-05-261-0/+722
OpenPOWER on IntegriCloud