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.
This commit is contained in:
Andreas Schulz 1994-11-18 22:31:05 +00:00
parent 8fbd0636ed
commit dc2e984f57
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4656

View File

@ -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;