[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: [netbsd-5] src/usr.sbin/ypserv/ypxfr
Module Name: src
Committed By: bouyer
Date: Wed Feb 16 21:07:21 UTC 2011
src/usr.sbin/ypserv/ypxfr [netbsd-5]: ypxfr.c
Pull up following revision(s) (requested by chuck in ticket #1550):
usr.sbin/ypserv/ypxfr/ypxfr.c: revision 1.16 - 1.19
Fix WARNS=4 issues (-Wshadow -Wcast-qual -Wsign-compare)
Follow upstream's lead and remove third and fourth clauses (except on
from usr.sbin/mopd/common/pf.c, where only the ad clause is removed,
because it has a shared UCB copyright) on Mats O Jansson's files.
thorpej OK'd usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c, where he shares
yppush RPC is supposed to return yppush_status error/status codes
(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
Change ypxfr.c to convert the YPERR codes to YPPUSH codes.
rev 1.18 un-covered some bugs:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r188.8.131.52 src/usr.sbin/ypserv/ypxfr/ypxfr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Main Index |
Thread Index |