summaryrefslogtreecommitdiffstats
path: root/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Use size_t in appropriate places; fixes sorting of big arrays;otto2010-02-081-9/+10
| | | | | after the diff was written, I made it similar to the freebsd fix of the same code; pr6287 ok millert@ guenther@
* use size_t to index arrays; avoids big array bugs; ok millert@ guenther@otto2010-02-081-1/+1
|
* Use MACHINE_CPU instead of MACHINE_ARCH to pick the correct machine dependentmiod2010-02-0321-88/+95
| | | | | | | files or directories when applicable. The inspiration and name of MACHINE_CPU come from NetBSD, although the way to provide it to Makefiles is completely different. ok kettenis@
* add a fix from OpenSSL CVS for SA38200.jasper2010-01-312-20/+14
| | | | | | | | "Modify compression code so it avoids using ex_data free functions. This stops applications that call CRYPTO_free_all_ex_data() prematurely leaking memory." looks ok to markus@
* Update translations: fix EREMOTE and add a bunch of error codes too.guenther2010-01-281-1/+25
| | | | From Vadim Zhukov (persgray at gmail.com)
* stucture -> structure;jmc2010-01-251-3/+3
|
* ellipses are not optional arguments; while here, fix a double .Ar/.Arsobrado2010-01-251-3/+3
| | | | | | in the roff source. ok jmc@
* fix double full stop, find out by jmc@ when looking into another issue.sobrado2010-01-251-3/+3
|
* Give little-endian fp on mips a change to be handled correctly.miod2010-01-231-0/+4
|
* back out last commit. breaks half-duplex playback with poll().jakemsr2010-01-201-14/+7
| | | | ok ratchov
* Better ERRORS section info; from Tim van der Molen. POSIX documentsmillert2010-01-191-7/+54
| | | | | other common errno values for opendir() whereas we just point the user to open() et al. OK jmc@
* Leave errno as-is if fstat(2) fails instead of masking the realmillert2010-01-191-3/+7
| | | | errno with ENOTDIR. From Tim van der Molen.
* Keep in memory whether the socket is writable. This way sio_revents()ratchov2010-01-151-7/+14
| | | | | | | | can return POLLOUT (if requested), even the handle was not writable when sio_pollfd() was called but become writable somewhere in the code path of sio_revents(). This should improve stability of programs using very small buffers.
* Add support to sysconf(3) for the variables _SC_NPROCESSORS_CONF andsthen2010-01-153-4/+22
| | | | | | | _SC_NPROCESSORS_ONLN, implemented by AIX/Tru64/Solaris/Linux/SCO/FreeBSD/NetBSD. Bump libc minor. From Brad, ok deraadt@ guenther@
* Restore an if that got lost in the update.nicm2010-01-141-7/+9
| | | | Fixes problems with editors/joe reported by benoit@.
* Document hw.ncpufound and HW_NCPUFOUND.guenther2010-01-141-3/+22
| | | | | | | | Document the interpretation of the third and fourth levels of KERN_FILE2. Document that KERN_FILE and KERN_PROC are deprecated in favor of KERN_FILE2 and KERN_PROC2. ok and tweaks jmc@
* New options 'S', as a shorthand for the options most suitable as anotto2010-01-132-3/+9
| | | | extra safeguard (FGJ). Idea from deraadt@; ok deraadt@ dlg@
* If a process receives two different signals while in readpassphrase, onlydtucker2010-01-131-13/+19
| | | | | | | the most recent one will be stored for later re-delivery. When the signal handlers are restored, all except the most recent signal will be lost. Replace the single variable with an array so signals are not lost. ok deraadt@
* Update to ncurses 5.7, with local changes reapplied.nicm2010-01-12387-14963/+28213
| | | | | | | | | This is around eight years worth of changes (previously we were around ncurses 5.2), too many to list - many bug fixes and also a few new functions. A major bump for libcurses, libpanel, libform and libmenu. ok deraadt
* the comment is right, this can indeed go away.jasper2010-01-121-2/+1
| | | | | | it's unused inside libkvm, and nothing else is allowed to use it. ok guenther@ "sure" deraadt@
* encourage use of setreseuid(), and warn there are other privs; ok henningderaadt2010-01-111-5/+5
|
* Reimplement kvm_getproc2()'s support for reading crash dumps andguenther2010-01-104-204/+383
| | | | | | | | | | | | | | /dev/mem to be direct instead of going through kvm_getprocs(), as that function is going to get more an more broken as we move stuff from struct proc to struct process for rthreads. To minimize the code copying, put the common logic of filling in a kinfo_proc2 structure into a macro FILL_KPROC2() in <sys/sysctl.h> for use from both the kernel and user-space. This also hides the KERN_PROC #define behind "#if defined(_KERNEL)||defined(_LIBKVM)", as it's deprecated. Positive feedback from millert and blambert; so committing to unblock further rthreads work.
* Fix evsignal_del()'s use of sigaction(): fill in a sigaction structguenther2010-01-101-2/+7
| | | | | | | and pass a pointer to that instead of passing SIG_DFL directly. (Probably the result of a bad signal()-->sigaction() translation...) ok deraadt@, nicm@, miod@
* plug a file descriptor leak in HASHFileChunk().oga2010-01-081-2/+4
| | | | | | From Igor Zinovik; thanks! ok millert@
* Stop installing many of the incredibly dated and un-authoritative share/docderaadt2010-01-041-5/+1
| | | | | | | files. If any information found in these documents is worthwhile and you miss it, please make the time to work it into the manual pages (which people actually do read). ok guenther
* Make SO_RCVTIMEO and SO_SNDTIMEO work with pthreads. Fixes at least some offgsch2010-01-0313-38/+128
| | | | | the issues seen with www/varnish. With input and help from guenther@ and kurt@. guenther@ ok
* Neither .Pp nor unqualified text are allowed at the top level of .Bl;schwarze2010-01-031-3/+2
| | | | | | | | instead, .It is required. Thus, move .Pp and text before the .Bl, and remove the .Pp altogether where it is not needed. Syntax errors found by mandoc(1), also required to fix the mandoc build; feedback and ok jmc@, and sobrado@ also supports the direction.
* .Bl always requires .It, even in .Bl -column;schwarze2010-01-031-67/+67
| | | | | syntax errors found by mandoc(1), also required to fix the mandoc build; feedback and ok jmc@ and sobrado@
* blank lines not allowed outside literal context;schwarze2010-01-031-4/+4
| | | | | syntax errors found by mandoc(1), also required to fix the mandoc build; ok jmc@
* new ipsca root.dlg2009-12-311-0/+108
|
* ipsca has expireddlg2009-12-311-51/+0
|
* Document ESPIPE and make EFAULT cover all functions.fgsch2009-12-302-16/+34
| | | | jmc@ deraadt@ ok
* explain what sio_close() drains play buffers as if sio_close() wasratchov2009-12-301-16/+16
| | | | | | | called. Since sio_onmove() callback doesn't return negative deltas anymore, slightly simplify related paragraphs. siggested by espie@, ok jakemsr@
* move this file to Attic; the swapon(2) system call cannot be accessedsobrado2009-12-291-111/+0
| | | | | | | | | | | | from userland since April 2003 and, of course, the manual page is not built either. see miod@'s change in r1.66 of src/lib/libc/sys/Makefile.inc. i would like to acknowledge the excellent advice from jmc@ and fgsch@ with relation to this change. ok miod@
* add missing paragraph break (.Pp) macro.sobrado2009-12-291-2/+3
|
* replace a few remaining UNIX terms with .Ux macros; this diffsobrado2009-12-296-30/+35
| | | | completes the changes from Oct 22.
* Security fix for CVE-2009-3560, which could allow attackers to causejasper2009-12-271-1/+0
| | | | | | | a DoS using a specially crafted XML document with malformed UTF-8 sequences. Patch taken from upstream CVS.
* Implement proper error handling for getgrent(3), getgrnam(3) and getgrgid(3).schwarze2009-12-191-27/+43
| | | | | | | | | | | | | | | | | | | 1) Distinguish normal end of data (like eof, YPERR_NOMORE, YPERR_KEY) from error conditions. 2) Save errno(2) and restore it in case of success, as suggested by deraadt@ and beck@. While this code is touched, * move the common code for the yp_first and yp_next calls after the respective if/else-block; note that free(data) is not needed in case of failure and that __ypcurrent = NULL does no harm after failing yp_first. * return 0, not NULL: the return value of grscan is int, not a pointer. This is the last part of the work done on getgrent.c during c2k9, heavily relying on the other improvements done at that time. This has been rotting in my tree far too long. "get it in" deraadt@; also lightly tested by simon@ some time ago
* save calls to arc4random() by using a nibble at a time; not becauseotto2009-12-161-24/+27
| | | | | arc4random() is slow, but it induces getpid() calls; also saves a bit on stirring efforts
* Update the list of async-signal-safe functionsguenther2009-12-162-174/+208
| | | | | | | | | | Document that snprintf/vsnprintf/syslog_r() aren't async-signal-safe for floating-point Provide cursory documentation of SIGTHR Eliminate the NOTE section of the sigaction(2) manpage by merging the good bits into the STANDARDS section ok deraadt@
* No point in refreshing the pid from inside arc4_stir() when thatguenther2009-12-151-6/+15
| | | | | | | | | doesn't test it, so factor out the two places that test it into a routine and do the refreshing there. With this, arch4random_buf() doesn't trigger superfluous calls to getpid() when filling large buffers. ok deraadt@, "looks nicer indeed" otto@
* Keep all bits of __svc_fdset up to date, not just those beyond FD_SETSIZE.schwarze2009-12-141-3/+3
| | | | | | | Bug found while auditing the same complaint by parfait, see the previous commit; still not shutting parfait up. "wow, that's nasty" deraadt@
* sleep(3) is supposed to return zero when it sleeps the entire amountguenther2009-12-141-3/+3
| | | | ok deraadt@
* __svc_fdsetsize is counted in bits, not in array elementsschwarze2009-12-111-2/+2
| | | | | | | | | | When exceeding fd 1024, this bug cleared flag bits for all file descriptors except those <= 64. Found while auditing a (false positive) complaint by parfait. This bugfix does not shut parfait up, though. OK millert@ deraadt@
* Fix two memory leaks, one found by parfait, one by myself.jacekm2009-12-111-14/+35
| | | | ok deraadt@
* clean up the realloc code to make a parfait false positive go away.deraadt2009-12-111-5/+3
| | | | | parfait still does not completely understand how realloc() behaves (or %, ?:, >>, or << and its terminal function tracking remains weak)
* plug a memory leak; found by parfait, ok djmderaadt2009-12-111-0/+2
|
* More changes to avoid truncating 64 bit pointers to 32 bits and sign-extendingmiod2009-12-118-69/+69
| | | | them; allows userland with stack beyond 2GB to run.
* getcwd() is posix, not ansi; from Thomas Pfaffjmc2009-12-101-3/+3
| | | | ok millert
* Make sure to use 64 bit instructions in the assembly statements (addi -> daddi)miod2009-12-101-8/+4
| | | | | in the prologue; this gives a chance for binaries loaded with their stack over 2GB virtual, to run. Who's your daddi now?