Commit Graph

12599 Commits

Author SHA1 Message Date
Jaakko Heinonen
21148e9257 MFC r199843:
Clarify that the value of the fts_info field is different in post-order.

Approved by:	trasz (mentor)
2009-12-04 11:26:52 +00:00
Christian Brueffer
e043b4c399 MFC: r199988
Add an .Nm for strncat.
2009-12-04 07:08:15 +00:00
Garrett Wollman
28f2223875 MFC revs 199781,199782,199784,199785,199786:
Eliminate dead stores.

  In __mbsconv(), if prec was zero, nconv could have been used
  uninitialized.  Initialize it to a safe value so that there's no
  chance of returning an error if stack garbage happens to be equal to
  (size_t)-1 or (size_t)-2.

  In svc_raw_reply(), don't leave stat uninitialized if the MSG_ACCEPTED
  && SUCCESS case succeeds.  The stack garbage might be zero.

  In clnt_raw_create(), avoid minor race condition initializing the
  file-scope variable clntraw_private.

Found by:		Clang static analyzer
2009-12-02 02:47:29 +00:00
Fabien Thomas
9e5aec3978 MFC 198339:
Fix the NO_PROXY handling.

PR: 139751
2009-12-01 23:23:52 +00:00
Peter Pentchev
c6a4ef661d Merge rev. 199180 to 8.x-STABLE, the change to isblank(3):
Fix the grammar as in the PR, and then some.

PR:             140454
Submitted by:   Jeremy Huddleston <jeremyhu@apple.com>
2009-11-25 10:52:07 +00:00
Marcel Moolenaar
374a76c186 MFC r198450:
Implement _umtx_op_err() for ia64.
2009-11-24 03:23:40 +00:00
Christian Brueffer
25cf40cbc9 MFC: r199320
Fix grammar.
2009-11-23 09:44:08 +00:00
Christian Brueffer
234c497e6a MFC: r199317
Fix a memory leak in acl_from_text() in case the conversion succeeded.
2009-11-23 09:10:08 +00:00
Hajimu UMEMOTO
1b05fd6074 MFC r199092: Add gai_strerror() catalog for ja_JP.UTF-8
and ja_JP.eucJP.
2009-11-22 17:08:52 +00:00
Hajimu UMEMOTO
b119cf74a1 MFC r199083: Add NLS catalogs support to gai_strerror(3).
Controlled by NLS define.
2009-11-22 17:05:46 +00:00
Christian Brueffer
a154a457ff MFC: r199255, r199257
Improved the manpage description.  The committed wording
was provided by jhb.

Remove a note about vfork(4) going to be eliminated, it's here to stay.
2009-11-20 06:55:35 +00:00
Hajimu UMEMOTO
a1a32e5e31 MFC r199188: ANSIfy. 2009-11-18 14:40:00 +00:00
John Baldwin
41f114f107 MFC 198986:
Fix a copy-paste bug when reading data from the last 3 (7 for PAE) bytes of
a page mapped by a large page in the kernel.
2009-11-17 16:50:57 +00:00
Christian Brueffer
841de8ae65 MFC: r199046
Fix a copy+paste error by checking the correct variable against MM_NULLACT.
2009-11-16 08:26:56 +00:00
Hajimu UMEMOTO
26520868bc MFC r199080, r199081, r199082:
Add ja_JP.UTF-8 and ja_JP.eucJP catalogs.
2009-11-16 03:52:18 +00:00
Andrew Thompson
1110a4604f MFC r199055
- fix refcounting error during data transfer
 - fix a memory leak on the USB backend
 - fix invalid pointer computations (in one case memory outside the allocated
   area was written in LibUSB v1.0)
 - make sure memory is always initialised, also in failing cases
 - add missing functions from v1.0.4

PR:		usb/140325
2009-11-11 01:27:58 +00:00
Christian Brueffer
d5c7a9c3d9 MFC: r198542
Initialize f_rabuf in the raw device case. A subsequent close()
later on would try to free it, leading to a crash.
2009-11-04 13:40:04 +00:00
Alan Cox
225da9692c MFC r197524
Make malloc(3) superpage aware.
2009-11-02 18:44:01 +00:00
Alan Cox
12e8008e6d MFC r197163
Add the FBSD_1.2 namespace.

Reminded by:	kib
2009-11-01 20:24:17 +00:00
Alan Cox
588b5e6ee8 MFC r197331, r197394
Add getpagesizes(3).
2009-11-01 19:22:07 +00:00
Stacey Son
83613795b2 MFC 197240,197241,197242,197243,197293,197294,197407:
Add EVFILT_USER filter and EV_DISPATCH/EV_RECEIPT flags to kevent(2).

Approved by: rwatson (mentor)
2009-10-31 21:22:18 +00:00
Edwin Groothuis
05edd60be4 MFCs of r197764, r197765, r197766, r197847:
Modified locale(1) to be able to show the altmon_X fields and the
[cxX]_fmt's.  Also modify the "-k list" option to display only
fields with a certain prefix.

Add the comment "(FreeBSD only)" to the altmonth_x keywords
2009-10-31 06:35:40 +00:00
Alexander Motin
e4692ffe5b MFC rev. 197621:
Fix bug, when RADIUS client gave up after single sendto() error, do not
trying backup servers.

PR:		kern/103764, misc/139214
2009-10-30 13:02:08 +00:00
Alexander Motin
22c6623dc4 MFC rev. 197086:
Add simple embedded RADIUS server support to libradius, by extending existing
API, keeping backward compatibility.

First consumer for this functionality is going to become forthcoming MPD-5.4,
supporting CoA and DR of RFC 3576: Dynamic Authorization Extensions to RADIUS.
2009-10-30 12:57:28 +00:00
Andrew Thompson
de411f4cd2 MFC r198376
Prevent wraparound of the timeout variable.

Submitted by:	HPS
Approved by:	re (kib)
2009-10-23 12:02:01 +00:00
Alexander Kabaev
8ed4544ca7 MFC Revision 197277:
Make libc.a provide __stack_chk_fail_local weak alias. This is
needed to satisfy static libraries that are compiled with -fpic
and linked into static binary afterwards. Several libraries in
gcc are examples of such static libs.

Approved by: re (kib)
2009-10-20 19:05:43 +00:00
Konstantin Belousov
f7bca35675 MFC r197958:
In nanosleep(2), note that the calling thread is put to sleep, not the
whole process. Also explicitely name the parameter that specifies
sleep interval.

Approved by:	re (kensmith)
2009-10-14 14:26:19 +00:00
Christian Brueffer
225cdb4e6c MFC: r197312
Fix setfib(1) section number.

Approved by:	re (kib)
2009-10-09 13:52:49 +00:00
Joe Marcus Clarke
6c09384ae8 MFC: rev. 197681
Correct the pthread stub prototype for pthread_mutexattr_settype to allow for
the type argument.  This is known to fix some pthread_mutexattr_settype()
invocations, especially when it comes to pulseaudio.

Approved by:	re (kib)
2009-10-04 21:46:43 +00:00
Brooks Davis
ad00749016 MFC r196990:
cr_groups is no longer embedded in struct ucred and is instead stored
in a seperate array.  As such we need to use kvm_read rather than bcopy
to populate the ki_groups field.

This fixes a crash when running ps -ax on a coredump.

Reported by:	brucec
Tested by:	brucec
MFC after:	3 days
Approved by:	re@ (kib)
2009-09-24 21:35:13 +00:00
Yoshihiro Takahashi
8b1e4172cb MFC: r197322 and r197374
Revision: 197322
  Log:
    Correct BIOS header sanitizing on pc98.

  Revision: 197374
  Log:
    Disable a check on a disk size because it's too strict.  This change is
    to avoid using incorrect geometry.

   It seems that this is the same problem in g_part_bsd_read()@g_part_bsd.c.

   Reviewed by: rink

Approved by:	re (kib)
2009-09-24 15:34:18 +00:00
Attilio Rao
917c07ca1d MFC r197445:
Let fall down in the hard path (thus handling shared waiters wakeup
correctly) for the shared waiters also in the rwlock held in shared mode
as well, fixing possible deadlocks.

Please note that this is a special condition as we want this fix in
before RC2 as we assume it is critical and so it has been handled
as an instant-merge.  For the STABLE_7 branch, 1 week before the MFC
is assumed.

Approved by:	re (kib)
2009-09-24 08:35:17 +00:00
Tim Kientzle
52bd177ff7 MFC r196962: Fix /usr/bin/unzip: A bug deep in libarchive's read-ahead logic
(incorrect handling of zero-length reads before the copy buffer is
allocated) is masked by the iso9660 taster.  Tar and cpio both enable
that taster so were protected from the bug; unzip is susceptible.

This both fixes the bug and updates the test harness to exercise
this case.

Submitted by: Ed Schouten diagnosed the bug and drafted a patch
Approved by:	re (kib)
2009-09-17 06:31:59 +00:00
Attilio Rao
623b4aa57e MFC r197224:
Use explicit int values for the device states in order to allow, if
necessary, in the future, adds of new states without breaking ABI
between revisions.

Please note that this is a special condition as we want this fix in
before RC1 as we assume it is critical and so it has been handled
as an instant-merge.

Approved by:	re (kib)
2009-09-15 19:24:18 +00:00
Konstantin Belousov
80bc871bdd MFC r196861:
Handle zero size for posix_memalign. Return NULL or unique address
according to the 'V' option.

Approved by:	re (kensmith)
2009-09-12 18:16:46 +00:00
Ken Smith
ac7d4c93c6 Remove extra debugging support that is turned on for head but turned off
for stable branches:

	- shift to MALLOC_PRODUCTION
	- turn off automatic crash dumps
	- Remove kernel debuggers, INVARIANTS*[1], WITNESS* from
	  GENERIC kernel config files[2]

[1] INVARIANTS* left on for ia64 by request marcel
[2] sun4v was left as-is

Reviewed by:	marcel, kib
Approved by:	re (implicit)
2009-09-10 14:04:00 +00:00
Edward Tomasz Napierala
b9d99ec84d MFC r196740:
Fix regression introduced with NFSv4 ACL support - make acl_to_text(3)
and acl_calc_mask(3) return error instead of crashing when acl passed
to them is NULL.

Submitted by:	markus
Reviewed by:	rwatson
Approved by:	re (kib)
2009-09-05 15:01:56 +00:00
Xin LI
c291f85f32 MFC r196525:
Consider flag == 0 as the same of flag == R_NEXT.  This change will restore
a historical behavior that has been changed by revision 190491, and has seen
to break exim.

Approved by:	re (kib)
2009-08-28 19:48:06 +00:00
Ed Schouten
2025af696e MFC r196508:
Our implementation of granpt(3) could be valid in the future.

  When I wrote the pseudo-terminal driver for the MPSAFE TTY code, Robert
  Watson and I agreed the best way to implement this, would be to let
  posix_openpt() create a pseudo-terminal with proper permissions in place
  and let grantpt() and unlockpt() be no-ops.

  This isn't valid behaviour when looking at the spec. Because I thought
  it was an elegant solution, I filed a bug report at the Austin Group
  about this. In their last teleconference, they agreed on this subject.
  This means that future revisions of POSIX may allow grantpt() and
  unlockpt() to be no-ops if an open() on /dev/ptmx (if the implementation
  has such a device) and posix_openpt() already do the right thing.

  I'd rather put this in the manpage, because simply mentioning we don't
  comply to any standard makes it look worse than it is. Right now we
  don't, but at least we took care of it.

  Approved by:  re (kib)
2009-08-28 10:25:26 +00:00
Robert Watson
1f9b1ccbd0 Merge r196123 from head to stable/8:
Update posix1e-related man pages, especially as relates to MAC, to more
  accurately reflect the last ten years of work.

Approved by:	re (kib)
2009-08-13 15:08:05 +00:00
Bjoern A. Zeeb
80ba674cae MFC r196185:
Rather than replicating the maths from the kernel, use the
  value the kernel calculated directly as we already read it
  with struct vnet.  This will make kvm_vnet.c more resilent
  in case of possible kernel changes.

  Reviewed by:  rwatson

Approved by:	re (kib)
2009-08-13 15:02:02 +00:00
Robert Watson
530c006014 Merge the remainder of kern_vimage.c and vimage.h into vnet.c and
vnet.h, we now use jails (rather than vimages) as the abstraction
for virtualization management, and what remained was specific to
virtual network stacks.  Minor cleanups are done in the process,
and comments updated to reflect these changes.

Reviewed by:	bz
Approved by:	re (vimage blanket)
2009-08-01 19:26:27 +00:00
Alfred Perlstein
390065b18e LibUSB v1.0:
- Significantly improve libusb10 support.
        - Many minor issues fixed.
        - P4 ID: 166189, 165853, 165991, 166052, 166069

Submitted by:	hps
Approved by:	re
2009-07-30 00:11:41 +00:00
Tim Kientzle
33fe28bbcd The parser for Rockridge symlinks tended to insert
extra slashes at the beginning of absolute targets.

Thanks to Jung-uk Kim for pointing this out to me.

Approved by:	re (kib)
2009-07-26 18:11:44 +00:00
Alan Cox
5592fb2f9b Eliminate a stale paragraph from the BUGS section. This "bug" was
eliminated in r195693.

Approved by:	re (kensmith)
2009-07-26 06:38:56 +00:00
Tim Kientzle
e2f1f1fb00 Libarchive recognizes hardlinked files on ISO images,
but returned them incorrectly, causing tar to actually
erase the resulting file while trying to restore the
link.  This one-line fix corrects the hardlink descriptions
to avoid this problem.

Thanks to Jung-uk Kim for pointing this out.

Approved by:	re (kib)
2009-07-25 18:11:55 +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
Brooks Davis
1b5768be71 Revert the changes to struct kinfo_proc in r194498. Instead, fill
in up to 16 (KI_NGROUPS) values and steal a bit from ki_cr_flags
(all bits currently unused) to indicate overflow with the new flag
KI_CRF_GRP_OVERFLOW.

This fixes procstat -s.

Approved by: re (kib)
2009-07-24 15:03:10 +00:00
Bjoern A. Zeeb
7cf8b4b933 Make libkvm work on live systems and crashdumps with and
without VIMAGE virtualization in the kernel.

If we cannot resolve a symbol try to see if we can find it with
prefix of the virtualized subsystem, currently only "vnet_entry"
by identifying either the vnet of the current process for a
live system or the vnet of proc0 (or of dumptid if compiled
in a non-default way).

The way this is done currently allows us to only touch libkvm
but no single application. Once we are going to virtualize more
subsystems we will have to review this decision for better scaling.

Submitted by:	rwatson (initial version of kvm_vnet.c, lots of ideas)
Reviewed by:	rwatson
Approved by:	re (kib)
2009-07-23 21:12:21 +00:00
Ken Smith
764eca2591 It is believed the last subsystem that limited ID sizes to something
other than the current system-wide size (32-bits) has been updated so
for now just cautiously turn the check off.  While here fix the check
for IDs being too large which doesn't work due to type mis-matches.

Reviewed by:    jhb (previous version)
Approved by:	re (kib)
MFC after:	1 month (type mis-match fixes only)
2009-07-22 20:46:17 +00:00