1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Robert Watson 44533b1722 Re-implement kernel access control for quotactl() as found in the
UFS quota implementation.  Push some quite broken access control
logic out of ufs_quotactl() into the individual command
implementations in ufs_quota.c; fix that logic.  Pass in the thread
argument to any quotactl command that will need to perform access
control.

o quotaon() requires privilege (PRISON_ROOT).

o quotaoff() requires privilege (PRISON_ROOT).

o getquota() requires that:

    If the type is USRQUOTA, either the effective uid match the
    requested quota ID, that the unprivileged_get_quota flag be
    set, or that the thread be privileged (PRISON_ROOT).

    If the type is GRPQUOTA, require that either the thread be
    a member of the group represented by the requested quota ID,
    that the unprivileged_get_quota flag be set, or that the
    thread be privileged (PRISON_ROOT).

o setquota() requires privilege (PRISON_ROOT).

o setuse() requires privilege (PRISON_ROOT).

o qsync() requires no special privilege (consistent with what
  was present before, but probably not very useful).

Add a new sysctl, security.bsd.unprivileged_get_quota, which when
set to a non-zero value, will permit unprivileged users to query user
quotas with non-matching uids and gids.  Set this to 0 by default
to be mostly consistent with the previous behavior (the same for
USRQUOTA, but not for GRPQUOTA).

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-06-15 06:36:19 +00:00
bin Get this area compiling with the highest WARNS= that it works with. 2003-06-13 07:04:02 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r115984, 2003-06-07 20:18:23 +00:00
crypto Fix off-by-one and initialization errors which prevented sshd from 2003-05-28 19:39:33 +00:00
etc Update a comment about symlinking named's pid file to correctly 2003-06-14 22:26:30 +00:00
games Fixup three rather minor typos that have irked me over time. 2003-05-31 16:27:53 +00:00
gnu Remove MAINTAINER lines. 2003-06-14 19:32:52 +00:00
include Finish the repocopy of bitstring.h to sys so it can be used 2003-06-13 19:40:13 +00:00
kerberos5 Remove some KRB4 scraps, and allow NOSHARED make worlds to 2003-05-11 18:49:29 +00:00
lib P_THREADED was renamed to P_SA, follow up. 2003-06-15 03:42:04 +00:00
libexec fix a couple typos in the comments 2003-06-15 03:08:37 +00:00
release Merge the following from the English version: 2003-06-15 02:10:37 +00:00
sbin Tighten up the string->integer conversion in sysctl(8): 2003-06-15 06:26:08 +00:00
secure Fix for the NO_OPENSSL case. 2003-06-08 08:24:07 +00:00
share Catch up man page with reality in rc.d/named. 2003-06-14 22:43:40 +00:00
sys Re-implement kernel access control for quotactl() as found in the 2003-06-15 06:36:19 +00:00
tools Set the precedence on failure reports to "bulk" so I don't get tons of 2003-06-14 12:36:13 +00:00
usr.bin Remove MAINTAINER lines. 2003-06-14 19:32:52 +00:00
usr.sbin make rarpd use in_addr_t instead of u_long since this is neccessary 2003-06-15 03:00:22 +00:00
COPYRIGHT
MAINTAINERS Update and try to remain out of area where conflict exists. 2003-06-14 19:27:10 +00:00
Makefile Kill upgrade target docs. It too is stale. 2003-04-03 05:34:36 +00:00
Makefile.inc1 Minor tweaks to the build process so that we can build 5.1-current on 2003-06-14 17:50:13 +00:00
README
UPDATING Add a retrospective entry about how having installed a broken sed(1) 2003-06-13 20:05:46 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The
``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html