-/* $OpenBSD: yppush.c,v 1.5 1996/12/14 22:10:27 maja Exp $ */
+/* $OpenBSD: yppush.c,v 1.6 1997/03/15 00:08:58 gene Exp $ */
/*
* Copyright (c) 1995 Mats O Jansson <moj@stacken.kth.se>
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: yppush.c,v 1.5 1996/12/14 22:10:27 maja Exp $";
+static char rcsid[] = "$OpenBSD: yppush.c,v 1.6 1997/03/15 00:08:58 gene Exp $";
#endif /* not lint */
#include <sys/types.h>
exit(1);
}
+
/* Check map */
snprintf(map_path,sizeof map_path,"%s/%s/%s%s",
YP_DB_PATH,domain,Map,YPDB_SUFFIX);
yp_bind(Domain);
- r = yp_master(Domain, ypmap, &master);
+ r = yp_master(Domain, ypmap, &master);
+ if (r != 0) {
+ fprintf(stderr, "yppush: could not get ypservers map\n");
+ exit(1);
+ }
if (hostname != NULL) {
push(strlen(hostname), hostname);