diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2024-01-22 16:18:07 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2024-01-22 16:18:07 +0000 |
commit | bd92455fedfb4aca02bf0ee3cabc5ecc4a852a4d (patch) | |
tree | 7eddee18b845254548fd71cb218ece1ccc0fce06 /games/worm | |
parent | bbc2551a91978838ac0cb42f9753d3c74d100b65 (diff) |
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
Diffstat (limited to 'games/worm')
0 files changed, 0 insertions, 0 deletions