Commit Graph

98 Commits

Author SHA1 Message Date
manu
c438332a22 mtree: Add more runtime package tag
When using pkgbase those empty directories aren't packaged otherwise.

Reviewed by:	bapt
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D20056
2019-04-25 16:45:24 +00:00
markj
f571872c4d dhclient: Don't chroot if we are in capability mode.
The main dhclient process is Capsicumized but also chroots to
restrict filesystem access.  With r322369, pidfile(3) maintains a
directory descriptor for the pidfile, which can cause the chroot
to fail in certain cases.  To minimize the problem, only chroot
if we fail to enter capability mode, and store dhclient pidfiles
in a subdirectory of /var/run, thus restricting access via
pidfile(3)'s directory descriptor.

PR:		223327
Reviewed by:	cem, oshogbo
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D16584
2018-08-06 16:22:01 +00:00
ian
86596b2682 Make it possible to run ntpd as a non-root user, add ntpd uid and gid.
Code analysis and runtime analysis using truss(8) indicate that the only
privileged operations performed by ntpd are adjusting system time, and
(re-)binding to privileged UDP port 123. These changes add a new mac(4)
policy module, mac_ntpd(4), which grants just those privileges to any
process running with uid 123.

This also adds a new user and group, ntpd:ntpd, (uid:gid 123:123), and makes
them the owner of the /var/db/ntp directory, so that it can be used as a
location where the non-privileged daemon can write files such as the
driftfile, and any optional logfile or stats files.

Because there are so many ways to configure ntpd, the question of how to
configure it to run without root privs can be a bit complex, so that will be
addressed in a separate commit. These changes are just what's required to
grant the limited subset of privs to ntpd, and the small change to ntpd to
prevent it from exiting with an error if running as non-root.

Differential Revision:	https://reviews.freebsd.org/D16281
2018-07-19 23:55:29 +00:00
asomers
ea5ae4e080 tabs -> spaces in etc/mtree
MFC after:	4 weeks
2017-01-05 02:47:56 +00:00
asomers
442baa5184 zfsd(8), the ZFS fault management daemon
Add zfsd, which deals with hard drive faults in ZFS pools. It manages
hotspares and replements in drive slots that publish physical paths.

cddl/usr.sbin/zfsd
	Add zfsd(8) and its unit tests

cddl/usr.sbin/Makefile
	Add zfsd to the build

lib/libdevdctl
	A C++ library that helps devd clients process events

lib/Makefile
share/mk/bsd.libnames.mk
share/mk/src.libnames.mk
	Add libdevdctl to the build. It's a private library, unusable by
	out-of-tree software.

etc/defaults/rc.conf
	By default, set zfsd_enable to NO

etc/mtree/BSD.include.dist
	Add a directory for libdevdctl's include files

etc/mtree/BSD.tests.dist
	Add a directory for zfsd's unit tests

etc/mtree/BSD.var.dist
	Add /var/db/zfsd/cases, where zfsd stores case files while it's shut
	down.

etc/rc.d/Makefile
etc/rc.d/zfsd
	Add zfsd's rc script

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
	Fix the resource.fs.zfs.statechange message. It had a number of
	problems:

	It was only being emitted on a transition to the HEALTHY state.
	That made it impossible for zfsd to take actions based on drives
	getting sicker.

	It compared the new state to vdev_prevstate, which is the state that
	the vdev had the last time it was opened.  That doesn't make sense,
	because a vdev can change state multiple times without being
	reopened.

	vdev_set_state contains logic that will change the device's new
	state based on various conditions.  However, the statechange event
	was being posted _before_ that logic took effect.  Now it's being
	posted after.

Submitted by:	gibbs, asomers, mav, allanjude
Reviewed by:	mav, delphij
Relnotes:	yes
Sponsored by:	Spectra Logic Corp, iX Systems
Differential Revision:	https://reviews.freebsd.org/D6564
2016-05-28 17:43:40 +00:00
gjb
ccde53b74b MFH r289384-r293170
Sponsored by:	The FreeBSD Foundation
2016-01-04 19:19:48 +00:00
cy
f8f954a38e Add default leap-seconds file. This should help ntp networks get the
leap second date correct

Updates to the file can be obtained from ftp://time.nist.gov/pub/ or
ftp://tycho.usno.navy.mil/pub/ntp/.

Suggested by:	dwmalone
Reviewed by:	roberto, dwmalone, delphij
Approved by:	roberto
MFC after:	1 week
2015-10-16 14:04:16 +00:00
bapt
54bc7e8be5 Add the at(1) directories into the at package 2015-03-05 17:01:30 +00:00
bapt
9b69bba32a Make unbound an individual package
Ensure we keep all tags from mtrees when creating the METALOG
2015-03-05 12:40:59 +00:00
delphij
edc7ea3a5d Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

This is a stable/10 candidate for inclusion with 10.1-RELEASE.

Submitted by:	Wei Hu <weh microsoft com>
MFC after:	1 week
2014-09-13 02:15:31 +00:00
des
bb147ad2e0 Create /var/unbound/conf.d for additional configuration files.
Ensure that it is used if present.

MFH:	3 weeks
2014-05-29 22:34:04 +00:00
bapt
7ce3b5e295 Fix typo 2014-02-21 10:34:59 +00:00
bapt
44c7fbcbb3 Import Dragonfly Mail Agent into base system
It is a small and lightweight Mail Transport Agent.
It accepts mails from locally installed Mail User Agents (MUA) and delivers the
mails either locally or to a remote destination. Remote delivery includes
several features like TLS/SSL support, SMTP authentication and NULLCLIENT.

Make dma conditional to new WITHOUT_DMA option and make it respect WITHOUT_MAIL

Reviewed by:	peter
Discussed with:	emaste, bz, peter
2014-02-21 07:26:49 +00:00
delphij
2ec7242654 Create /var/cache with mode 0755 instead of 0750.
This directory is used by many third party applications and having
permission 0750 makes it impossible to drop group privileges.

MFC after:	3 days
2013-11-26 20:03:25 +00:00
des
aa2e4b623c Remove BIND.
Approved by:	re (gjb)
2013-09-30 17:23:45 +00:00
des
15943e2b3d Fix indentation.
Approved by:	re (blanket)
2013-09-22 18:31:49 +00:00
des
ea05e625ec Build and install the Unbound caching DNS resolver daemon.
Approved by:	re (blanket)
2013-09-15 14:51:23 +00:00
des
795da63f42 authpf needs /var/authpf to exist and be writable by group authpf. 2013-09-05 12:35:23 +00:00
ume
1bd72ff3fb Fix location of /var/audit/dist and /var/audit/remote.
Note that those who did installworld after r243752 should
remove wrongly created /var/dist and /var/remote.

Reviewed by:	pjd
2012-12-28 10:42:01 +00:00
rwatson
991e942bf2 Merge a number of changes required to hook up OpenBSM 1.2-alpha2's
auditdistd (distributed audit daemon) to the build:

- Manual cross references
- Makefile for auditdistd
- rc.d script, rc.conf entrie
- New group and user for auditdistd; associated aliases, etc.

The audit trail distribution daemon provides reliable,
cryptographically protected (and sandboxed) delivery of audit tails
from live clients to audit server hosts in order to both allow
centralised analysis, and improve resilience in the event of client
compromises: clients are not permitted to change trail contents
after submission.

Submitted by:	pjd
Sponsored by:	The FreeBSD Foundation (auditdistd)
2012-12-01 15:11:46 +00:00
jeff
5115240a6c - Merge in OFED 1.5.3 from projects/ofed/head 2011-03-21 09:58:24 +00:00
bschmidt
35826cc401 Create the var/run/wpa_supplicant directory where the wpa_supplicant
RC script wants to save a pidfile for each interface.

MFC after:	2 weeks
2010-09-10 08:27:02 +00:00
cperciva
e4106d9e8f Disable SSL renegotiation in order to protect against a serious
protocol flaw. [09:15]

Correctly handle failures from unsetenv resulting from a corrupt
environment in rtld-elf. [09:16]

Fix permissions in freebsd-update in order to prevent leakage of
sensitive files. [09:17]

Approved by:	so (cperciva)
Security:	FreeBSD-SA-09:15.ssl
Security:	FreeBSD-SA-09:16.rtld
Security:	FreeBSD-SA-09:17.freebsd-udpate
2009-12-03 09:18:40 +00:00
cperciva
1caefdfb4b Add FreeBSD Update 2.0 client code. The build code is in the projects
repository.

Sponsored by:	FreeBSD security development fundraiser
2006-08-31 09:51:34 +00:00
rwatson
3926af01b2 Change group for /var/audit to audit, so that audit review can be
delegated to non-administrators.

Obtained from:	TrustedBSD Project
2006-02-05 18:22:56 +00:00
rwatson
7a4b60ef35 Add /var/audit, mode 750, which will hold audit trail files.
Obtained from:	TrustedBSD Project
2006-02-02 01:19:31 +00:00
cperciva
7d8af51fdc Add portsnap to the base system. This is a secure, easy to use,
fast, lightweight, and generally good way for users to keep their
ports trees up to date.

This is version 0.9.4 from the ports tree (sysutils/portsnap) with
the following changes:
1. The experimental pipelined http code is enabled.  No seatbelts
in -CURRENT. (^_^)
2. The working directory has moved from /usr/local/portsnap to
/var/db/portsnap (as discussed on -arch two days ago).
3. Portsnap now fetches a list of mirrors (distributed as DNS SRV
records) and selects one randomly.  This should help to avoid the
uneven loading which plagues the cvsup mirror network.
4. The license is now 2-clause BSD instead of 3-clause BSD.
5. Various incidental changes to make portsnap fit into the base
system's build mechanics.

X-MFC-After:    6.0-RELEASE
X-MFC-Before:   5.5-RELEASE
X-MFC-To:       RELENG_6, RELENG_5, ports
discussed on:   -arch and several other places
"yes please" from:      simon, remko, flz, Diane Bruce
thinks this is a great idea:    bsdimp
Hopes he didn't forget any files:       cperciva
2005-08-08 20:10:06 +00:00
ru
776eafa230 Remove a redundant "uname=root".
Forgotten by:	dougb
2004-10-15 08:57:24 +00:00
dougb
a0c7847c5b Create a named chroot directory structure in /var/named, and use it
by default when named is enabled. Also, improve our default directory
layout by creating /var/named/etc/namedb/{master|slave} directories,
and use the former for the generated localhost* files.

Rather than using pax to copy device entries, mount devfs in the
chroot directory.

There may be some corner cases where things need to be adjusted,
but overall this structure has been well tested on a production
network, and should serve the needs of the vast majority of users.

UPDATING has instructions on how to do the conversion for those
with existing configurations.
2004-09-28 09:46:00 +00:00
eivind
f6f5d6c39d Add /var/db/ports/ (support directory necessary for
ports that use the new OPTIONS infrastructure)
2004-01-20 13:51:23 +00:00
ru
10d5bf9b25 Scheduled sweep using the README guidelines.
Approved by:	re (rwatson)
2003-11-29 18:22:01 +00:00
markm
dc392314fa Restore /var/games; lots of ports' games use it. 2002-11-04 07:50:48 +00:00
markm
cc5521cdd1 Do not build the majority of the games. Remaining are the
"utility-like" games and everyone's favourite, fortune(6).
2002-10-20 11:18:56 +00:00
sheldonh
0148f2db27 Revert previous delta, setting the system immutable flag on /var/empty
instead of the user immutable flag, now that mergemaster handles
schg directories in its /var/tmp/temproot.
2002-06-26 17:05:48 +00:00
sheldonh
70a58092b5 Tone down the previous delta: don't set the system immutable flag on
/var/empty, because it makes it difficult for mergemaster(8) to remove
/var/tmp/temproot/var.
2002-06-26 08:58:28 +00:00
sheldonh
68469a22f1 The previous delta introduced /var/empty, for use by openssh-portable,
which needs an empty directory into which to chroot(2).

Hint to the operator that this directory really _should_ be empty
by creating it with mode 0555 and the system immutable flag (schg)
set.

Reviewed by:	des
2002-06-24 18:31:47 +00:00
des
6c4dd41fe3 Add /var/empty for the OpenSSH privsep code. 2002-06-23 20:44:19 +00:00
gshapiro
5e1dc7a023 In my continuing crusade to make life better for non-sendmail users, avoid
the creation of /var/spool/clientmqueue and therefore the need for the
smmsp user and group if NO_SENDMAIL is defined.  This required breaking out
the creation of the directory into a new BSD.sendmail.dist mtree file.

MFC after:	1 week
2002-04-20 19:00:11 +00:00
gshapiro
72b2a94378 Add /var/spool/clientmqueue for 8.12's non-set-user-ID root mail submission 2002-02-17 22:11:41 +00:00
ru
b7f75f85b5 Apply README style guidelines (this time checked). 2001-11-19 10:10:27 +00:00
guido
e6be341188 Change mode for var/db/ipf to 0700 2001-11-17 12:21:29 +00:00
cjc
4d613e6699 Fix a bug I introduced yesterday. People who built world since the
previous commit yesterday may wish to check /var/run for junk.
2001-11-02 22:00:17 +00:00
cjc
36445ca6bd Add a directory in /var/run to store ppp(8) command sockets.
PR:		bin/29966
Approved by:	brian
MFC after:	4
2001-11-01 23:44:12 +00:00
ache
731a008f1c Remove /var/spool/uucp subtree, not needed for 'cu' 2001-10-26 09:40:28 +00:00
ache
9e3e7670a8 The same unbreakage (0755 -> 0775) for /var/games and subdirs 2001-10-25 23:18:41 +00:00
ache
e502ef07e5 Fix /var/mail, /var/rwho and /var/spool/lock back to 0775
Not sure about other dirs with the same damage (0755) by recent commit.
2001-10-25 23:13:11 +00:00
ru
e0bbafeb17 Style these once again. 2001-10-25 12:16:51 +00:00
darrenr
2d265de5c7 Create /var/db/ipf
PR:		27070
2001-10-20 04:33:12 +00:00
kris
43e975663f Put back /var/spool/uucp so it can be used for serial port locking. 2001-10-01 08:54:16 +00:00
kris
2716e56536 UUCP removal phase II. These directories are now created by the
freebsd-uucp port.
2001-10-01 06:24:50 +00:00