Commit Graph

12177 Commits

Author SHA1 Message Date
Jaakko Heinonen
1a225ffb6a MFC r197833:
When run() returns an error, print the error message also in
non-interactive mode. Previously error messages were printed only in
interactive mode.

PR:		bin/124517
Approved by:	trasz (mentor)
2009-11-11 19:50:52 +00:00
Xin LI
01e195f21d MFC r198846:
Set umask to 0x077 instead of the default.  This prevents non-root user
  from reading crashinfo output, which could contain some sensitive
  information.
2009-11-10 00:41:22 +00:00
Edwin Groothuis
cbd57efc02 MFC of 198831, tzcode2009q
- Cleanup unnecessary local variables in zdump.
- Fix man-page
2009-11-09 11:32:18 +00:00
Christian Brueffer
92eb005cae MFC: r198750
Expand DESCRIPTION and add a basic EXAMPLES section.
2009-11-08 12:08:42 +00:00
John Baldwin
2d7c21427d MFC 198586: Include the output of the ddb(4) capture buffer. 2009-11-04 16:05:09 +00:00
Ed Maste
7c064f68be MFC r198029:
Correct typo: thetime -> the time

PR:		docs/139447
Submitted by:	Guido Falsi  mad at madpilot dot net
2009-11-02 16:27:34 +00:00
Ed Schouten
f36e7051c7 MFC various commits back to stable/8:
SVN r197174:
  Make sure we never place the cursor outside the screen.

  For some vague reason, it may be possible that scp->cursor_pos exceeds
  scp->ysize * scp->xsize. This means that teken_set_cursor() may get
  called with an invalid position. Just ignore the old cursor position in
  this case.

  Reported by:  Paul B. Mahol <onemda gmail com>

SVN r198213:
  Make lock devices work properly.

  It turned out I did add the code to use the init state devices to set
  the termios structure when opening the device, but it seems I totally
  forgot to add the bits required to force the actual locking of flags
  through the lock state devices.

  Reported by:	ru

SVN r198215, r198217:
  Fix a typo in the jail(8) manpage.

  Submitted by: Jille Timmermans <jille quis cx>

SVN r198216:
  Fix qouting in a comment, to make it look more consistent

  Submitted by: Jille Timmermans <jille quis cx>

SVN r198223:
  Properly set the low watermarks when reducing the baud rate.

  Now that buffers are deallocated lazily, we should not use
  tty*q_getsize() to obtain the buffer size to calculate the low
  watermarks. Doing this may cause the watermark to be placed outside the
  typical buffer size.

  This caused some regressions after my previous commit to the TTY code,
  which allows pseudo-devices to resize the buffers as well.

  Reported by:  yongari, dougb
2009-11-01 10:30:30 +00:00
John Baldwin
9f6aba26bf MFC 196555:
- Use the headers from ACPI-CA to define various constants and structures
  for table layouts, etc. rather than homerolling our own structures and
  constants in acpidump.h.
- Verify the extended checksum on the RSDP.
- Handle new ACPI 3.0 fields in MADT including X2APIC entries and
  UIDs for local SAPICs.
- Add handling for new ACPI 3.0 flags in the FADT.
2009-10-29 14:40:21 +00:00
John Baldwin
dce196cf9c MFC: Remove spurious README and an old version of the manpage. 2009-10-28 21:08:20 +00:00
Jilles Tjoelker
815fc7356d MFC r197625: Fix using lp(1) without the new -t option after r194171.
Approved by:	re (kib)
2009-10-06 21:23:49 +00:00
Hajimu UMEMOTO
43ea76c98d MFC r196475:
- Add AS lookup functionality to traceroute6(8) as well.
 - Support for IPv6 transport for AS lookup.
 - Introduce $RA_SERVER to set whois server.
 - Support for 4 byte ASN.
 - ANSIfy function declaration in as.c.

Approved by:	re (kib)
2009-09-13 11:34:33 +00:00
Bjoern A. Zeeb
e0adffb3d5 MFC r196866:
In the NEXTADDR macro use SA_SIZE() rather than directly using
  sizeof(), as introduced in r186119, for advancing the current
  position into the buffer.
  See comment in net/route.h for a description of the difference.
  This makes ndp -s work again.

   Reviewed by:	qingli

Approved by:	re (kib)
2009-09-05 17:29:08 +00:00
Brian Somers
6d2e2db1a9 MFC r196530: Document that ppp handles pipe(2) descriptors specially in
-direct mode.

Approved by:	re (kib)
2009-08-29 04:15:37 +00:00
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
Colin Percival
c17e4d0b6e Add detection of UFS filesystems.
PR:		bin/135565
Submitted by:	Daniel O'Connor
Reviewed by:	randi
MFC after:	1 month
2009-06-24 04:56:13 +00:00
Rick Macklem
73f4ccbd29 When mountd.c parses the nfsv4 root line(s) in /etc/exports, it
allocates data structures that are never linked into the tree or free'd.
As such, mountd would leak memory every time it parsed an nfsv4 root line.
This patch frees up those structures to plug the leak.

Approved by:	kib (mentor)
2009-06-23 21:48:04 +00:00
Jamie Gritton
b97457e2e6 Add a limit for child jails via the "children.cur" and "children.max"
parameters.  This replaces the simple "allow.jails" permission.

Approved by:	bz (mentor)
2009-06-23 20:35:51 +00:00
Jamie Gritton
5b4a0a4fb5 Whitespace fix.
Approved by:	bz (mentor)
2009-06-23 14:40:08 +00:00
Jamie Gritton
ded788478f Remove obsolete comment describing how the command line is
no longer parsed.

Approved by:	bz (mentor)
2009-06-23 14:39:51 +00:00
Maxim Konovalov
fe7bc8cbab o Fix usage() prototype [1] and correct its call.
Submitted by:	ed [1]
2009-06-23 08:51:11 +00:00
Maxim Konovalov
c07af67dc8 o style(9) usage() definition: it doesn't need an argument. 2009-06-23 05:55:56 +00:00
Maxim Konovalov
6e5f06fead o Remove unneeded argument in fprintf(3) call in usage().
Submitted by:	Pawel Worach
2009-06-23 05:51:48 +00:00
Robert Watson
5e1f7b807d If the label being printed by getpmac(8) is empty, then don't print a
carriage return.

Obtained from:	TrustedBSD Project
MFC after:	3 days
2009-06-20 20:22:11 +00:00
Stanislav Sedov
65a570613a - Include rpcv2.h before other NFS includes. That allows nfscbd to
compile.
2009-06-20 08:46:40 +00:00
Brooks Davis
838d985825 Rework the credential code to support larger values of NGROUPS and
NGROUPS_MAX, eliminate ABI dependencies on them, and raise the to 1024
and 1023 respectively.  (Previously they were equal, but under a close
reading of POSIX, NGROUPS_MAX was defined to be too large by 1 since it
is the number of supplemental groups, not total number of groups.)

The bulk of the change consists of converting the struct ucred member
cr_groups from a static array to a pointer.  Do the equivalent in
kinfo_proc.

Introduce new interfaces crcopysafe() and crsetgroups() for duplicating
a process credential before modifying it and for setting group lists
respectively.  Both interfaces take care for the details of allocating
groups array. crsetgroups() takes care of truncating the group list
to the current maximum (NGROUPS) if necessary.  In the future,
crsetgroups() may be responsible for insuring invariants such as sorting
the supplemental groups to allow groupmember() to be implemented as a
binary search.

Because we can not change struct xucred without breaking application
ABIs, we leave it alone and introduce a new XU_NGROUPS value which is
always 16 and is to be used or NGRPS as appropriate for things such as
NFS which need to use no more than 16 groups.  When feasible, truncate
the group list rather than generating an error.

Minor changes:
  - Reduce the number of hand rolled versions of groupmember().
  - Do not assign to both cr_gid and cr_groups[0].
  - Modify ipfw to cache ucreds instead of part of their contents since
    they are immutable once referenced by more than one entity.

Submitted by:	Isilon Systems (initial implementation)
X-MFC after:	never
PR:		bin/113398 kern/133867
2009-06-19 17:10:35 +00:00
Brian Somers
f345b422d1 When running pkg_add -r, check & install our dependencies for each
package rather than expecting our top level package to get all of
the dependencies correct.

Previously, the code depended on the top level package having all
of the pkgdep lines in +CONTENTS correct and in the right order,
but that doesn't always happen due to code such as this (in
security/gnutls/Makefile):

    .if (defined(WITH_LZO) || exists(${LOCALBASE}/lib/liblzo2.so)) && !defined(WITHOUT_LZO)
    LIB_DEPENDS+=           lzo2:${PORTSDIR}/archivers/lzo2
    ....

With such conditional dependencies, my 'sophox-packages' package won't
install.  The dependency tree looks like this:

    sophox-packages
      ...
      x11/gnome2
        x11/gnome-applets
          net/libgweather
            devel/libsoup
              security/gnutls
                security/libgcrypt
                  security/libgpg-error
      ...
      x11/gnome2
        archivers/file-roller
          archivers/gtar
            archivers/lzop
              archivers/lzo2
      ...

gnutls doesn't depend on lzo2 initially, but lzo2 is dragged into the
mix via other dependencies and is built by the initial 'make'.  The
subsequent package generation for gnutls adds a pkgdep line for lzo2
to gnutls' +CONTENTS but the pkgdeps in sophox-packages' +CONTENTS
has gnutls *before* lzo2.

As a result, sophox-packages cannot install; gnutls fails because lzo2
is missing, 82 more packages fail because gnutls is missing and the
whole thing spirals into a super-confusing mess!

MFC after:	3 weeks
2009-06-19 17:07:38 +00:00
Brooks Davis
54404cfb13 In preparation for raising NGROUPS and NGROUPS_MAX, change base
system callers of getgroups(), getgrouplist(), and setgroups() to
allocate buffers dynamically.  Specifically, allocate a buffer of size
sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow).

This (or similar gymnastics) is required for the code to actually follow
the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime
and where getgroups may return {NGROUPS_MAX}+1 results on systems like
FreeBSD which include the primary group.

In id(1), don't pointlessly add the primary group to the list of all
groups, it is always the first result from getgroups().  In principle
the old code was more portable, but this was only done in one of the two
places where getgroups() was called to the overall effect was pointless.

Document the actual POSIX requirements in the getgroups(2) and
setgroups(2) manpages.  We do not yet support a dynamic NGROUPS, but we
may in the future.

MFC after:	2 weeks
2009-06-19 15:58:24 +00:00
Alexander Kabaev
e7733ffa39 Re-do r192913 in less intrusive way. Only do IP_RECVDSTADDR/IP_SENDSRCADDR
dace for UPDv4 sockets bound to INADDR_ANY. Move the code to set
IP_RECVDSTADDR/IP_SENDSRCADDR into svc_dg.c, so that both TLI and non-TLI
users will be using it.

Back out my previous commit to mountd. Turns out the problem was affecting
more than one binary so it needs to me addressed in generic rpc code in
libc in order to fix them all.

Reported by:	lstewart
Tested by:	lstewart
2009-06-18 17:10:43 +00:00
Jamie Gritton
baab20bd4e Use the right jail parameters for -v (cpuset has changed to cpuset.id).
Reported by:	netchild
Approved by:	bz (mentor)
2009-06-17 14:32:08 +00:00
Marius Strobl
2f577b0166 Add cas(4).
Approved by:	re (kib)
MFC after:	2 weeks
2009-06-15 18:27:27 +00:00
Dag-Erling Smørgrav
c540146463 Add volatile to sig_atomic_t where it was missing.
MFC after:	1 week
2009-06-14 21:39:52 +00:00
Ed Schouten
32cf31fa52 Include <sys/wait.h> and <signal.h> for wait() and kill(). 2009-06-14 12:44:09 +00:00
Brian Somers
a0347c7148 Add -m and -t options.
PR:		129554
Submitted by:	gavin
MFC after:	3 weeks
2009-06-14 06:47:21 +00:00
Dag-Erling Smørgrav
d2432adb9a Remove "extern" from function prototypes, and fix some (but not all)
style(9) violations.

MFC after:	1 week
2009-06-13 14:12:55 +00:00
Dag-Erling Smørgrav
da77297b1e Wrap some macros that needed wrapping.
MFC after:	1 week
2009-06-13 13:54:03 +00:00
Dag-Erling Smørgrav
8eeaaffaac Remove casts from {c,m,re}alloc() and simplify sizeof().
MFC after:	1 week
2009-06-13 13:07:56 +00:00
Dag-Erling Smørgrav
ef39345566 nscd builds cleanly at WARNS level 3.
MFC after:	1 week
2009-06-13 01:23:34 +00:00
Dag-Erling Smørgrav
27f2bc9e1b Explain to the compiler why the aliasing we're doing is OK.
MFC after:	1 week
2009-06-13 01:22:56 +00:00
Dag-Erling Smørgrav
51d6ddb5d1 Fix a large number of signed - unsigned comparison warnings.
MFC after:	1 week
2009-06-13 00:56:17 +00:00
Dag-Erling Smørgrav
2bdde973dd Change hashtable_index_t to unsigned.
Generate prototypes for our hash table.

MFC after:	1 week
2009-06-13 00:54:52 +00:00
Dag-Erling Smørgrav
006fb8efc3 #include the right header so we get prototypes for our own functions.
MFC after:	1 week
2009-06-13 00:46:07 +00:00
Dag-Erling Smørgrav
a5a5d924d2 Further #include cleanup.
MFC after:	1 week
2009-06-13 00:43:56 +00:00
Dag-Erling Smørgrav
570706f8ad Make the debugging macros expand to (void)0 instead of simply nothing
when debugging is turned off.
Rename debugging functions due to namespace violation.

MFC after:	1 week
2009-06-13 00:13:44 +00:00
Dag-Erling Smørgrav
28f805cece #include cleanup
MFC after:	1 week
2009-06-13 00:06:52 +00:00
Dag-Erling Smørgrav
34ecf97a64 Provide correct prototypes for functions with no arguments.
MFC after:	1 week
2009-06-12 23:39:05 +00:00
Dag-Erling Smørgrav
0309c35e84 _nss_cache_cycle_prevention_function doesn't actually need to be a function,
it just needs to have external linkage.

MFC after:	1 week
2009-06-12 23:27:31 +00:00
Rick Macklem
924823491e Update the content of the nfsv4.4 man page to reflect the final
choice of variable names for rc.conf and option name for the
experimental server.
Also replace the inaccurate description of the nfsv4 root lines
in /etc/exports, mostly with a reference to exports(5).

Approved by:	kib (mentor)
2009-06-12 14:18:13 +00:00
Andriy Gapon
5cd1d3ff17 syslog.conf(5): correct example
security.* and console.* are moved out of ftpd program block

Approved by:	jhb (mentor)
MFC after:	2 weeks
2009-06-11 18:42:31 +00:00
Stanislav Sedov
52074d389f - Make pstat(8) WARNS=6 safe.
- While here, eliminate the check for len > 0 in ttymode_sysctl
  as the code is able to handle this case well.

Reviewed by:	ed (initial version)
2009-06-11 17:03:28 +00:00
Dag-Erling Smørgrav
aebbf030e5 Lower WARNS due to alignment issues on sparc64. 2009-06-11 10:30:30 +00:00
Ed Schouten
493f0f1709 Correct my previous commit to pstat(8).
Not only mark the strings inside the array as const, but do the same for
the elements of the array itself.

Submitted by:	Christoph Mallon
2009-06-11 09:59:47 +00:00