diff options
author | wpaul <wpaul@FreeBSD.org> | 1996-07-04 02:13:11 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1996-07-04 02:13:11 +0000 |
commit | c26f3ec39e5c2fa4a8622057dc8491ffbd1fa9a9 (patch) | |
tree | 026335963f077546619c67d1a7a8e49fb215988f /libexec | |
parent | ffe43a70955c6e80274bbc1b6ac4a0a642982893 (diff) | |
download | FreeBSD-src-c26f3ec39e5c2fa4a8622057dc8491ffbd1fa9a9.zip FreeBSD-src-c26f3ec39e5c2fa4a8622057dc8491ffbd1fa9a9.tar.gz |
Fill in new arguments in the ypxfr_getmap structure (byte order,
db type, filename) and check for new failure codes (db mismatch,
endian mismatch).
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ypxfr/ypxfrd_getmap.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libexec/ypxfr/ypxfrd_getmap.c b/libexec/ypxfr/ypxfrd_getmap.c index 7af9a52..e598883 100644 --- a/libexec/ypxfr/ypxfrd_getmap.c +++ b/libexec/ypxfr/ypxfrd_getmap.c @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ypxfrd_getmap.c,v 1.7 1996/06/02 19:51:33 wpaul Exp $ + * $Id: ypxfrd_getmap.c,v 1.7 1996/06/02 19:51:33 wpaul Exp wpaul $ */ #include <sys/types.h> @@ -44,7 +44,7 @@ #include "ypxfr_extern.h" #ifndef lint -static const char rcsid[] = "$Id: ypxfrd_getmap.c,v 1.7 1996/06/02 19:51:33 wpaul Exp $"; +static const char rcsid[] = "$Id: ypxfrd_getmap.c,v 1.7 1996/06/02 19:51:33 wpaul Exp wpaul $"; #endif int fp = 0; @@ -79,6 +79,14 @@ static bool_t xdr_my_xfr(register XDR *xdrs, xfr *objp) yp_error("access to map denied by rpc.ypxfrd"); return(FALSE); break; + case(XFR_DB_TYPE_MISMATCH): + yp_error("client/server DB type mismatch"); + return(FALSE); + break; + case(XFR_DB_ENDIAN_MISMATCH): + yp_error("client/server byte order mismatch"); + return(FALSE); + break; default: yp_error("got unknown status from rpc.ypxfrd"); return(FALSE); @@ -104,6 +112,12 @@ int ypxfrd_get_map(host, map, domain, tmpname) req.xfrmap = map; req.xfrdomain = domain; + req.xfrmap_filename = ""; + req.xfr_db_type = XFR_DB_BSD_HASH; /* + req.xfr_byte_order = XFR_ENDIAN_ANY; * Berkeley DB isn't + * byte-order sensitive. + */ + bzero((char *)&resp, sizeof(resp)); if ((clnt = clnt_create(host, YPXFRD_FREEBSD_PROG, |