summaryrefslogtreecommitdiff
path: root/lib/libc/gen
AgeCommit message (Collapse)Author
2015-03-18use 4x buffer size for opendir. speeds up large directory reading, andTed Unangst
increased memory use is minimal. ok deraadt logan
2015-03-14TZ_MAX_CHARS in the old tzfile.h bears no resemblence to the actualTodd C. Miller
max time zone length used by libc/time. Just use PATH_MAX for now (since zone files are path names). This function is slated to be removed at the next libc major bump.
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can useJason McIntyre
"and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
2015-03-12_PERFPOLICY can also be set to "high"; it's "auto" not "automatic"; and the ↵Jason McIntyre
variable itself has bearing on _SETPERF; many thanks to theo buehler who both supplied a diff and corrected various issues with my diff;
2015-03-11document HW_PERFPOLICY; ok teduJason McIntyre
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-02-11sysctl({CTL_KERN, KERN_FILE, KERN_FILE_BYFILE}) previously requiredPhilip Guenther
the extra argument to be zero; instead, make it filter on the file type (DTYPE_*) when non-zero to make claudio's netstat work easier. ok claudio@
2015-02-07Add examples for stravis() and strnvis() to vis.3.Doug Hogan
Show the best ways to encode a dynamic and static buffer. input + ok schwarze@, ok jmc@
2015-02-06SIZE_MAX is standard, we should be using it in preference to theTodd C. Miller
obsolete SIZE_T_MAX. OK miod@ beck@
2015-02-06Add support for stravis() to vis.3 and Makefile.inc.Doug Hogan
stravis(3) is an OpenBSD extension that was added recently. input + ok schwarze@, jmc@, deraadt@
2015-02-05Include stdint.h, not limits.h to get SIZE_MAX. OK guenther@Todd C. Miller
2015-02-05macro fixes from Kaspars at Bankovskis dot net;Ingo Schwarze
also fixing one typo in fts(3) while here
2015-01-30Rework vis.3 so it has standard sections.Doug Hogan
Moved the return values from the description to a proper return values section. Broke up the description into function description followed by a subsection for the range and encoding. Replaced srclen with strlen(src) when srclen isn't an argument. Moved the common flag argument to its own paragraph. input schwarze@, input + ok jmc@
2015-01-29Use .Rv where appropriate, and move it to RETURN VALUES;Ingo Schwarze
remove .Tn, and a few minor macro adjustments. Patch from Kaspars at Bankovskis dot net.
2015-01-21Truncate progname to NAME_MAX in the syslog message, to ensure otherTheo de Raadt
information also makes it through. This is a compromise to cope with the absolutely ridiculous setprogname() API. ok various discussions
2015-01-20Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-19Explicitly mention that PATH_MAX includes the NUL in the ENAMETOOLONGTodd C. Miller
description.
2015-01-17NGROUPS_MAX, not NGROUPSTheo de Raadt
2015-01-16Replace HOST_NAME_MAX+1-1 with HOST_NAME_MAX. OK deraad@Todd C. Miller
2015-01-16Move to the <limits.h> universe.Theo de Raadt
review by millert, binary checking process with doug, concept with guenther
2015-01-15use .In where appropriate; from Kaspars at Bankovskis dot netIngo Schwarze
2015-01-15POSIX does not require an explicit inclusion of sys/types.h to getTodd C. Miller
uid_t or gid_t (and neither do we). OK deraadt@
2015-01-14these never needed sys/param.hTheo de Raadt
2015-01-12Add a note that HOST_NAME_MAX does not include a terminating \0, unlikeNicholas Marriott
MAXHOSTNAMELEN. ok deraadt guenther
2014-12-22fix docs for NOBROADCASTKILLTed Unangst
2014-12-12sysctl kern.global_ptrace.Ted Unangst
controls whether you can ptrace any process with appropriate privileges or only one own's children. ok deraadt
2014-12-11Remove an undocumented limit on the length of the pattern and stringTodd C. Miller
to match of PATH_MAX. As fnmatch() is used for matching more than just pathnames, this can prevent legitimate matches for long strings or partterns. OK miod@ tedu@
2014-12-09In ingo's new world order, we do not want multiple manual pages describingTheo de Raadt
the same thingies. Therefore these "lists of functions" man pages can go away. Hurray! I've wanted these pages to die for around 10 years! ok ingo (and i think jmc)
2014-12-05Introduce a new sysctl to retrieve VM map entriesMasao Uebayashi
This adds a new sysctl KERN_PROC_VMMAP, which returns an array of VM map entries of a specified process. This prevents debuggers from iterating vm_map_entry RB tree via kvm(3). The name KERN_PROC_VMMAP and struct kinfo_vmentry are chosen from the same function in FreeBSD. struct kinfo_vmentry is revised to reduce size, because OpenBSD does not keep track of filepaths. The semantic is also changed to return max buffer size as a hint, and start iteration at the specified base address. Much valuable input from deraadt@, guenther@, tedu@ OK tedu@ deraadt@
2014-11-30do not use .St -p1003.1d-99 which is used in exactly two pages;Ingo Schwarze
im going to delete support for it from mandoc(1)
2014-11-30mandoc -Tlint fixes from <kaspars at bankovskis dot net>Ingo Schwarze
2014-11-30Even though not callable, "Ed" is a macro name, so for clarity,Ingo Schwarze
escape it when it appears on a macro line.
2014-11-23Merge from FreeBSD:Philip Guenther
------------------------------------------------------------------------ r246641 | jilles | 2013-02-10 15:09:15 -0800 (Sun, 10 Feb 2013) | 8 lines fts: Use O_DIRECTORY when opening name that might be changed by attacker. There are uncommon cases where fts_safe_changedir() may be called with a non-NULL name that is not "..". Do not block or worse if an attacker put (a (symlink to) a fifo or device where a directory used to be. MFC after: 1 week ------------------------------------------------------------------------ r241010 | jilles | 2012-09-27 15:05:54 -0700 (Thu, 27 Sep 2012) | 9 lines libc/fts: Use O_CLOEXEC for internal file descriptors. Because fts keeps internal file descriptors open across calls, making such descriptors close-on-exec helps not only multi-threaded applications but also single-threaded applications. In particular, this prevents passing a temporary file descriptor for saving the current directory to processes created via find -exec. ------------------------------------------------------------------------ ports scan for possible O_CLOEXEC affected programs by sthen@ ok millert@
2014-11-20Merge from FreeBSD:Philip Guenther
-------- r260571 | jilles | 2014-01-12 12:30:55 -0800 (Sun, 12 Jan 2014) | 9 lines fts: Stat things relative to the directory fd, if possible. 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. -------- Prompted by a similar diff from (enh (at) google.com), who also reran a performance test. ok millert@
2014-11-19delete the KERN_VNODE sysctl. it fails to provide any isolation from theTed Unangst
kernel struct vnode defintion, and the only consumer (pstat) still needs kvm to read much of the required information. no great loss to always use kvm until there's a better replacement interface. ok deraadt millert uebayasi
2014-11-17Add stravis(), an allocating version of strvis(). OK doug@Todd C. Miller
2014-11-17When listing the async-signal-safe functions, don't split out "ANSI C"Philip Guenther
functions; the concept comes from POSIX anyway. With tweaks from schwarze@ ok deraadt@, jmc@, millert@, schwarze@
2014-11-15Delete some unnecessary #includesPhilip Guenther
2014-11-15Don't need <sys/types.h> before <sys/ipc.h> anymorePhilip Guenther
2014-11-14_NSIG is the number of valid signals including signal 0, so it's not a validJonathan Matthew
signal number itself. Attempting to reset the signal action for it causes posix_spawn to fail, making the POSIX_SPAWN_SETSIGDEF flag unusable. ok guenther@
2014-11-09Correct constness of str*unvis()'s second (source) argumentPhilip Guenther
2014-10-11obvious reallocarray() useTheo de Raadt
ok doug
2014-10-08obvious realloc -> reallocarray conversionTheo de Raadt
2014-10-08obvious reallocarray()Theo de Raadt
2014-10-08reallocarray() to detect potential int overflow; ok dougTheo de Raadt
2014-10-08reallocarray() for mult int overflow detect; ok dougTheo de Raadt
2014-10-03Strip trailing new-lines from syslog messages. This avoids emptyAlexander Bluhm
lines when printing to console or stderr. OK deraadt@
2014-09-15We missed a hyphen in 'async-signal-safe'Philip Guenther
Noted by Jean-Philippe Ouellet (jean-philippe (at) ouellet.biz)
2014-09-15When fopen()ing internal to libc (the API doesn't support the usePhilip Guenther
of the resulting FILE *), then pass fopen() the 'e' mode letter to mark it close-on-exec. ok miod@
2014-09-10sockatmark(3) has been implemented; add it to the async-signal-safe listsPhilip Guenther