CVSROOT: /cvs Module name: src Changes by: dera...@cvs.openbsd.org 2022/08/02 10:59:30
Modified files: lib/libc/yp : yp_all.c yp_bind.c yp_first.c yp_get_default_domain.c yp_maplist.c yp_master.c yp_order.c ypinternal.h ypmatch_cache.c Log message: 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