Commit Graph

5586 Commits

Author SHA1 Message Date
Hiroki Sato
da46bc0523 - Fix pidfile handling in sendmail_msp_queue. The pidfile was ignored
and multiple instances were invoked by start/stop cycles.

- Remove redundant start_cmd rewrite.

Approved by:	re (gjb)
Tested by:	jmg
2013-09-17 20:24:03 +00:00
Hiroki Sato
cdb5fa57f9 Fix parsing lines of ifconfig output which include \t in the case of
inet and inet6.

Approved by:	re (delphij)
2013-09-17 20:22:24 +00:00
Dag-Erling Smørgrav
8f8790cdf4 Build and install the Unbound caching DNS resolver daemon.
Approved by:	re (blanket)
2013-09-15 14:51:23 +00:00
Edward Tomasz Napierala
009ea47eb2 Bring in the new iSCSI target and initiator.
Reviewed by:	ken (parts)
Approved by:	re (delphij)
Sponsored by:	FreeBSD Foundation
2013-09-14 15:29:06 +00:00
Cy Schubert
854cb10a58 ipfilter 5.1.2 no longer supports sysctl. Use ipf -V to determine if
available (the kernel module is loaded or compiled into the kernel).

Approved by:	glebius (mentor)
Approved by:	re (blanket)
2013-09-10 13:48:33 +00:00
Dag-Erling Smørgrav
d7510453f3 The correct variable is apparently MACHINE_ARCH, not TARGET_ARCH.
Approved by:	re (blanket)
2013-09-09 17:38:02 +00:00
Dag-Erling Smørgrav
924eb7812b Remove unneeded mappings from libmap32.conf. Move it up one level and
install it on powerpc64 in addition to amd64.

Reviewed by:	kib
Approved by:	re (blanket)
2013-09-09 06:02:30 +00:00
Dag-Erling Smørgrav
773eec475a Add a stock libmap32.conf for amd64. The first two lines have no effect
except to document the hardcoded standard library search path for 32-bit
binaries.  The third line performs the equivalent substitution for the
private library directory.

Ironically, these entries rely on functionality which is only available
in the COMPAT_32BIT version of rtld-elf.

Approved by:	re (blanket)
2013-09-08 09:46:22 +00:00
Dag-Erling Smørgrav
2442cc585a Create a private library directory (LIBPRIVATEDIR) for libraries which
we don't want to expose but which can't or shouldn't be static.

To mark a library as private, define PRIVATELIB in its Makefile.  It
will be installed in LIBPRIVATEDIR, which is normally /usr/lib/private
(or /usr/lib32/private for 32-bit libraries on 64-bit platforms).

To indicate that a program or library depends on a private library,
define USEPRIVATELIB in its Makefile.  The correct version of
LIBPRIVATEDIR will be added to its run-time library search path.

Approved by:	re (blanket)
2013-09-08 09:40:23 +00:00
Dag-Erling Smørgrav
187a8d4b7a authpf needs /var/authpf to exist and be writable by group authpf. 2013-09-05 12:35:23 +00:00
David Chisnall
c354d333b2 Add a c++/v1/tr1 include directory containing symlinks to all of the standard
headrs.

Lots of third-party code expects to find C++03 headers under tr1 because that's
where GNU decided to hide them.  This should fix ports that expect them there.

MFC after:	1 week
2013-09-04 15:02:14 +00:00
Jeremie Le Hen
0185388553 Since r254974, periodic scripts' period can be configured
independently.  There is no reason to leave their options
with the daily ones, so move them to their own section.
Move periodic scripts' options into their own section.  Since r254974,
2013-09-03 07:47:53 +00:00
Xin LI
335c94e632 Create the default router last. This allows using an static
interface route for default routes, which seems to be common
among many dedicated hosting providers.

Reviewed by:	hrs
MFC after:	2 weeks
2013-09-02 23:52:25 +00:00
Ian Lepore
e02916a48a Regenerate after recent addition of FTDI and bluetooth device IDs. 2013-09-01 14:28:12 +00:00
Xin LI
4b0f6e5b60 Add directories that is installed as part of bsdconfig.
These are included unconditionally for now because bsdconfig
is currently installed unconditionally.

This fixes 'make -j 17 installworld' caused by a race
condition.

MFC candidate.
2013-08-29 17:45:13 +00:00
Xin LI
0cfb18af64 Add a few missing language directories for /usr. 2013-08-29 17:40:03 +00:00
Gavin Atkinson
9e9a57a307 After writing a kernel core dump into /var/crash, call sync(8).
If we panic again shortly after boot (say, within 30 seconds), any core
dump we wrote out may be lost on reboot.  In this situation, we really
want to keep that core file, as it may be the only way to have the issue
resolved.  Call sync(8) after writing out the core file and running
crashinfo(8), in the hope that these will not be lost if we panic
again.  sync(8) is only called in the case where there is a core dump
to be written out, so won't be called during normal boots.

Discovered by:	Trying to debug an IPSEC panic
MFC after:	1 week
2013-08-28 15:12:15 +00:00
Jung-uk Kim
b81c4e6563 Fix a typo introduced in r254975. 2013-08-27 22:37:29 +00:00
Jeremie Le Hen
622ceeb3fb Install 450.status-security. 2013-08-27 21:28:12 +00:00
Jeremie Le Hen
69b55c23cb Make the period of each periodic security script configurable.
There are now six additional variables
  weekly_status_security_enable
  weekly_status_security_inline
  weekly_status_security_output
  monthly_status_security_enable
  monthly_status_security_inline
  monthly_status_security_output
alongside their existing daily counterparts.  They all have the same
default values.

All other "daily_status_security_${scriptname}_${whatever}"
variables have been renamed to "security_status_${name}_${whatever}".
A compatibility shim has been introduced for the old variable names,
which we will be able to remove in 11.0-RELEASE.

"security_status_${name}_enable" is still a boolean but a new
"security_status_${name}_period" allows to define the period of
each script.  The value is one of "daily" (the default for backward
compatibility), "weekly", "monthly" and "NO".

Note that when the security periodic scripts are run directly from
crontab(5) (as opposed to being called by daily or weekly periodic
scripts), they will run unless the test is explicitely disabled with a
"NO", either for in the "_enable" or the "_period" variable.

When the security output is not inlined, the mail subject has been
changed from "$host $arg run output" to "$host $arg $period run output".
For instance:
  myfbsd security run output ->  myfbsd security daily run output
I don't think this is considered as a stable API, but feel free to
correct me if I'm wrong.

Finally, I will rearrange periodic.conf(5) and default/periodic.conf
to put the security options in their own section.  I left them in
place for this commit to make reviewing easier.

Reviewed by:	hackers@
2013-08-27 21:20:28 +00:00
Jeremie Le Hen
81e9f2d5d8 Move daily_status_security_noamd next to 200.chkmounts's variables. 2013-08-25 07:46:18 +00:00
Alan Somers
2adf57829e Correctly remove an interface's ipv4 address when the user calls
"/etc/rc.d/netif stop XXX".  The old globbing pattern failed to account for the
possibility of a tab occuring before "inet".

Reviewed by:	will
Approved by:	ken (mentor, implicit)
MFC after:	Never (bug affects head only)
Sponsored by:	Spectra Logic
2013-08-23 23:12:16 +00:00
Peter Wemm
030ee53fa1 Pass pidfile to bsnmpd if it's been changed (parts cut/pasted from
rc.d/rarpd and rc.d/wpa_supplicant)
2013-08-19 05:37:49 +00:00
Peter Wemm
8913b090d0 Revert r254508. 2013-08-19 05:12:38 +00:00
Peter Wemm
25180adf0d Add the optional ability to run as a different user.
Obtained from:	Antique freebsd.org cluster archive images
2013-08-19 04:56:03 +00:00
Erwin Lansing
295eeeb89d Add empty zones for Shared Address Space (RFC 6598)
Approved by:	delphij (mentor)
MFC after:	3 days
Sponsored by:	DK Hostmaster A/S
2013-08-09 07:57:04 +00:00
Rui Paulo
c02f0567ce Regen for if_rsu. 2013-08-04 19:36:46 +00:00
Hiroki Sato
7dce7544fc - Reimplement $gif_interfaces as a variant of $cloned_interfaces.
Newly-configured systems should use $cloned_interfaces.

- Call clone_{up,down}() and ifnet_rename() in rc.d/netif {start,stop}.
  ifnet_rename() now accepts an interface name list as its argument.

- Add rc.d/netif clear.  The "clear" subcommand is basically equivalent to
  "stop" but it does not call clone_down().

- Add "ifname:sticky" keyword into $cloned_interfaces.  If :sticky is
  specified, the interface will not be destroyed in rc.d/netif stop.

- Add cloned_interfaces_sticky={YES,NO}.  This variable globally sets
  :sticky keyword above for all interfaces.  The default value is NO.
  When cloned_interfaces_sticky=YES, :nosticky keyword can be used to
  override it on per interface basis.
2013-08-04 06:36:17 +00:00
Jeremie Le Hen
4b00159792 Include /usr/local/etc/libmap.d/ by default.
PR:		180568
Reviewed by:	bapt
Obtained from:	kib
MFC after:	3 days
2013-08-01 05:50:42 +00:00
Hans Petter Selasky
7dda4bda6b Regenerate usb.conf
MFC after:	1 week
2013-07-26 10:25:18 +00:00
Rui Paulo
041d3f3f09 Add pkgconf files for libusb.
Reviewed by:	hselasky
2013-07-25 03:54:08 +00:00
Hiroki Sato
0d6d097a5f Do not set ND6_IFF_ACCEPT_RTADV on if_bridge(4) interfaces when
ipv6_enable=yes.

MFC after:	3 days
2013-07-21 15:26:25 +00:00
Hiroki Sato
fd1fba7ce3 Fix address range specification with ifconfig(8) options such as:
- inet 192.0.2.1-10 netmask 255.255.255.0 (inet range spec + ifconfig options)
- inet6 2001:db8:1::1-f prefixlen 60 (inet6 range spec + ifconfig options)

If prefixlen or netmask option is specified with CIDR notation at
the same time, the option is used.

Tested by:	Michael Grimm
MFC after:	3 days
2013-07-20 16:58:17 +00:00
Hiroki Sato
1c26ccaba0 - Fix a bug in ipv6_prefix_IF. It did not work with the 64-bit prefix
notation like 2001:db8:1:1.

- Use eui64 flag in ifconfig(8) instead of network6_getladdr()[*] for
  interface indentifier part.

Suggested by:	ume [*]
MFC after:	3 days
2013-07-18 02:58:24 +00:00
Dag-Erling Smørgrav
b88ca6332b When stopping pfsync, remove the pfsync interface's syncpeer setting.
MFC after:	3 days
2013-07-15 08:48:45 +00:00
Andriy Gapon
9a91031836 rc.d/zfs: pass -v option to zfs mount
this should make boot process more informative (and entertaining)
on systems with lots of zfs filesystems.

MFC after:	7 days
2013-07-09 08:59:39 +00:00
Rui Paulo
676ef34c81 wpa_supplicant should be able to reassociate when resuming, so remove a
comment saying it can't.
2013-07-04 07:32:40 +00:00
Alan Somers
6d1014a32b Add syslog(3) support to devd(8).
sbin/devd/devd.cc
        All output will now go to syslog(3) if devd is daemonized, or stderr
        if it's running in the foreground.

sbin/devd/devd.8
        Remove the "-D" flag.  Filtering messages by priority now
	happens in the usual syslog way.  For performance reasons, a few
	extra-verbose debugging statements are now conditional on the "-d" (do
	not daemonize) flag.

etc/syslog.conf
etc/newsyslog.conf
        Direct messages from devd(8) to /var/log/devd.log, but leave it
        disabled by default

Reviewed by:	eadler
Approved by:	gibbs (co-mentor)
MFC after:	never (removed a command-line option from devd)
2013-07-01 21:20:17 +00:00
Hiroki Sato
b8c357fdca Add "ether" and "link" to ifconfig_alias{es,N}. 2013-06-30 19:52:45 +00:00
Xin LI
0094baf78c Don't attempt to do DHCP on certain interfaces, similar to what's done for
ipv6_autoconfif() in r212577.

MFC after:	1 week
2013-06-28 22:25:37 +00:00
Davide Italiano
237abf0c56 - Trim an unused and bogus Makefile for mount_smbfs.
- Reconnect with some minor modifications, in particular now selsocket()
internals are adapted to use sbintime units after recent'ish calloutng
switch.
2013-06-28 21:00:08 +00:00
Hiroki Sato
268a55bc98 - Add vnode-backed swap space specification support. This is enabled when
device names "md" or "md[0-9]*" and a "file" option are specified in
  /etc/fstab like this:

  md    none    swap    sw,file=/swap.bin       0       0

- Add GBDE/GELI encrypted swap space specification support, which
  rc.d/encswap supported.  The /etc/fstab lines are like the following:

  /dev/ada1p1.bde       none    swap    sw      0       0
  /dev/ada1p2.eli       none    swap    sw      0       0

  .eli devices accepts aalgo, ealgo, keylen, and sectorsize as options.

  swapctl(8) can understand an encrypted device in the command line
  like this:

  # swapctl -a /dev/ada2p1.bde

- "-L" flag is added to support "late" option to defer swapon until
  rc.d/mountlate runs.

- rc.d script change:

    rc.d/encswap -> removed
    rc.d/addswap -> just display a warning message if $swapfile is defined
    rc.d/swap1 -> renamed to rc.d/swap
    rc.d/swaplate -> newly added to support "late" option

These changes alleviate a race condition between device creation/removal
and swapon/swapoff.

MFC after:	1 week
Reviewed by:	wblock (manual page)
2013-06-27 18:28:45 +00:00
Rui Paulo
6f79f29583 Implement ifconfig_wlanX="HOSTAP".
Not only this is a bit cleaner, it allows multiple instances of hostapd to be
running on the system host, useful for simultaneous dual-band WiFi.
This is similar to ifconfig_wlanX="WPA" but it uses /etc/hostapd-wlanX.conf.
Compatibility with hostapd_enable=YES/NO was kept.

Reviewed by:	adrian
2013-06-26 04:00:52 +00:00
John Baldwin
d58802817b If daily_status_security_inline is set, the rc value needs to be
forced to 3 so that the output of this script is always displayed.
In fact, setting this flag is identical to setting
daily_status_security_output to an empty string.  To make the logic
less confusing, change the behavior of daily_status_security_inline
such that it just forces daily_status_security_output to an empty
string and then applies the normal logic.

PR:		conf/178611
Submitted by:	Jason Unovitch <jason.unovitch@gmail.com>
MFC after:	3 days
2013-06-25 15:45:31 +00:00
Kevin Lo
277a625085 Regenerate usb.conf after r252196.
Spotted by:	rpaulo
2013-06-25 07:17:30 +00:00
Xin LI
b19408db1a Call sshd_precmd instead of sshd_configtest when the operator
requests reload or restart, which, in addition of testing the
configuration, will also generate host keys when they are not
present (previous behavior).

Obtained from:	FreeNAS
Ok'ed by:	bdrewery, des
MFC after:	1 week
2013-06-21 17:23:19 +00:00
Hiroki Sato
740b713999 - Add CIDR notation support like 192.168.1-2.10-16/24 to $ifconfig_IF_aliasN.
This is an extended version of ipv4_addr_IF which supports both IPv4 and
  IPv6, and multiple range specifications.  To avoid to generate too many
  addresses, the maximum number of the generated addresses is currently
  limited to 31.

- Add $ifconfig_IF_aliases, which accepts multiple IP aliases in a variable.

- ipv6_prefix_IF now supports !/64 prefix length.  In addition to the old
  64-bit format (2001:db8:1:1), a full 128-bit format like 2001:db8:1:1::/64
  is supported.

- Replace ifconfig command with $IFCONFIG_CMD variable to support
  a dry-run mode in the future.

- Remove IP aliases before removing all of IPv4 addresses when doing
  "rc.d/netif down".

- Add a DAD wait to network6_getladdr() because it is possible to fail to
  configure an EUI64 address when ipv6_prefix_IF is specified.

A summary of the supported ifconfig_* variables is as follows:

 # IPv4 configuration.
 ifconfig_em0="inet 192.168.0.1"
 # IPv6 configuration.
 ifconfig_em0_ipv6="inet6 2001:db8::1/64"
 # IPv4 address range spec.  Now deprecated.
 ipv4_addr_em0="10.2.1.1-10"
 # IPv6 alias.
 ifconfig_em0_alias0="inet6 2001:db8:5::1 prefixlen 70"
 # IPv4 alias.
 ifconfig_em0_alias1="inet 10.2.2.1/24"
 # IPv4 alias with range spec w/o AF keyword (backward compat).
 ifconfig_em0_alias2="10.3.1.1-10/32"
 # IPv6 alias with range spec.
 ifconfig_em0_alias3="inet6 2001:db8:20-2f::1/64"
 # ifconfig_IF_aliases is just like ifconfig_IF_aliasN.
 ifconfig_em0_aliases="inet 10.3.3.201-204/24 inet6 2001:db8:210-213::1/64 inet 10.1.1.1/24"
 # IPv6 alias (backward compat)
 ipv6_ifconfig_em0_alias0="inet6 2001:db8:f::1/64"
 # IPv6 alias w/o AF keyword (backward compat)
 ipv6_ifconfig_em0_alias1="2001:db8:f:1::1/64"
 # IPv6 prefix.
 ipv6_prefix_em0="2001:db8::/64"

Tested by:	Kimmo Paasiala
2013-06-20 02:29:49 +00:00
Devin Teske
cc56559534 Allow $ntpdate_config to be NULL. Due to a lack of surrounding quotes, when
ntpdate_config was set to NULL the conditional would (counter to prevailing
logic) succeed -- leading to awk attempting to redirect from a NULL pathname
standard-in. While we're here, make the script consistant with itself by
removing the {curlies} around ntpdate_config (they are unnecessary).
2013-06-18 02:37:15 +00:00
Eitan Adler
1cbff2a999 Remove CVS from the base system.
Discussed with:	many
Reviewed by:	peter, zi
Approved by:	core
2013-06-15 20:29:07 +00:00
Chris Rees
c45506efd1 Clean up swapfile memory disk on shutdown
Make the md unit number configurable so that it can be predicted

PR:		bin/168544
Submitted by:	wblock (based on)
Approved by:	kevlo
2013-06-12 16:44:17 +00:00