Commit Graph

15030 Commits

Author SHA1 Message Date
Edward Tomasz Napierala
dce704a67a Fix ctld(8) to not forget to send TargetPortalGroupTag and TargetAlias
when the initiator skips security negotiation.  This fixes interoperability
with Xtend SAN initiator.

PR:		193021
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-09-09 16:45:36 +00:00
Peter Grehan
e18f344b9b Add a callback to be notified about negotiated features.
Submitted by:	luigi
Obtained from:	Vincenzo Maffione, Universita` di Pisa
MFC after:	3 days
2014-09-09 04:11:54 +00:00
Dag-Erling Smørgrav
24de4f90fa Fix support for IPv6 nameservers.
PR:		188931
Submitted by:	Takefu <takefu@airport.fm>
MFC after:	3 days
2014-09-08 09:16:07 +00:00
Edward Tomasz Napierala
44a5953aa1 Avoid ctld(8) crash on getaddrinfo(3) failure.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-09-06 09:03:13 +00:00
Edward Tomasz Napierala
a5f9f526bd Document initiator-portal netmask support.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-09-05 14:58:24 +00:00
Edward Tomasz Napierala
0488e848d9 Turn two errors, which are possible to trigger only by bugs,
into assertions.

Discussed with:	mav@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-09-05 14:48:06 +00:00
Edward Tomasz Napierala
a5e9e2bee7 Make it possible to quote names in autofs maps using double quotes.
Note that this is a workaround, not a proper solution.  If you know
lex well, and want to help - please let me know, I'll explain how it
should work.

PR:		192968
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2014-09-05 14:32:09 +00:00
Edward Tomasz Napierala
d69440367c Fix typo.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-09-05 11:10:44 +00:00
Devin Teske
b74ae45b45 Fix regression introduced by SVN r270954. Correct way to reset getopts
is to set OPTIND to 1, not unset it (which causes an error).

Thanks to:	jilles
2014-09-02 22:59:40 +00:00
Devin Teske
2c4a847864 Fix a bug where command line arguments could be misprocessed if getopts is
used prior to f_dialog_init() -- e.g., in a script that sets
DIALOG_SELF_INITIALIZE to NULL, preventing f_dialog_init() from being run
automaticaly when `dialog.subr' is included. Caused by sub-shell processing
of arguments inheriting prior value of $OPTIND, used by getopts. Solved by
unsetting OPTIND prior to [re-]processing of positional arguments.
2014-09-01 22:53:47 +00:00
Ed Schouten
13b7412dad Add -Wthread-safety to WARNS=6.
While there, add a NO_WTHREAD_SAFETY flag that can be used to disable
this specific warning flag. Disable it for auditdistd. We can easily
patch up auditdistd to have the right annotations to build, but as
auditdistd is intended to be portable across other operating systems,
it's not worth the effort.

Approved by:	brueffer@
2014-09-01 20:18:09 +00:00
Stefan Eßer
320098549a Add references to vt(4) to further man-pages.
MFC after:	3 days
2014-09-01 16:25:08 +00:00
Stefan Eßer
5c08832dbd Fix typo (by -> be).
MFC after:	3 days
2014-09-01 16:12:29 +00:00
Gleb Smirnoff
c26544aa7f Make SOCK_RAW sockets to be truly raw, not modifying received and sent
packets at all. Swapping byte order on SOCK_RAW was actually a bug, an
artifact from the BSD network stack, that used to convert a packet to
native byte order once it is received by kernel.

Other operating systems didn't follow this, and later other BSD
descendants fixed this, leaving us alone with the bug. Now it is
clear that we should fix the bug.

In collaboration with:	Olivier Cochard-Labbé <olivier cochard.me>
See also:		https://wiki.freebsd.org/SOCK_RAW
Sponsored by:		Nginx, Inc.
2014-09-01 14:04:51 +00:00
Neel Natu
04da7226c4 Set the 'inst_length' to '0' early on before any error conditions are detected
in the emulation of the task switch. If any exceptions are triggered then the
guest %rip should point to instruction that caused the task switch as opposed
to the one after it.
2014-08-30 18:35:16 +00:00
Baptiste Daroussin
24ed0a5759 Allow mailwrapper to use mailer.conf from localbase (respecting LOCALBASE env var if set)
Phabric:	https://reviews.freebsd.org/D412
Reviewed by:	bdrewery
MFC after:	2 weeks
Relnotes:	yes
2014-08-26 22:20:02 +00:00
Stefan Eßer
f071b64ed3 More man pages that need to know about vt in addition to syscons.
MFC after:	3 dayS
2014-08-26 10:55:08 +00:00
Stefan Eßer
dd281ebb46 Update man-pages to correctly refer to changed pathes and naming conventions
for systems with vt(4) consoles.

MFC after:	3 days
2014-08-26 09:40:14 +00:00
Stefan Eßer
0ae9426c10 Remove band.aid that made kbdcontrol lookup keymap files in the syscons
path even under vt, which is no longer useful, since the syscons keymap
files have been converted and committed for use by vt.
2014-08-26 09:37:43 +00:00
Enji Cooper
e5516195c6 Convert LIBCURSES to LIBNCURSES to fix "make checkdpadd"
Also, add a missing LIBPANEL dependency for lldb

Approved by: rpaulo (mentor)
Suggested by: brooks
MFC after: 5 days
Phabric: D675 (as part of a larger diff)
PR: 192762
2014-08-26 09:10:28 +00:00
Hiren Panchasara
3a1abb4c43 Fix a typo to catch correct condition. 2014-08-25 05:52:05 +00:00
Devin Teske
36fb8bfcd3 Optimize f_which() to be slightly faster still. 2014-08-24 16:40:31 +00:00
Edward Tomasz Napierala
3dd80c05b1 Fix handling of keys in executable maps. Previously it was broken for keys
containing whitespace.

PR:		192947
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-24 12:32:26 +00:00
Edward Tomasz Napierala
f7ae83075a Add "nobrowse" option. Previously automountd(8) always behaved as if
it was set, now it's conditional.

PR:		192862
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-23 12:00:45 +00:00
Edward Tomasz Napierala
30ae6e0076 Don't fail on executable maps that return no entries. This turns useless
error message into useful one.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-23 11:51:46 +00:00
Tycho Nightingale
b297e71ede Fix a recursive lock acquisition in vi_reset_dev().
Reviewed by:	grehan
2014-08-22 13:01:22 +00:00
Neel Natu
f518456fdb Change file permissions for some setuid executables so they are "o+r".
The executable itself doesn't contain any privileged information.

An example of where this is useful is when makefs(8) is creating an image
that includes /sbin/shutdown. This can now be done without root privileges.

Reviewed by:	delphij
Discussed with:	delphij, des
CR:		https://reviews.freebsd.org/D662
2014-08-21 19:04:15 +00:00
Devin Teske
3a2e3fe269 Add `-A' flag to pkg-install(8) invocation when installing dependencies.
MFC after:	3 days
X-MFC-to:	stable/10, stable/9
Reported by:	gjb
Discussed with:	jelischer, gjb, bdrewery
2014-08-21 17:15:09 +00:00
Edward Tomasz Napierala
b7a65e3936 Make the iSCSI stack use __FBSDID() properly.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-21 15:32:38 +00:00
Edward Tomasz Napierala
925fd94584 Use __FBSDID() properly.
Suggested by:	pluknet@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-21 15:07:25 +00:00
Hiroki Sato
d292a6c795 Recover sin6_scope_id of gateway addresses in riprecv() by using the if_index
where a RIP packet was received.  This fixes a bug which prevented gateway
addresses in fe80::/64 from being added.
2014-08-20 17:27:15 +00:00
Edward Tomasz Napierala
5e8c3d974e Remove useless - and buggy, it resulted in spurious warnings in logs - code.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-20 13:54:27 +00:00
Bryan Drewery
4a185fa6c9 Avoid showing stale errors when nmount(2) fails.
Sometimes nmount(2) will fail without setting errmsg. The previous (ignored)
error would then be shown as the reason for the failed call if the next
nmount(2) also fails without [ENOENT,ENOTSUP].

An example is when there is a tmpfs mounted with -o size. vfs_filteropt() adds
'size' as an error in errmsg due to 'size' not being in tmpfs_updateopts. Then
tmpfs_mount returns [ENOTSUP] from nmount(2), which is then ignored. The next
call may race with an unmount causing an invalid [EINVAL] that then does log an
error, with the tmpfs errmsg.

The race itself is a separate issue to fix as it is expected to have an
[ENOENT] returned instead.

In this example the mount being shown is actually nullfs, not tmpfs that the
error is from.

  mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument mount option <size> is unknown

It should only show:

  mountd[740]: can't delete exports for /poudriere/data/.m/exp-head-commit-test-devel/04/.npkg: Invalid argument

MFC after:	2 weeks
2014-08-19 21:04:31 +00:00
Enji Cooper
86e9f36ea6 Add LIBMD and LIBUTIL to DPADD to fix "make checkdpadd"
Approved by: jmmv (mentor)
MFC after: 5 days
Phabric: D633
PR: 192763
2014-08-19 18:47:47 +00:00
Enji Cooper
b7ca81625e Add missing libraries to DPADD; sort DPADD so DPADD and LDADD match up
This fixes "make checkdpadd"

Approved by: jmmv (mentor)
MFC after: 2 weeks
Phabric: D630
PR: 192765
2014-08-19 18:31:20 +00:00
Bryan Drewery
5608fd23c2 Revert r267233 for now. PIE support needs to be reworked.
1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other
   build-only utility libraries.
2. Another 40% is fixed by generating _pic.a variants of various libraries.
3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR)
   where it never would work anyhow, such as csu or loader. This suggests
   there may be better ways of adding support to the tree. Many of these
   cases can be fixed such that -fPIE will work but there is really no
   reason to have it in those cases.
4. Some of the uses are working around hacks done to some Makefiles that are
   really building libraries but have been using bsd.prog.mk because the code
   is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have
   been needed.

We likely do want to enable PIE by default (opt-out) for non-tree consumers
(such as ports). For in-tree though we probably want to only enable PIE
(opt-in) for common attack targets such as remote service daemons and setuid
utilities. This is also a great performance compromise since ASLR is expected
to reduce performance. As such it does not make sense to enable it in all
utilities such as ls(1) that have little benefit to having it enabled.

Reported by:	kib
2014-08-19 15:04:32 +00:00
Enji Cooper
a725bfc49c Add LIBCRYPTO and LIBSSL to DPADD
This fixes "make checkdpadd"

Phabric: D621
PR: 192761
Approved by: rpaulo (mentor)
MFC after: 2 weeks
2014-08-18 18:01:18 +00:00
Neel Natu
06224a9492 Remove LOG_ODELAY because it does nothing.
Reviewed by:	jilles
CR:		https://reviews.freebsd.org/D611
2014-08-17 19:06:26 +00:00
Edward Tomasz Napierala
3914ddf8a7 Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by:	allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric:	D523
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2014-08-17 09:44:42 +00:00
Rick Macklem
9109536752 Try to clarify how file systems are exported for NFSv4.
Suggested by:	rcarter@pinyon.org
MFC after:	1 week
2014-08-14 22:52:05 +00:00
Stefan Eßer
6fe6b12f07 Add support for NEWCONS to kbdmap and vidfont.
The path to keymaps and fonts is selected based on the existence and value
of "sysctl kern.vty".

MFC after:	1 week
2014-08-14 14:22:12 +00:00
Neel Natu
33424543f2 Minor cleanup:
- Set 'pirq_cold' to '0' on the first PIRQ allocation.
- Make assertions stronger.

Reviewed by:	jhb
CR:		https://phabric.freebsd.org/D592
2014-08-13 00:14:26 +00:00
Rick Macklem
fd71d3ebee Document the use of the vfs.nfsd sysctls that control the size of
the NFS server's DRC for TCP.
This is a content change.

MFC after:	1 week
2014-08-10 20:05:13 +00:00
Neel Natu
12a6eb99a1 Support PCI extended config space in bhyve.
Add the ACPI MCFG table to advertise the extended config memory window.

Introduce a new flag MEM_F_IMMUTABLE for memory ranges that cannot be deleted
or moved in the guest's address space. The PCI extended config space is an
example of an immutable memory range.

Add emulation for the "movzw" instruction. This instruction is used by FreeBSD
to read a 16-bit extended config space register.

CR:		https://phabric.freebsd.org/D505
Reviewed by:	jhb, grehan
Requested by:	tychon
2014-08-08 03:49:01 +00:00
Andrew Thompson
7041a67eee Give a brief message as to what error was encountered to help the user along.
Reviewed by:	nwhitehorn
MFC after:	2 weeks
2014-08-07 01:51:01 +00:00
Baptiste Daroussin
d029c3aa25 Rework privatelib/internallib
Make sure everything linking to a privatelib and/or an internallib does it directly
from the OBJDIR rather than DESTDIR.
Add src.libnames.mk so bsd.libnames.mk is not polluted by libraries not existsing
in final installation
Introduce the LD* variable which is what ld(1) is expecting (via LDADD) to link to
internal/privatelib
Directly link to the .so in case of private library to avoid having to complexify
LDFLAGS.

Phabric:	https://phabric.freebsd.org/D553
Reviewed by:	imp, emaste
2014-08-06 22:17:26 +00:00
Peter Wemm
713c03d57a Check gethostname(2) return code - but even if it succeeds it may not
null terminate.

Temporarily use "From: $user@$hostname" rather than "From: $user".
The latter exposes incompatible behavior if using dma(8).  sendmail(8)
(and other alternatives) canonify either form on submission (even
if masquerading), but dma will leak a non-compliant address to
the internet.
2014-08-05 01:32:09 +00:00
Steven Hartland
b22b6abd34 Added support for extra ifconfig args to jail ip4.addr & ip6.addr params
This allows for CARP interfaces to be  used in jails e.g.
ip4.addr = "em0|10.10.1.20/32 vhid 1 pass MyPass advskew 100"

Before this change using exec.prestart to configure a CARP address
would result in the wrong MAC being broadcast on startup as jail creates
IP aliases to support ip[4|6].addr before exec.prestart is executed.

PR:		191832
Reviewed by:	jamie
MFC after:	1 week
X-MFC-With:	r269340
Phabric:	D528
Sponsored by:	Multiplay
2014-08-04 16:32:08 +00:00
Devin Teske
341e5ca37c Add required `exec' before Xdialog(1) invocation for the case where we
expect (require) data on stdin. The effect of this is that, when
backgrounded, $! returns the pid of an Xdialog(1) instance instead of
an sh(1) instance -- the difference being a later kill of $! will reach
the Xdialog(1) instance whereas without the exec the kill succeeds on
the sh(1) instance leaving Xdialog(1) open.
2014-08-03 05:02:00 +00:00
Devin Teske
7729d5e3ac Update command and add check for edge-case. 2014-07-31 22:13:31 +00:00