1/* $NetBSD: security.c,v 1.5 2000/06/08 09:01:05 fvdl Exp $ */ |
2/* $FreeBSD: head/usr.sbin/rpcbind/security.c 262860 2014-03-06 17:33:27Z mav $ */ |
3 4#include <sys/types.h> 5#include <sys/time.h> 6#include <sys/socket.h> 7#include <netinet/in.h> 8#include <arpa/inet.h> 9#include <rpc/rpc.h> 10#include <rpc/rpcb_prot.h> --- 92 unchanged lines hidden (view full) --- 103 case RPCBPROC_GETVERSADDR: 104 case RPCBPROC_GETADDRLIST: 105 case RPCBPROC_GETSTAT: 106 default: 107 break; 108 } 109 110#ifdef LIBWRAP |
111 if (libwrap && addr->sa_family != AF_LOCAL) { 112 request_init(&req, RQ_DAEMON, "rpcbind", RQ_CLIENT_SIN, addr, 113 0); 114 sock_methods(&req); 115 if(!hosts_access(&req)) { 116 logit(deny_severity, addr, proc, prog, 117 ": request from unauthorized host"); 118 return 0; 119 } |
120 } 121#endif 122 if (verboselog) 123 logit(log_severity, addr, proc, prog, ""); 124 return 1; 125} 126 127int --- 163 unchanged lines hidden --- |