Commit Graph

75 Commits

Author SHA1 Message Date
Warner Losh
fbbd9655e5 Renumber copyright clause 4
Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by:	Jan Schaumann <jschauma@stevens.edu>
Pull Request:	https://github.com/freebsd/freebsd/pull/96
2017-02-28 23:42:47 +00:00
Don Lewis
3b7e0c53d5 Use strlcpy() instead of strncpy() to ensure that qup->fsname is NUL
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
2016-05-13 00:02:03 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Baptiste Daroussin
c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Jilles Tjoelker
1ebe85202b edquota: Don't pass fd for temporary file to editor.
The editor opens the temporary file by name.
2013-10-27 21:06:17 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
David E. O'Brien
d9a447559b Sync with HEAD. 2013-02-08 16:10:16 +00:00
Eitan Adler
0a05b87187 Remove unneeded includes.
Tested with "make universe"; there are no conditional features.

Approved by:	cperciva
MFC after:	3 daus
2012-11-20 02:12:01 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Eitan Adler
50e04779c4 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
2012-10-22 03:07:05 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Ulrich Spörlein
3df5ecac8c Spelling fixes for usr.sbin/ 2011-12-30 10:58:14 +00:00
Dag-Erling Smørgrav
6cfc1c1e18 type / format fixup 2009-09-27 17:33:26 +00:00
Kirk McKusick
8bd6a3ab4b Update the quotafile library to manage both active quotas via the
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.
2009-02-14 08:08:08 +00:00
Kirk McKusick
916e406eb5 Move hasquota() function to libutil. 2009-02-13 06:12:15 +00:00
Kirk McKusick
cdab8b664d More updates to edquota based on feedback from Dag-Erling Smorgrav. 2009-02-10 08:09:03 +00:00
Kirk McKusick
b83b5d3b79 Updates to edquota based on feedback from Dag-Erling Smorgrav. 2009-02-05 14:06:43 +00:00
Kirk McKusick
08dc3a5e5c Finish conversion of edquota to work with 64-bit quotas.
Add -h option to request "humanized" values such as 1M, 1G, 1T, etc.

Discussed with: Dag-Erling Smorgrav
Sponsored by: Rsync.net
2009-02-04 00:21:36 +00:00
Dag-Erling Smørgrav
1b3515f39b WIP 2009-01-30 13:54:03 +00:00
Dag-Erling Smørgrav
8f518424d9 Drag this code kicking and screaming into the twenty-first century. 2008-07-02 15:51:59 +00:00
Mike Pritchard
aecf742ea2 Document that quotas must be turned off on a file system and
then turned back on in order for grace time changes to take
effect.
2007-02-04 14:26:01 +00:00
Mike Pritchard
fbb42904c4 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
2007-02-04 06:33:15 +00:00
Mike Pritchard
dbbc0c8312 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
2007-02-04 01:41:32 +00:00
Philippe Charnier
606a36b9eb initialize unitialized variables (WARNS=6) 2006-09-14 04:45:44 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Warner Losh
486c8cc4c6 Per letter dated July 22, 1999 remove 3rd clause of Berkeley derived software
(with permission of addtional copyright holders where appropriate)
2004-08-07 04:28:56 +00:00
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Maxim Konovalov
b495040835 o Fix typo: s/bslim/bhlim/.
PR:		docs/67170
Submitted by:	Anatoly Zherdev
MFC after:	3 days
2004-05-25 10:43:46 +00:00
Ceri Davies
fc31408d87 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
2004-02-24 20:58:16 +00:00
Peter Grehan
5cfe0423e6 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
2004-01-22 07:23:36 +00:00
Ruslan Ermilov
743d5d518c mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
Yaroslav Tykhiy
da2f008200 Minor grammar, punctuation, and wording fixes
for the paragraph on the -e option.
2003-07-29 13:25:56 +00:00
David E. O'Brien
b728350ee6 Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
David E. O'Brien
052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Ruslan Ermilov
c041c1e0d9 mdoc(7) police: markup fixes.
Approved by:	re
2002-11-27 15:31:08 +00:00
Maxim Sobolev
b8b743d723 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
2002-09-07 12:26:07 +00:00
Jens Schweikhardt
a35d611fbc 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
2002-08-24 11:03:48 +00:00
Ian Dowse
c99f3c68a3 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
2002-08-09 01:21:03 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Alfred Perlstein
f251a0df8b WARNS=4 2002-07-11 21:18:55 +00:00
Alfred Perlstein
d89167b4ea de-__P() 2002-07-11 18:31:16 +00:00
Mike Heffner
28644e448a Reorder WARNS line for style.
Pointed out by:	bde
2001-12-10 21:13:36 +00:00