Commit Graph

15718 Commits

Author SHA1 Message Date
Allan Jude
a7d5d8d9d0 Add the Dell E7240 laptop and Intel DP965LT motherboard to the list for the GPT active workaround
PR:		194359
Requested by:	sbruno, hiren
Approved by:	marcel
MFC after:	3 days
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3139
2015-07-21 00:33:15 +00:00
Pedro F. Giffuni
d37cb73c79 snmp_hostres(3): Fix buffer overflow.
Actually just a typo. Detected by gcc + FORTIFY_SOURCE patches.

CID:		1007594
MFC after:	3 days
2015-07-20 16:08:01 +00:00
Xin LI
788aa07e34 Use fixed date/time (the time choosen was the time the import was done on
-HEAD) in libntp so we can make reproducible build.

PR:		bin/201661
Reviewed by:	gjb, cy, roberto
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D3122
2015-07-19 19:23:38 +00:00
Marcelo Araujo
f19e47d691 Add support to the jail framework to be able to mount linsysfs(5) and
linprocfs(5).

Differential Revision:	D2846
Submitted by:		Nikolai Lifanov <lifanov@mail.lifanov.com>
Reviewed by:		jamie
2015-07-19 08:52:35 +00:00
Allan Jude
7059fa6ff8 Add support for two workarounds for known issues booting GPT in legacy mode on some hardware
For Lenovo laptops with buggy bios (x220, t420, t520):
	Write the 0xee entry into the second slot in the pmbr instead of the first

For some Dell and HP models:
	The BIOS gives a warning message when booting in legacy mode from a GPT partitioned disk where the 0xee partition in the pmbr is not flagged active
	For models known to have this problem, mark the pmbr active during installation

Use smbios data to identify machines known to be affected by any of the above, and offer the user the option to apply the workaround

In bsdinstall's ufs auto mode (autopart partition wizard):
	Allow users to select which type of partition table to use
	Keep current defaults: MBR for BIOS, GPT for UEFI
	This allows users to choose GPT for legacy boot if they wish

PR:		184910
PR:		194359
Reviewed by:	Michael Dexter
Approved by:	marcel
MFC after:	3 days
X-MFC-With:	r285594
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3091
2015-07-18 18:49:44 +00:00
Edward Tomasz Napierala
f36b09c457 fstyp(8) ships with 10.2.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-07-18 12:03:51 +00:00
Edward Tomasz Napierala
d79b323ba9 uefisign(8) ships with 10.2.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2015-07-18 12:03:17 +00:00
Baptiste Daroussin
dac542123b make ctdladm(8) return 0 is everything was ok.
retval is used to test the return of XML_Parse function which is ok if 1 is
returned and retval it directly returned to the main function and used as an
exit value.

if all the parsing part is done reset retval to 0 so that the command return 0
if everything ok

Differential Revision:	https://reviews.freebsd.org/D3102
Reviewed by:	trasz
MFC after:	3 days
Sponsored by:	gandi.net
2015-07-17 19:10:43 +00:00
Justin Hibbits
8947c2986d Fix formatting. 2015-07-16 05:14:20 +00:00
Marcelo Araujo
e5523594ed Fix a warning spotted by gcc4.9: dereferencing type-punned pointer will break
strict-aliasing rules.

Declare some variables as statics as well as some functions that are internal
helpers. Update the function broadcast_result() to a post-K&R definition.

Differential Revision:	D2690
Reviewed by:		rodrigc, dim
2015-07-16 02:34:22 +00:00
Allan Jude
69e4b249f8 Make bsdinstall's zfsboot script align partitions to 4k/1m when the user requests it
PR:		195174
Reviewed by:	darius
Approved by:	brueffer
MFC after:	3 days
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3062
2015-07-14 19:57:10 +00:00
Allan Jude
7e3ebc5b0a Set a mountpoint on the root of the pool so user-created datasets have a mountpoint to inherit
Reviewed by:	darius
Approved by:	brueffer
MFC after:	3 days
Relnotes:	yes
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3063
2015-07-14 19:42:40 +00:00
Allan Jude
1bc080435c Have bsdinstall's zfsboot script make /var/audit its own dataset, so it is not part of the OS boot environment
PR:		199864
Submitted by:	Jason Unovitch
Approved by:	brueffer
MFC after:	3 days
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D2861
2015-07-14 19:38:26 +00:00
Allan Jude
4ffa3da5f8 Fix a typo in bsdinstall
A variable was misspelled resulting in chmod executing on the installer instead of on the target chroot

PR:		191402
Submitted by:	Martin Simmons <martin@lispworks.com>
Approved by:	brueffer
MFC after:	3 days
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D3061
2015-07-13 17:40:24 +00:00
Baptiste Daroussin
a70fbf7ef5 Really fix -o 2015-07-13 09:12:05 +00:00
Baptiste Daroussin
aa509e5e81 Add regression tests to ensure we keep allowing creating users with uid0 2015-07-13 09:09:09 +00:00
Baptiste Daroussin
d7747c3c6f Regression fix: allow to create users with uid0
Reported by:	Jan Mikkelsen <janm@transactionware.com>
2015-07-13 09:08:27 +00:00
Baptiste Daroussin
a46045bbfa Fix logic of check duplicates that has been inverted 2015-07-13 09:07:38 +00:00
Xin LI
8c377b430c Bump version after 4.2.8p3 import.
Note: currently 'mkver' script is using hardcoded knowledge and always
emits -a in the version string, a more through solution would be to generate
the script with something that we own.
2015-07-12 23:32:23 +00:00
Baptiste Daroussin
28b2f1294f Ensure skeldir is abolute path (relatively to the rootdir) 2015-07-12 22:08:58 +00:00
Baptiste Daroussin
ee8c5d1451 pw -R <rootdir> userdel can now cleanup installation
Rewrite rm_r to use *at function, allowing to remove home directories along with
users. only crontabs and at(1) installation are not removed

Relnotes:	yes
2015-07-12 21:43:57 +00:00
Baptiste Daroussin
65730d9349 Rework the home directory creation and copy or the skel content to use *at
functions

This allows to simplify the code a bit for -R by not having to keep modifying
path and also prepare the code to improve support -R in userdel

While here, add regression tests for the functionality
2015-07-12 20:29:51 +00:00
Allan Jude
f56cc610dc Remove excess copyright lines propogated by copy/paste
Approved by:	trasz
2015-07-12 19:16:19 +00:00
Jamie Gritton
3bbdb8a755 Run a shell in the jail when no command is specified.
Add a new flag, -l, for a clean environment, same as jail(8) exec.clean.
Change the GET_USER_INFO macro into a function.

PR:		201300
Submitted by:	Willem Jan Withagen
MFC after:	3 days
2015-07-12 17:03:50 +00:00
Baptiste Daroussin
67eea76de0 Add minimum regression tests for pw -R 2015-07-12 09:42:10 +00:00
Baptiste Daroussin
8a2ace2a78 Make getarg return NULL if args is NULL 2015-07-12 00:02:43 +00:00
Baptiste Daroussin
52f92d8c1d Fix regression: ensure when try to create the group and the user with the same
id if possible and nothing in particular was specified
2015-07-11 23:56:55 +00:00
Baptiste Daroussin
9c56d9c5e4 Remove now unused variable 2015-07-11 23:17:13 +00:00
Baptiste Daroussin
10e6a51cf3 Replace custom string array with stringlist(3) 2015-07-11 23:07:17 +00:00
Baptiste Daroussin
5ebd525aab Rework groupmod modification:
Use gr_add(3) when possible to avoid code duplication.
Use a simpler logic to delete members of a group
2015-07-11 22:35:07 +00:00
Baptiste Daroussin
8970fe5251 Remove unused argument from pm_passwd 2015-07-11 21:12:28 +00:00
Baptiste Daroussin
49c195e61e check the gecos format early: at the moment the -c option is parsed 2015-07-11 21:09:50 +00:00
Baptiste Daroussin
81e683d636 Remove useless use of goto 2015-07-11 20:18:34 +00:00
Baptiste Daroussin
04c25b678f Isolate pw lock/unlock into a separate function 2015-07-11 20:10:12 +00:00
Baptiste Daroussin
9dd1a593d2 homedir can only be populate during useradd 2015-07-11 19:14:09 +00:00
Baptiste Daroussin
d14c48479c Make a separate groupdel/userdel from the main function 2015-07-11 19:07:47 +00:00
Baptiste Daroussin
ae73dd9f37 Make separate functions to show users and groups 2015-07-11 18:09:27 +00:00
Baptiste Daroussin
8daa3a67ff Move the quiet flag into the configuration structure 2015-07-11 17:01:08 +00:00
Baptiste Daroussin
f936ccb5f8 Separate usernext/groupnext from the main functions 2015-07-11 16:58:47 +00:00
Baptiste Daroussin
0fc58d1446 Do not try to set password on group if the group is added as a consequence of
of creating a user (regression from r285136)

Reported by:	Fabian Keil <fk@fabiankeil.de>
2015-07-09 14:14:44 +00:00
Hiroki Sato
64bb8a3881 Implement PF_IMMUTABLE flag and apply it to "name" and "jid" in
jail.conf parameters.  This flag disallows redefinition of the parameter.

"name" and/or "jid" are automatically defined in jail.conf by using
the jail names at the front of jail parameter definitions.  However,
one could override them by using a variable with the same name like
$name = "foo".  This confused the parser and could end up with SIGSEGV.

Note that this change also affects a case when all of parameters are
defined in the command line arguments, not in jail.conf.  Specifically,
"jail -c name=j1 name=j2" no longer works.  This should be harmless.

PR:		196574
Reviewed by:	jamie
Differential Revision:	https://reviews.freebsd.org/D3017
2015-07-08 16:37:48 +00:00
Patrick Kelsey
8bdc5a6251 MFV r285191: tcpdump 4.7.4.
Also, the changes made in r272451 and r272653 that were lost in the
merge of 4.6.2 (r276788) have been restored.

PR: 199568
Differential Revision: https://reviews.freebsd.org/D3007
Reviewed by: brooks, hiren
Approved by: jmallett (mentor)
MFC after: 1 month
2015-07-08 16:19:32 +00:00
Patrick Kelsey
fe3ff217dd Replace use of .Po Pc with the preferred .Pq for single line
enclosures in iovctl.conf(5), iovctl(8), pci(9), and
pci_iov_schema(9).

Differential Revision: https://reviews.freebsd.org/D3000
Reviewed by: wblock
Approved by: jmallett (mentor)
2015-07-08 16:16:44 +00:00
Hiroki Sato
882efc9ac2 Fix offset calculation in variable substitution
in jail.conf.  The following did not work correctly:

 A="A_${B}_C_${D}"
 B="BBBBB"
 D="DDDD_${E}_FFFFF"
 E="EEEEE"

PR:		189139
Reviewed by:	jamie
Differential Revision:	https://reviews.freebsd.org/D3018
2015-07-08 00:51:53 +00:00
Baptiste Daroussin
59856c7d26 pw: fail if an invalid entry is found while parsing master.passwd and group
PR:		198554
Reported by:	diaran <fbsd@centraltech.co.uk>
MFC after:	2 days
2015-07-07 21:05:20 +00:00
Gregory Neil Shapiro
ccbcdcd550 Temporarily disable WARNS while addressing a non-issue with the upstream code 2015-07-07 02:30:35 +00:00
Neel Natu
ccfe4c3f74 Always assert DCD and DSR in bhyve's uart emulation.
The /etc/ttys entry for a serial console in FreeBSD/x86 is as follows:
ttyu0   "/usr/libexec/getty 3wire"      vt100   onifconsole secure

The initial terminal type passed to getty(8) is "3wire" which sets the
CLOCAL flag. However reset(1) clears this flag and any programs that try
to open the terminal will hang waiting for DCD to be asserted.

Fix this by always asserting DCD and DSR in the emulated uart.

The following discussion on virtualization@ has more details:
https://lists.freebsd.org/pipermail/freebsd-virtualization/2015-June/003666.html

Reported by: jmg
Discussed with: grehan
2015-07-06 19:33:29 +00:00
Patrick Kelsey
2ccda62ff8 Fix range upper bound for uint32_t and uint64_t, and reformat range
description for uint8_t, uint16_t, uint32_t, and uint64_t.

Differential Revision: https://reviews.freebsd.org/D2988
Reviewed by: rstone, wblock
Approved by: jmallett (mentor)
Sponsored by: Norse Corp, Inc.
2015-07-06 01:48:23 +00:00
Cy Schubert
21e17e1fc8 Update ntp version number. (This is a manual update that was missed.) 2015-07-05 16:48:40 +00:00
Cy Schubert
276da39af9 MFV ntp-4.2.8p3 (r284990).
Approved by:	roberto, delphij
Security:	VuXML: 0d0f3050-1f69-11e5-9ba9-d050996490d0
Security:	http://bugs.ntp.org/show_bug.cgi?id=2853
Security:	https://www.kb.cert.org/vuls/id/668167
Security:	http://support.ntp.org/bin/view/Main/SecurityNotice#June_2015_NTP_Security_Vulnerabi
2015-07-05 15:42:16 +00:00