summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Integrate two patches originally from Daniel Micay.tedu2015-12-091-8/+76
| | | | | | | | | | | | 1. Optionally add random "canaries" to the end of an allocation. This requires increasing the internal size of the allocation slightly, which probably results in a large effective increase with current power of two sizing. Therefore, this option is only enabled via 'C'. 2. When writing junk (0xdf) to freed chunks (current default behavior), check that the junk is still intact when finally freeing the delayed chunk to catch some potential use after free. This should be pretty cheap so there's no option to control it separately. ok deraadt tb
* rewrite guts of getusershell() to avoid possibility of overflow.tedu2015-12-081-41/+45
| | | | | | | | instead of trying to allocate "just enough" memory based on the size of the file (which is mostly comments, in fact), allocate memory on demand. i.e., save memory by wasting it. also be a little stricter about parsing. after discussion with tobias. (with a bug fix from patrick keshishian) descended from bug glibc bug 18660 via tobias.
* Validate input files to prevent out of boundary accesses.tobias2015-12-061-63/+80
| | | | with input by and ok schwarze@
* Remove the /usr/share/nls/ exception from pledge(2). The libcbluhm2015-12-031-9/+5
| | | | | native language support was deleted a month ago at u2k15. OK semarie@ deraadt@
* use strlcat instead of strlcpy with modified arguments. ok deraadt@canacar2015-12-011-6/+5
|
* Document that "tty" provides read-write access to /dev/tty too.millert2015-12-011-4/+9
| | | | OK deraadt@
* modify getpw*(), getgr*(), and getgrouplist() functions to access thederaadt2015-12-013-4/+24
| | | | | | | | | YP lock file unconditionally. This hints to the kernel that a "getpw" operation is happening, even in the non-YP case. This looks like a gruesome hack, but helps refine the ways these functions are called and mandates the right pledge requests. Once the tree is fully annotated we will know better how to improve the backing store management. ok semarie espie beck
* Send Aviion to same place as Nova IIderaadt2015-12-011-5/+5
| | | | discussed with jsg
* Mention ksh along with csh when job control is discussed. ok deraadt@mmcc2015-12-011-3/+6
|
* Phrase allocation failure more clearly. ok deraadt@mmcc2015-12-011-3/+3
|
* change Xrs from now-defunct db(3) to dbopen(3); this wasn;t ajmc2015-11-304-17/+17
| | | | | | | straight replace: thanks both to schwarze and maja for feedback on how to rewrite parts; i've snuck in an rcs id->openbsd id change in dev_mkdb too;
* Add pledge "pf" which allows ioctls on pf(4). This will be used bybenno2015-11-291-2/+20
| | | | | relayd and other programs manipulating the packet filter. ok deraadt@
* remove the "YP server for domain %s not responding, still trying" code.deraadt2015-11-261-15/+1
| | | | | | | | | For years, it talked to stderr. That was wrong. Then it was converted to opening /dev/tty, which is also wrong (pledge says so). Upon reconsideration people in these more modern times have adapted to all sorts of services not being available, so axe the alert and retry silently. ok beck
* group_from_gid: use _GR_BUF_LEN instead of _PW_BUF_LENjcs2015-11-251-2/+2
|
* Wrap <icdb.h> so that calls go direct and the symbols are all weakguenther2015-11-252-1/+47
| | | | ok tedu@
* Make using a deprecated function an error instead of just a warningguenther2015-11-251-1/+5
| | | | ok millert@ kettenis@
* syslog() here is pointless; ok millertderaadt2015-11-251-2/+0
|
* Rather than using syslog(3) (which pulls in snprintf), creating the reportderaadt2015-11-251-4/+14
| | | | | | | | string using simpler strings functions and use sendsyslog2() directly. Also, use the LOG_CONS flag so that single-user reports are more clear. Use a buffer size of 1024 (from bluhm) discussed with guenther and matthew ok millert
* Add a syscall stub for sendsyslog2(2), and use it in syslog_r(3), passingderaadt2015-11-253-22/+9
| | | | | | LOG_CONS to the kernel. As a result, the /dev/console opening code can be removed. ok kettenis millert beck
* Use reentrant versions of getpw{nam,uid} and getgr{nam,gid} withinmillert2015-11-2412-103/+72
| | | | | | | libc to avoid reusing the static buffers returned by the non-reentrant versions. Since this is inside libc we can use constants for the buffer sizes instead of having to call sysconf(). OK guenther@ deraadt@
* fix an error in NAME; ok schwarzejmc2015-11-241-3/+3
|
* Document that these functions are now in strings.h.daniel2015-11-247-19/+22
| | | | ok millert@
* Don't fake a bulleted list by prefixing items with 'o'.bentley2015-11-241-8/+8
| | | | ok jmc@
* Remove support for "lookup yp" in /etc/resolv.conf. This historicalderaadt2015-11-234-239/+7
| | | | | | | | wart is incompatible with pledge, because suddenly a "dns" operation needs "getpw" access to ypbind/ypserv, etc. file + dns access is enough for everyone, sorry if you were using that old SunOS 4.x style mechanism, but it is now gone. ok semarie millert florian
* point to mount_mfs(8), not mfs(8);jmc2015-11-231-3/+3
|
* point to netintro(4) rather than (now removed) networking(4);jmc2015-11-212-6/+6
|
* Document that the status argument may be NULL; OK millert@tim2015-11-201-3/+4
|
* typo tcgetpgrp -> tcsetpgrptb2015-11-201-3/+3
| | | | ok mmcc@, yes... deraadt@
* mlinks for _shadowtedu2015-11-181-1/+2
|
* document the _shadow functionstedu2015-11-181-5/+17
|
* add a version field to prevent mayhem if different data gets storedtedu2015-11-181-3/+7
|
* update for new symbols and codetedu2015-11-183-3/+16
|
* Add icdb, the internal c database. A simpler replacement for the oldtedu2015-11-181-0/+367
| | | | Berzerkeley DB code.
* Add _shadow variants to the two popular getpw functions (uid and nam).tedu2015-11-182-15/+69
| | | | | | | | | This version of the function will always open the secure/shadow/master password files. Soon, the regular variants of these functions will not. (Intermixing shadow and regular gets a little weird; don't do that.) Not using struct spwd and getspwnam functions to reduce churn in callers. Should just be a one line diff in most places. ok deraadt
* rob pierce spotted a mistake left by jmcderaadt2015-11-181-3/+3
|
* change passwd caches to be 4-way "associative". still primitive, but atedu2015-11-171-24/+62
| | | | little better than winner take all caching.
* minor tweaks;jmc2015-11-162-4/+4
|
* Permit revoke(2) for a pledge "rpath tty"deraadt2015-11-161-2/+9
| | | | ok millert semarie tedu guenther
* Only perform revoke(2) on tty cdevs. Others paths return ENOTTY.deraadt2015-11-161-6/+13
| | | | ok millert semarie tedu guenther
* Tweak previous: rename it to fpround() to match FreeBSDguenther2015-11-151-11/+11
| | | | requested by kettenis@
* _towctrans_ext and _wctrans_init are now hidden; so drop them from the listguenther2015-11-151-2/+0
|
* I got a round tuit to rename round() to roundit() to avoid gcc warning.guenther2015-11-151-14/+14
| | | | ok deraadt@
* Split the non-syscall ASM bits from SYS.h into DEFS.h and use that in theguenther2015-11-1413-41/+80
| | | | | | non-syscall .S source ok millert@ miod@
* Give clear directions on how to declare, PROTO_*() and DEF_*() new symbolsguenther2015-11-141-0/+97
| | | | prodded by deraadt@
* update NAME section to include all documented functions,jmc2015-11-1029-104/+149
| | | | | | or otherwise change Dt to reflect the name of an existing function; feedback/ok schwarze
* Document tzsetwall(). OK schwarze@ jmc@millert2015-11-101-5/+26
|
* Split the intra-thread functionality from kill(2) into its own syscallguenther2015-11-107-12/+119
| | | | | | | | | | | | thrkill(2), rolling the kill(2) syscall number with the ABI change to avoid breaking binaries during during the transition. thrkill(2) includes a 'tcb' argument that eliminates the need for locking in pthread_kill() and simplifies pthread_cancel(). Switch __stack_smash_handler() to use thrkill(2) and explicitly unblock SIGABRT. Minor bump to both libc and libpthread: make sure you install a new kernel! ok semarie@
* libc.so can't be unloaded, so move the hidden atexit() and pthread_atfork()guenther2015-11-107-9/+77
| | | | | | | | | | | stubs for the executable from crtbegin.o into libc, which lets them be excluded from static links that don't use them. For this, drop the normal crt{begin,end}S.o from libc.so: the .init and .fini sections for libc aren't called at the right times anyway, so it's good that they're unused. libc.so just needs __guard_local and the .note.openbsd.ident section, so add them to stack_protector.c for now (this will be improved) "good time" deraadt@
* inet(4), not inet(3);jmc2015-11-081-3/+3
|
* add missing NAME entries;jmc2015-11-074-12/+29
|