Commit Graph

12114 Commits

Author SHA1 Message Date
Brian Somers
61a651a452 MFC: When ``ppp -direct'' is invoked by a program that uses pipe(2) to
create stdin and stdout, don't blindly try to use stdin as a bi-directional
     channel.  Instead, detect the pipe and set up a special exec handler
     that indirects write() calls through stdout.

     This fixes the problem where ``set device "!ssh -e none host ppp
     -direct label"'' no longer works with an openssh-5.2 server side as
     that version of openssh ignores the USE_PIPES config setting and
     *always* uses pipes (rather than socketpair) for stdin/stdout channels.

Approved by:	re (kib)
2009-08-27 07:07:38 +00:00
Brian Somers
ff550a99bd MFC: When realloc()ing device memory for transfer to another ppp process,
don't continue to use the realloc()d pointer - it might have changed!

     Remove some stray diagnostics while I'm here.

Approved by:	re (kib)
2009-08-27 07:05:46 +00:00
Sam Leffler
f9906ce770 MFC r196472:
Enable _DIRENT_HAVE_D_TYPE so wpa_cli scans directories properly
  for it's unix domain socket.  Before this change wpa_cli would take
  the first file in the directory that was not "." or "..".

Approved by:	re (rwatson)
2009-08-23 16:21:49 +00:00
Simon L. B. Nielsen
452e49d601 MFC 196392:
Add support for backing up the old kernel when installing a new kernel
  using freebsd-update.  This applies to using freebsd-update in "upgrade
  mode" and normal freebsd-update on a security branch.

  The backup kernel will be written to /boot/kernel.old, if the directory
  does not exist, or the directory was created by freebsd-update in a
  previous backup.  Otherwise freebsd-update will generate a new directory
  name for use by the backup.  By default symbol files are not backed up
  to save diskspace and avoid filling up the root partition.

  This feature is fully configurable in the freebsd-update config file,
  but defaults to enabled.

  Reviewed by:	cperciva

Approved by:	re (kib)
2009-08-19 21:01:32 +00:00
Scott Long
53e7499383 Merge mptutil
Approved by:	re
2009-08-17 07:30:08 +00:00
Scott Long
42eeb00e0b Merge mfiutil
Approved by:	re
2009-08-17 07:25:12 +00:00
Rink Springer
1e2c2ea509 MFC r196272
Prevent sysinstall from needlessly waiting for confirmation when using an USB
device in non-interactive mode.

If there are no USB devices, sysinstall gives an error messages, and if there
is >1, it'll ask which one is to be used. This change allows a non-interactive
install from USB media to succeed without any user interaction if there is
exactly one USB disk device in the system it can use.

Submitted by: Daniel O'Connor < doconnorat gsoft dot com dot au >
Reviewed by:  randi
Approved by:  re (rwatson)
2009-08-16 10:25:58 +00:00
Giorgos Keramidas
ae131b7499 MFC 196254 - iostat: add a bit of space between tty in/out columns
The columns for tty input and output may bump against each other
if the tty output needs more than 5 columns.  Add a bit of space
that pushes everything 1 column to the right, but also avoids the
problem.

Approved by:	re (rwatson)
2009-08-15 18:03:34 +00:00
Stanislav Sedov
81fda6adf0 - Merge r196244:
Avoid overflowing the swap size counters in human-readable mode
    by introducing the new CONVERT_BLOCKS macro which operates on
    sizes already converted to number of blocks.  With this macro
    it is not longer needed to perform needless multiplica

Approved by:	re (kib)
2009-08-15 15:12:46 +00:00
Remko Lodder
c5047621f0 Remove bogus char cast.
PR:		118014
 Submitted by:	Gardner Bell <gbell72 at rogers dot com>
 Approved by:	re (rwatson), imp (mentor, implicit)
 MFC after:	immediate

Approved by:	re (rwatson), imp (mentor, implicit)
2009-08-14 19:30:59 +00:00
Colin Percival
a429f76be7 Merge r196213 to stable/8.
Approved by:	re (rwatson)
2009-08-14 13:26:50 +00:00
John Baldwin
badf1a61b3 MFC 196147: Fix references to the kernel distributions to use the correct
names (uppercase).

Approved by:	re (rwatson, kib)
2009-08-12 14:40:21 +00:00
Bjoern A. Zeeb
290d3c9f72 MFC r196137:
Do not truncate IPv6 addresses when printing them in the
  jls -av 7.x multi-IP jail backward compat output.

  Reported by:  ed
  Tested by:    ed
  Reviewed by:  rwatson

Approved by:  re
2009-08-12 12:31:29 +00:00
Colin Percival
6bf0cb8a79 Merge r196128 to stable/8.
Approved by:	re (rwatson)
2009-08-12 12:00:22 +00:00
Ken Smith
357327a0c2 Prepare for 8.0 package set, adjust for 8-stable, acknowledge 9-current
is coming.

Approved by:	re (implicit)
2009-08-12 07:37:18 +00:00
Jamie Gritton
843c277bfa Handle kernels that don't have IPv6 by not sending an "ip6.addr"
parameter unless a (numeric) IPv6 address is given.  Even the default
binaries built with -DINET6 will work with IPv6-less kernels.  With an
eye to the future, similarly handle the possibility of an IPv4-less kernel.

Approved by:	re (kib), bz (mentor)
2009-07-31 14:30:06 +00:00
Robert Watson
b2beb67f92 Style tweak.
Approved by:	re (kib)
MFC after:	3 days
2009-07-30 09:51:04 +00:00
John Baldwin
a0333ad155 Parse the System Resource Affinity Table ('SRAT') used to describe affinity
relationships between CPUs and memory.

Reviewed by:	jkim
Approved by:	re (kib)
MFC after:	1 week
2009-07-29 19:07:24 +00:00
Jamie Gritton
7cbf72137f Some jail parameters (in particular, "ip4" and "ip6" for IP address
restrictions) were found to be inadequately described by a boolean.
Define a new parameter type with three values (disable, new, inherit)
to handle these and future cases.

Approved by:	re (kib), bz (mentor)
Discussed with:	rwatson
2009-07-25 14:48:57 +00:00
Edward Tomasz Napierala
ea665f1079 Change the name displayed in sysinstall(8) from 'Wizard Mode'
to 'Expert Mode', to make it less confusing to new users, to whom
a 'wizard' is a set of simple dialogs with the 'next >>>' button.

Approved by:	re (kensmith)
2009-07-25 08:36:28 +00:00
Ken Smith
1e237f59b5 It is believed the last of the base system that could have an issue with
IDs larger than 16-bits has been updated so adjust sysinstall to allow
IDs up to the current system-wide size of 32-bits.

Approved by:	re (kib)
2009-07-22 22:13:42 +00:00
Colin Percival
90ad51e897 Remove the "dedicated disk mode" partitioning option from sysinstall, in
both the disk partitioning screen (the 'F' key) and via install.cfg (the
VAR_DEDICATED_DISK option).  This functionality is currently broken in 8.x
due to libdisk and geom generating different partition names; this commit
merely acts to help steer users away from the breakage.

Submitted by:	randi
Approved by:	re (kensmith)
2009-07-22 03:50:54 +00:00
Brian Somers
8e41399c8f Don't get stuck in an infinite loop comparing (short++ <= maxshort)
PR:		136893
Submitted by:	Aragon Gouveia - aragon at phat dot za dot net (mostly)
Approved by:	re (kib)
MFC after:	3 weeks
2009-07-19 19:01:30 +00:00
Ken Smith
3ca3047aee Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE.  Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by:    kib
Approved by:    re (rwatson)
2009-07-19 17:25:24 +00:00
Sam Leffler
412c439591 add mesh support
Submitted by:	rpaulo
Approved by:	re (kib)
2009-07-17 21:11:08 +00:00
Ken Smith
8222d1e2f7 Correct the name of the Mongolian Documentation package.
Approved by:	re (kib)
2009-07-16 20:19:36 +00:00
Sam Leffler
4365f62b1e fix Jouni's email address
Approved by:	re (blanket)
2009-07-12 19:58:52 +00:00
Jamie Gritton
4d4d887907 Give a more expected behavior to -[hns] options, defaulting to all
parameters instead of ignoring the options and giving the old-style
default output.

Approved by:	re (kib), bz (mentor)
2009-07-08 15:57:22 +00:00
Jamie Gritton
f9bc4dcb56 Fix a typo in the examples.
Approved by:	re (kib), bz (mentor)
2009-07-08 15:46:29 +00:00
Colin Percival
71b38b3c12 Add support for using a livefs from a USB disk.
Submitted by:	randi
Approved by:	re (kensmith)
2009-07-08 06:07:51 +00:00
Colin Percival
e24256e54e Refactor code from installFixitCDROM into a new function, fixit_livefs_common.
While doing so, improve style and reword some comments.

This should not result in any functional changes, but the fixit_livefs_common
function will be used by future code.

Submitted by:	randi
Approved by:	re (kensmith)
2009-07-08 06:07:23 +00:00
Brian Somers
559bfa18dc Add a missing phrase.
Submitted by:	Jason McIntyre jmc at kerhand dot co dot uk
Approved by:	re (kib)
Obtained from:	OpenBSD
MFC after:	3 weeks
2009-07-05 16:55:57 +00:00
Brian Somers
56991865e3 Disable r194497 for now. It doesn't work well with ports-mgmt/tinderbox.
Approved by:	re (ken)
2009-07-05 06:14:59 +00:00
Attilio Rao
5d279e6530 Add a new options (-s) that, when specified, skips the question about
adjusting the clock to UTC.
That avoids to write on /etc/wall_cmos_clock which is useful in some
cases (example: host user in a jail).

Sponsored by:	Sandvine Incorporated
Initially submitted by:	Matt Koivisto <mkoivisto at sandvine dot com>
Approved by:	re (kib)
2009-07-04 11:11:21 +00:00
Stanislav Sedov
12de41a26f - Properly order headers, local variables and prototypes. [1]
- Remove unneeded headers.
- Return non-zero error code in usage().

Approved by:	re (kib)
Suggested by:	bde [1]
2009-07-01 22:23:26 +00:00
Stanislav Sedov
d981a4e272 - Fix the bug in write(2) called with incorrect parameters resulting in writes
always started from the start of the packet.
- Fix usage string (multiple addresses can be specified).
- Make the source more style(9) compliant.
- Improve error reporting (do not silently fail if something goes
  wrong).
- Make functions static.
- Use warns level 6.

Approved by:	re (kib)
Discussed with:	Marc Balmer <marc@msys.ch>, brian, mbr
2009-07-01 13:07:02 +00:00
Martin Blapp
a6dff0a5de Compiles without higher warn level
M    wake/Makefile

Approved by: re (previous commit)
2009-06-30 22:09:47 +00:00
Brian Somers
ef26f51cb1 Don't imply that only FTP urls are supported when we can't fetch
a package.

Approved by:	re (kib)
MFC after:	3 weeks
2009-06-30 20:53:57 +00:00
Martin Blapp
58c6a70a52 Add wake, a tool to send Wake on LAN frames to hosts on a local Ethernet network
Submitted by:   Marc Balmer <marc@msys.ch>
Reviewed by:    rwatson
Approved by:	re

M    usr.sbin/Makefile
A    usr.sbin/wake
AM   usr.sbin/wake/wake.c
AM   usr.sbin/wake/Makefile
AM   usr.sbin/wake/wake.8
2009-06-30 18:51:22 +00:00
Stanislav Sedov
b2d758545b - Add support to atomically set/clear individual bits of a MSR register
via cpuctl(4) driver.  Two new CPUCTL_MSRSBIT and CPUCTL_MSRCBIT ioctl(2)
  calls treat the data field of the argument struct passed as a mask
  and set/clear bits of the MSR register according to the mask value.
- Allow user to perform atomic bitwise AND and OR operaions on MSR registers
  via cpucontrol(8) utility.  Two new operations ("&=" and "|=") have been
  added.  The first one applies bitwise AND operaion between the current
  contents of the MSR register and the mask, and the second performs bitwise
  OR.  The argument can be optionally prefixed with "~" inversion operator.
  This allows one to mimic the "clear bit" behavior by using the command
  like this:
      cpucontrol -m 0x10&=~0x02		# clear the second bit of TSC MSR

  Inversion operator support in all modes (assignment, OR, AND).

Approved by:	re (kib)
MFC after:	1 month
2009-06-30 12:35:47 +00:00
Marc Fonvieille
944bc81da9 - release/* update to use freebsd-doc-* packages instead of building
FreeBSD docset during 'make release' this will speed up release
  builds;
- sysinstall(8) has also been updated to use these packages with a new
  menu allowing people to choose what localized doc to install;
- mention in UPDATING that docs from the FreeBSD Documentation project
  are now installed in /usr/local/share/doc/freebsd instead of
  /usr/share/doc.

Approved by:	re (kensmith)
2009-06-28 08:59:46 +00:00
Xin LI
256d01ee17 Correct a typo (which you can use to in order -> which you can use in order
to).

PR:		bin/136040
Submitted by:	"Vikentii L. Karabin" <kvl tomsksoft com>
MFC after:	1 weeks
2009-06-25 23:10:59 +00:00
Brian Somers
53c405786b Support shadow.byname and shadow.byuid maps, protecting them by
insisting on privileged port access.

Include /var/yp/Makefile.local if it exists and suggest using
it to override /var/yp/Makefile behaviour.

Approved by:	re (kib)
MFC after:	3 weeks
2009-06-25 16:15:39 +00:00
John Baldwin
e68920db5f Raise the default size of the EFI partition on ia64 from 100MB to 400MB.
A fresh install of a current 8.0 snapshot uses 156MB with a single kernel
and having the filesystem too small prevented the system from booting.

Reviewed by:	marcel
MFC after:	1 week
2009-06-25 12:34:05 +00:00
Colin Percival
2245fa69bb Make sysinstall search for /dev/daXa and register such devices as USB disks.
This covers the common case of unsliced USB drives, and makes it possible to
select them as installation source media.

PR:		61152, 115197, 135016
Submitted by:	randi
MFC after:	1 month
2009-06-24 23:17:00 +00:00
Navdeep Parhar
bc62d44240 This adds a new "stdio" mode to cxgbtool - it's an interactive mode
meant primarily for _non_ interactive use.  Scripts that run cxgbtool
repeatedly to perform register r/w or mdio will benefit from this.
Instead of fork/exec'ing a new cxgbtool for every regio/mdio you can
simply open a pair of pipes to/from cxgbtool and run cmds over them.

Approved by:	gnn (mentor)
2009-06-24 22:28:48 +00:00
Joerg Wunsch
81f5cd998c Drop the defunct FDOPT_NOERRLOG option from all the floppy utilities.
The kernel does not log floppy media errors anymore.

In fdcontrol, do always open the file descriptor in read-only mode so
it can operate on read-only media, as there is no longer a separate
control device to operate on.
2009-06-24 19:47:53 +00:00
Doug Rabson
0775314b63 Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementation
and will be removed.
2009-06-24 18:42:21 +00:00
Jamie Gritton
de6f37045c Add libjail, a (somewhat) simpler interface to the jail_set and jail_get
system calls and the security.jail.param sysctls.

Approved by:	bz (mentor)
2009-06-24 18:18:35 +00:00
Garance A Drosehn
46bfa198cf Fix end-of-line issues that can come up when `lpq' reads information
about a queue from a remote host.  That remote host may use \r, \r\n,
or \n\r as the line-ending character.  In some cases the remote host
will write a single line of information without *any* EOL sequence.

Translate all the non-unix EOL's to the standard newline, and make
sure the final line includes a terminating newline.  Logic is also
added to translate all unprintable characters to '?', but that is
#if-ed out for now.

PR:		bin/104731
MFC after:	3 weeks
2009-06-24 16:57:33 +00:00