summaryrefslogtreecommitdiff
path: root/lib/libc
AgeCommit message (Collapse)Author
2016-11-12the referred to EXAMPLES section is now in strncpy(3);Jason McIntyre
issue reported by scott cheloha ok otto
2016-11-09Fix a use after free error introduced in rev 1.18 by only callingTodd C. Miller
closedir() outside the loop. OK deraadt@ guenther@ markus@
2016-11-04MALLOC_STATS tweaks, by default not compiled inOtto Moerbeek
2016-11-03small tweak to also check canaries if F is in effectOtto Moerbeek
2016-10-31remove some old option letters and also make P non-settable. It hasOtto Moerbeek
been the default for ages, and I see no valid reason to be able to disable it. ok natano@
2016-10-30include float.h for the LDBL_MAX_EXP cpp test in floatio.hJonathan Gray
2016-10-28Pages in the malloc cache are either reused quickly or unmappedOtto Moerbeek
quickly. In both cases it does not make sense to set hints on them. So remove that option, which is just a remainder of old times when malloc used to hold on to pages. ok stefan@
2016-10-27For consistency, allow symlinkat(2) in the same way as symlink(2);Ingo Schwarze
no need to wait until the first program using it breaks... "could make sense" semarie@ (and thanks for the cluestick) OK deraadt@
2016-10-22$OpenBSD$Theo Buehler
2016-10-22- fix MALLOC_STATS compileOtto Moerbeek
- redundant cast is redundant
2016-10-21fix some void * arithmetic by castingOtto Moerbeek
2016-10-21and recommit with fixed GCOtto Moerbeek
2016-10-20backout for now; flag combination GC is not okOtto Moerbeek
2016-10-20avoid sentence splicing;Jason McIntyre
2016-10-20canary corruption message changed a bitOtto Moerbeek
2016-10-20Also place canaries in > page sized objects (if C is in effect); ok tb@Otto Moerbeek
2016-10-19Remove the save_errno dance inside strerror_r(3). It is from theAlexander Bluhm
time when we had national language support. OK millert@
2016-10-19Use the reentrant strerror_r() instead of strerror() to expand %m.Todd C. Miller
Previously, syslog_r() would avoid calling strerror() since the latter is not reentrant. OK bluhm@
2016-10-19note that SO_REUSEADDR is restricted to callers with the same uid or root;Jason McIntyre
while there, super-user -> superuser for internal consistency; diff from kirill miazine, tweaked by myself; ok deraadt millert guenther
2016-10-18Avoid generate SIGTTOU when restoring the terminal mode. If we getTodd C. Miller
SIGTTOU it means the process is not in the foreground process group which, in most cases, means that the shell has taken control of the tty. Requiring the user the fg the process in this case doesn't make sense and can result in both SIGTSTP and SIGTTOU being sent which can lead to the process being suspended again immediately after being brought into the foreground.
2016-10-16Roll back uintptr_t cast changes after discussions with tedu, otto andDarren Tucker
others. C11 6.5.6.9 says: When two pointers are subtracted, both shall point to elements of the same array object, or one past the last element of the array object; the result is the difference of the subscripts of the two array elements. In these cases the objects are arrays of char so the result is defined, and we believe that the report is based on a compiler incorrectly trapping on defined behaviour.
2016-10-15Wrap _malloc_init() so internal calls go directlyPhilip Guenther
prodded by otto@ ok kettenis@ otto@
2016-10-14Cast pointers to uintptr_t to avoid potential signedness errors.Darren Tucker
Based on patch from yuanjie.huang at windriver.com via OpenSSH bz#2608, with & ok millert, ok deraadt.
2016-10-140xd0 -> 0xdb; ok deraadt@ millert@ tedu@Otto Moerbeek
2016-10-12optimize canary code a bit by storing offset of sizes table instead ofOtto Moerbeek
recomputing it all the time
2016-10-08make clear the length printed is the requested lengthOtto Moerbeek
2016-10-07sort;Jason McIntyre
2016-10-07introduce a sysctl to hijack dns sockets. when set to a port number,Ted Unangst
all dns socket connections will be redirected to localhost:port. this could be a sockopt on the listening socket, but sysctl is an easier interface to work with right now. ok deraadt
2016-10-07rss limit is no longer enforced. noticed by Raimo NiskanenTed Unangst
2016-10-07grammar fix previous;Jason McIntyre
2016-10-07document "chunk canary corrupted" errorOtto Moerbeek
2016-10-07stray tabOtto Moerbeek
2016-10-07Beter implementation of chunk canaries: store size in chunk meta dataOtto Moerbeek
instead of chunk itself; does not change actual allocated size; ok tedu@
2016-10-04Use the userspace-visible thread register directly in __cerror insteadPhilip Guenther
of indirecting through __errno(). Register naming tweaks and clang testing by patrick@ and jsg@ ok kettenis@
2016-09-30Make read(2) return EISDIR on directories.Jeremie Courreges-Anglas
Years ago Theo made read(2) return 0 on directories, instead of dumping the directory content. Another behavior is allowed as an extension by POSIX, returning an EISDIR error, as used on a few other systems. This behavior is deemed more useful as it helps spotting errors. This implies that it might break some setups. Ports bulk builds by ajacoutot@ and naddy@, ok millert@ bluhm@ naddy@ deraadt@
2016-09-28use the same template for describing securelevel interaction;Jason McIntyre
2016-09-28document kern.allowkmem; ok deraadtJason McIntyre
2016-09-26sigsetmask() and sigblock() are no longer used by any setjmp implementationPhilip Guenther
so the internal hidden names are unused; switch to PROTO_DEPRECATED() and drop the DEF_WEAK()s
2016-09-24Fix matching when all of user, host and domain are specified.Todd C. Miller
OK guenther@
2016-09-23s/alloctaed/allocated/ in commentPhilip Guenther
2016-09-22Switch from calling obsolete sig{block,setmask} to directly using thePhilip Guenther
sigprocmask syscall. abort() can't return, so simplify the call, and use the internal name to avoid the PLT. no-return observation by Miod Vallat, testing by aoyama@
2016-09-22m88k switched to RELROPhilip Guenther
2016-09-22Simplify __cerror now that %r27 is always the TCB pointer.Philip Guenther
Don't need a PLT relocation for __cerror. Move macros for doing internal aliases in ASM from SYS.h to DEFS.h __cerror tweaks by Miod Vallat, testing by aoyama@
2016-09-21no more KERN_ARND; ok deraadtJason McIntyre
2016-09-21Delete casts to off_t and size_t that are implied by assignmentsPhilip Guenther
or prototypes. Ditto for some of the char* and void* casts too. verified no change to instructions on ILP32 (i386) and LP64 (amd64) ok natano@ abluhm@ deraadt@ millert@
2016-09-19gmtime_r() should return NULL on failure, not the struct tm * resultTodd C. Miller
parameter that was passed in. From Carlin Bingham.
2016-09-18move page junking tp unmap(), right before we stick the region in the cache;Otto Moerbeek
ok tedu@
2016-09-18Use unified syntax such that this compiles with both gcc and clang.Mark Kettenis
ok jsg@
2016-09-18unbreak the build by including stddef.h for the definition of NULLJonathan Gray
fix suggested by and ok guenther@
2016-09-17Add an interface to find the ARM.exidx table for use by the ARM EHABI unwinder.Mark Kettenis
Makes exceptions work in C++ code work again om armv7. ok guenther@