Commit Graph

197438 Commits

Author SHA1 Message Date
bapt
5daa84302c MFC: 272445,272578,273772,273779,273782,273786,273787,273791
Add a test for bug 191427 where pw(8) will go into an infinite loop
Add some tests for modifying groups
When a group is renamed then the group has been invalidated for sure.
In that case get the group information using the new name.

Fix a regression in pw usermod -G list

The user was perperly adding the to different groups from "list" but was not
removed from the other groups it could have belong to.

Do not delete the group wheel when bad argument is passed to pw groupdel -g

Check that the -g argument is actually a number, if not report an error.
This argument is converted without checking with atoi(3) later so without this
check it converts any alpha entries into 0 meaning it deletes the group wheel

Ensure pw userdel -u <invalid> do not try to remove root

Check the uid passed is actually a number as early as possible

Fix renaming a group via the gr_copy function

Add a regression test to pw(8) because the bug was discovered via using:
pw groupmod

PR:		193704 [1], 185666 [2], 90114 [3], 187189 [4]
Submitted by:	Marc de la Gueronniere [4]
Reported by:	az [1], sub.mesa@gmail.com [2], bkoenig@cs.tu-berlin.de [3],
		mcdouga9@egr.msu.edu [4]
2014-11-04 07:50:48 +00:00
hselasky
fa183f0174 MFC r271946 and r272595:
Improve transmit sending offload, TSO, algorithm in general. This
change allows all HCAs from Mellanox Technologies to function properly
when TSO is enabled. See r271946 and r272595 for more details about
this commit.

Sponsored by:	Mellanox Technologies
2014-11-03 12:38:29 +00:00
nyan
8dd879bfaf MFC: r268474 and r268476 (by imp)
- Merge the clang support from i386.
  - Compile boot2 with clang on pc98.

MFC: r272250 (by nyan)
  - Reduce diffs against i386.
2014-11-03 12:07:04 +00:00
nyan
2b45887284 MFC: r268475 (by imp)
Make SERIAL support optional again. Enable it for i386 because a huge
  percentage of machines has a 16550. Disable it for pc98 since only a
  tiny fraction of them have one.
2014-11-03 11:58:32 +00:00
nyan
562d29cc36 MFC: r272258
- Cosmetic changes.
  - Reduce diffs against i386.

MFC: 272259
  MFi386: Enable QUOTA, PRINTF_BUFR_SIZE and puc.
2014-11-03 11:21:43 +00:00
nyan
027712baa4 MFC: r272256
Switch from lib/libstand to sys/boot/libstand32.
2014-11-03 11:08:00 +00:00
nyan
85b0a19937 MFC: r272255
Supress clang warning for FreeBSD printf %b and %D formats.
2014-11-03 11:01:12 +00:00
nyan
c2e8bf4779 MFC: r272252
Drop the 3rd clause from all 3 clause BSD licenses.
2014-11-03 10:38:03 +00:00
kib
2a026f5937 MFC r273728:
Add a method to iicbus to request IIC_M_NOSTOP behaviour for multibyte
transfers to be default.
2014-11-03 10:33:01 +00:00
kib
9b2eda21cd MFC r273727:
Original commit message was
Allow the vfs.nfsd knobs to be set from loader.conf (or using
kenv(8)).  This is useful when nfsd is loaded as module.

As I understand, automatic fetch from kenv does not work in stable/10.
Merge the change still, to reduce code difference.
2014-11-03 10:30:44 +00:00
nyan
70c10de0a9 MFC: r272248
- Cleanups pc98 code.
  - Remove unworked formats.
2014-11-03 10:26:29 +00:00
bapt
be8c3b9bec MFC r273737, 273739
Clarify the documentation of pmcstat:
the -d argument should be passed before -p, -s, -P or -S to be taken in account

Differential Revision:	https://reviews.freebsd.org/D1011
Reviewed by:	adrian, gnn
2014-11-03 08:48:48 +00:00
nyan
fa7a22d018 MFC: r272245
Remove duplicate prog.
2014-11-03 06:33:52 +00:00
nyan
3f0322db38 MFC: r272243
Add missing library dependencies.
2014-11-03 05:35:45 +00:00
mav
edabf036a2 MFC r273809:
Implement better handling for ENOSPC error for both CTL and CAM.

This makes VMWare VAAI Thin Provisioning Stun primitive activate, pausing
the virtual machine, when backing storage (ZFS pool) is getting overflowed.
2014-11-03 03:45:41 +00:00
mav
131eff3491 MFC r273730, r273731:
Reduce code duplication around Write Exclusive persistent reservation.

While there, allow some more commands to pass persistent reservation.
2014-11-03 03:44:59 +00:00
mav
58bf349623 MFC r273711:
Allocate buffer for READ BUFFER/WRITE BUFFER commands on demand.

These commands are rare, but consume additional 256KB RAM per LUN.
2014-11-03 03:43:40 +00:00
rpaulo
ce9598bb33 MFC 273598 273602 273607 273613 273647:
Userland HPET support.
2014-11-03 03:17:58 +00:00
jhb
916cd4d89a MFC 273834:
Rework the EXAMPLES section to be a bit clearer.
- Add an example of using etcupdate diff.
- Create a subsection on bootstrapping that is below the simple
  examples.  This should make it clearer that 'etcupdate extract' is
  a one-time operation and not part of the common workflow.  It also
  adds more suggestions on when bootstrapping is needed and additional
  steps to make future merges simpler.
2014-11-03 00:13:20 +00:00
jhb
a245d679cf MFC 273644,273738:
Clarify that pthread_cleanup_push()/pop() are implemented as macros that
create a new code block and thus must be balanced at the same lexical
scope.  (This is also a requirement in POSIX.)

PR:		194280
Submitted by:	dr2867.business@pacbell.net
2014-11-02 23:22:22 +00:00
hrs
e57a7947db MFC r272974,272976:
Add ${name}_env and ${name}_prepend.  ${name}_env is an argument list which
will be passed to env(1).  ${name}_prepend is simply prepended to the command
line for $command.
2014-11-02 22:41:55 +00:00
delphij
9a897ad843 MFC r273026:
Add a tunable for arc_shrink_shift (vfs.zfs.arc_shrink_shift) that
controls how much fraction, 1/2^arc_shrink_shift, should be reclaimed
when there is memory pressure.

Submitted by:	Richard Kojedzinszky <krichy at tvnetwork.hu>
2014-11-02 19:16:41 +00:00
delphij
78541e1020 MFC r273267:
Add tunable vfs.zfs.space_map_blksz for space map's maximum block size.
2014-11-02 19:09:34 +00:00
mav
9252414b60 MFC r273708: Fix support for LUN flat space addressing. 2014-11-02 17:31:45 +00:00
mav
9e735a2fb2 MFC r273693: Fix printing non-terminated strings in devlist XML. 2014-11-02 17:31:10 +00:00
mav
c9979422b8 MFC r273687:
Add "rpm" and "formfactor" LUN options to match istgt functionality.
2014-11-02 17:30:30 +00:00
mav
522da768bb MFC r273640: Add support for 12/16-byte EUI and 16-byte NAA IDs. 2014-11-02 17:29:48 +00:00
mav
db924e4c03 MFC r273075: Remove couple Copan's vendor-specific mode pages.
Those pages are highly system-/hardware-specific, the code is incomplete,
and so they hardly can be useful for anybody else.
2014-11-02 17:28:44 +00:00
mav
9ac81dc0af MFC r273073: Some groundwork for later Informational Exceptions support.
This includes support for:
 - Read-Write Error Recovery mode page;
 - Informational Exceptions Control mode page;
 - Logical Block Provisioning mode page;
 - LOG SENSE command.

No real Informational Exceptions features yet. This is only a placeholder.
2014-11-02 17:28:08 +00:00
mav
13d0c695a0 MFC r272409:
Use REPORT LUNS command for SPC-2 devices with LUN 0 disconnected.

SPC-2 tells REPORT LUNS shall be supported by devices supporting LUNs other
then LUN 0.  If we see LUN 0 disconnected, guess there may be others, and
so REPORT LUNS shall be supported.
2014-11-02 17:26:13 +00:00
mav
5c2f41bdb0 MFC r272406:
Make disconnected LUN 0 don't remain in half-configured state if there are
no LUNs on SPC-3 target after we tried REPORT LUNS.
2014-11-02 17:25:03 +00:00
mav
3f2b3e757a MFC r272401, r272402: Rework the logic of sequential SCSI LUN scanner.
Previous logic was not differentiating disconnected LUNs and absent targets.
That made it to stop scan if LUN 0 was not found for any reason.  That made
problematic, for example, using iSCSI targets declaring SPC-2 compliance and
having no LUN 0 configured.

The new logic continues sequential LUN scan if:
 -- we have more configured LUNs that need recheck;
 -- this LUN is connected and its SCSI version allows more LUNs;
 -- this LUN is disconnected, its SCSI version allows more LUNs and we
    guess they may be connected (we haven't scanned first 8 LUNs yet or
    kern.cam.cam_srch_hi sysctl is set to scan more).
2014-11-02 17:23:44 +00:00
dim
d8d62b896b MFC r273837:
Fix a clang 3.5 warning about abs(3) being given an argument of type
quad_t in setusercontext().  While here, sanitize the clamping of the
priority value, and use the correct type for the return value of
login_getcapnum().

Reviewed by:	kib
2014-11-01 13:45:01 +00:00
rpaulo
4ca13eed64 MFC r273551:
puc(4): add an entry for the Oxford Semiconductor OXPCIe952 1S1P
  card.

  Submitted by:	Alex Burlyga <alex.burlyga.ietf at gmail.com>
2014-11-01 05:45:05 +00:00
dumbbell
272ad10c66 vt(4): Add PIO_VFONT_DEFAULT ioctl to restore the default builtin font
To restore the default font using vidcontrol(1), use the "-f" flag
without an argument:
    vidcontrol -f < /dev/ttyv0

PR:		193910
Differential Revision:	https://reviews.freebsd.org/D971
Submitted by:	Marcin Cieslak <saper@saper.info>
Reviewed by:	ray@, emaste@
Approved by:	ray@
MFC of:		r273544
2014-10-31 23:10:58 +00:00
hselasky
a916deff5e MFC 258028:
Unbreak build of RSU module.
Use the real product name for Edimax rsu(4) id.
2014-10-31 10:07:56 +00:00
hselasky
67fc427da2 MFC r264801, r264802, r264934, r273181, r273216 and r273252:
Add more USB IDs.
2014-10-31 07:55:42 +00:00
hselasky
6154f3f498 MFC r269575, r269576 and r269578:
- Add a second Huawei SCSI eject command as USB mode switch config files
sometimes use one or the other. Maybe newer Huawei modems switched.
- Return USB_ERR_INVAL if the eject method is not known.

PR:		145319
2014-10-31 07:51:05 +00:00
hselasky
5c349cb3d1 MFC r264923:
Remove device type from the uftdi_devs table, enhance the jtag-skip feature.
2014-10-31 07:41:28 +00:00
hselasky
8118b15cf0 MFC r269569:
Remove unused defines.
Fix some device_printf's that were missing '\n' at the end or had
spelling errors.

PR:		145319
2014-10-31 07:38:49 +00:00
hselasky
07b5c0c04d MFC r271159, r271168 and r271680:
Add USB LED driver for the Dream Cheeky WebMail Notifier.
2014-10-31 07:33:56 +00:00
hselasky
d720a46ad0 MFC r273867:
Fix compile warning by removing unused variable.

Sponsored by:	Mellanox Technologies
2014-10-31 07:08:32 +00:00
hselasky
b52afefda4 MFC r273593:
Update the network interface baudrate integer according to the actual
line rate.

Sponsored by:	Mellanox Technologies
2014-10-31 07:04:25 +00:00
araujo
7081823e48 MFC r273159:
Add two sysctl(8) to enable/disable NFSv4 server to check when setting
user nobody and/or setting group nogroup as owner of a file or directory.
Usually at the client side, if there is an username that is not in the
client's passwd database, some clients will send 'nobody@<your.dns.domain>'
in the wire and the NFSv4 server will treat it as an ERROR.
However, if you have a valid user nobody in your passwd database,
the NFSv4 server will treat it as a NFSERR_BADOWNER as its believes the
client doesn't has the username mapped.

Submitted by:	Loic Blot <loic.blot@unix-experience.fr>
Reviewed by:	rmacklem
Approved by:	rmacklem
Sponsored by:	QNAP Systems Inc.
2014-10-31 04:01:10 +00:00
ae
33d2961d9a MFC r272770:
When tunneling interface is going to insert mbuf into netisr queue after stripping
  outer header, consider it as new packet and clear the protocols flags.

  This fixes problems when IPSEC traffic goes through various tunnels and router
  doesn't send ICMP/ICMPv6 errors.

PR:		174602
Sponsored by:	Yandex LLC
2014-10-30 13:53:57 +00:00
hselasky
1d17f744c7 MFC r273733, r273740 and r273773:
The SYSCTL data pointers can come from userspace and must not be
directly accessed. Although this will work on some platforms, it can
throw an exception if the pointer is invalid and then panic the kernel.

Add a missing SYSCTL_IN() of "SCTP_BASE_STATS" structure.

Sponsored by:	Mellanox Technologies
2014-10-30 08:04:48 +00:00
jilles
2b4fb09304 MFC r266842: netinet/in.h: Expose htonl(), htons(), ntohl() and ntohs() in
strict POSIX mode.

Put the htonl(), htons(), ntohl() and ntohs() declarations under
__POSIX_VISIBLE >= 200112. POSIX.1-2001 and newer require these to be
exposed from <netinet/in.h> (as well as <arpa/inet.h>).

Note that it may be unnecessary to check __POSIX_VISIBLE >= 200112 because
older versions of POSIX and the C standard do not define this header.
However, other places in the same file already perform the check.

PR:		188316
Submitted by:	Christian Neukirchen
2014-10-29 23:10:48 +00:00
jilles
971ac59143 MFC r264628: fcntl.h: Make visible various POSIX.1-2008 features.
Also, remove #if __BSD_VISIBLE where it is redundant. When __BSD_VISIBLE is
defined to 1, __POSIX_VISIBLE, __XSI_VISIBLE and __ISO_C_VISIBLE are also
defined to the newest supported version.

PR:		188173
2014-10-29 22:55:16 +00:00
sbruno
47c62aa0b0 MFC r272720, 273061, 273062, 273063, 273064
Implement PLPMTUD blackhole detection (RFC 4821), inspired by code
from xnu sources.  If we encounter a network where ICMP is blocked
the Needs Frag indicator may not propagate back to us.  Attempt to
downshift the mss once to a preconfigured value.

Note, this is turned off by default.
2014-10-29 22:17:45 +00:00
nwhitehorn
97d69448b8 MFC r271539,273003,273005:
Add ZFS support to the bsdinstall partition editor and sade

Submitted by:	Kurt Lidl (original version)
2014-10-29 16:48:18 +00:00