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.
18 #include "do_author.h" /* for "struct identity" */
22 int allow_severity = LOG_INFO; /* *_severity accessed from libwrap */
23 int deny_severity = LOG_WARNING;
29 /* Define tac_plus name for hosts.* files */
30 #define TACNAME "tac_plus"
33 int check_from_wrap TAC_ARGS((struct identity *datap));
36 check_from_wrap(datap)
37 struct identity *datap;
39 struct request_info req;
41 request_init(&req, RQ_FILE,session.sock,RQ_DAEMON,TACNAME,RQ_CLIENT_ADDR,datap->NAS_name , NULL);
42 fromhost(&req); /* validate client host info */
43 if (!hosts_access(&req))
45 if (debug & DEBUG_AUTHEN_FLAG)
46 report(LOG_DEBUG, "Access denied for NAS=%s",datap->NAS_name);
47 send_authen_error("You are not allowed to access here");
48 refuse(&req); /* If connection is not allowed, clean up and exit. */
52 if (debug & DEBUG_AUTHEN_FLAG )
53 report(LOG_DEBUG, "Access permited for NAS=%s",datap->NAS_name);
58 #else /* TCPWRAPPER */
62 #endif /* TCPWRAPPER */