summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorats <ats@FreeBSD.org>1994-11-18 22:31:05 +0000
committerats <ats@FreeBSD.org>1994-11-18 22:31:05 +0000
commit3e9710907d797f0e10c863862166e2557bf585bb (patch)
tree8e529f78581ff1ca197259dcf66418306cc4e8c8 /libexec
parent8950638ff7cd545dbffe70bf93c93ae3e219f87b (diff)
downloadFreeBSD-src-3e9710907d797f0e10c863862166e2557bf585bb.zip
FreeBSD-src-3e9710907d797f0e10c863862166e2557bf585bb.tar.gz
Reviewed by: Roger Holst roger@first.gmd.de
Add an initialization of the len parameter for the getsockname call. Now rpc.rstatd can run under inetd.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rpc.rstatd/rstatd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c
index 3698171..2cbdac7 100644
--- a/libexec/rpc.rstatd/rstatd.c
+++ b/libexec/rpc.rstatd/rstatd.c
@@ -32,7 +32,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: rstatd.c,v 1.1 1993/09/16 00:27:49 jtc Exp $";
+static char rcsid[] = "$Id: rstatd.c,v 1.1.1.1 1994/08/28 14:49:04 csgr Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -73,6 +73,7 @@ main(argc, argv)
/*
* See if inetd started us
*/
+ fromlen = sizeof(from);
if (getsockname(0, (struct sockaddr *)&from, &fromlen) < 0) {
from_inetd = 0;
sock = RPC_ANYSOCK;
OpenPOWER on IntegriCloud