Commit Graph

15960 Commits

Author SHA1 Message Date
Xin LI
6bce9a1004 Use strlcpy().
MFC after:	2 weeks
2015-10-30 00:33:03 +00:00
Bryan Drewery
b1585b5a06 Fix unlikely memory leak.
It is unlikely since the first check in the function is that dir[0] is '/',
but later code changes may make it real.

Coverity CID:	1332104
2015-10-29 18:29:28 +00:00
Bryan Drewery
e6b0222d60 Include libutil's headers directly from src to avoid recording a dirdeps
dependency for META MODE.
2015-10-28 16:31:04 +00:00
Bryan Drewery
985dfe52e9 Connect mpsutil for META MODE. 2015-10-28 16:22:00 +00:00
Baptiste Daroussin
c94fbe2671 Connect mpsutil(8) to the build
Sponsored by:	Gandi.net
2015-10-28 12:31:29 +00:00
Baptiste Daroussin
11d38a5764 Merge from head
Sponsored by:	Gandi.net
2015-10-28 11:58:18 +00:00
Baptiste Daroussin
4080404605 Fix a typo in the comment about the include guard
Sponsored by:	Gandi.net
2015-10-28 11:29:58 +00:00
Baptiste Daroussin
08a1f267fa Remove more of the mptutil unused code
Sponsored by:	Gandi.net
2015-10-28 11:28:46 +00:00
Baptiste Daroussin
5114c60e8a Remove some unused code from the mptutil(8)
The code from mptutil living in the same source tree the day those functions
will be implemented in the mpsutil(8) it can be copy/paste easily

Sponsored by:	Gandi.net
2015-10-28 11:25:28 +00:00
Baptiste Daroussin
76103694a0 Reduce overlinking, for now neither cam nor libutil are needed
Sponsored by:	Gandi.net
2015-10-28 11:20:55 +00:00
Baptiste Daroussin
64dbc39cd3 Do enforce "-g", DEBUG_FLAGS can be user if one want to set it
Sponsored by:	Gandi.net
2015-10-28 11:18:43 +00:00
Baptiste Daroussin
04be2b8b7a Replace the manpage with one that actually describes the utility
Sponsored by:	Gandi.net
2015-10-28 11:06:04 +00:00
Bryan Drewery
edc6ea2ae9 Remove unneeded NAME override.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-27 23:35:08 +00:00
Bryan Drewery
7d8f797b72 Use more appropriate ${SHAREDIR} rather than /usr/share.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-27 23:35:02 +00:00
Scott Long
883bb7e941 Add copyright for Netflix for the files that changed from mptutil 2015-10-27 20:56:57 +00:00
Scott Long
aa307236af Remove mps_config.c, it's unused. 2015-10-27 20:56:34 +00:00
Xin LI
427c435f64 Revert r289269 for now. After looking at share/zoneinfo/Makefile this could
potentially break non-root installs and we need a better solution, probably
by doing it differently when no UI is involved.
2015-10-27 01:26:50 +00:00
Enji Cooper
dc50fb3673 Add a regression test for r289899 to validate rockridge encoding
of device types

X-MFC with: r289899
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-24 23:21:08 +00:00
Enji Cooper
fb9ab5ec6b Remove an ls -l I was using for debugging
MFC after: 2 weeks
X-MFC with: r289897
Sponsored by: EMC / Isilon Storage Division
2015-10-24 23:19:24 +00:00
Enji Cooper
fc002adafd Import the fix from NetBSD kern/48852 (sic) to fix rockridge encoding of
device nodes

In particular, use st_rdev (the device type), not st_dev (the device inode),
and fix the comparison to be correct with the st_rdev field

Bug 203648
MFC after: 2 weeks
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 1008927
Sponsored by: EMC / Isilon Storage Division
2015-10-24 23:16:13 +00:00
Enji Cooper
fc2b053656 Add more cd9660/FFS makefs testcases
General changes:
- Parameterize out the mount command.
- Use mtree to verify the contents of an image (check_image_contents) instead
  of using diff (diff verifies content, but not file metadata).
- Move common logic out to functions (common_cleanup, mount_image,
  check_image_contents)
- Add stub testcases for makefs -D (crashes with SIGBUS, similar to bug # 192839)
- Add a note about the ISO-9660 and rockridge specs
- Add testcases that exercise:
-- Creating disk images from an mtree and multiple directories.
-- -F flag use (not really an extensive testcase right now)

cd9660-specific test changes:

- Remove an XXX comment about symlinks; I forgot that non-rockridge images turn
  symlinks into hardlinks.
- Add testcases that exercise:
-- -o allow-deep-trees
-- -o allow-max-name stub testcase (doesn't seem to be implemented in makefs)
-- -o preparer (existence in image; not conformance to spec)
-- -o publisher (existence in image; not conformance to spec)
-- -o rockridge (basic)

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-24 22:12:23 +00:00
Baptiste Daroussin
c91d99bf1c newsyslog.conf: allow to configure the signal using the signal name.
Submitted by:	Alexandre Perrin <alex@kaworu.ch>
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D3961
2015-10-24 13:55:12 +00:00
Gleb Smirnoff
01ddbee86b A miss from r289764. 2015-10-23 05:03:34 +00:00
Baptiste Daroussin
d9a4f21fa7 Stop suggesting -grope argument when -grope argument was actually given 2015-10-22 21:13:35 +00:00
Gleb Smirnoff
9034852c84 MFV ntp-4.2.8p4 (r289715)
Security:       VuXML: c4a18a12-77fc-11e5-a687-206a8a720317
Security:	CVE-2015-7871
Security:	CVE-2015-7855
Security:	CVE-2015-7854
Security:	CVE-2015-7853
Security:	CVE-2015-7852
Security:	CVE-2015-7851
Security:	CVE-2015-7850
Security:	CVE-2015-7849
Security:	CVE-2015-7848
Security:	CVE-2015-7701
Security:	CVE-2015-7703
Security:	CVE-2015-7704, CVE-2015-7705
Security:	CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
Security:	http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner
Sponsored by:	Nginx, Inc.
2015-10-22 19:42:57 +00:00
Hiroki Sato
c8b84e5330 - Fix a bug which prevented dnssl[0-9] and rdnss[0-9] parameters from
working.

- Fix a pointer calculation for padding when multiple dnssl[0-9]
  parameters are specified [*].

Reported by:	http://bugs.dragonflybsd.org/issues/2847 [*]
2015-10-22 09:55:40 +00:00
Enji Cooper
68dd37f7b4 Exit with a user-friendly message instead of tripping an assert
if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..)

MFC after: 1 week
PR: 203884
Reviewed by: grehan
Submitted by: William Orr <will@worrbase.com>
2015-10-22 08:37:11 +00:00
Enji Cooper
66845bf5c5 Revise "create_test_inputs" to simplify the file structure as
these testcases don't need to be nested as much as bin/ls/ls_tests.sh
do when verifying ls -a, ls -A, etc. This allows the tests to make
all paths relative to the top of the temporary directory instead of
always tacking on $ATF_TMPDIR, thus complicating things unnecessarily

Create non-empty files in create_test_inputs as well now, similar to
create_test_inputs2 in bin/ls/ls_tests.sh

Compare the input files to the output file contents using diff where
possible:
- Skip over the fifo comparison for now because it always fails
- Skip over the symlink comparison on cd9660 because it always fails
  today

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks
X-MFC with: r289739
2015-10-22 07:22:05 +00:00
Enji Cooper
7bdfc3b75e Correctly reintroduce the rudimentary smoke tests I botched up
in r289684

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-22 05:32:45 +00:00
Enji Cooper
6cf8c0fe51 Revert r289694
I committed some other undesirable local changes by accident
2015-10-21 13:15:04 +00:00
Enji Cooper
b4c3ec123e Add some rudimentary [smoke] testcases for makefs
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-21 13:13:38 +00:00
Enji Cooper
42afd55d1e Unbreak makefs -t cd9660 after r289687
buffer_head needs to be freed -- not buffer

Detected by jemalloc, i.e. running makefs failed the arena assert
because my copy of malloc on CURRENT is compiled with the default
!MALLOC_PRODUCTION asserts on

Pointyhat to: ngie
PR: 203647
X-MFC with: r289687
Sponsored by: EMC / Isilon Storage Division
2015-10-21 12:54:15 +00:00
Enji Cooper
b73321f086 Free buffer before returning from cd9660_write_path_table to avoid
leaking it after returning from the function

MFC after: 1 week
PR: 203647
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 978431
Sponsored by: EMC / Isilon Storage Division
2015-10-21 11:38:48 +00:00
Eitan Adler
463a577b27 Fix a ton of speelling errors
arc lint is helpful

Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com
Differential Revision: https://reviews.freebsd.org/D3337
2015-10-21 05:37:09 +00:00
Maksim Yevmenkin
f32d9c4bd3 check boundaries while parsing SDP responses
Reported by:	hps
Reviewed by:	hps
MFC after:	1 week
2015-10-20 18:01:08 +00:00
Enji Cooper
d2a489eb1a Don't check if val is NULL before calling free; free(3) already
handles this

MFC after: 1 week
PR: 203649
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 1305659
Sponsored by: EMC / Isilon Storage Division
2015-10-19 18:45:14 +00:00
Enji Cooper
0fbf8c6085 Initialize quiet to false so pw groupnext again prints out the next gid
by default

Reported by: Florian Degner <f.degner@gmx.de>
MFC after: 1 week
PR: 203876
Sponsored by: EMC / Isilon Storage Division
2015-10-19 18:29:32 +00:00
Rui Paulo
325151a32e Update hostapd/wpa_supplicant to version 2.5.
Tested by several people on current@/wireless@.

Relnotes:	yes
2015-10-18 21:38:25 +00:00
Baptiste Daroussin
c05f3be9a5 Remove the now not needed diff used to switch the tool from mps to mpr
Sponsored by:	Gandi.net
2015-10-16 09:37:15 +00:00
Baptiste Daroussin
9b51f8578a Fix some alignement in the output
Sponsored by:	Gandi.net
2015-10-15 17:16:17 +00:00
Baptiste Daroussin
5a92b27175 Add generic storage structure for both mpr and mps to simplify code
Use correct ioctl on mpr
Prevent duplication in headers between mps_ioctl.h and mpr_ioctl.h

Sponsored by:	Gandi.net
2015-10-15 15:51:40 +00:00
Baptiste Daroussin
3f4fe35d6c Correctly print the device name of the adapter
Sponsored by:	Gandi.net
2015-10-15 15:24:13 +00:00
Baptiste Daroussin
48f31f4fef Make mpsutil open the mpr devices when named mprutil
Make mprutil a hardlink to mpsutil

Sponsored by:	Gandi.net
2015-10-15 15:19:38 +00:00
Ed Maste
7e1ed2c72c Add debug file extension to freebsd-update(8) after r288176
Reviewed by:	delphij
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D3784
2015-10-15 01:48:52 +00:00
Xin LI
a2668e8128 Use chroot(2) instead of using prefixes for files.
Previously, the code prefixes the chroot path to actual file paths to
simulate the effect.  This, however, will not work for tzset(3) which
expects the current system have a working set of timezone data files,
and that is not always the case.

This changeset simplifies the handling of paths and use an actual
chroot(2) call to implement the effect.

PR:		bin/197313
MFC after:	2 weeks
2015-10-13 22:55:17 +00:00
Rui Paulo
8ed645520e Fix two memory leaks in config(8).
PR:		202145
Submitted by:	Kurt Lidl <lidl pix.net>
2015-10-13 20:25:03 +00:00
Sean Bruno
24484ca4bf makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily
checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel
module sanity checks do not like zero fs_old_size value and skips such UFS1
file system while tasting (fs_old_size derives from sblock.fs_providersize).

PR:	203704
Submitted by:	eugen@grosbein.net
Reviewed by:	marcel
2015-10-13 17:00:14 +00:00
Adrian Chadd
a08b904c5e makefs: introduce a new option to specify what to round the resulting
image up to.

From ticket:

While trying to run FreeBSD/mips on some device having very small flash media,
one is forced to compress file system with mkulzma(8) utility. It is desirable
to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8)
and big compression block size like 65535 bytes to mkulzma at the same time.
Then one obtains very good comression ratios (like 75% and more) but faces
the following problem.

geom_uncompress kernel module reports GEOM provider size rounded up to its
compression block size. Generally, this changes original media size and now
it fails to match the size of embedded UFS file system that leads to other
problems, f.e. geom_label kernel module does not like this and skips the
file system while tasting the GEOM and looking for UFS label.

This makes it impossible to refer to the file system using known UFS label
instead of something like /dev/map/rootfs.uncompress.

The following patch introduces new command line option "-r roundup" for makefs
that makes it round up the image to specified block size. Hence, geom_uncompress
does not change GEOM media size for images rounded that way and geom_label
accepts such GEOMs just fine.

With the patch applied, one can use following commands:

$ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs
$ mkulzma -s 65536 -o fs.img.ulzma fs.img

PR:		bin/203707
Submitted by:	<eugen@grosbein.net>
2015-10-13 02:32:15 +00:00
Enji Cooper
b2d48be1bc Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison
2015-10-12 08:16:03 +00:00
Baptiste Daroussin
f98f68bd50 Use existing CONFDIR instead of adding a new CONFIGDIR
Reported by:	jbeich
2015-10-11 19:25:39 +00:00