Commit Graph

197697 Commits

Author SHA1 Message Date
trasz
f9abf723a8 MFC r273854:
Update acl(3) to expand on NFSv4 ACL support.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:51:48 +00:00
trasz
684c853eed MFC r273853:
Make it clear that ACL flags are NFSv4-only.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:50:13 +00:00
trasz
964eff34c6 MFC r273852:
Fix handling of "conn" mount_nfs(8) option.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:48:47 +00:00
trasz
3c827138a2 MFC r273851:
Note that the "timeout" nfs option is in tenths of a second.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:43:32 +00:00
trasz
059653a03d MFC r273849:
Add support for "timeo", "actimeo", "noac", and "proto" options
to mount_nfs(8).  They are implemented on Linux, OS X, and Solaris,
and thus can be expected to appear in automounter maps.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:41:55 +00:00
trasz
59965706b2 MFC r273822:
Fix iscsictl(8) and ctld(8) to correctly handle Windows newlines
(CRLF) in iscsi.conf and ctl.conf.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:39:31 +00:00
trasz
00cfd4605b MFC r273821:
Keep the token list sorted.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:37:51 +00:00
trasz
704c9e7b81 MFC r273820:
Make it possible to optionally use semicolon to separate statements.
This makes it possible to format stuff like this:

target xxx {
	lun 0 { path /foo/bar; size 4G; }
}

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:36:10 +00:00
trasz
077d08af55 MFC r273816:
Simplify code; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:34:17 +00:00
trasz
aa126c68f3 MFC r273813:
Add discovery-filter.  This makes it possible to restrict which targets
are returned during discovery based on initiator portal, name, and CHAP
credentials.
2014-11-29 15:32:15 +00:00
rodrigc
0475e04762 MFC r272484:
Add dependencies to various libraries to libzfs and libzpool.

Submitted by:	sef
2014-11-29 08:33:54 +00:00
hselasky
0bfa661315 MFC r274020:
Reduce boot verbosity.
2014-11-29 05:07:24 +00:00
hselasky
77aefe28be MFC r275109:
Add support for 64-byte CQE size.

Sponsored by:	Mellanox Technologies
2014-11-29 04:18:56 +00:00
cy
dc900c0528 MFC r274744.
Set the current vnet inside the ioctl handler for ipfilter.

Without this fix, the vnet was NULL and would crash.
This fix is similar to what was done inside the ioctl handler for PF.

Tested by:
   (1) Boot a kernel with "options VIMAGE" enabled
   (2) Type:

   echo "map lo0 from 10.0.0.0/24 to ! 10.0.0.0/24 -> 127.0.0.1/32" > /etc/ipnat.rules ; service ipnat onerestart

PR: 176992
Differential Revision: https://reviews.freebsd.org/D1191
2014-11-28 20:39:35 +00:00
hselasky
4c0230ed4d MFC r274017, r274088 and r275205:
Provide an on-stack temporary buffer for small IOCTL requests.
Avoiding a memory allocation per IOCTL request can give a significant
speedup for applications which heavily rely on IOCTLs.
2014-11-28 19:21:46 +00:00
mav
d424575bb7 MFC r274756:
Remove residual xpt_release_device() call left after r272406 cleanup.

Excessive release here could trigger use-after-free condition and kernel
panic on LUN 0 disconnect.
2014-11-28 09:23:15 +00:00
mav
8eec24be06 MFC r274840, r274940:
Make iSCSI frontend less chatty while waiting for tasks termination.
2014-11-28 08:56:37 +00:00
mav
2e80dc504a MFC r274790: Remove bunch of unused lun variables. 2014-11-28 08:54:43 +00:00
mav
6625927f31 MFC r274789: Reduce race between LUN destruction and request arrival. 2014-11-28 08:53:44 +00:00
mav
6f5634bed9 MFC r274786: Log errors for absent LUNs too. 2014-11-28 08:52:38 +00:00
trasz
43998423fb MFC r273770:
Fix build after previous commit.  While here, improve error messages.

Sponsored by:	The FreeBSD Foundation
2014-11-27 10:48:06 +00:00
trasz
863c0f84a8 MFC r273768:
Remove the distinction between strings and numbers from ctld(8) yacc parser.
This fixes problems with passing strings that look like numbers to clauses
that expect strings; previously it caused syntax errors and had to be worked
by user, using quotes.  The workaround introduced in r267833 is no longer
neccessary.

Sponsored by:	The FreeBSD Foundation
2014-11-27 10:45:55 +00:00
trasz
6d726858a2 MFC r273690:
Mention VAAI and ODX in ctl(4).

Sponsored by:	The FreeBSD Foundation
2014-11-27 10:31:11 +00:00
ae
3a3d4bc315 MFC r274750:
Use geom attribute "PART::type" to determine partition type and choose
  relevant fsck_xxx utility.
2014-11-27 08:41:31 +00:00
hselasky
f188d6b61c MFC r273774:
Make some infiniband example utilities easily buildable:
- Add new Makefiles.
- Add more include directories when building.
- Fixed a printf() formatting string.

Sponsored by:	Mellanox Technologies
2014-11-26 09:37:35 +00:00
np
bed3ddc442 MFC r274724:
cxgbe(4): figure out the max payload size and save it for later.
2014-11-26 00:44:48 +00:00
dteske
7230e71362 MFC r274116:
Add new libraries/utilities for data throughput visualization.
dpv(3): dialog progress view library
dpv(1): stream data from stdin or multiple paths with dialog progress view
figpar(3): configuration file parsing library

MFC r274120, r274121, r274123, r274124, r274144, r274146, r274159, r274192,
r274203, r274209, r274226, r274270, and r274851: Fixes following r274116

Reviews:        D714
Relnotes:       New libdpv/libfigpar and dpv(1) utility
Reviewed by:    jelischer, shurd
Discussed at:   MeetBSD California 2014 Vendor/Dev Summit
Discussed on:   -current
Thanks to:      ngie, ian, jelischer, shurd, bapt
2014-11-25 13:47:53 +00:00
dim
b0242e0d02 MFC r274900:
Fix the following -Werror warnings from clang 3.5.0, while building
bsnmpd's snmp_hostres module:

usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:204:20: note: use function 'labs' instead
        str[9] = (u_char)(abs(tm->tm_gmtoff) / 3600);
                          ^~~
                          labs
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: error: absolute value function 'abs' given an argument of type 'const long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.c:205:22: note: use function 'labs' instead
        str[10] = (u_char)((abs(tm->tm_gmtoff) % 3600) / 60);
                            ^~~
                            labs

Since tm::tm_gmtoff is a long, use labs(3) instead.
2014-11-25 13:29:13 +00:00
dim
10bfcc72ff MFC r274898:
Fix the following -Werror warnings from clang 3.5.0, while building
usr.sbin/rtadvd:

usr.sbin/rtadvd/rtadvd.c:1291:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1291:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(preferred_time - pfx->pfx_pltimeexpire) > rai->rai_clockskew) {
                    ^~~
usr.sbin/rtadvd/rtadvd.c:1324:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^
usr.sbin/rtadvd/rtadvd.c:1324:7: note: remove the call to 'abs' since unsigned values cannot be negative
                    abs(valid_time - pfx->pfx_vltimeexpire) > rai->rai_clockskew) {
                    ^~~
2 errors generated.

These warnings occur because both preferred_time and pfx_pltimeexpire
are uint32_t's, so the subtraction expression is also unsigned, and
calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by:	hrs
Differential Revision: https://reviews.freebsd.org/D1197
2014-11-25 13:12:45 +00:00
dim
b7c69c9f14 MFC r274856:
Avoid undefined behaviour in gas's rotate_left() macro for n == 0.
Otherwise, clang can effectively remove the first iteration of the for
loops where this macro is invoked, and as a result, "cmp r0, #99" fails
to assemble.

Obtained from:	joerg at netbsd
2014-11-25 12:58:21 +00:00
dim
88dda701c6 MFC r274847:
Fix the following -Werror warnings from clang 3.5.0, while building
usr.bin/locate:

usr.bin/locate/locate/util.c:249:29: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^
usr.bin/locate/locate/util.c:249:29: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(i) < abs(htonl(i)) ? i : htonl(i));
                                                 ^~~
usr.bin/locate/locate/util.c:274:32: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^
usr.bin/locate/locate/util.c:274:32: note: remove the call to 'abs' since unsigned values cannot be negative
                            MAXPATHLEN, abs(word) < abs(htonl(word)) ? word :
                                                    ^~~

The problem is that ntohl() always returns an unsigned quantity.  In
this case, it's expected to be cast back to a signed integer, but to
stop complaints about abs() we just store it into an integer, and don't
call ntohl() again.

Reviewed by:	ngie
Differential Revision: https://reviews.freebsd.org/D1196
2014-11-25 12:45:31 +00:00
dim
a37b4354f2 MFC r274846:
Fix the following -Werror warning from clang 3.5.0, while building
usr.bin/cpio on amd64 (or any arch with 64-bit time_t):

contrib/libarchive/cpio/cpio.c:1143:6: error: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Werror,-Wabsolute-value]
	if (abs(mtime - now) > (365/2)*86400)
	    ^
contrib/libarchive/cpio/cpio.c:1143:6: note: use function 'labs' instead
	if (abs(mtime - now) > (365/2)*86400)
	    ^~~
	    labs
1 error generated.

This is because time_t is a long on amd64. To avoid the warning, just
copy the equivalent test from a few lines before, which is used in the
Windows case, and which is type safe.

Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D1198
2014-11-25 12:19:05 +00:00
trasz
0f5dfd9d3d MFC r273585:
Improve ctld.conf example.

Sponsored by:	The FreeBSD Foundation
2014-11-24 08:09:50 +00:00
trasz
99d5e34563 MFC r273470:
Fix ctl.conf example to use proper paths to ZVOLs.

Sponsored by:	The FreeBSD Foundation
2014-11-24 08:06:29 +00:00
trasz
46ba63ac4f MFC r273467:
Comment out parts about iSER; it's not implemented.

Sponsored by:	The FreeBSD Foundation
2014-11-24 08:04:40 +00:00
trasz
6d3549321e MFC r273584:
Make the initiator-name and initiator-portal checks a little nicer.

Sponsored by:	The FreeBSD Foundation
2014-11-24 07:59:44 +00:00
trasz
3ffc9ed98b MFC 273583:
Tidy up the login code; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-24 07:57:18 +00:00
kevlo
110eb67327 MFC r273760:
Fix prototypes.
2014-11-24 01:56:33 +00:00
grehan
2c63daa4b3 MFC r274407
Fix incorrect reading of 32-bit modinfo by 64-bit loaders.

  The various structures in the mod_metadata set of a FreeBSD kernel and
  modules contain pointers. The FreeBSD loader correctly deals with a
  mismatch in loader and kernel pointer size (e.g. 32-bit i386/ppc
  loader, loading 64-bit amd64/ppc64 kernels), but wasn't dealing with
  the inverse case where a 64-bit loader was loading a 32-bit kernel.
2014-11-24 01:25:19 +00:00
mav
a3fd5530e7 MFC r273635, r273793, r274797: Add basic iSNS client to the iSCSI target.
This makes ctld(8) register its iSCSI targets and portals on configured
iSNS servers to allow initiators find them without active discovery.

Fetching of allowed initiators from iSNS is not implemented now, so target
ACLs still should be configured manually.

Relnotes:	Yes
Sponsored by:	iXsystems, Inc.
2014-11-24 00:47:04 +00:00
mav
8ef35bbcf8 MFC r274328:
Make both iSCSI initiator and target support base64 encoded CHAP data.

While all tested initiators and targets use hex-encoded CHAP data, RFC also
allows base64 encoding there, and Microsoft certificaition tool uses it.
2014-11-23 04:17:39 +00:00
n_hibma
15c962e2cf MFC:
------------------------------------------------------------------------
	r274792 | n_hibma | 2014-11-21 15:53:42 +0100 (Fri, 21 Nov 2014) | 5
	lines

	Simply remove the tmp dir before creating the symlink. We are doing
	chroots all over the place, so there is bound to be a stale file lying
	around in there (in my case samba lock files from creating accounts). If
	we don't do that, the symlink later will fail.

	------------------------------------------------------------------------
2014-11-22 20:55:21 +00:00
trasz
19b6e68597 MFC r273543:
Clean up (refactor) discovery a little; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:58:39 +00:00
trasz
340f150ff8 MFC r273468:
Remove misleading statement.  Bump date.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:56:03 +00:00
trasz
c6421981a9 MFC r273466:
Remove spurious empty line.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:54:11 +00:00
trasz
4844d3d80c MFC r273465:
Fix ctld(8) to not show the "auth-group <name> not assigned to any target"
warning for auth-groups assigned to a portal-group.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:52:33 +00:00
trasz
38906efd97 MFC r273464:
Whitespace fixes.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:50:14 +00:00
trasz
e89f2b0aad MFC r271320:
Use keys_add_int() where appropriate.  No functional changes.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:48:09 +00:00
dumbbell
efacd3be3e vt(4): Support syscons' SC_HISTORY_SIZE to configure history size
Therefore, to set histry size to 2000 lines, add the following line to
your kernel configuration file:
    options SC_HISTORY_SIZE=2000

The default history remains at 500 lines.

MFC of:		r274117
2014-11-22 17:47:03 +00:00
trasz
071ca148ac MFC r273459:
Untangle iSCSI authentication code by splitting off the CHAP
implementation.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:39:39 +00:00