Commit Graph

16088 Commits

Author SHA1 Message Date
Glen Barber
8834318685 Merge ^/projects/release-install-debug:
- Rework MANIFEST generation and parsing via bsdinstall(8).
- Allow selecting debugging distribution sets during install.
- Rework bsdinstall(8) to fetch remote debug distribution sets
  when they are not available on the local install medium.
- Allow selecting additional non-GENERIC kernels during install.
  At present, GENERIC is still required, and installed by default.

Tested with:	head@r293203
Sponsored by:	The FreeBSD Foundation
2016-01-05 21:05:17 +00:00
Jilles Tjoelker
43d53dba8f Add sbin and /usr/local directories to _PATH_DEFPATH.
Set _PATH_DEFPATH to
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin. This is the
path in the default class in the default /etc/login.conf,
excluding ~/bin which would not be expanded properly in a string
constant.

For normal logins, _PATH_DEFPATH is overridden by /etc/login.conf,
~/.login_conf or shell startup files. _PATH_DEFPATH is still used as a
default by execlp(), execvp(), posix_spawnp() and sh if PATH is not set, and
by cron. Especially the latter is a common trap (most recently in PR
204813).

PR:		204813
Reviewed by:	secteam (delphij), alfred
2016-01-05 16:21:20 +00:00
Ed Maste
647129e382 kbdmap.5: Use current names for ASCII control codes lf, ff, us
Refer to the old names nl, np, ns as historical aliases.

PR:		205776, 205778
MFC After:	1 week
Sponsored by:	The FreeBSD Foundation
2016-01-02 18:35:11 +00:00
Josh Paetzel
21d7e927b5 Unset the gss kernel state when gssd exits
When gssd exits it leaves the kernel state set by
gssd_syscall().  nfsd sees this and waits endlessly
in an unkillable state for gssd to come back.  If you
had acidentally started gssd then stopped it, then
started nfsd you'd be in a bad way until you either
restarted gssd or rebooted the system.  This change
fixes that by setting the kernel state to "" when
gssd exits.
Reviewed by:	rmacklem
MFC after:	1 week
Sponsored by:	iXsystems
2016-01-01 17:06:16 +00:00
Bjoern A. Zeeb
cc398e2151 Remove unused variable after r292981 to unbreak the build. 2015-12-31 10:55:50 +00:00
Marcelo Araujo
3ec1cff529 Clean up unused-but-set-variable spotted by gcc-4.9.
Reviewed by:	grehan
Approved by:	rodrigc (mentor)
Differential Revision:	https://reviews.freebsd.org/D4734
2015-12-31 07:08:21 +00:00
Marcelo Araujo
09df572391 Clean up unused-but-set-variable spotted by gcc-4.9.
Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D4736
2015-12-31 01:57:55 +00:00
Marcelo Araujo
d74fdc6a35 Clean up unused-but-set-variable spotted by gcc-4.9.
Reviewed by:	grehan
Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D4735
2015-12-31 01:55:51 +00:00
Enji Cooper
5e25b19e29 Fix getopt(3) argument after r290180; I forgot to change -r to -R
by accident

MFC after: 3 days
Pointyhat to: ngie
Reported by: vangyzen
Sponsored by: EMC / Isilon Storage Division
2015-12-29 20:17:40 +00:00
Ulrich Spörlein
c9e1c304c1 Fix type mismatches for malloc(3) and Co.
This is rather pedantic, as for most architectures it holds that
sizeof(type *) == sizeof(type **)

Found by:	clang static analyzer
Reviewed by:	ed
Differential Revision: https://reviews.freebsd.org/D4722
2015-12-29 11:24:41 +00:00
Baptiste Daroussin
49d448f523 Simplify code for parsing extra groups 2015-12-29 00:08:32 +00:00
Baptiste Daroussin
4fc9390e7e Remove useless assignement of linelen 2015-12-29 00:02:08 +00:00
Baptiste Daroussin
36a8b62f3a Restore dryrun support for pw groupmod 2015-12-28 23:57:22 +00:00
Devin Teske
ed27536fd5 Explicitly set permissions on entropy files
Differential Revision:	https://reviews.freebsd.org/D3933
Submitted by:	jmg
Reviewed by:	delphij, markm
Approved by:	secteam (delphij)
MFC after:	3 days
X-MFC-to:	stable/10 stable/9
2015-12-28 17:27:20 +00:00
Xin LI
ca001338d8 Eliminate unneeded includes.
Reviewed by:		allanjude
Differential Revision:	https://reviews.freebsd.org/D4716
2015-12-28 08:53:31 +00:00
Marcelo Araujo
daa3baeb1d The sdp opens the database with PERM_SECURE mode and it is different than
dp that opens the database with PERM_INSECURE, so we need to check sdp->put
against sdp instead of use dp->put.

PR:		bin/191720
Submitted by:	Miles Ohlrich <turingsboy@yahoo.com>
Approved by:	rodrigc (mentor)
Differential Revision:	https://reviews.freebsd.org/D4255
2015-12-28 05:48:22 +00:00
Allan Jude
b5e81ea6b0 Fix includes in usr.sbin/fstyp/zfs.c
Approved by:	bapt (mentor)
MFC after:	1 week
Sponsored by:	ScaleEngine Inc.
Differential Revision:	https://reviews.freebsd.org/D4710
2015-12-26 19:48:36 +00:00
Baptiste Daroussin
8c18e026ba camadd does not require linking to libsbuf or libbsdxml directly 2015-12-24 11:43:32 +00:00
Pedro F. Giffuni
587d674e16 Undo change from r292607 that was not meant to be there
Pointyhat: me
2015-12-22 15:42:53 +00:00
Pedro F. Giffuni
d985028157 cron: Check the return value of pipe(2)
Fix inspired by:	OpenBSD (rev 1.56)
CID:	1009830
2015-12-22 15:32:45 +00:00
Pedro F. Giffuni
7044922b39 crontab: properly free an entry
This should close memory leak.

Obtained from:	OpenBSD (rev. 1.62)
CID:		271773
2015-12-22 15:30:26 +00:00
Pedro F. Giffuni
c28c984689 crontab: replace malloc + bzero with calloc
Obtained from:	OpenBSD (Rev 1.20)
2015-12-22 15:20:08 +00:00
Enji Cooper
e830a247a1 Prevent use-after-free with ctx->ns in set_nameservers(..), which could occur
if the memory wasn't allocated again later on

Reported by: Coverity
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-12-22 05:57:23 +00:00
Craig Rodrigues
cbbaf9b2b1 Add libxo support to jls
PR:                    200746
Submitted by:          Emmanuel Vadot <manu bidouilliste com>
Reviewed by:           allanjude
Relnotes:              yes
Differential Revision: https://reviews.freebsd.org/D4452
2015-12-22 00:58:35 +00:00
Ian Lepore
91ee346313 Make the building of libsmb and mount_smbfs unconditional, now that r292552
has eliminated alignment and endian problems that were making it fail on
some platforms.

PR:        180438
PR:        189415
2015-12-21 17:41:08 +00:00
Ed Maste
203b6f692c makefs: use ENTRY macro for diff reduction with NetBSD
Sponsored by:	The FreeBSD Foundation
2015-12-21 16:12:41 +00:00
Hajimu UMEMOTO
cf245b1092 Fix indent after r292333. 2015-12-19 09:18:01 +00:00
John Baldwin
32960dd10a Fix the precious change to check the pointer returned by malloc().
Submitted by:	luke <luke.tw@gmail.com>
Pointy hat to:	jhb
2015-12-18 17:52:08 +00:00
Hajimu UMEMOTO
00022bd089 Generate ipnodes.by{addr,name} from /etc/hosts for compatibility with
FreeBSD local name resolution.
If /var/yp/ipnodes exists, we generate them from it for backward
compatibility.

Inspired by:	NetBSD
MFC after:	1 week
2015-12-18 17:30:22 +00:00
Hajimu UMEMOTO
4ba79bb433 - Keep hosts.by{name,addr} IPv4 only.
- Add comment how we handle hosts and ipnodes. (from NetBSD)

MFC after:	1 week.
2015-12-18 11:20:50 +00:00
John Baldwin
b128c3c395 Exit cleanly if malloc() fails to allocate a buffer for a copy of the
current MBR.

PR:		205322
Submitted by:	Alexander Kuleshov <kuleshovmail@gmail.com>
MFC after:	1 week
2015-12-17 20:42:05 +00:00
Ian Lepore
7f84b7b298 Build mount_smbfs for arm. Also sort the subdirs. 2015-12-16 15:26:31 +00:00
Alexander V. Chernikov
427c2f4ef0 Provide additional lle data in IPv6 lltable dump used by ndp(8).
Before the change, things like lle state were queried via
  SIOCGNBRINFO_IN6 by ndp(8) for _each_ lle entry in dump.
This ioctl was added in 1999, probably to avoid touching rtsock code.

This change maps SIOCGNBRINFO_IN6 data to standard rtsock dump the
 following way:
  expire (already) maps to rtm_rmx.rmx_expire
  isrouter -> rtm_flags & RTF_GATEWAY
  asked -> rtm_rmx.rmx_pksent
  state -> rtm_rmx.rmx_state (maps to rmx_weight via define)

Reviewed by:	ae
2015-12-16 10:14:16 +00:00
Marcelo Araujo
6d652b139e Remove a garbage printf used for debug.
Approved by:	bapt (mentor implicit)
2015-12-15 15:46:14 +00:00
Marcelo Araujo
84e29f233a Remove the null checker before free.
Approved by:	bapt (mentor)
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D4549
2015-12-15 15:42:42 +00:00
Marcelo Araujo
474fa6a744 Remove wrong header and the NULL check before free().
Approved by:	bapt (mentor)
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D4548
2015-12-15 15:41:09 +00:00
Marcelo Araujo
7433efffe3 EAGAIN handling for imsg_read.
Approved by:	bapt (mentor)
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D4547
2015-12-15 15:37:58 +00:00
Baptiste Daroussin
60f466403f Show the enclosure name and id in sesutil map
Sponsored by:	Gandi.net
2015-12-15 13:01:14 +00:00
Christian Brueffer
9f9d157d82 Flesh out the SEE ALSO section.
PR:		202929
Submitted by:	jhs@berklix.com
MFC after:	1 week
2015-12-14 15:44:34 +00:00
Baptiste Daroussin
96e6c444c3 Fix sesutil locate when a sesid is passed to locate command 2015-12-11 21:11:02 +00:00
Baptiste Daroussin
d7654478d3 sesutil: Add extra information specific to some SES devices to sesutil map
Rework stat2ascii preparing a buffer of what could be printed. This prevent the
risk of overflowing a static buffer.

Do not print those informations anymore in the "status" but into a new
"extra status" only printed if there are actually extra things to print.

Now add those extra informations:

* Thermal sensor temperature
* Cooling devices speed
* Voltage sensors, current consumption

Tested by:	AllanJude
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D4520
2015-12-11 20:45:39 +00:00
Ed Maste
c8daf7a00f crunchide: add RISC-V to supported machine types
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-12-11 13:55:31 +00:00
Baptiste Daroussin
f57605fb7d sesutils, pass the correct element type when printing the status of a given
element of the ses.

Sponsored by:	Gandi.net
2015-12-11 11:08:00 +00:00
Baptiste Daroussin
845614cd22 sesutil: fix map not printing the status of the LED device in an array
Sponsored by:	Gandi.net
2015-12-11 10:58:26 +00:00
Warner Losh
493b2041d6 Augment kldxref to find the new MODULE_PNP_INFO records now in
modules, simplify them into a more normal form and write them to
linker.hints.

Differential Review: https://reviews.freebsd.org/D3461
2015-12-11 05:27:55 +00:00
Randall Stewart
eef0660a7f Fix several typos and bugs within pmcstudy. Also highlight the one SB test
that is failing (and is likely a problem in the actual PMC defintions). Add
to this also the -A option to run all canned tests.

Sponsored by:	Netflix Inc.
2015-12-10 01:52:29 +00:00
Randall Stewart
385e27bfab Update the manual page to include Broadwell. 2015-12-09 21:54:33 +00:00
Randall Stewart
058ccb7564 White space changes. 2015-12-09 21:50:06 +00:00
Randall Stewart
ade40db3a2 Proper support of Broadwell tool by the pmc_study based on the
Intel Itune guide for 5th generation processors. There is at least
one formula missing in that guide, which I extrapolated and put a ? by
in the help.

Sponsored by:	Netflix Inc
2015-12-09 21:49:31 +00:00
Alan Somers
da61e79c42 When iostat(8) receives SIGINT while running with "-w" or "-c", it will now
print statistics one more time before exiting. Also, it now implements the
wait using setitimer instead of sleep, so the waits will be more consistent
when the system is heavily loaded.

MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D4473
2015-12-09 18:07:26 +00:00