From 3e9710907d797f0e10c863862166e2557bf585bb Mon Sep 17 00:00:00 2001 From: ats Date: Fri, 18 Nov 1994 22:31:05 +0000 Subject: 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. --- libexec/rpc.rstatd/rstatd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libexec/rpc.rstatd/rstatd.c') 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 @@ -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; -- cgit v1.1