History log of /freebsd-current/lib/libutil/quotafile.c
Revision Date Author Comments
# e738085b 17-Aug-2023 Dag-Erling Smørgrav <des@FreeBSD.org>

Remove my middle name.


# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# 18bb746b 07-Feb-2019 Sean Eric Fagan <sef@FreeBSD.org>

r343881 had an uninitialized error. This fixes that.

PR: 233849
Reported by: Andre Albsmeier
MFC after: 1 month
Sponsored by: iXsystems Inc
Differential Revision: https://reviews.freebsd.org/D18785


# 148d31b8 07-Feb-2019 Sean Eric Fagan <sef@FreeBSD.org>

r339008 broke repquota for UFS. This rectifies that.

Refactor the function calls and tests so that, on UFS, the proper fields
are filled out.

PR: 233849
Reported by: Andre Albsmeier
Reviewed by: mav, delphij
MFC after: 1 month
Sponsored by: iXsystems Inc
Differential Revision: https://reviews.freebsd.org/D18785


# 1e4da04f 30-Dec-2018 Xin LI <delphij@FreeBSD.org>

Ensure buffer is nul-terminated.

MFC after: 2 weeks


# aad5531e 05-Jul-2018 Sean Eric Fagan <sef@FreeBSD.org>

This exposes ZFS user and group quotas via the normal
quatactl(2) mechanism. (Read-only at this point, however.)
In particular, this is to allow rpc.rquotad query quotas
for NFS mounts, allowing users to see their quotas on the
hosts using the datasets.

The changes specifically:

* Add new RPC entry points for querying quotas.
* Changes the library routines to allow non-UFS quotas.
* Changes rquotad to check for quotas on mounted filesystems,
rather than being limited to entries in /etc/fstab
* Lastly, adds a VFS entry-point for ZFS to query quotas.

Note that this makes one unavoidable behavioural change: if quotas
are enabled, then they can be queried, as opposed to the current
method of checking for quotas being specified in fstab. (With
ZFS, if there are user or group quotas, they're used, always.)

Reviewed by: delphij, mav
Approved by: mav
Sponsored by: iXsystems Inc
Differential Revision: https://reviews.freebsd.org/D15886


# 5e53a4f9 25-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

lib: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# 4238b561 12-May-2016 Don Lewis <truckman@FreeBSD.org>

Use strlcpy() instead of strncpy() to ensure that qf->fsname is NUL
terminated. Don't bother checking for truncation since the subsequent
stat() call should detect that and fail.

Reported by: Coverity
CID: 1018189
MFC after: 1 week


# d1d4d952 28-Aug-2013 Jilles Tjoelker <jilles@FreeBSD.org>

libutil: Use O_CLOEXEC for internal file descriptors from open().


# b3608ae1 03-Jan-2012 Ed Schouten <ed@FreeBSD.org>

Replace index() and rindex() calls with strchr() and strrchr().

The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.

This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 516ad57b 16-Mar-2010 Kirk McKusick <mckusick@FreeBSD.org>

Debugging nits found while testing the new 64-bit quota code.


# aee785ba 28-Dec-2009 Kirk McKusick <mckusick@FreeBSD.org>

Add and document the quota_convert function which converts between the
old 32-bit and the new 64-bit formats.


# c3616249 26-Dec-2009 Kirk McKusick <mckusick@FreeBSD.org>

Minor bugs turned up during conversion of quotacheck.


# e525d16a 16-Nov-2009 Kirk McKusick <mckusick@FreeBSD.org>

Add and document new quoat_on and quota_off functions.


# 6197731d 19-Oct-2009 Kirk McKusick <mckusick@FreeBSD.org>

Add quota_maxid which returns the maximum user (or group) identifier
in an associated quotafile. Needed by repquota.

Bug fix in quota_read.


# 5666aadb 26-Sep-2009 Dag-Erling Smørgrav <des@FreeBSD.org>

Further extend the quotafile API.


# fdd356a8 25-Sep-2009 Dag-Erling Smørgrav <des@FreeBSD.org>

Style


# 8bd6a3ab 14-Feb-2009 Kirk McKusick <mckusick@FreeBSD.org>

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.


# a88984f2 13-Feb-2009 Kirk McKusick <mckusick@FreeBSD.org>

Make hasquota thread safe.


# 916e406e 12-Feb-2009 Kirk McKusick <mckusick@FreeBSD.org>

Move hasquota() function to libutil.


# 581fce8e 10-Feb-2009 Kirk McKusick <mckusick@FreeBSD.org>

Bug fixes found from using these functions in edquota.


# 1b3515f3 30-Jan-2009 Dag-Erling Smørgrav <des@FreeBSD.org>

WIP