11042 Commits

Author SHA1 Message Date
trasz
38906efd97 MFC r273464:
Whitespace fixes.

Sponsored by:	The FreeBSD Foundation
2014-11-22 17:50:14 +00:00
emaste
3df6bbce99 bsdgrep: Work-around for segmentation fault.
Fix by David Carlier.

MFC of r272127
Obtained from:	HardenedBSD
PR:		167921
2014-11-20 19:35:29 +00:00
marcel
a6b76a0b4d MFC r274410: Fix for behaviour of SEEK_DATA on ZFS. 2014-11-17 17:17:10 +00:00
smh
f6482d9897 MFC r260800:
Fix a regression introduced in r237618

MFC r260801:
Re-work r260800 to include other signals which start with 'I'
such as ILL, INFO etc.

Sponsored by:	Multiplay
2014-11-13 16:40:15 +00:00
delphij
7ba4eeedbf MFC r273507: Sync with NetBSD. 2014-11-08 00:51:31 +00:00
emax
3f28cd3e4f MFC r273548
Change the code to use the openpty(3) API which uses the pts(4) driver
instead of the pty(4) driver.

PR:		184597
Submitted by:	tobias.rehbein
2014-11-06 16:32:00 +00:00
ngie
9a57ba8bbc MFC r270650 (this is what should have been committed in r273497):
Convert LIBCURSES to LIBNCURSES to fix "make checkdpadd"

  Also, add a missing LIBPANEL dependency for lldb

  Approved by: rpaulo (mentor)
  Suggested by: brooks
  Phabric: D675 (as part of a larger diff)
  PR: 192762
2014-10-23 00:43:08 +00:00
ngie
f3b7cba370 MFC r263264 (by glebius):
Make talk(1) capable of displaying UTF-8 characters.

  Sponsored by:	Nginx, Inc.
2014-10-23 00:39:19 +00:00
markj
7d81889ecb MFC r271692:
Fix a typo.
2014-10-22 23:55:08 +00:00
rodrigc
538d05fbcc Merge: r269884
Complete the usr.bin/yacc kyua integration work I originally
submitted via r268811

- Install the Kyuafile by adding FILES to FILESGROUPS
- Run the testcases with an unprivileged user

  Some of the testcases depend upon behavior that's broken when
  run as root on FreeBSD because of how permissions are treated
  with access(2) vs eaccess(2), open(2), etc

- Simplify the test driver to just inspect the exit code from
  run_test because it now exits with 0 if successful and exits
  with !0 if unsuccessful
- Don't do ad hoc temporary directory creation/deletion; let Kyua
  handle that
- Add entries for files removed in r268811 to
  OptionalObsoleteFiles.inc

PR: 191020
X-MFC with: r268811
Approved by: jmmv (mentor)
Reviewed by: bapt
Sponsored by: EMC / Isilon Storage Division
2014-10-11 23:31:44 +00:00
rodrigc
094ca4bfbc Merge: r258931
Add missing bits from the vendor's 2005-05-04 change to
contrib/byacc/makefile.in ("add YYPATCH here so it can be tested by
applications") so that applications have a hope of detecting newer
FreeBSD YACC output from an older one.

Submitted by: Juniper Networks
2014-10-11 23:02:03 +00:00
rodrigc
6fdcea3e5e Merge: r268811
Update to byacc 20140715

PR:             191020
Submitted by:   gcooper (yaneurabeya@gmail.com)
2014-10-11 19:18:00 +00:00
emaste
31f18a365b MFC r272762: Correct scale factor for T terabyte suffix
PR:		194250
2014-10-11 00:30:57 +00:00
hrs
a95d28f371 MFC r271410:
Fix header output when -P is specified and (ncpus - 1) != maxid.
2014-10-09 23:42:22 +00:00
hrs
afd3460b01 MFC r266177:
- Do not override sin6_scope_id in LLA when it is already set to non-zero.
    This fixes destination list in output of netstat -r.
  - Plug a memory leak.
  - Add RTM_VERSION check.
2014-10-09 23:23:12 +00:00
hrs
200a7a67a4 MFC r266494:
- Fix a bug which can make sysctl() fail when -F is specified.
  - Increase WID_IF_DEFAULT() from 6 to 8 (the default for AF_INET6) because
    we have interfaces with longer names than 6 chars like epairN{a,b}.
  - Style fixes.
2014-10-09 22:54:51 +00:00
ae
142c064467 MFC r271307:
Add the ability to set `prefer_source' flag to an IPv6 address.
  It affects the IPv6 source address selection algorithm (RFC 6724)
  and allows override the last rule ("longest matching prefix") for
  choosing among equivalent addresses. The address with `prefer_source'
  will be preferred source address.
2014-10-09 02:49:33 +00:00
marcel
4742b8fd12 MFC r272485: Fill cyclinder, head and sector fields for the EBR,
MBR and PC98 schemes.

Requested by: gjb
2014-10-08 22:13:18 +00:00
marcel
f816038a40 MFC 272384:
Improve performance of mking(1).

Requested by: gjb
2014-10-08 22:09:36 +00:00
marcel
27db89ec69 MFC 272198, 272217:
Add 3 long options (--version, --formats & --schemes) for getting
information about mkimg itself.

Requested by: gjb

Relnotes:	yes
2014-10-08 22:06:38 +00:00
marcel
951d95ff86 MFC 271965, 272072, 272086: Add QCOW v1 & v2 support
Requested by: gjb

Relnotes:	yes
2014-10-08 22:01:35 +00:00
bapt
2014ab0354 MFC: r272398
Make sure to not skip any argument when converting from deprecated
+POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n
as it is expected

PR:		193994
Submitted by:	rodrigo
MFC after:	3 days
2014-10-06 09:15:09 +00:00
delphij
28944a4ef0 MFC r272288,272289:
When setting environment variables in the atrun script, use the
"export foo=bar" form instead of "foo=bar; export foo" since the
former allows the shell to catch variable names that are not valid
shell identifiers.  This will cause /bin/sh to exit with an error
(which gets mailed to the at user) and it will not run the script.

Obtained from:	OpenBSD (r1.63 millert)
Approved by:	re (gjb)
2014-10-02 18:26:40 +00:00
marcel
0eb256ebfd MFC 271881: Fix partition alignment and image rounding when any of
-P (block size),  -T (track size) or -H (number of heads) is given.

Approved by:	re@ (gjb)
2014-09-23 16:05:23 +00:00
marcel
a6288e6f8d MFC 271482: Add support for adding empty partition entries.
Relnotes:	yes
Approved by:	re@ (gjb)
2014-09-22 15:22:57 +00:00
marcel
df98102783 Be compatible with boot code that starts right after the disk label in
the second sector by only clearing the amount of bytes needed for the
disklabel in the second sector. Previously we were clearing exactly 1
sector worth of bytes and as such writing over boot code that may have
been there.
Since we do support more than 8 partitions, make sure to set all fields
in d_partitions. For the first 8 partitions this is unneeded, but for
partitioons 9 and up this compensates for the fact that we don't clear
an entire sector anymore.
Obviously, one cannot use more than 8 partitions when using boot code
that starts right after the disk label.

Relevant GRNs:
107879 - Employ unused bytes after the disklabel in the second sector.
189500 - Revert the part of change 107879 that employs the unused bytes
	 after the disklabel in the 2nd sector for boot code.

Obtained from:	Juniper Networks, Inc.

Approved by:	re@ (gjb)
2014-09-18 22:27:02 +00:00
marcel
3a41a0b0c1 Fix checksum calculation:
1.  Iterate over all partitions counted in the label, which can be more
   than the number of partitions given to mkimg(1).
2.  Start the checksum from the beginning of the label; not the beginning
   of the bootarea.

Tested with bsdlabel(8).

Approved by:	re@ (rodrigc)
2014-09-18 22:16:20 +00:00
allanjude
ddfed1e4ee MFC r271445,r271446,r271560:
Improve markup and language throughout the ctl.conf man page

MFC r271543:
Add the new iscsi(4) man page
Cross reference it from iscsid(8) and iscsictl(8)

Approved by:	re (gjb), bcr (mentor)
2014-09-18 03:02:00 +00:00
trasz
7619d6d5db MFC r271436:
Fix typo.

Approved by:	re (marius)
Sponsored by:	The FreeBSD Foundation
2014-09-15 13:19:40 +00:00
ngie
e55bc1f0d7 MFC r267176, r267181, r268445 (ATF-related commits):
Phabric: https://reviews.freebsd.org/D706
Approved by: rpaulo (mentor)
Approved by: re (gjb)
Reviewed by: jmmv
Sponsored by: EMC / Isilon Storage Division

r267176:

 Add the *_TESTS_SH_SED_* functionality to atf.test.mk.

 This exists already in plain.test.mk and tap.test.mk and should have been
 added to atf.test.mk too when the feature was first introduced.

 (It is probably time to address the related TODOs but I will do that
 separately.)

r267181:

 Move atf-sh from /usr/bin/ to /usr/libexec/

 In r266650, we made libatf-c and libatf-c++ private libraries so that no
 components outside of the source tree could unintendedly depend on them.

 This change does the same for the "atf-sh library" by moving the atf-sh
 interpreter from its public location in /usr/bin/ to the private location
 in /usr/libexec/.  Our build system will ensure that our own test programs
 use the right binary, but users won't be able to depend on atf-sh by
 "mistake".

 Committing this now to ride the UPDATING notice added with r267172 today.

r268445:

 Fix atf-sh's integration_test

 With the move of atf-sh into /usr/libexec in r267181, some of the
 tests in the integration_test program broke because they could not
 execute atf-sh from the path any longer.

 This slipped through because I do have a local atf installation in
 my home directory that appears in my path, hence the tests could
 still execute my own version.

 Fix this by forcing /usr/libexec to appear at the beginning of the
 path when attempting to execute atf-sh.

 To make upgrading easy (and to avoid an unnecessary entry in UPDATING),
 make integration_test depend on the Makefile so that a rebuild of the
 shell script is triggered.  This requires a hack in the *.test.mk files
 to ensure the Makefile is not treated as a source to the generated
 program.  Ugly, I know, but I don't have a better way of doing this at
 the moment.  Will think of one once I address the TODO in the *.test.mk
 files that suggests generalizing the file generation functionality.

 PR:		191052
 Reviewed by:	Garrett Cooper
2014-09-09 04:00:30 +00:00
ae
7bed52c05c MFC r270927:
Add the reverse part to rule #9. Also change its description in the
  netstat(8) output.

Approved by:	re (gjb)
2014-09-08 19:40:59 +00:00
markj
5a094736fb MFC r270348:
Add some missing checks for unsupported interfaces (e.g. pflog(4)) when
handling ioctls. While here, remove duplicated checks for a NULL ifp in
in6_control(): this check is already done near the beginning of the
function.

MFC r270349:
Suppress warnings when retrieving protocol stats from interfaces that
don't support IPv6 (e.g. pflog(4)).

PR:		189117
Approved by:	re (gjb)
2014-09-06 04:39:26 +00:00
jhb
e5fbff9d81 MFC 270674:
Clarify that the -c argument clears the list of tracepoints specified by
-t (it does not clear all tracepoints).

Approved by:	re (gjb for 10)
2014-09-05 17:22:20 +00:00
se
395db98c3c MFC r270647: Add references to vt(4) and the configuration files in /usr/sha
MFC r270653: Update man-pages to correctly refer to changed pathes and namin
MFC r270657: More man pages that need to know about vt in addition to syscon
MFC r270659: (by pluknet@) Missed comma.
MFC r270660: Back-out the references to vt(4) from this man-page. It appears
MFC r270933: Add references to vt(4) to further man-pages.
MFC r270934: Final patches to the tools used to convert syscons keymaps for
MFC r270935: Add vt(4) support to the console initialisation script, specifi

Second batch of MFCs to add support for Unicode keymaps for use with vt(4).

It contains the following changes:

- Add references to vt(4) to relevant man-pages.
- Update comment in defaults/rc.conf to mention vt
- Update rc.d/syscons to warn about syscons keymaps used under vt.
  An attempt is made to identify the vt keymap to load instead.
- Minor changes to the conversion tool based on mail comments on keymaps.

Relnotes:	yes
2014-09-04 13:45:16 +00:00
emaste
1c035447bc MFC elfdump improvements
r269092: Improve section type reporting

  The SHT range 0x70000000-0x7fffffff is processor-specific.  Pass the
  ELF machine type header to sh_types so the section header type name can
  be reported correctly for the given processor.

  For all ranges report the actual value for unknown types.

  Add MIPS-specific type SHT_MIPS_OPTIONS.

r269143 (andreast): Further improvements on elfdump, to follow up r269092:

  - Add ARM specific section header types.
  - Add SHT_GNU_HASH section header type.
  - Improve reporting of undefined tags in d_tags.
  - Add DT_GNU_HASH tag.

  Reviewed by:	emaste

r269337: add EM_AARCH64 64-bit ARM machine architecture

r269338: use existing ELF constants where available

r270303: Rename DT_FEATURE_1 to DT_FEATURE

  This provides a minor cleanup in elfdump; there are otherwise no
  consumers in the tree.  Old SUN documentation can be found for either
  variant, but GNU binutils switched to DT_FEATURE around 2000.

r270304: Remove extraneous _SUNW_ in reported DT_ names

Sponsored by:	The FreeBSD Foundation
2014-09-02 15:49:33 +00:00
ngie
b02a11f4a7 MFC r270432:
Fix "make checkdpadd" in usr.bin/iscsictl by removing -lfl dependency

  Approved by: rpaulo (mentor)
  MFC after: 1 week
2014-09-01 01:39:20 +00:00
ngie
b7b1b100cc MFC r266650, r267172 (both by jmmv):
r266650:

  Change libatf-c and libatf-c++ to be private libraries.

  We should not be leaking these interfaces to the outside world given
  that it's much easier for third-party components to use the devel/atf
  package from ports.

  As a side-effect, we can also drop the ATF pkgconfig and aclocal files
  from the base system.  Nothing in the base system needs these, and it
  was quite ugly to have to get them installed only so that a few ports
  could build.  The offending ports have been fixed to depend on
  devel/atf explicitly.

  Reviewed by:  bapt

r267172:

  Homogenize libatf-* version numbers with upstream.

  The libatf-* major version numbers in FreeBSD were one version ahead of
  upstream because, when atf was first imported into FreeBSD, the upstream
  numbers were not respected.  This is just confusing and bound to cause
  problems down the road.

  Fix this by taking advantage of the fact that libatf-* are now private
  and that atf is not yet built by default.  However, and unfortunately, a
  clean build is needed for tests to continue working once "make
  delete-old-libs" has been run; hence the note in UPDATING.

Phabric: D701
Approved by: jmmv (maintainer, mentor)
2014-08-31 23:09:23 +00:00
jilles
1c7ffe4762 MFC r256800: pathchk: Ensure bytes >= 128 are considered non-portable
characters.

This was not broken on architectures such as ARM where char is unsigned.

Also, remove the first non-portable character from the output. POSIX does
not require this, and printing the first byte may yield an invalid byte
sequence with UTF-8.

PR:		165988
Reported by:	Nicolas Rachinsky
Relnotes:	yes
2014-08-31 20:34:06 +00:00
trasz
bd6edcc077 MFC r270279:
Make the iSCSI stack use __FBSDID() properly.

Sponsored by:	The FreeBSD Foundation
2014-08-31 20:21:08 +00:00
gjb
3bf1a4440d MFC r270668, r270669, r270672:
r270668:
  Add gnugrep.1 to CLEANFILES.

r270669:
  Add host.1 to CLEANFILES.

r270672:
  Add svnlite.1 to CLEANFILES.

Sponsored by:	The FreeBSD Foundation
2014-08-29 01:20:31 +00:00
pfg
564b330f17 MFC r270256:
Always check the limits of array index variables before using them.

Obtained from:	DragonFlyBSD
2014-08-28 18:11:05 +00:00
peter
644cd5de6d MFC r270062: switch rpc mount protocol for showmount and umount from
mountv1 to mountv3 - it breaks by default on the new netapp release with
the legacy protocols removed.
2014-08-21 04:31:48 +00:00
eadler
7d882e21ec MFC r265256:
Syntax fix
2014-08-21 04:26:16 +00:00
ache
3b103d7c51 MFC: r269806,r269809,r269811,r269810
r269806:
Fix too long (seed length >12 chars) challenge handling.
1) " ext" length should be included into OPIE_CHALLENGE_MAX (as all places
of opie code expects that).
2) Overflow check in challenge.c is off by 1 even with corrected
OPIE_CHALLENGE_MAX
3) When fallback to randomchallenge() happens and rval is 0 (i.e.
challenge is too long), its value should be set to error state too.

To demonstrate the bug, run opiepasswd with valid seed:
opiepasswd -s 1234567890123456
and notice that it falls back to randomchallenge() (i.e. no
1234567890123456 in the prompt).

r269809:
When sha1 support was added, they forget to increase OPIE_HASHNAME_MAX

r269811:
Last '/' for program name, not first one.

r269810:
Link otp-sha1 to match real challenge prompt, not otp-sha.

PR:     191511
Submitted by: mitsururike@gmail.com (partially, PR 269806)
2014-08-18 02:13:45 +00:00
bz
4e0609eb85 MFC r261525:
Print the MD5 signature information introduced in r221023 (head) in the
 TCP statistics output.
2014-08-16 13:25:49 +00:00
trasz
5bc1b6b16a MFC r267615:
Rename a variable; no functional changes.

Sponsored by:	The FreeBSD Foundation
2014-08-14 12:33:24 +00:00
trasz
b94d41f0ae MFC r267614:
Add "iscsictl -M", which allows one to change session parameters
without removing it and adding back.

Sponsored by:	The FreeBSD Foundation
2014-08-14 12:31:18 +00:00
gavin
b3d4f13333 Merge r268842 from head:
Fix two typos in iscsictl.8

PR:		191581
Submitted by:	Jimmy Olgeni
2014-08-13 12:47:51 +00:00
marcel
8760318092 MFC 269745: Create a redundant grain directory and table. 2014-08-13 01:43:38 +00:00
peter
72d63a715a MFC r266728,266731,266735,266736,268135,268960,269833
Update apr 1.4.8 -> 1.5.1
 Update apr-util 1.5.2 -> 1.5.3
 Update serf 1.3.4 -> 1.3.7
 Update svnlite 1.8.8 -> 1.8.10
 Deal with svnlite.1 manpage.
2014-08-12 01:40:11 +00:00