1. add_interdomain and add_secure are optional... not all maps use these
keys. if we are unable to add them due to a YPERR_KEY (meaning they
are not being used), then we should not flag this as a general error.
2. if we have a failure (status <= 0) we unlink_db() the temp database
as part of error handling. but we should not overwrite our error
status code with the return value from unlink_db() because if the
unlink_db() works (likely true) than that success will wipe out our
error code and the calling yppush will think we worked.
* it depended on the biglock (in a very cruel way)
* it was attached to userspace transactions rather than logical
fs operations
(If someone wants to revisit it some day, most of the stuff can be
reused from cvs history)
not just the yp_get_default_domain() domain), we must remove
any old binding files from /var/yp/binding (BINDINGDIR) from
previous runs, or the non-yp_get_default_domain()'s will not
bind properly. add a purge_bindingdir() function that basically
does "rm BINDINGDIR/*.[0-9]" at ypbind startup time.
example case of where this is an issue: bind a second (non-default)
domain. ypbind will create and flock a /var/yp/binding/xxx.2
file for it. stop and restart ypbind. the old /var/yp/binding/xxx.2
file will remain from the previous run. since it is not flock()'d
by the new instance of ypbind, libc functions like yp_master() will
fail without even bothering to talk to ypbind itself. (and ypbind
is totally unaware of the old file...)
a valid optimization, but that's long gone and once VOP_INACTIVE is
called and the file server says that the vnode is going to be recycled,
it really is going to be recycled extra references gained or not.
Completely ignore @src in pkg_create. Silently ignore the -L option.
The combination of -I and -p are used by pkgsrc for the same result.
Do not overwrite a string with itself using snprintf. This breaks
setting the pkgdb directory internally on Linux. Explicitly check
if the string is the same and otherwise just use xstrdup.
Add support to query arbitrary variables with pkg_admin config-var.
(e.g. YPPUSH_SUCC, YPPUSH_NOMAP, etc.).
Functions like yp_master, yp_order_host, yp_master_host, and
yp_match_host return YPERR-style error codes. YPERR-style error
codes do not directly correspond to yppush_status codes, so it
is a bad idea to just directly YPERR codes into the yppush return
status value (it causes failing yppush runs to print confusing
error messages).
Change ypxfr.c to convert the YPERR codes to YPPUSH codes.