Commit Graph

12670 Commits

Author SHA1 Message Date
Jaakko Heinonen
324846ecfa MFC r204447:
In _gettemp(), check that the length of the path doesn't exceed
MAXPATHLEN. Otherwise the path name (or part of it) may not fit to
carrybuf causing a buffer overflow.

PR:		bin/140228
2010-03-12 06:56:51 +00:00
Gregory Neil Shapiro
1b0154570e MFC: Enable the use of nanosleep() instead of using pause() and signals.
This Makefile change can be removed when the next version of sendmail
     is imported as it will have this built in to the FreeBSD conf.h section.
2010-03-07 02:02:07 +00:00
Marcel Moolenaar
35420d4867 MFC revs 203696, 203783:
Add PT_VM_TIMESTAMP and PT_VM_ENTRY so that the tracing process can
obtain the memory map of the traced process.

Requested by: kib@
2010-03-07 00:07:00 +00:00
Konstantin Belousov
bd94a8bcdc MFC r204307:
Make pause(3) implementation not depended on the legacy sigcompat.c
interfaces. Do not block rt signals during and after pause(3) calls.
Use private libc namespace to call proper methods.
2010-03-04 07:12:44 +00:00
Brooks Davis
d4e3872db3 MFC r201959
Use the correct types to store uids and gids in the credential cache and
eliminate an inappropriate use of NGROUPS.
2010-03-03 21:47:25 +00:00
Xin LI
aa3d547d09 MFC x86emu/x86bios emulator and make previously i386 only dpms and vesa
framebuffer driver, etc. work on FreeBSD/amd64.

A significant amount of improvements were done by jkim@ during the recent
months to make vesa(4) work better, over the initial code import.  This
work is based on OpenBSD's x86emu implementation and contributed by
paradox <ddkprog yahoo com> and swell.k at gmail com.

Hopefully I have stolen all their work to 8-STABLE :)

All bugs in this commit are mine, as usual.
2010-03-02 01:56:55 +00:00
Kirk McKusick
4179ce18a2 MFC of 203763, 203764, 203768, 203769, 203770, 203782, and 203784.
These fixes correct a problem in the file system that treats large
inode numbers as negative rather than unsigned. For a default
(16K block) file system, this bug began to show up at a file system
size above about 16Tb.

These fixes also update newfs to ensure that it will never create a
filesystem with more than 2^32 inodes.

They also update libufs, tunefs, and growfs so that they properly
handle inode numbers as unsigned.

Reported by: Scott Burns, John Kilburg, and Bruce Evans
Followup by: Jeff Roberson
PR:          133980
2010-02-26 21:49:11 +00:00
Ruslan Ermilov
8d0a84b1d4 MFC: r204008: realloc() with a proper amount of memory. 2010-02-22 15:58:10 +00:00
Ruslan Ermilov
3343356549 MFC: r203918: Unbreak makefiles by removing mentions of DEFAULT_THREAD_LIB. 2010-02-18 16:52:49 +00:00
Rebecca Cran
ee7ee75497 MFC r203323:
Remove extra semicolon.

Approved by:	rrs (mentor)
2010-02-18 10:55:42 +00:00
Rebecca Cran
73ab91c2d6 MFC r203322:
Fix typo of ENOTCONN.
Add missing RETURN VALUES section in sctp_opt_info(3).

Approved by:	rrs (mentor)
2010-02-18 10:51:31 +00:00
Konstantin Belousov
a5d3f6af70 MFC r203441:
Placate new binutils, by using 16-bit %ax instead of 32-bit %eax as an
argument for fnstsw. Explicitely specify sizes for the XMM control and
status word and X87 control and status words.
2010-02-17 09:09:12 +00:00
Gavin Atkinson
d69d02b9a4 Merge r203393,r203395 from head:
The multiplicand a = 0x5deece66d = 25214903917, not 0xfdeece66d.
  This bug in the man page has gone unnoticed for over 15 years!

PR:		docs/143461
Submitted by:	Jeremy Huddleston  jeremyhu apple.com
2010-02-13 10:26:00 +00:00
Ed Maste
3268298eef MFC r203077:
Add missing return, in a rare case where we can't allocate memory in
  deallocate.

Submitted by: Ryan Stone (rysto32 at gmail dot com)
Approved by:  jasone
2010-02-09 13:07:32 +00:00
Doug Barton
ac8e3748c2 MFC 202960:
Copyright-only changes to generated files as part of the 9.6.1-P3 update
2010-02-07 20:26:45 +00:00
Hajimu UMEMOTO
9ed7f3a23a MFC r202916: Make strsignal(3) thread-safe. 2010-02-07 04:27:18 +00:00
Joerg Wunsch
a387b53227 MFC r203356: add a manpage for gpib(3). 2010-02-04 19:49:07 +00:00
Gavin Atkinson
c11be0301d Merge r203027 from head:
Correct the HISTORY section of these man pages to show when the function,
  not the "manual page example" was introduced.

Approved by:	ed (mentor, implicit)
2010-02-02 19:44:52 +00:00
Gavin Atkinson
335287096d Merge r203025,r203026 from head:
Correct the HISTORY section of these man pages to show when the function,
  not the "manual page example" was introduced.

Approved by:	ed (mentor, implicit)
2010-02-02 19:37:26 +00:00
Konstantin Belousov
f2d58a1d9b MFC r199827:
Implement sighold, sigignore, sigpause, sigrelse, sigset functions.

MFC r200881 (by cognet):
Don't name parameters.
2010-01-31 18:38:03 +00:00
Antoine Brodin
e2b36efde5 MFC r201145 to stable/8:
(S)LIST_HEAD_INITIALIZER takes a (S)LIST_HEAD as an argument.
  Fix some wrong usages.
  Note: this does not affect generated binaries as this argument is not used.

  PR:		137213
  Submitted by:	Eygene Ryabinkin (initial version)
2010-01-30 12:11:21 +00:00
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