NetBSD/lib/libwrap/refuse.c

40 lines
909 B
C
Raw Normal View History

2012-03-21 14:10:36 +04:00
/* $NetBSD: refuse.c,v 1.5 2012/03/21 10:10:37 matt Exp $ */
1996-11-26 19:48:08 +03:00
/*
* refuse() reports a refused connection, and takes the consequences: in
* case of a datagram-oriented service, the unread datagram is taken from
* the input queue (or inetd would see the same datagram again and again);
* the program is terminated.
*
1996-11-26 19:48:08 +03:00
* Author: Wietse Venema, Eindhoven University of Technology, The Netherlands.
*/
#include <sys/cdefs.h>
1996-11-26 19:48:08 +03:00
#ifndef lint
#if 0
1996-11-26 19:48:08 +03:00
static char sccsid[] = "@(#) refuse.c 1.5 94/12/28 17:42:39";
#else
2012-03-21 14:10:36 +04:00
__RCSID("$NetBSD: refuse.c,v 1.5 2012/03/21 10:10:37 matt Exp $");
#endif
1996-11-26 19:48:08 +03:00
#endif
/* System libraries. */
#include <stdio.h>
#include <syslog.h>
/* Local stuff. */
#include "tcpd.h"
/* refuse - refuse request */
2012-03-21 14:10:36 +04:00
void
refuse(struct request_info *request)
1996-11-26 19:48:08 +03:00
{
syslog(deny_severity, "refused connect from %s", eval_client(request));
clean_exit(request);
/* NOTREACHED */
}