summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Fix Denial of Service vulnerability in named(8) with DNS64. [13:01]releng/7.4Bjoern A. Zeeb2013-02-191-22/+79
| | | | | | | | | | | | | | Fix Denial of Service vulnerability in libc's glob(3) functionality. [13:02] Security: CVE-2012-5688 Security: FreeBSD-SA-13:01.bind Security: CVE-2010-2632 Security: FreeBSD-SA-13:02.libc Approved by: so (simon, bz) Notes: svn path=/releng/7.4/; revision=246989
* Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]Colin Percival2011-12-236-3/+84
| | | | | | | | | | | | | | | | | | | | | | | Add an API for alerting internal libc routines to the presence of "unsafe" paths post-chroot, and use it in ftpd. [11:07] Fix a buffer overflow in telnetd. [11:08] Make pam_ssh ignore unpassphrased keys unless the "nullok" option is specified. [11:09] Add sanity checking of service names in pam_start. [11:10] Approved by: so (cperciva) Approved by: re (bz) Security: FreeBSD-SA-11:06.bind Security: FreeBSD-SA-11:07.chroot Security: FreeBSD-SA-11:08.telnetd Security: FreeBSD-SA-11:09.pam_ssh Security: FreeBSD-SA-11:10.pam Notes: svn path=/releng/7.4/; revision=228843
* MFC r215236:Xin LI2010-11-272-124/+130
| | | | | | | | | Sync with OpenBSD, primarily better signal and terminal handling. Obtained from: OpenBSD Notes: svn path=/stable/7/; revision=215935
* MFC r198406: wordexp(3): fix some bugs with signals and long outputsJilles Tjoelker2010-11-171-19/+57
| | | | | | | | | | | | | | * 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 Notes: svn path=/stable/7/; revision=215442
* MFC r213453: When no protocol entry is found, getproto*_r(3)Hajimu UMEMOTO2010-10-303-3/+3
| | | | | | | should return zero. Notes: svn path=/stable/7/; revision=214550
* MFC r213403: Clear errno for each method dispatch.Hajimu UMEMOTO2010-10-301-0/+2
| | | | Notes: svn path=/stable/7/; revision=214549
* MFC of r207830Edwin Groothuis2010-10-191-0/+8
| | | | | | | | | | | | | | | | | strptime(3) confused July with June with the fr_FR locale. When parsing the month "juillet" (abbr "jul"), %B recognized it as "juin" (abbr "jui") because the full name of the month names is checked at the same time as the abbrevation. The new behaviour checks the full names first before checking the abbrevation names. PR: kern/141939 Submitted by: Denis Chatelain <denis@tikuts.com> Notes: svn path=/stable/7/; revision=214080
* MFC 212269.Glen Barber2010-09-131-1/+3
| | | | | | | | | Add ECONNRESET to connect(2). Approved by: keramida (mentor) Notes: svn path=/stable/7/; revision=212565
* MFC r211340: Correct the return code from _dns_gethostby*()Hajimu UMEMOTO2010-08-291-4/+20
| | | | | | | to correspond with h_errno. Notes: svn path=/stable/7/; revision=211957
* MFC r211276:Hajimu UMEMOTO2010-08-2811-49/+109
| | | | | | | | | | | | | - When there is no room for returning the result, nss backend have to return ERANGE and terminate with NS_RETURN. - When gethostbyname_r(3) and the friends end with an error, set errno to the value nss backend returns, and return errno value. PR: kern/131623 Notes: svn path=/stable/7/; revision=211939
* MFC r204636:Jaakko Heinonen2010-08-281-1/+8
| | | | | | | | | | | In reallocf(3), free the memory only when size != 0. Otherwise, when the System V compatibility option (malloc "V" flag) is in effect a zero sized reallocf() could cause a double free. PR: bin/141753 Notes: svn path=/stable/7/; revision=211919
* MFC r209058:Rebecca Cran2010-08-061-1/+1
| | | | | | | | | sctp_recvmsg returns the number of bytes received, not sent. Approved by: rrs (mentor) Notes: svn path=/stable/7/; revision=210950
* MFC r210641: Fix a couple of typos.Ulrich Spörlein2010-08-061-1/+1
| | | | | | | | PR: docs/148891 Submitted by: olgeni Notes: svn path=/stable/7/; revision=210920
* MFC: r207946Christian Brueffer2010-07-041-3/+2
| | | | | | | | The previous revision actually removed the bug being hinted at, so go ahead and remove the hint. Notes: svn path=/stable/7/; revision=209699
* Change the current working directory to be inside the jail created byColin Percival2010-05-271-1/+8
| | | | | | | | | | | | | | | | | the jail(8) command. [10:04] Fix a one-NUL-byte buffer overflow in libopie. [10:05] Correctly sanity-check a buffer length in nfs mount. [10:06] Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:04.jail Security: FreeBSD-SA-10:05.opie Security: FreeBSD-SA-10:06.nfsclient Notes: svn path=/stable/7/; revision=208586
* MFC r207981:Gordon Tetlow2010-05-201-2/+2
| | | | | | | | | | | | | Fix a bug due to a type conversion from 64 to 32 bits. The side effect of this type conversion is the high bits which were used to indicate if a special character was a literal or special were dropped. As a result, all special character were treated as special, even if they were supposed to be literals. Approved by: mentor (wes@) Notes: svn path=/stable/7/; revision=208366
* 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/7/; revision=207685
* MFC r207186: sysctl(3): Update description of various kern.* variables.Jilles Tjoelker2010-05-051-12/+10
| | | | | | | | | | Also add xrefs for confstr(3) (as sysconf(3) but for strings) and kvm(3) (which is a more convenient way to access some of the variables). PR: 116480 Notes: svn path=/stable/7/; revision=207681
* MFC: r206490, r206492Marius Strobl2010-05-021-0/+4
| | | | | | | | | | | | | | | 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 tininess is detected before rounding therefore rounding up to the smallest normalized number should set the underflow flag. This change is needed for using SoftFloat on sparc64 for reference purposes. PR: 144900 Submitted by: Peter Jeremy Notes: svn path=/stable/7/; revision=207527
* MFC r206549:Konstantin Belousov2010-04-211-8/+13
| | | | | | | | | | | | | | Align the declaration for sa_sigaction with POSIX. MFC r206649: Still reference struct __sigaction with clarification when this form of argument declaration is needed. MFC r206802: Revert r206649. Simplify the presented declaration of struct sigaction. Notes: svn path=/stable/7/; revision=206991
* MFC 205536:John Baldwin2010-04-141-1/+6
| | | | | | | Reject attempts to create a MAP_ANON mapping with a non-zero offset. Notes: svn path=/stable/7/; revision=206603
* MFC 184226:John Baldwin2010-04-141-8/+6
| | | | | | | Add a statement about the non-portability of non-page-aligned offsets. Notes: svn path=/stable/7/; revision=206601
* MFC r206178: ibc/db/hash: cap auto-tuned block sizeAndriy Gapon2010-04-122-1/+3
| | | | Notes: svn path=/stable/7/; revision=206509
* MFC r206177: hash.3: fix a factual mistake in the man pageAndriy Gapon2010-04-081-1/+1
| | | | Notes: svn path=/stable/7/; revision=206394
* 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/7/; revision=205906
* 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/7/; revision=205901
* 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/7/; revision=205897
* MFC: r205395Marius Strobl2010-03-303-1/+12
| | | | | | | | | | FPU_DEBUG requires <stdio.h>. PR: 144900 Submitted by: Peter Jeremy Notes: svn path=/stable/7/; revision=205894
* 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: 144900 Obtained from: OpenBSD Notes: svn path=/stable/7/; revision=205891
* MFC: r205393Marius Strobl2010-03-302-7/+3
| | | | | | | | - Remove a bogus forward declaration. - Fix whitespace. Notes: svn path=/stable/7/; revision=205889
* MFC 204950,205020:John Baldwin2010-03-228-65/+81
| | | | | | | | | | | | Use thr_once() with once_t controls to initialize various thread_key_t objects used to provide per-thread storage in the RPC code. Almost all of these used double-checking with a dedicated mutex (tsd_lock) to do this before. However, that is not always safe with more relaxed memory orders. There were also other bugs, such as one in __rpc_createrr() that caused a new key to be allocated each time __rpc_createrr() was invoked. Notes: svn path=/stable/7/; revision=205450
* 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/7/; revision=205330
* 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/7/; revision=205184
* MFC r203323:Rebecca Cran2010-02-241-1/+1
| | | | | | | | | Remove extra semicolon. Approved by: rrs (mentor) Notes: svn path=/stable/7/; revision=204292
* MFC r203322:Rebecca Cran2010-02-244-3/+5
| | | | | | | | | | Fix typo of ENOTCONN. Add missing RETURN VALUES section in sctp_opt_info(3). Approved by: rrs (mentor) Notes: svn path=/stable/7/; revision=204291
* Merge r203393,r203395 from head:Gavin Atkinson2010-02-231-2/+2
| | | | | | | | | | | 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 Notes: svn path=/stable/7/; revision=204255
* MFC 197331, 197394:John Baldwin2010-01-294-3/+184
| | | | | | | | | | Add getpagesizes(3) function that returns either the number of page sizes supported by the system or a specified subset of the supported page sizes. Approved by: re (kib) Notes: svn path=/stable/7/; revision=203170
* MFC r201892:Xin LI2010-01-232-4/+8
| | | | | | | | | Add a set of manual pages for pthread[_attr]_[sg]etaffinity(3). Reviewed by: davidxu Notes: svn path=/stable/7/; revision=202856
* MFC r200799:Xin LI2010-01-201-8/+3
| | | | | | | K&R -> ANSI prototype. Notes: svn path=/stable/7/; revision=202667
* MFC: r202176Christian Brueffer2010-01-1912-45/+54
| | | | | | | Miscellaneous mdoc, spelling and inconsistency fixes. Notes: svn path=/stable/7/; revision=202633
* MFC: r201603Christian Brueffer2010-01-191-1/+1
| | | | | | | Fix a double free(). Notes: svn path=/stable/7/; revision=202631
* MFC: r201836Christian Brueffer2010-01-151-3/+2
| | | | | | | Remove unnecessary quoting and markup, add missing punctuation. Notes: svn path=/stable/7/; revision=202414
* MFC 199607, 200797, 201270, 201669:John Baldwin2010-01-131-35/+41
| | | | | | | | | 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. Notes: svn path=/stable/7/; revision=202202
* MFC r197163Alan Cox2010-01-041-1/+11
| | | | | | | | | Add the FBSD_1.2 namespace. Discussed with: deischen Notes: svn path=/stable/7/; revision=201519
* MFC r201201:Konstantin Belousov2010-01-012-11/+45
| | | | | | | | | | Document CLOCK_SECOND, add cross-reference from time(3) to clock_gettime(2). MFC r201204: Document _FAST and _PRECISE clocks. Notes: svn path=/stable/7/; revision=201363
* MFC of r200832, tzdata2009tEdwin Groothuis2009-12-291-1/+1
| | | | | | | | | | | zic: - Fix URL / reference to Calendrical Calculations: Third Edition libc/stdtime: - Fix typo in tzfile.5 (no changes in our part) Notes: svn path=/stable/7/; revision=201184
* 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/7/; revision=200963
* MFC r200589: cpuset(2): fix a typo and a markup error in the man pageJilles Tjoelker2009-12-221-2/+2
| | | | Notes: svn path=/stable/7/; revision=200837
* MFC 199606, 199614:John Baldwin2009-12-173-1/+73
| | | | | | | | | | | | 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. Notes: svn path=/stable/7/; revision=200649
* 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/7/; revision=200225