-/* $OpenBSD: inetd.c,v 1.20 1996/08/28 09:55:00 deraadt Exp $ */
+/* $OpenBSD: inetd.c,v 1.21 1996/08/31 17:31:05 deraadt Exp $ */
/* $NetBSD: inetd.c,v 1.11 1996/02/22 11:14:41 mycroft Exp $ */
/*
* Copyright (c) 1983,1991 The Regents of the University of California.
#ifndef lint
/*static char sccsid[] = "from: @(#)inetd.c 5.30 (Berkeley) 6/3/91";*/
-static char rcsid[] = "$OpenBSD: inetd.c,v 1.20 1996/08/28 09:55:00 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: inetd.c,v 1.21 1996/08/31 17:31:05 deraadt Exp $";
#endif /* not lint */
/*
#define RLIMIT_NOFILE RLIMIT_OFILE
#endif
-#define RPC
-
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
-#ifdef RPC
#include <rpc/rpc.h>
#include <rpc/pmap_clnt.h>
-#endif
#include "pathnames.h"
#define TOOMANY 40 /* don't start more than TOOMANY */
rp = getrpcbyname(sep->se_service);
if (rp == 0) {
syslog(LOG_ERR,
- "%s: unknown service",
+ "%s: unknown rpc service",
sep->se_service);
continue;
}
register_rpc(sep)
register struct servtab *sep;
{
-#ifdef RPC
int n;
struct sockaddr_in sin;
struct protoent *pp;
sep->se_rpcprog, n, pp->p_proto,
ntohs(sin.sin_port));
}
-#endif /* RPC */
}
void
unregister_rpc(sep)
register struct servtab *sep;
{
-#ifdef RPC
int n;
for (n = sep->se_rpcversl; n <= sep->se_rpcversh; n++) {
syslog(LOG_ERR, "pmap_unset(%u, %u)\n",
sep->se_rpcprog, n);
}
-#endif /* RPC */
}
} else {
sep->se_family = AF_INET;
if (strncmp(sep->se_proto, "rpc/", 4) == 0) {
-#ifdef RPC
char *cp, *ccp;
cp = strchr(sep->se_service, '/');
if (cp == 0) {
if (ccp == cp)
goto badafterall;
}
-#else
- syslog(LOG_ERR, "%s: rpc services not suported",
- sep->se_service);
- goto more;
-#endif /* RPC */
}
}
arg = skip(&cp);