2 This function use for check access control rules from hosts.deny and
4 Writen by Devrim SERAL<devrim@gazi.edu.tr>. This file protected by
5 GNU Copyright agreement.
11 int allow_severity = LOG_INFO;
12 int deny_severity = LOG_WARNING;
16 check_from_wrap(datap)
17 struct identity *datap;
19 struct request_info req;
21 request_init(&req, RQ_DAEMON,TACNAME,RQ_CLIENT_ADDR,datap->NAS_name , NULL);
22 fromhost(&req); /* validate client host info */
23 if (!hosts_access(&req))
25 if (debug & DEBUG_AUTHEN_FLAG)
26 report(LOG_DEBUG, "Access denied for NAS=%s",datap->NAS_name);
27 send_authen_error("You are not allowed to access here");
28 refuse(&req); /* If connection is not allowed, clean up and exit. */
32 if (debug & DEBUG_AUTHEN_FLAG )
33 report(LOG_DEBUG, "Access permited for NAS=%s",datap->NAS_name);
37 #endif /* TCPWRAPPER */