summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* MFC r288199,r288246:bdrewery2015-10-031-0/+2
| | | | Add missing CLEANFILES.
* MFC 286177:jhb2015-10-011-3/+3
| | | | Fix a couple of markup typos.
* MFC r288092:bdrewery2015-09-291-2/+0
| | | | | Avoid adding duplicates into OBJS. bsd.lib.mk already handles adding entries to OBJS based on SRCS.
* MFC r285428alc2015-09-271-4/+4
| | | | Correct the description of MADV_DONTNEED.
* Long overdue MFC r284377:jlh2015-09-221-8/+5
| | | | | | | | | | | | | NetBSD commit log: Use a constant array for the MIB. Newer LLVM decided that mib[] warranted stack protections, with the obvious crash after the setup was done. As a positive side effect, code size shrinks a bit. I'm not sure why this hasn't bitten us yes, but it is certainly possible and there are no real drawbacks to this change anyway. Submitted by: pfg Obtained from: NetBSD
* MFC 287349,287404:hrs2015-09-131-7/+15
| | | | | | | | | - Print sdl->sdl_data when sdl->sdl_nlen > 0 && sdl->sdl_alen == 0 as link_ntoa(3) does. - snprintf() returns at most size-1 of the chars printed into the buffer. (n == hostlen) also means the buffer length was too short.
* MFC 287595:hrs2015-09-131-12/+8
| | | | | | | - Fix SIGSEGV when sa == NULL. NULL check in getnameinfo_inet() did not work as expected. - Simplify afdl table lookup.
* MFC r287360:kib2015-09-081-1/+1
| | | | | Fix t_spawnattr test for attributes handling by posix_spawn(3). Connect it to the build.
* MFC r287093:delphij2015-09-081-1/+1
| | | | | | | Instead of doing an no-op (|= 0), actually clear the flags in acl_clear_flags_np. Reported by: Pascal Drecker <pascal freebsd drecker com>
* MFC r287292:kib2015-09-0522-121/+104
| | | | | | | | | | Switch libc from using _sig{procmask,action,suspend} symbols, which are aliases for the syscall stubs and are plt-interposed, to the libc-private aliases of internally interposed sigprocmask() etc. MFC r287300: Use libthr interposed functions instead of syscalls, in posix_spawn()' child.
* MFC: r286490,r286491,r287125bapt2015-09-021-16/+6
| | | | | | | | | Per rfc3629 value greater than 0x10ffff should be rejected (r286490,r286491) Make UTF-8 parsing and generation more strict. (r287125 by ed) - in mbrtowc() we need to disallow codepoints above 0x10ffff. - In wcrtomb() we need to disallow codepoints between 0xd800 and 0xdfff.
* MFC r286910:delphij2015-09-011-10/+5
| | | | | | | | - ANSIfy - Remove the redundant _PATH_RSH definition (paths.h at r96194); - Use pid_t for PIDs - Note that we are at the same level of OpenBSD's counterpart of revision 1.7 (r94757).
* MFC r279084,280713: setmode(): Use sysctl kern.proc.umask instead of umask()jilles2015-08-291-9/+33
| | | | | | | | | if possible. The kern.proc.umask.<pid> sysctl allows querying the umask without temporarily modifying it. r280713 is the actual change, while r279084 is a whitespace change.
* MFC r286975:kib2015-08-271-2/+6
| | | | Remove the wrong asserts.
* MFC r284649: fts_children: preserve errno after running close/fchdirjilles2015-08-091-5/+8
| | | | | PR: 200942 Submitted by: Conrad Meyer
* Implement x86 ptrace(2) requests PT_{GET,SET}{FS,GS}BASE.kib2015-08-051-2/+189
| | | | | | | | | | | | | | | | | | | | | | MFC r284918: Add helper fill_based_sd(9). MFC r284919: Add x86 PT_GETFSBASE, PT_GETGSBASE machine-depended ptrace requests to obtain the thread %fs and %gs bases. Add x86 PT_SETFSBASE and PT_SETGSBASE requests to set the bases from debuggers. The set requests, similarly to the sysarch({I386,AMD64}_SET_FSBASE), override the corresponding segment registers. MFC r284965: Document x86 machine-specific ptrace(2) requests. MFC r285011: Disallow a debugger on 64bit system to set fs/gs bases of the 32bit process beyond the end of the process address space. MFC r285104: Grammar and language fixes.
* MFC r285873:trasz2015-08-022-24/+2
| | | | | | | Update Capsicum and Mandatory Access Control manual pages to no longer claim they are experimental. Sponsored by: The FreeBSD Foundation
* MFC r285251:trasz2015-08-021-3/+3
| | | | | | Fix markup. Sponsored by: The FreeBSD Foundation
* MFC r285188:pkelsey2015-07-151-2/+14
| | | | | | | | Fix sysctl(3) so it returns the intended values for all mib names in the 'user' sysctl tree, which have all been coming back 0 or empty since r240176. Approved by: re
* MFH (r275020): partial fix for getgrouplist() in group_compat casedes2015-07-091-9/+16
| | | | | PR: 190055 Approved by: re (marius)
* MFC r284229: Add support for '_' occurring at the beginning orume2015-06-181-3/+3
| | | | | | | end of a name component. PR: 176093 Submitted by: landonf__at__bikemonkey.org
* MFC r264038 (theraven):delphij2015-06-172-9/+9
| | | | | | | | Fix an issue where the locale and rune locale could become out of sync, causing mb* functions (and similar) to be called with the wrong data (possibly a null pointer, causing a crash). PR: standards/188036
* MFC r284386:tuexen2015-06-171-2/+2
| | | | Fix name of a constant.
* MFC 281887:jhb2015-06-027-7/+7
| | | | | Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC.
* MFC 282417:jhb2015-06-021-7/+19
| | | | | | | | | | | | | | | | Various updates to the ftruncate(2) documentation: - Note that ftruncate(2) can operate on shared memory objects and cross reference shm_open(2). - Note that ftruncate(2) does not change the file position pointer (aka seek pointer) of the file descriptor. - ftruncate(2) will fail with EINVAL for all sorts of other fd types than just sockets, so instead note that it fails for all but regular files and shared memory objects. - Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2). (Or at least the manpage for both appeared in 4.2, I did not check the kernel code itself to see if either predated 4.2.) PR: 199472
* MFC 282416:jhb2015-06-021-4/+4
| | | | | | | | Partially revert r255486, the first argument to socketpair() is a socket domain, not a file descriptor. Use 'domain' instead of the original 'd' for this argument to match socket(2). PR: 199491
* MFC 282552:jhb2015-06-021-7/+1
| | | | | Remove the note about seekdir() removing telldir() cookies. That was removed back in r269204.
* MFC 281170:jhb2015-06-021-2/+2
| | | | | | | vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the copy of 3BSD on disc 1 of "The CSRG Archives". PR: 198612
* MFC r281884:tuexen2015-05-291-3/+3
| | | | | | A complete user message is signalled with the MSG_EOR flag, not the MSG_EOF flag. Thanks to Valentin Nechayev for reporting the issue.
* MFC r280782:tuexen2015-05-291-0/+1
| | | | | | | | Add an SCTP symbol which was missed in https://svnweb.freebsd.org/base?view=revision&revision=169622 This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197783 Thanks to Jukka Ukkonen for reporting the bug and providing a fix.
* MFC r279859:tuexen2015-05-291-0/+3
| | | | Add a SCTP socket option to limit the cwnd for each path.
* MFC r275857:tuexen2015-05-291-1/+4
| | | | | | | Initilize the msg_flags field consistently in all code paths. Reported by: Coverity CID: 1018726
* MFC r275682:tuexen2015-05-291-1/+1
| | | | Fix a typo reported by Lennart Grahl.
* MFC r283153:kib2015-05-271-5/+0
| | | | Remove the write-only variable phent.
* MFH: r282485julian2015-05-155-1/+69
| | | | | | | | | | | | | | | | | | Tweak seekdir, telldir and readdir so that when htere are deletes going on, as seek to teh last location saved will still work. This is needed for Samba to be able to correctly handle delete requests from windows. This does not completely fix seekdir when deletes are present but fixes the worst of the problems. The real solution must involve some changes to the API for eh VFS and getdirentries(2). Obtained from: Panzura inc MFH: r282550 (jhb@) A few style fixes and expand the comment a bit on what _fixtelldir() is doing. MFH: r282560 (jhb@) Tweak the comment here some more. In particular, the previous opening sentence was a bit confusing. Noted by: kib
* MFC r280983:trasz2015-05-151-3/+3
| | | | | | | Update open(2) to make it more obvious that O_NOCTTY and O_TTY_INIT are ignored. Sponsored by: The FreeBSD Foundation
* MFC r278352:trasz2015-05-151-6/+1
| | | | | | Remove useless comment. Sponsored by: The FreeBSD Foundation
* MFC r282057,r282092,r282106:ngie2015-05-133-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | r282057: Build/install libc, librt, libthr, and msun NetBSD test suites on all architectures r282092 (by andrew): Correct the spelling of MACHINE_CPUARCH, MACHINE_CPU is not set on arm64. r282106: Remove per-architecture checks for enabling HAVE_FENV_H The conditional came from NetBSD, where only select architectures have this header/support All architectures on FreeBSD have the necessary support though, so the conditional's completely unnecessary make tinderbox done on all architectures (including arm64, where the issue occurred before) this time
* MFC r281967:ngie2015-05-131-0/+1
| | | | | Assuming a system has /bin/csh on it is a bad idea (especially it being optional on FreeBSD). Look for /bin/cat instead
* MFC r281763:kib2015-05-041-37/+36
| | | | | Remove code to support the top of the stack layout for FreeBSD 1.x/2.x kernel.
* MFC r275805:tijl2015-04-3014-25/+23
| | | | | | | | | | | | | Fix incorrect type of "invalids" argument in __iconv() prototype. MFC r281550,281591: Remove the const qualifier from iconv(3) to comply with POSIX: http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html Adjust all code that calls iconv. PR: 199099
* MFC r277877: Use zero register instead of immediate 0x0 in MIPS assemblyemaste2015-04-281-1/+1
| | | | | | It seems GAS makes the substitution automatically, but Clang's integrated assembler does not (yet). It fails with "invalid operand for instruction."
* MFC r281712:kib2015-04-256-1/+119
| | | | Make wait6(2), waitid(3) and ppoll(2) cancellation points.
* MFC r280919: wordexp: Explicitly pass along IFS.jilles2015-04-191-1/+4
| | | | | | | | | Per Austin group issue #884, sh should not import IFS from the environment but always set it to $' \t\n'. For wordexp(), however, it is documented and useful for it to use IFS from the environment. Since sh currently imports IFS from the environment, this change has no functional effect.
* MFC r281082: fts: Don't return FTS_SLNONE if it's not a symlink (if race).jilles2015-04-191-5/+6
| | | | | | | | | | | | | | When following symlinks, fts returned FTS_SLNONE when fstatat(flag=0) failed, but a subsequent fstatat(flag=AT_SYMLINK_NOFOLLOW) succeeded. This incorrectly triggered if a filename existed to be read from the directory, was deleted before the fstatat(flag=0) and created again after the fstatat(flag=0). Fix this by only returning FTS_SLNONE if the result from fstatat(flag=AT_SYMLINK_NOFOLLOW) is actually a symlink. If it is not a symlink, treat it as if fstatat(flag=0) succeeded. PR: 196724
* MFC r274933 (by bapt), r281470:pluknet2015-04-191-7/+2
| | | | | r274933 - Ta is only allowed with Bl -column not in Bl -item r281470 - Remove obsolete bits about maximum number of file systems.
* MFC r260571: fts: Stat things relative to the directory fd, if possible.jilles2015-04-181-12/+19
| | | | | | | | | As a result, the kernel needs to process shorter pathnames if fts is not changing directories (if fts follows symlinks (-L option to utilities), fts cannot open "." or FTS_NOCHDIR was specified). Side effect: If pathnames exceed PATH_MAX, [ENAMETOOLONG] is not hit at the stat stage but later (opendir or application fts_accpath) or not at all.
* MFC: r266671, r266725:allanjude2015-04-163-98/+38
| | | | | | | Merge strcspn.3 into strspn.3 and clarify the explaination Approved by: eadler (mentor, implicit) Sponsored by: ScaleEngine Inc.
* MFC r280818:kib2015-04-125-2/+82
| | | | Make kevent(2) a cancellation point.
* MFC r280959:kib2015-04-082-3/+9
| | | | Correctly handle __fcntl_compat symbol for the !SYSCALL_COMPAT case.
OpenPOWER on IntegriCloud