refuse.c revision 44743
144743Smarkm /*
244743Smarkm  * refuse() reports a refused connection, and takes the consequences: in
344743Smarkm  * case of a datagram-oriented service, the unread datagram is taken from
444743Smarkm  * the input queue (or inetd would see the same datagram again and again);
544743Smarkm  * the program is terminated.
644743Smarkm  *
744743Smarkm  * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
844743Smarkm  */
944743Smarkm
1044743Smarkm#ifndef lint
1144743Smarkmstatic char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39";
1244743Smarkm#endif
1344743Smarkm
1444743Smarkm/* System libraries. */
1544743Smarkm
1644743Smarkm#include <stdio.h>
1744743Smarkm#include <syslog.h>
1844743Smarkm
1944743Smarkm/* Local stuff. */
2044743Smarkm
2144743Smarkm#include "tcpd.h"
2244743Smarkm
2344743Smarkm/* refuse - refuse request */
2444743Smarkm
2544743Smarkmvoid    refuse(request)
2644743Smarkmstruct request_info *request;
2744743Smarkm{
2844743Smarkm    syslog(deny_severity, "refused connect from %s", eval_client(request));
2944743Smarkm    clean_exit(request);
3044743Smarkm    /* NOTREACHED */
3144743Smarkm}
3244743Smarkm
33