diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-03-26 03:15:39 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-03-26 03:15:39 +0000 |
commit | 91aac05da2413bf79364520453818b2c52f8650e (patch) | |
tree | 12eb96b1e4bf0132ca2f2c59d9379e03beab9761 /usr.sbin/bootparamd | |
parent | 41b7559ce7839154774119fd9ea5980ad3bcb88d (diff) | |
download | FreeBSD-src-91aac05da2413bf79364520453818b2c52f8650e.zip FreeBSD-src-91aac05da2413bf79364520453818b2c52f8650e.tar.gz |
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.
Diffstat (limited to 'usr.sbin/bootparamd')
-rw-r--r-- | usr.sbin/bootparamd/callbootd/callbootd.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/bootparamd/callbootd/callbootd.c b/usr.sbin/bootparamd/callbootd/callbootd.c index 22dbd5a..421bb3c 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 <klas@nada.kth.se> - $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: |