summaryrefslogtreecommitdiff
path: root/lib
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-237-10/+102
| | | | | | | | | | | | | | | | | | | | | | | 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 r217383:Konstantin Belousov2011-01-221-0/+1
| | | | | | | | | | The (%esp & 0xf) == 0 should be true before the call instruction is executed, for the properly aligned stack. Approved by: re (bz) Notes: svn path=/releng/7.4/; revision=217721
* MFC r216351:Tijl Coosemans2010-12-141-9/+30
| | | | | | | | | | | | Add a .note.ABI-tag section to ia64 startup files by linking crtbrand.c in crt1.o. On other architectures crtbrand.c is included from crt1.c, but that's not a C source code file on ia64. Instead it is compiled separately and included in crt1.o using incremental linking. Approved by: re (kensmith), kib (mentor) Notes: svn path=/stable/7/; revision=216435
* 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 r215133: amd64: introduce minidump version 2Andriy Gapon2010-11-261-14/+94
| | | | | | | | This should reduce size of the minidump. Compatibility with version 1 should be preserved in libkvm. Notes: svn path=/stable/7/; revision=215874
* MFC r215237: Fix bug in jn(3) and jnf(3) that led to -inf resultsUlrich Spörlein2010-11-232-2/+12
| | | | Notes: svn path=/stable/7/; revision=215757
* 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 213402:George V. Neville-Neil2010-10-112-30/+30
| | | | | | | Fix punctuation and grammar, mostly by ending sentences with a period. Notes: svn path=/stable/7/; revision=213693
* MFC r212373:Kai Wang2010-10-101-11/+6
| | | | | | | | | | | | | | | | libelf is overly strict about the type and alignment of Elf_Data objects inside one ELF section, which prevents the creation of a ELF section with mixed data types. For example, gcc LTO use libelf to create a .gnu_lto_XXX section that contains integers and a string table, which doesn't work with our libelf implementation. The changes made in this commit include: * Allow Elf_Data type to be different than section type. * Relax Elf_Data alignment check. * Align each Elf_Data by their own alignment instead of section alignment. Notes: svn path=/stable/7/; revision=213671
* MFC r211833:David Xu2010-10-071-1/+1
| | | | | | | Decrease rdlock count only when thread unlocked a reader lock. Notes: svn path=/stable/7/; revision=213513
* 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/7/; revision=213145
* MFC r212224:Fabien Thomas2010-09-161-4/+4
| | | | | | | | Fix invalid class removal when IAF is not the last class. Keep IAF class with 0 PMC and change the alias in libpmc to IAP. Notes: svn path=/stable/7/; revision=212743
* 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 r210351-r210353,r211192.Kai Wang2010-09-044-14/+19
| | | | | | | | | | | | | | | | | | | | r210351: * Note that ar(1) archives may also be opened using `elf_memory(3)`. * Ignore the passed in value of the `fd` argument for ar(1) archives opened with elf_memory(3). r210352: Add a cross-reference to `elf_rawfile(3)`. r210353: * Remove a superfluous error description. * Document an additional error that may be returned: `ELF_E_ARCHIVE`. r211192: Add translation support for section type SHT_SUNW_dof. Notes: svn path=/stable/7/; revision=212207
* MFC r210344,r210345,r210348.Kai Wang2010-09-0416-260/+616
| | | | | | | | | | | | | | | | | | | | | | | | r210344: Avoid switching between "unsigned char" and "char" in the C code generated from "libelf_convert.m4". r210345: * Deprecate `elf_getshnum()`, `elf_getphnum()` and `elf_getshstrndx()` in favour of `elf_getshdrnum()`, `elf_getphdrnum()` and `elf_getshdrstrndx()` respectively. * Add new manual pages for `elf_getshdrstrndx()`, `elf_getphdrnum()` and `elf_getshdrnum()`. * Add a deprecation warning for `elf_getshstrndx()`, `elf_getphnum()` and `elf_getshnum()`. r210348: Move helper functions `_libelf_ar_get_{name,number,string}()` and `_libelf_ar_open()` to a new compilation unit "libelf_ar_util.c" to break the circular dependency between "elf_memory.o" and "libelf_ar.o". Notes: svn path=/stable/7/; revision=212205
* MFC r210329,r210330,r210347.Kai Wang2010-09-044-9/+13
| | | | | | | | | | | | | | r210329: Use <unistd.h> to declare the prototype for ftruncate(). r210330: Allow an application that updates only the ELF Ehdr to work. r210347: Fix a memory leak. Notes: svn path=/stable/7/; revision=212203
* MFC r210325,r210326,r210328,r210349Kai Wang2010-09-045-15/+17
| | | | | | | | | | | | | | | | | | | | | r210325: Bug fix: when updating headers using the gelf_update_*() functions, the appropriate `dirty' bit needs to be set for both the Elf32 and Elf64 case. r210326: Improve compatibility with other implementations of the ELF(3) API: when an output file has no program headers, set the 'e_phentsize' field of the ELF executable header to zero. r210328: Bug fix: permit the creation of zero-sized sections. r210349: Remove a redundant word. Notes: svn path=/stable/7/; revision=212201
* MFC r210324, r210438.Kai Wang2010-09-042-19/+52
| | | | | | | | | | | | | | | | | | r210324: - Correctly handle sections of type SHT_NOBITS. For these sections: - elf_getdata() and elf_rawdata() should return an "Elf_Data" structure that has its "d_buf" member set to NULL and "d_size" member set to the nominal 'size' of the section. - Update the manual page for these functions. - Fix a memory leak in an error handling path inside elf_getdata(). - Use _libelf_allocate_data() in elf_newdata() for consistency. r210438: (np) Catch up with r210324. d_buf will be NULL for SHT_NOBITS sections, do not attempt to copy from it in that case. Notes: svn path=/stable/7/; revision=212199
* MFC r210321:Kai Wang2010-09-041-1/+0
| | | | | | | Remove a superfluous comment. Notes: svn path=/stable/7/; revision=212197
* 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 r208860:Fabien Thomas2010-08-031-1/+3
| | | | | | | | | Fix memory leak on error. Found with: Coverity Prevent(tm) Notes: svn path=/stable/7/; revision=210817
* MFC: r209837, r209842, r209949Jung-uk Kim2010-07-201-12/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | Sync. printf() of libstand(3) with sys/kern/subr_prf.c. CVS r1.94 jhb: Cast the integer read as the first argument for %b to an unsigned integer so it's value is not sign extended when assigned to the uintmax_t variable used internally by printf. For example, if bit 31 is set in the cpuid feature word, then %b would print out the initial value as a 16 character hexadecimal value. Now it only prints out an 8 character value. CVS r1.109 njl: Add support for 'h' and 'hh' modifiers for printf(9). CVS r1.117 phk: If we ignore an unknown % sequence, we must stop interpreting the remaining % arguments because the varargs are now out of sync and there is a risk that we might for instance dereference an integer in a %s argument. SVN r209836 jkim: Implement optional 'precision' for numbers. Previously, it was parsed but ignored. Some third-party modules (e.g., ACPICA) prefer this format over zero padding flag '0'. Notes: svn path=/stable/7/; revision=210310
* 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
* Cleanup svn merge conflict markers.David E. O'Brien2010-06-301-3/+0
| | | | Notes: svn path=/stable/7/; revision=209606
* MFC r209122:Kai Wang2010-06-212-13/+19
| | | | | | | | | | | * Improve compatibility with existing application code by permitting the use of `elf_getbase()` on non-archive members. This change is needed for gcc LTO (-flto) to work properly. * Style fix: paranthesize returned values. * Document the current behaviour of `elf_getbase()`. Notes: svn path=/stable/7/; revision=209394
* MFC r197477 - clean up keys deleted via pthread_key_delete()Brian Somers2010-06-091-1/+11
| | | | | | | PR: 135462 Notes: svn path=/stable/7/; revision=208937
* 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 r205398: Do not create *.gmon files for PIE executables on i386.Jilles Tjoelker2010-05-021-1/+1
| | | | | | | | | | | | | Scrt1_c.o was accidentally compiled with -DGCRT (profiling), like gcrt1_c.o. This problem is i386-specific, the other architectures are OK. If you have problems with PIE executables such as samba and cups leaving behind gmon files, rebuild them after installing this change. PR: ports/143924 Notes: svn path=/stable/7/; revision=207538
* 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 r207187: kvm(3): Mention that some of the functions use sysctl(3)Jilles Tjoelker2010-05-021-2/+6
| | | | | | | | | | | instead of kmem. Additionally, because of sysctl(3) use (which is generally good), behaviour for crash dumps differs slightly from behaviour for live kernels and this will probably never be fixed entirely, so weaken that claim. Notes: svn path=/stable/7/; revision=207510
* Merge r203027 from head:Gavin Atkinson2010-04-2136-72/+72
| | | | | | | | Correct the HISTORY section of these man pages to show when the function, not the "manual page example" was introduced. Notes: svn path=/stable/7/; revision=206999
* 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 173194Giorgos Keramidas2010-04-191-3/+1
| | | | | | | | | Remove an extra (commented out) .Sh HISTORY section heading, to avoid the risk of "shadowing" the following .El request, and delete an empty line to fix mdoc warnings. Notes: svn path=/stable/7/; revision=206872
* MFC 173190Giorgos Keramidas2010-04-191-4/+2
| | | | | | | | | Remove an extra (commented out) .Sh HISTORY section heading, to avoid the risk of "shadowing" the following .El request, strip eol spaces and delete an empty line to fix mdoc warnings. Notes: svn path=/stable/7/; revision=206867
* MFC 173189Giorgos Keramidas2010-04-192-6/+3
| | | | | | | | Change a .PP request to a valid .Pp mdoc request, and remove an extra (but commented out) .Sh HISTORY section heading. Notes: svn path=/stable/7/; revision=206864
* MFC 173188Giorgos Keramidas2010-04-1928-56/+28
| | | | | | | | | Remove duplicate (but commented out) .Sh HISTORY section heading. It almost "shadows" the ending .El request of a list, which seems to have caused mdoc buglets in some gss_*.3 manpages. Notes: svn path=/stable/7/; revision=206863
* MFC 173187Giorgos Keramidas2010-04-192-4/+4
| | | | | | | | Remove duplicate (but commented out) .Sh HISTORY section heading and add a missing .El request. Notes: svn path=/stable/7/; revision=206862
* MFC r206089, r206684:Fabien Thomas2010-04-167-7/+5167
| | | | | | | | | | | | | | | | - Support for uncore counting events: one fixed PMC with the uncore domain clock, 8 programmable PMC. - Westmere based CPU (Xeon 5600, Corei7 980X) support. - New man pages with events list for core and uncore. - Updated Corei7 events with Intel 253669-033US December 2009 doc. There is some removed events in the documentation, they have been kept in the code but documented in the man page as obsolete. - Offcore response events can be setup with rsp token. Sponsored by: NETASQ Notes: svn path=/stable/7/; revision=206704
* MFC 205900:John Baldwin2010-04-141-4/+4
| | | | | | | | | | Use panic() (which the environment is required to provide to libstand) to implement assert() instead of relying on a non-required exit(). The exit() invocation also did not match the semantics of the exit() routine that current boot environments happen to require. Notes: svn path=/stable/7/; revision=206612