};
extern void sm_prog_1 (struct svc_req *, register SVCXPRT *);
-extern int statd_get_socket(void);
static void load_state_number(void);
#ifdef SIMULATIONS
static void
sm_prog_1_wrapper (struct svc_req *rqstp, register SVCXPRT *transp)
{
+ struct sockaddr_in *sin = nfs_getrpccaller_in(transp);
+
/* remote host authorization check */
- if (!check_default("statd", svc_getcaller(transp),
- rqstp->rq_proc, SM_PROG)) {
+ if (sin->sin_family == AF_INET &&
+ !check_default("statd", sin, rqstp->rq_proc, SM_PROG)) {
svcerr_auth (transp, AUTH_FAILED);
return;
}
}
/* Make sure we have a privilege port for calling into the kernel */
- statd_get_socket();
+ if (statd_get_socket() < 0)
+ exit(1);
/* If sm-notify didn't take all the state files, load
* state information into our notify-list so we can