Commit Graph

12649 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
aae70d8491 insta-mfh r203028 (doc update) 2010-01-26 15:07:47 +00:00
Dag-Erling Smørgrav
da4af7b6c4 MFH (r202613, r202623): HTTP digest authentication support. 2010-01-26 14:15:12 +00:00
Maksim Yevmenkin
38cd0240f4 MFC SVN rev 198492
Fix typo in bluetooth.3
Do not use reserved C++ keyword "new"
2010-01-26 00:38:56 +00:00
David Schultz
903d5593ab MFC r197752:
Better glibc compatibility for getline/getdelim:

  - Tolerate applications that pass a NULL pointer for the buffer and
    claim that the capacity of the buffer is nonzero.

  - If an application passes in a non-NULL buffer pointer and claims the
    buffer has zero capacity, we should free (well, realloc) it
    anyway. It could have been obtained from malloc(0), so failing to
    free it would be a small memory leak.
2010-01-24 20:15:59 +00:00
Ed Schouten
eb63bf5c83 MFC r202500:
Fix a regression that was introduced in r191882.

  I changed login_tty() to only work when the application is not a session
  leader yet. This works fine for applications in the base system, but it
  turns out various applications call this function after daemonizing,
  which means they already use their own session.

  If setsid() fails, just call tcsetsid() on the current session.
  tcsetsid() will already perform proper security checks.

Reported by:	Oliver Lehmann
2010-01-24 14:30:57 +00:00
Konstantin Belousov
b3c4be736e Merge scandir(3) interface update to stable/8.
MFC r201512:
Modernize scandir(3) and alphasort(3) interfaces according to the IEEE
Std 1003.1-2008.

MFC r201602:
Move scandir(3) and alphasort(3) into XSI namespace.

MFC r201604:
Use thunks to adapt alphasort-like interface to the comparision function
required by qsort() and qsort_r().

MFC r202556 (by ache):
Use strcoll() in opendir() and alphasort(). Remove some comments.

MFC r202572 (by ache):
Revert to using strcmp() for opendir().

MFC r202677 (by ache):
Style.

MFC r202679 (by ache):
Style: rename internal function to opendir_compar().

MFC r202691 (by ache):
For alphasort(3) add reference to strcoll(3).

MFC r202693 (by ache):
Style: reword comment.
2010-01-24 12:35:36 +00:00
Xin LI
deacfb8431 MFC r201892:
Add a set of manual pages for pthread[_attr]_[sg]etaffinity(3).

Reviewed by:	davidxu
2010-01-23 00:43:44 +00:00
Brooks Davis
52c240aaf4 MFC r201350:
The devices that supported EVFILT_NETDEV kqueue filters were removed in
  r195175.  Remove all definitions, documentation, and usage.

The change of function signature for vlan_link_state() was not merged to
maintain the ABI.
2010-01-22 19:51:34 +00:00
Andriy Gapon
cd58d51b0f MFC r202585: fix a comment typo 2010-01-22 09:27:31 +00:00
Xin LI
6e6d19008b MFC r200802:
Use vsprintf instead of rolling our own.

PR:		bin/140496
Submitted by:	Jeremy Huddleston <jeremyhu apple.com>
2010-01-20 00:53:44 +00:00
Xin LI
bf2d481d44 MFC r200800:
Use vsscanf instead of rolling our own.

PR:		bin/140530
Submitted by:	Jeremy Huddleston <jeremyhu apple.com>
2010-01-20 00:53:03 +00:00
Xin LI
49399ca706 MFC r200799:
K&R -> ANSI prototype.
2010-01-20 00:52:24 +00:00
Fabien Thomas
53b6e7516f MFC 202157:
Bug fix: add a missing initializer.
2010-01-19 20:55:57 +00:00
Christian Brueffer
c321d2f343 MFC: r202176
Miscellaneous mdoc, spelling and inconsistency fixes.
2010-01-19 17:09:18 +00:00
Christian Brueffer
d24c3430ea MFC: r201603
Fix a double free().
2010-01-19 16:51:51 +00:00
Andrew Thompson
f08a4d065b MFC r202025
Reset variable fields in case the transfer is opened again
2010-01-17 18:24:40 +00:00
Marcel Moolenaar
6bbfc14d02 MFC rev 201937:
Implement the fo_readdir method.
2010-01-16 04:24:10 +00:00
Christian Brueffer
c8dedae27a MFC: r202159
Remove useless .TE groff macro.
2010-01-15 19:53:36 +00:00
Christian Brueffer
82dd0f696c MFC: r201836
Remove unnecessary quoting and markup, add missing punctuation.
2010-01-15 19:42:09 +00:00
John Baldwin
8e42544da7 MFC 199607, 200797, 201270, 201669:
Use pthread_once() to initialize the thread-local storage for localtime()
and gmtime() and _once() to initialize gmt state rather than home-rolled
versions using pthread mutex locks.
2010-01-13 18:12:21 +00:00
Konstantin Belousov
28f48c5ccc MFC r201743:
Give some information on SF_MNOWAIT flag.

MFC r201759 (by brueffer):
Fix a typo and bump date for the previous commit.

MFC r201760:
Further fix grammar.
2010-01-10 11:25:34 +00:00
Konstantin Belousov
3354257d95 MFC r201194:
Use clock_gettime(CLOCK_SECOND) instead of gettimeofday(2) for
implementation of time(3). CLOCK_SECOND is much faster.
2010-01-05 12:32:09 +00:00
Xin LI
ca22ec93f0 MFC r201137:
Grammar fix.

Submitted by:	Kenyon Ralph <kenyon kenyonralph com>
2010-01-04 01:09:59 +00:00
Konstantin Belousov
92bfafd31b MFC r201201:
Document CLOCK_SECOND, add cross-reference from time(3) to clock_gettime(2).

MFC r201204:
Document _FAST and _PRECISE clocks.
2010-01-01 11:43:09 +00:00
John Baldwin
abd97995f5 MFC 200919:
Fix a bug in gzipfs that prevented lseek() from working and add lseek()
support to bzip2fs.  This fixes problems with loading compressed amd64
kernel modules containing debug symbols.
2009-12-30 17:53:07 +00:00
Jaakko Heinonen
694faf6751 MFC r199844:
Reset path name back to original correctly in fts_build() when
FTS_NOCHDIR option is used. fts_build() could strip a trailing slash
from path name in post-order visit if a path pointing to an empty
directory was given for fts_open().

PR:		bin/133907, kern/134513
Approved by:	trasz (mentor)
2009-12-30 17:22:00 +00:00
Markus Brueffer
0900fee4fb MFC r200992:
Use a local copy of entry_d for finding matches. Otherwise, if entry_d pointed
to an entry of 'acl', all ACL entries starting with entry_d would be deleted.

Approved by:	emax (mentor)
2009-12-30 16:37:58 +00:00
Edwin Groothuis
dd1c9c3da4 MFC of r200832, tzdata2009t
zic:
- Fix URL / reference to Calendrical Calculations: Third Edition

libc/stdtime:
- Fix typo in tzfile.5 (no changes in our part)
2009-12-29 10:05:20 +00:00
Konstantin Belousov
5300f787ac MFC r200038:
Properly support -fPIE by linking PIE binaries with specially-built
Scrt1.o instead of crt1.o, since the later is built as non-PIC.

Separate i386-elf crt1.c into the pure assembler part and C code,
supplying all data extracted by assembler stub as explicit parameters.
Hide and localize _start1 symbol used as an interface between asm and
C code.
2009-12-27 20:39:58 +00:00
Xin LI
8f923cfaf1 Explicitly say that this is an internal library which is intended to be
used within FreeBSD base system only, and discourage user applications
from using it.  User applications should use the expat version from the
ports/package collection.

Reviewed by:	simon (earlier version)
2009-12-27 07:04:27 +00:00
Peter Pentchev
29b0c308e2 MFC r199244:
Fix the grammar in the isgraph(3) description, almost as per the PR.

  PR:           140455
  Submitted by: Jeremy Huddleston <jeremyhu@apple.com>
2009-12-24 20:35:01 +00:00
Jilles Tjoelker
eb058880c4 MFC r200589: cpuset(2): fix a typo and a markup error in the man page 2009-12-22 13:45:29 +00:00
Sean Farley
86a2af8fd4 Merge from head to stable/8:
r200424:
Fix libusb_open_device_with_vid_pid() to return a NULL if no device is
found instead of the last device in its search list.

Reviewed by:	thompsa
2009-12-20 18:57:43 +00:00
Jamie Gritton
19022f2808 MFC r200623:
Add a null pointer check so "name" can be used as a key parameter in
  jailparam_get.

PR:		bin/141692
Submitted by:	delphij
2009-12-20 04:49:29 +00:00
Attilio Rao
9853fc7d63 MFC r199802:
Fix handling of empty attributes.

Sponsored by:	Sandvine Incorporated
2009-12-19 19:23:25 +00:00
Attilio Rao
9a46c76970 MFC r199801:
Fix a socket leak.

Sponsored by:	Sandvine Incorporated
2009-12-19 19:22:09 +00:00
Konstantin Belousov
7e76751181 MFC r198508, r198509:
Reimplement pselect() in kernel, making change of sigmask and sleep atomic.

MFC r198538:
Move pselect(3) man page to section 2.
2009-12-19 11:47:00 +00:00
Sean Farley
08c59cc33e Merge from head to stable/8:
r200423:
Remove a dead store.
2009-12-18 20:05:10 +00:00
Brooks Davis
c1dde08ce2 MFC r200366
Add a missing else that negated the truncation of ki_ngroups to NGROUPS.

Submitted by:   Dmitry Pryanishnikov <lynx dot ripe at gmail dot com>
2009-12-18 06:09:43 +00:00
John Baldwin
5ff95453cc MFC 199606, 199614:
Add an internal _once() method.  This works identical to pthread_once(3)
with the additional property that it is safe for routines in libc to use
in both single-threaded and multi-threaded processes.  Multi-threaded
processes use the pthread_once() implementation from the threading library
while single-threaded processes use a simplified "stub" version internal
to libc.
2009-12-17 20:41:27 +00:00
Konstantin Belousov
b6050120db MFC r199826:
sigset() is the name of function specified by SUSv4.
Replace it to avoid conflict.
2009-12-17 18:56:52 +00:00
Marcel Moolenaar
83fe91c2f0 MFC rev 200498:
Work-around a race condition on ia64 while unlocking a contested lock.
2009-12-17 02:06:07 +00:00
Robert Watson
f7000239aa Merge r197841 from head to stable/8:
Add a new errno, ENOTCAPABLE, to be returned when a process requests an
  operation on a file descriptor that is not authorized by the descriptor's
  capability flags.

  Sponsored by:	Google
2009-12-14 13:13:43 +00:00
Doug Barton
391a9677be MFC r199958:
Update to BIND 9.6.1-P2. The vulnerability this is designed to fix is
related to DNSSEC validation on a resolving name server that allows
access to untrusted users. If your system does not fall into all 3 of
these categories you do not need to update immediately.
2009-12-11 01:23:58 +00:00
Andrew Thompson
4b56fe67b6 MFC r199575
- fix a transfer cancelling bug/segfault [1]
  - correct a return code in the transfer cancel function.
  - add new API function, libusb20_tr_bulk_intr_sync().

 Submitted by:	HPS
 Reported by:	Robert Jenssen [1]
2009-12-09 21:34:38 +00:00
Fabien Thomas
d7fbf69d96 MFC 198433:
Not all Intel Core (TM) CPUs implement PMC_CLASS_IAF fixed-function
counters.  For such CPUs, use an alternate mapping of convenience
names to events supported by PMC_CLASS_IAP programmable counters.
2009-12-07 20:44:43 +00:00
Xin LI
931d13672c MFC revision 197579 and 199617:
Add two new fcntls to enable/disable read-ahead:

 - F_READAHEAD: specify the amount for sequential access.  The amount is
   specified in bytes and is rounded up to nearest block size.
 - F_RDAHEAD: Darwin compatible version that use 128KB as the sequential
   access size.

A third argument of zero disables the read-ahead behavior.

Please note that the read-ahead amount is also constrainted by sysctl
variable, vfs.read_max, which may need to be raised in order to better
utilize this feature.

Thanks Igor Sysoev for proposing the feature and submitting the original
version, and kib@ for his valuable comments.
2009-12-07 19:59:28 +00:00
John Baldwin
cd6d7a15cf MFC 200061:
The fd_mask type is an unsigned long, not an int, so treat the mask as a
long instead of an int when examining the results of select() to look for
RPC requests.  Previously this routine would ignore RPC requests to sockets
whose file descriptor mod 64 was greater than 31 on a 64-bit platform.
2009-12-07 19:07:45 +00:00
Christian Brueffer
02a7ccf746 MFC: r200019
Fix the dprintf() prototype.
2009-12-07 08:38:44 +00:00
Jilles Tjoelker
2ffbb2cea1 MFC r198406: wordexp(3): fix some bugs with signals and long outputs
* retry various system calls on EINTR
* retry the rest after a short read (common if there is more than about 1K
  of output)
* block SIGCHLD like system(3) does (note that this does not and cannot
  work fully in threaded programs, they will need to be careful with wait
  functions)

PR:		90580
2009-12-06 22:14:58 +00:00