#
903e91b4 |
| 22-Jan-2024 |
deraadt <deraadt@openbsd.org> |
When getpwnam(3) reaches out to YP, it calls clntudp_create(3) with a pre-initialized ypconnect(2) socket. That calls clntudp_bufcreate(), which contains code checking if the socket and address are
When getpwnam(3) reaches out to YP, it calls clntudp_create(3) with a pre-initialized ypconnect(2) socket. That calls clntudp_bufcreate(), which contains code checking if the socket and address are configured.. If not, socket(2) is called, or an address allocation is performed via the portmapper (which calls a whole lot more code).
Split clnt_udp.c into two .c files (which will compile as seperate .o files), and create a new libc-private clntudp_bufcreate_simple() function which skips the socket and address work.
Result: In most static binaries, this reduces the text segment by ~100K, and removes 5-7 system call stubs -- which might matter for non-pledged binaries with otherwise lack socket(2). ok millert jmatthew
show more ...
|
#
2d62dde8 |
| 02-Aug-2022 |
deraadt <deraadt@openbsd.org> |
1) The yp_bind/yp_unbind and internal _yp_dobind/_yp_unbind sequences shared dom_binding structs between threads, which is unsafe -- example, dom_vers signalled retry events, and structs+socket would
1) The yp_bind/yp_unbind and internal _yp_dobind/_yp_unbind sequences shared dom_binding structs between threads, which is unsafe -- example, dom_vers signalled retry events, and structs+socket would get deallocated in _yp_unbind. Change all yp_first (and similar) functions to understand that _yp_dobind now provides a private dom_binding and socket, which must be released using _yp_unbind. Use similar methods in the one-step yp_all function. 2) domainname caching in get* is not neccessary now that the domainname cannot change relative to ypconnect(2)'s decisions. Many fields in dom_binding struct become unused, so delete them. ok jmatthew, also tested by miod
show more ...
|
#
ca355988 |
| 22-Jul-2022 |
jsg <jsg@openbsd.org> |
avoid use after free ok deraadt@
|
#
f4c33f54 |
| 18-Jul-2022 |
deraadt <deraadt@openbsd.org> |
ypbinding should not be intrude to application namespace. spotted by guenther
|
#
125e6122 |
| 17-Jul-2022 |
deraadt <deraadt@openbsd.org> |
Rather than opening the binding file, checking for advisory lock, reading a piece of it for the address, opening a socket, and providing the address to the RPC clnt layer.. do all these steps with th
Rather than opening the binding file, checking for advisory lock, reading a piece of it for the address, opening a socket, and providing the address to the RPC clnt layer.. do all these steps with the magic system call ypconnect(2) which performs these steps without other system calls, and provides a socket which is not readily abuseable for other purposes. ok jmatthew, miod
show more ...
|
#
8ae7fd5a |
| 30-May-2016 |
guenther <guenther@openbsd.org> |
Stop publicly declaring _yp_dobind() and struct dom_binding, closing out a rant Theo wrote 24 years ago. Mark __ypexclude_{add,is,free}() as hidden
"get off my lawn!" deraadt@
|
#
5a1da47d |
| 29-May-2016 |
guenther <guenther@openbsd.org> |
_yp_bind(), _ypbindlist, _yp_domain, and _yplib_timeout are no longer exported, so declare them as hidden to avoid pointless GOT relocations
ok millert@ deraadt@
|
#
443927d0 |
| 26-Nov-2015 |
deraadt <deraadt@openbsd.org> |
remove the "YP server for domain %s not responding, still trying" code. For years, it talked to stderr. That was wrong. Then it was converted to opening /dev/tty, which is also wrong (pledge says s
remove the "YP server for domain %s not responding, still trying" code. 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
show more ...
|
#
6cf18d3c |
| 14-Sep-2015 |
guenther <guenther@openbsd.org> |
Wrap _yp_check() and _yp_unbind() so internal calls go direct and they're weak
|
#
ba364bef |
| 13-Sep-2015 |
guenther <guenther@openbsd.org> |
Wrap <rpcsvc/ypclnt.h> so that calls go direct and the symbols are all weak
|
#
5e571521 |
| 05-Sep-2015 |
deraadt <deraadt@openbsd.org> |
rather than assuming stderr is alive, open + dprintf to /dev/tty ok guenther millert
|
#
aea60bee |
| 16-Jan-2015 |
deraadt <deraadt@openbsd.org> |
Move to the <limits.h> universe. review by millert, binary checking process with doug, concept with guenther
|
#
e7e445a1 |
| 14-Jan-2015 |
deraadt <deraadt@openbsd.org> |
change _yp_domain[] to HOST_NAME_MAX+1, and re-arrange those who include it to get limits.h early enough
|
#
c7421165 |
| 25-May-2014 |
tedu <tedu@openbsd.org> |
use calloc, from Benjamin Baier
|
#
69245ebd |
| 30-Sep-2013 |
millert <millert@openbsd.org> |
Use PATH_MAX, NAME_MAX and LOGIN_NAME_MAX not MAXPATHNAMELEN, MAXNAMLEN or MAXLOGNAME where possible. OK deraadt@
|
#
b779915b |
| 29-Apr-2013 |
okan <okan@openbsd.org> |
use FD_CLOEXEC instead of 1; from David Hill
ok otto
|
#
2f7e579f |
| 05-Jun-2009 |
schwarze <schwarze@openbsd.org> |
improve yp_bind(3) error reporting after clnttcp_create(3) failure: map ECONNREFUSED -> YPERR_YPBIND, ENOMEM -> YPERR_RESRC, else YPERR_YPERR while here, malloc(3) failure should raise YPERR_RESRC, n
improve yp_bind(3) error reporting after clnttcp_create(3) failure: map ECONNREFUSED -> YPERR_YPBIND, ENOMEM -> YPERR_RESRC, else YPERR_YPERR while here, malloc(3) failure should raise YPERR_RESRC, not YPERR_YPERR ok millert@
show more ...
|
#
bb14a393 |
| 17-Sep-2007 |
moritz <moritz@openbsd.org> |
Check snprintf(3) return value for error or truncation. Mostly path construction, where truncation could be bad.
ok and input from deraadt@ millert@ ray@
|
#
951548d6 |
| 05-Aug-2005 |
espie <espie@openbsd.org> |
- remove rcsid - put all the YPMATCHCACHE code into a #ifdef, proper - remove all extra header files that are not needed
okay deraadt@
|
#
00466ad4 |
| 02-Jun-2003 |
deraadt <deraadt@openbsd.org> |
remove terms 3 & 4 on my own software
|
#
11e5d692 |
| 20-Jul-2002 |
deraadt <deraadt@openbsd.org> |
ansi
|
#
e4490880 |
| 02-Jan-2002 |
deraadt <deraadt@openbsd.org> |
more pid_t use
|
#
f1a075da |
| 27-Jun-2001 |
lebel <lebel@openbsd.org> |
use strlcpy vs strncpy+a[len-1]='\0'. millert@ ok.
|
#
01a83688 |
| 17-Aug-1999 |
millert <millert@openbsd.org> |
More <sys/file.h> vs. <fcntl.h> and open() flags fixes.
|
#
f155a74c |
| 29-Apr-1997 |
deraadt <deraadt@openbsd.org> |
possible buf oflow
|