aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* MFC:Xin LI2013-02-211-89/+104
| | | | | | | | | | | | | | | | | | | | | | | | r158812 (ache): Reflect size_t changes in glob.h Obtained from: NetBSD (mostly) r159294: - ANSIfy. - Remove two unnecessary casts. r243779 (marcel): Protect against DoS attacks, such as being described in CVE-2010-2632. The changes were derived from what has been committed to NetBSD, with modifications. This fixes FreeBSD-SA-13:02.libc for stable/6. Notes: svn path=/stable/6/; revision=247126
* MFC r211393 (by des):Xin LI2010-09-241-1/+1
| | | | | | | | | | | | In setusercontext(), do not apply user settings unless running as the user in question (usually but not necessarily because we were called with LOGIN_SETUSER). This plugs a hole where users could raise their resource limits and expand their CPU mask. Approved by: des Notes: svn path=/stable/6/; revision=213146
* MFC r181341 (marcel):Warner Losh2010-05-081-3/+3
| | | | | | | Cleanup for WARNS 6. Notes: svn path=/stable/6/; revision=207782
* MFC r181059:Warner Losh2010-05-081-2/+1
| | | | | | | Cleanup for WARNS 3. Notes: svn path=/stable/6/; revision=207781
* MFC r181044 (marcel):Warner Losh2010-05-081-1/+1
| | | | | | | Cleanup for WARNS 2. Notes: svn path=/stable/6/; revision=207780
* Hand merge in support for compiling libthread_db on arm (from changeWarner Losh2010-05-081-1/+1
| | | | | | | | r173703). Given the large delta between this and head, mergeinfo likely would do more harm than good. Notes: svn path=/stable/6/; revision=207779
* MFC r173703(cognet):Warner Losh2010-05-082-0/+120
| | | | | | | Add arm support in libthread_db Notes: svn path=/stable/6/; revision=207778
* MFC r206760: getcwd(3): Clarify that EACCES may or may not be checked.Jilles Tjoelker2010-05-051-3/+11
| | | | | | | | | | | | | | | | | | POSIX permits but does not require checking access on the current and parent directories. Because various programs do not like it if getcwd(3) fails, it seems best to avoid checking access as much as possible. There are various reports in GNATS about this (search for getcwd). Our getcwd(3) implementation first queries the kernel for the pathname directly, which does not check any permissions but sometimes fails, and then falls back to reading all parent directories for the names. PR: standards/44425 Notes: svn path=/stable/6/; revision=207686
* MFC: r173859, r205410Marius Strobl2010-03-301-11/+11
| | | | | | | | | | | Avoid aliasing which leads to incorrect results when compiling with the default strict aliasing rules. PR: 144900 Submitted by: Peter Jeremy Notes: svn path=/stable/6/; revision=205907
* MFC: r205397Marius Strobl2010-03-301-5/+10
| | | | | | | | | | | | | | | | - While SPARC V9 allows tininess to be detected either before or after rounding (impl. dep. #55), the SPARC JPS1 responsible for SPARC64 and UltraSPARC processors defines that in all cases tinyness is detected before rounding, therefore rounding up to the smallest normalised number should set the underflow flag. - If an infinite result is rounded down, the result should have an exponent 1 less than the value for infinity. PR: 144900 Submitted by: Peter Jeremy Notes: svn path=/stable/6/; revision=205903
* MFC: r205396Marius Strobl2010-03-301-7/+9
| | | | | | | | | | | Division should take both arguments' signs into account when the the dividend is infinity or zero and the divisor is not the same. PR: 144900 Submitted by: Peter Jeremy Notes: svn path=/stable/6/; revision=205898
* MFC: r205395Marius Strobl2010-03-303-1/+12
| | | | | | | | | | FPU_DEBUG requires <stdio.h>. PR: 144900 Submitted by: Peter Jeremy Notes: svn path=/stable/6/; revision=205895
* MFC: r205394Marius Strobl2010-03-301-5/+7
| | | | | | | | | | | Ensure that __fpu_ftox() both returns the high bits and res[1] contains the low bits also in the default case. PR:i 144900 Obtained from: OpenBSD Notes: svn path=/stable/6/; revision=205892
* MFC: r205393Marius Strobl2010-03-302-7/+3
| | | | | | | | - Remove a bogus forward declaration. - Fix whitespace. Notes: svn path=/stable/6/; revision=205888
* MFC r204447:Jaakko Heinonen2010-03-191-0/+4
| | | | | | | | | | | 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 Notes: svn path=/stable/6/; revision=205331
* MFC: r204974, r205002Marius Strobl2010-03-152-29/+21
| | | | | | | | | | | | | | | | | | | | - The OPSZ macro actually only does the right thing for int32 and int64 operands but not for double and extended double ones. Instead of trying to fix the macro just nuke it and unroll the loops in the correct way though as extended double operands turn out to be the only special case. - For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded after setting type accordingly as it's generally decoded using the low 2 bits as the type, which are 0 for these three instructions. - Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be re-decoded using not only the operand mask appropriate for int64 but also the correct register number encoding. - Use const where appropriate. - Wrap long lines. Submitted by: Peter Jeremy (partly) Notes: svn path=/stable/6/; revision=205185
* MFC: Enable the use of nanosleep() instead of using pause() and signals.Gregory Neil Shapiro2010-03-071-0/+1
| | | | | | | | 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. Notes: svn path=/stable/6/; revision=204817
* MFC: r201836Christian Brueffer2010-01-151-3/+2
| | | | | | | Remove unnecessary quoting and markup, add missing punctuation. Notes: svn path=/stable/6/; revision=202415
* MFC r186834:Bjoern A. Zeeb2010-01-051-1/+4
| | | | | | | | | | | Document the special loopback address behaviour of jails. PR: kern/103464 Submitted by: brueffer (correct markup) Reviewed by: brueffer Notes: svn path=/stable/6/; revision=201607
* MFC r201137Xin LI2010-01-041-1/+1
| | | | | | | | | Grammar fix. Submitted by: Kenyon Ralph <kenyon kenyonralph com> Notes: svn path=/stable/6/; revision=201465
* Explicitly say that this is an internal library which is intended to beXin LI2009-12-271-1/+10
| | | | | | | | | | | 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) Notes: svn path=/stable/6/; revision=201041
* MFC r199244:Peter Pentchev2009-12-241-1/+1
| | | | | | | | | | Fix the grammar in the isgraph(3) description, almost as per the PR. PR: 140455 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> Notes: svn path=/stable/6/; revision=200964
* MFC 200061:John Baldwin2009-12-071-2/+2
| | | | | | | | | | 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. Notes: svn path=/stable/6/; revision=200226
* MFC: r199988Christian Brueffer2009-12-041-2/+3
| | | | | | | Add an .Nm for strncat. Notes: svn path=/stable/6/; revision=200094
* Merge rev. 199180 to 8.x-STABLE, the change to isblank(3):Peter Pentchev2009-11-251-2/+2
| | | | | | | | | | Fix the grammar as in the PR, and then some. PR: 140454 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> Notes: svn path=/stable/6/; revision=199795
* MFC: r199320Christian Brueffer2009-11-231-1/+1
| | | | | | | Fix grammar. Notes: svn path=/stable/6/; revision=199711
* MFC: r199317Christian Brueffer2009-11-231-0/+1
| | | | | | | Fix a memory leak in acl_from_text() in case the conversion succeeded. Notes: svn path=/stable/6/; revision=199703
* MFC: r199255, r199257Christian Brueffer2009-11-201-10/+2
| | | | | | | | | | 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. Notes: svn path=/stable/6/; revision=199570
* MFC 198986:John Baldwin2009-11-171-6/+6
| | | | | | | | 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. Notes: svn path=/stable/6/; revision=199410
* MFC: r199046Christian Brueffer2009-11-161-1/+1
| | | | | | | Fix a copy+paste error by checking the correct variable against MM_NULLACT. Notes: svn path=/stable/6/; revision=199316
* MFC: 198542Christian Brueffer2009-11-041-0/+1
| | | | | | | | Initialize f_rabuf in the raw device case. A subsequent close() later on would try to free it, leading to a crash. Notes: svn path=/stable/6/; revision=198890
* MFC: rev. 197681Joe Marcus Clarke2009-10-041-1/+1
| | | | | | | | | | | 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: kib Notes: svn path=/stable/6/; revision=197760
* Fix world build on alpha, by adding an include now required but only addedNathan Whitehorn2009-10-031-0/+1
| | | | | | | | | on other platforms. Note: this is not an MFC due to removal of alpha support in head. Notes: svn path=/stable/6/; revision=197736
* MFC 193023+193024:Xin LI2009-09-282-1/+18
| | | | | | | | | | Add an option to enforce strict RFC 1034 compliance. Document how to enable strict RFC 1034 enforcements. PR: kern/129477 Notes: svn path=/stable/6/; revision=197602
* Implement %z for strptime.Xin LI2009-07-261-0/+28
| | | | | | | | PR: kern/63064 Submitted by: Stefan `Sec` Zehl <sec 42 org> (with some small changes) Notes: svn path=/stable/6/; revision=195889
* MFC r194932Xin LI2009-07-081-3/+49
| | | | | | | | | | | | Lock around access to nc_file and netconfig_info ("ni"). The RPC part of libc is still not thread safe but this would at least reduce the problems we have. PR: threads/118544 Submitted by: Changming Sun <snnn119 gmail com> Notes: svn path=/stable/6/; revision=195432
* MF7: If the running kernel has support for shm_open() and shm_unlink() asJohn Baldwin2009-06-231-0/+28
| | | | | | | | system calls (i.e. 8.0+), then invoke the system calls instead of using open/fcntl/unlink. Notes: svn path=/stable/6/; revision=194740
* MFC r181997 by kib:Ed Maste2009-06-161-0/+1
| | | | | | | | | | | Add -fno-omit-frame-pointer to CFLAGS used to compile crt1.c on amd64. For gcc' __builtin_frame_address() to work, all call frames need to save frame pointer. In particular, this is important for the upper frame that should terminate the chain. Notes: svn path=/stable/6/; revision=194301
* MFC: Add a feature_present(3) function which checks to see if a named kernelJohn Baldwin2009-06-113-2/+137
| | | | | | | feature is present by checking the kern.features sysctl MIB. Notes: svn path=/stable/6/; revision=193995
* MFC r193826:Attilio Rao2009-06-092-2/+4
| | | | | | | avoid to write a int into a char * avoiding breakages on BE architectures. Notes: svn path=/stable/6/; revision=193838
* Merge r192129+r190661:Xin LI2009-05-281-5/+7
| | | | | | | | | Properly handle malloc() failures. PR: bin/83338 Notes: svn path=/stable/6/; revision=193000
* Merge r190646:Xin LI2009-05-281-2/+6
| | | | | | | | | | | Bail out when memory allocation is failed, rather than referencing a NULL pointer. PR: kern/94480 Submitted by: Michiel Pelt <m.pelt xs4all nl> Notes: svn path=/stable/6/; revision=192996
* MFC: r192410Christian Brueffer2009-05-231-2/+2
| | | | | | | | Since audit(4) isn't based on posix1e, remove the commented out audit.h header, xref libbsm(3). Notes: svn path=/stable/6/; revision=192633
* Fix the world breakage, on amd64, introduced by the last libthread_dbAttilio Rao2009-05-181-0/+1
| | | | | | | | | | | commit. Reported by: many Sponsored by: Sandvine Incorporated Pointy hat to: attilio Notes: svn path=/stable/6/; revision=192320
* MFC libthread_db modifies until r181651:Attilio Rao2009-05-1420-241/+446
| | | | | | | | | | - Introduce and use new functions pthread_{read, write}_* - Move psaddr_t from void * to uintptr_t - Fix some ABI mismatches - Introduce WARN 6 for compilation Notes: svn path=/stable/6/; revision=192098
* MFC: Fix an off-by-one buffer overflow in ngets().John Baldwin2009-05-041-1/+1
| | | | Notes: svn path=/stable/6/; revision=191786
* MFC r190482: zero out memory before use and free.Xin LI2009-04-115-28/+11
| | | | | | | Security: Potential Information Leak Notes: svn path=/stable/6/; revision=190940
* MFC revisions 162191, 166134, and 172259:Xin LI2009-04-026-33/+54
| | | | | | | | Avoid memory leaks, properly handle malloc/realloc failures, and remove duplicate includes. Notes: svn path=/stable/6/; revision=190659
* MFC r177490 - diff reduction w/ head.Ed Maste2009-02-264-15/+22
| | | | | | | Use linker set to collection all target operations. Notes: svn path=/stable/6/; revision=189058
* MFH 188316: Shutup warning for DNAME RR.Hajimu UMEMOTO2009-02-162-2/+3
| | | | | | | | PR: bin/127591 Submitted by: "Eugene M. Kim" <20080111.freebsd.org__at__ab.ote.we.lv> Notes: svn path=/stable/6/; revision=188691