From bdb44d5fb6c056c07dc2ad478bb50b3756349a8a Mon Sep 17 00:00:00 2001 From: Bill Paul Date: Sun, 26 Mar 1995 03:15:39 +0000 Subject: Stop callbootd from dumping core when attempting to directly query a bootparam server on a host that isn't running bootparamd: if clnt_create() comes back with a NULL pointer, bail out with an error. --- usr.sbin/bootparamd/callbootd/callbootd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr.sbin/bootparamd') diff --git a/usr.sbin/bootparamd/callbootd/callbootd.c b/usr.sbin/bootparamd/callbootd/callbootd.c index 22dbd5a9b115..421bb3cfb06f 100644 --- a/usr.sbin/bootparamd/callbootd/callbootd.c +++ b/usr.sbin/bootparamd/callbootd/callbootd.c @@ -5,7 +5,7 @@ use and modify. Please send modifications and/or suggestions + bug fixes to Klas Heggemann - $Id$ + $Id: callbootd.c,v 1.1.1.1 1995/02/26 23:40:53 wpaul Exp $ */ @@ -90,6 +90,11 @@ char **argv; clnt = clnt_create(server,BOOTPARAMPROG, BOOTPARAMVERS, "udp"); } + if ( clnt == NULL ) { + fprintf (stderr, "%s: could not contact bootparam server on host %s\n", + argv[0], server); + exit (1); + } switch (argc) { case 3: -- cgit v1.3