summaryrefslogtreecommitdiff
path: root/lib/libc
AgeCommit message (Collapse)Author
2009-11-12simplify the code looking for + in the password database, after analysisTheo de Raadt
of a false positive made by parfait; ok millert
2009-11-11fix leaks in error cases found by parfaitJonathan Gray
ok blambert@ miod@ deraadt@
2009-11-10ctim -> ctime; from ca (pr #6256)Jason McIntyre
2009-11-09mbrlen returns size_t not int.Nicholas Marriott
ok espie
2009-11-09Fix the handle locking in stdio to use flockfile/funlockfileKurt Miller
internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. committing on behalf of and okay guenther@ now that we have install media space available.
2009-11-08ansifyStefan Sperling
ok deraadt
2009-11-07remove gcc 1 workaround we no longer care about whichJonathan Gray
was breaking non GNUC defining compilers. Came up during a conversation with ragge@, positive comments from several.
2009-11-02permit -DMALLOC_STATS to compile againTodd T. Fries
noticed by Jonathan Armani & Fabien Romano ugh+ok otto@
2009-11-01Use a local numeric label to branch to the start of the function, instead ofMiod Vallat
referencing it by name; silences a linker warning; no functional change.
2009-11-01Two minor bug fixes rotting in my tree:Ingo Schwarze
(1) When the second malloc in yp_next fails, do not leak the memory allocated by the first one. Same fix as yp_first.c rev. 1.9. (2) When compiled with YPMATCHCACHE, do not fail the lookup when reserving memory for the cache fails. Instead, just return the correct result without caching it. ok millert@
2009-10-31s/Mhz/MHz/, MHz is a multiple of the SI unit hertz (whose symbol is Hz).Igor Sobrado
2009-10-28skip the \' formatting flag, grouping is not implemented; ok deraadt@Christian Weisgerber
2009-10-28more fallout from jasper's commit.Jonathan Gray
Changing the size of the _sys_errlist array changes a libc interface so we need to crank major. kettenis@ agrees
2009-10-28more rcsid/sccs cleanupTheo de Raadt
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-10-27We don't have an "Ap" macro so ".Fn execve() Ap d" is wrong, reword to removeNicholas Marriott
it. ok jmc
2009-10-26add ENOTSUP and bump libc minorJasper Lievisse Adriaanse
discussed with a few ok deraadt@
2009-10-22Back out previous commit, as it caused too much growth for the installPhilip Guenthe
media to fit
2009-10-21Fix the handle locking in stdio to use flockfile/funlockfilePhilip Guenthe
internally when and where required. Macros in <stdio.h> are updated to automatically call the underlying functions when the process is threaded to obtain the necessary locking. A private mutex is added to protect __sglue, the internal list of FILE handles, and another to protect the one-time initialization. Some routines in libc that use getc() change to use getc_unlocked() as they're either protected by their own lock or aren't thread-safe routines anyway. ok kurt@, earlier version tested by sthen@ and jj@
2009-10-20Check mmap return value against MAP_FAILED not NULL.Paul Irofti
Okay deraadt@, otto@.
2009-10-16teach gdtoa & its subroutines that malloc can fail; in which caseMartynas Venckus
ecvt, fcvt, gcvt, *printf, strtof, strtod, strtold act per ieee 1003.1. after these massive changes, remove unused files which would not work now. reported by Maksymilian Arciemowicz; ok theo
2009-10-10rewrite the history section, prompted by Paul Stoeber; ok deraadt@ jmc@Otto Moerbeek
2009-10-04Add (again) support for divert sockets. They allow you to:Michele Marchetto
- queue packets from pf(4) to a userspace application - reinject packets from the application into the kernel stack. The divert socket can be bound to a special "divert port" and will receive every packet diverted to that port by pf(4). The pf syntax is pretty simple, e.g.: pass on em0 inet proto tcp from any to any port 80 divert-packet port 1 A lot of discussion have happened since my last commit that resulted in many changes and improvements. I would *really* like to thank everyone who took part in the discussion especially canacar@ who spotted out which are the limitations of this approach. OpenBSD divert(4) is meant to be compatible with software running on top of FreeBSD's divert sockets even though they are pretty different and will become even more with time. discusses with many, but mainly reyk@ canacar@ deraadt@ dlg@ claudio@ beck@ tested by reyk@ and myself ok reyk@ claudio@ beck@ manpage help and ok by jmc@
2009-09-27Minor bump for safety, due to the mips cachectl() addition.Miod Vallat
2009-09-27Add an implementation of IRIX-compatible cacheflush() routine to mips ports,Miod Vallat
needed for gcc -ftrampoline operation as well as by some third-party software. Although the implementation uses the sysarch() sysctl, the wrapper is added to libc as it was a direct system call (which it is on IRIX).
2009-09-10cvs log message from ed@freebsd, revision 197045:Jason McIntyre
Make the description of `b' a little better. If you have a one-byte sequence, `w', `b' is the second character. Not the third. Submitted by: Christoph Mallon checked by otto
2009-09-09maxzis -> maxsize; from Han BoetesJason McIntyre
2009-09-08I had not enough oks to commit this diff.Michele Marchetto
Sorry.
2009-09-08Add support for divert sockets. They allow you to:Michele Marchetto
- queue packets from pf(4) to a userspace application - reinject packets from the application into the kernel stack. The divert socket can be bound to a special "divert port" and will receive every packet diverted to that port by pf(4). The pf syntax is pretty simple, e.g.: pass on em0 inet proto tcp from any to any port 80 divert-packet port 8000 test, bugfix and ok by reyk@ manpage help and ok by jmc@ no objections from many others.
2009-09-02make getaddrinfo(3) accept numeric servname when ai_socktype is notFederico G. Schwindt
specified in hint or hints is NULL. claudio@ ok
2009-08-27Don't stop traversing a directory hierarchy if we reach SHRT_MAX,Todd C. Miller
just stop updating fts_level so we don't overflow it. This allows rm, find, etc to operate on very deep hierarchies. Consumers of fts(3) do need to be aware that the actual level may be larger than fts_level. During the next libc major bump we will make fts_level an int instead of a short. OK deraadt@
2009-08-20add SF_ARCHIVED. ok millert@, tedu@Martynas Venckus
2009-08-13various MLINK fixes from Alan R. S. Bueno;Jason McIntyre
2009-08-07define substitution in some cases might happen after prototypes areMartynas Venckus
already pulled; so manually substitute protos ensuring they will always be right; ok millert@
2009-07-15must include <sys/types.h> before including <login_cap.h> or <bsd_auth.h>;Ingo Schwarze
noticed by joao <salvatti at gmail dot com> on tech@; feedback and ok kettenis@ deraadt@ and reminded by jmc@
2009-07-13Load symbol address with dla, not la; good thing userland is still limitedMiod Vallat
to 2GB of vm space.
2009-07-12fwrite() should also return 0 if either size or nmemb are 0.Todd C. Miller
Adapted from FreeBSD. OK deraadt@
2009-07-09promote correct style for error checkingEric Faurot
ok tedu@ deraadt@ krw@
2009-06-23getgrouplist(3) used to and ought to return 0 on success;Ingo Schwarze
fixing a regression introduced in rev. 1.16 spotted by otto@; ok millert@ otto@
2009-06-21fix rcs ids. ok sthen@Martynas Venckus
2009-06-21abs conforms c99 -> imaxabs conforms c99. ok millert@Martynas Venckus
2009-06-12YP client functions do not allocate memory when they fail;Ingo Schwarze
wording tweaked by jmc@
2009-06-11don't use freelist if it overruns; use heap memory instead notMartynas Venckus
trying to allocate large blocks from bss memory pool in this case. problem reported by Maksymilian Arciemowicz. ok otto@, millert@
2009-06-09document KERN_BUFCACHEPERCENT and KERN_MAXLOCKSPERUID; help/ok ogaJason McIntyre
2009-06-08quieten compiler by converting pointers to uintptr_t before truncating themTheo de Raadt
to u_int32_t to do integer math with (in a situation where that is legit) ok otto millert
2009-06-07de-spaghetti:Ingo Schwarze
If code is used from exactly one place, don't jump back dozens of lines to reach it, only to "goto" back where you came from. Instead, simply put the code where it belongs. Also fixes a regression that crept in in rev. 1.30: After clearing the variable __ypmode, don't try to make decisions based on its former value. As a bonus, garbage collect the grname variable and the _ypmode enum type. ok millert@
2009-06-07fix a minor memory leak spotted by deraadt@; ok millert@ deraadt@Ingo Schwarze
2009-06-07Add KERN_FILE2 sysctl analogous to KERN_PROC2 but for file structures,Todd C. Miller
along with vnode type-specific info to make it more useful for fstat(1). OK deraadt@
2009-06-07Modify the uc_entries allocation check such that the lhs is a constant.Todd C. Miller
OK deraadt@
2009-06-07No need to malloc, copy, have a single read access, and free right away.Ingo Schwarze
Thus, garbage collect one variable, one strdup, one free, two ifs, one else and a couple of assignments. No functional change. ok millert@